22 #ifndef SLUDGE_GRAPHICS_H 23 #define SLUDGE_GRAPHICS_H 25 #include "sludge/sprbanks.h" 28 class SeekableReadStream;
39 struct FrozenStuffStruct;
40 struct LoadedSpriteBank;
41 struct OnScreenPerson;
48 LIGHTMAPMODE_NONE = -1,
59 uint16 fileNum, fractionX, fractionY;
73 void setWindowSize(uint winWidth, uint winHeight) { _winWidth = winWidth; _winHeight = winHeight; }
79 bool loadParallax(uint16 v, uint16 fracX, uint16 fracY);
85 void killAllBackDrop();
86 bool resizeBackdrop(
int x,
int y);
87 bool killResizeBackdrop(
int x,
int y);
89 void loadBackDrop(
int fileNum,
int x,
int y);
90 void mixBackDrop(
int fileNum,
int x,
int y);
92 void blankScreen(
int x1,
int y1,
int x2,
int y2);
93 void blankAllScreen();
98 void drawLine(uint, uint, uint, uint);
99 void drawHorizontalLine(uint, uint, uint);
100 void drawVerticalLine(uint, uint, uint);
101 void hardScroll(
int distance);
109 bool loadLightMap(
int v);
120 int getCamX() {
return _cameraX; }
121 int getCamY() {
return _cameraY; }
122 float getCamZoom() {
return _cameraZoom; }
123 void aimCamera(
int cameraX,
int cameraY);
124 void zoomCamera(
int z);
127 int getCenterX(
int width) {
return (_winWidth - width) >> 1; }
128 int checkSizeValide(
int width,
int height) {
return ((width >= 0) && (height >= 0) && (width < (
int)_winWidth) && (height < (
int)_winHeight)); }
132 void unfreeze(
bool killImage =
true);
134 bool isFrozen() {
return (_frozenStuff !=
nullptr); }
137 static void forgetSpriteBank(
SpriteBank &forgetme);
138 bool loadSpriteBank(
char *filename,
SpriteBank &loadhere);
139 bool loadSpriteBank(
int fileNum,
SpriteBank &loadhere,
bool isFont);
155 bool setZBuffer(
int y);
157 void drawZBuffer(
int x,
int y,
bool upsidedown);
161 void drawSpriteToZBuffer(
int x,
int y, uint8 depth,
const Graphics::Surface &surface);
162 void fillZBuffer(uint8 d);
165 void setBlankColor(
int r,
int g,
int b) { _currentBlankColour = _renderSurface.format.RGBToColor(r & 255, g & 255, b & 255);};
166 void setBurnColor(
int r,
int g,
int b) {
175 bool setThumbnailSize(
int thumbWidth,
int thumbHeight);
181 void setBrightnessLevel(
int brightnessLevel);
182 void setFadeMode(
int fadeMode) { _fadeMode = fadeMode; };
183 void fixBrightness();
185 void reserveTransitionTexture();
187 void transitionFader();
188 void transitionDisolve();
190 void transitionBlinds();
191 void transitionSnapshotBox();
192 void transitionCrossFader();
198 bool blur_createSettings(
int numParams,
VariableStack *&stack);
200 uint getWinWidth() {
return _winWidth; }
201 uint getWinHeight() {
return _winHeight; }
206 uint _winWidth, _winHeight, _sceneWidth, _sceneHeight;
212 uint8 *_zBufferSurface =
nullptr;
223 int _cameraX, _cameraY;
228 void freezeGraphics();
233 bool _backdropExists;
234 bool reserveBackdrop();
239 void blendColor(
Graphics::Surface * surface, uint32 color, Graphics::TSpriteBlendMode mode);
247 void sortZPal(
int *oldpal,
int *newpal,
int size);
250 uint _currentBlankColour;
251 byte _currentBurnR, _currentBurnG, _currentBurnB;
258 byte _brightnessLevel;
263 uint32 _randbuffer[RANDKK][2];
264 int _randp1, _randp2;
268 ParallaxLayers *_parallaxLayers;
270 inline int sortOutPCamera(
int cX,
int fX,
int sceneMax,
int boxMax) {
271 return (fX == 65535) ? (sceneMax ? ((cX * boxMax) / sceneMax) : 0) : ((cX * fX) / 100);
278 #endif // SLUDGE_GRAPHICS_H Definition: managed_surface.h:51
Definition: variable.h:132
bool saveThumbnail(Common::WriteStream &out)
Definition: variable.h:60
Definition: graphics.h:64
Definition: algorithm.h:29
bool skipThumbnail(Common::SeekableReadStream &in)
Definition: sprbanks.h:28
Definition: graphics.h:55