22 #ifndef LASTEXPRESS_GRAPHICS_H 23 #define LASTEXPRESS_GRAPHICS_H 25 #include "lastexpress/lastexpress.h" 27 #include "graphics/surface.h" 44 TBM(int32 newX, int32 newY, int32 newWidth, int32 newHeight) {
53 #include "common/pack-start.h" 58 #include "common/pack-end.h" 60 typedef uint16 PixMap;
80 bool acquireSurface();
84 void stepBG(
int sceneIndex);
85 void goStepBG(
int sceneIndex);
86 void stepDissolve(
TBM *tbm);
87 void clear(
Graphics::Surface &surface, int32 x, int32 y, int32 width, int32 height);
88 void clear(PixMap *pixels, int32 x, int32 y, int32 width, int32 height);
89 void copy(PixMap *src, PixMap *dst, int32 x, int32 y, int32 width, int32 height);
90 void goDissolve(int32 location, int32 width, int32 height, PixMap *buffer);
91 void bitBltSprite255(
Sprite *sprite, PixMap *pixels);
92 void bitBltSprite128(
Sprite *sprite, PixMap *pixels);
93 void bitBltSprite32(
Sprite *sprite, PixMap *pixels);
94 void bitBltSprite16(
Sprite *sprite, PixMap *pixels);
95 void bitBltSprite8(
Sprite *sprite, PixMap *pixels);
96 void bitBltWane128(
Sprite *sprite, PixMap *pixels);
97 void bitBltWane32(
Sprite *sprite, PixMap *pixels);
98 void bitBltWane16(
Sprite *sprite, PixMap *pixels);
99 void bitBltWane8(
Sprite *sprite, PixMap *pixels);
100 void bitBltWax128(
Sprite *sprite, PixMap *pixels);
101 void bitBltWax32(
Sprite *sprite, PixMap *pixels);
102 void bitBltWax16(
Sprite *sprite, PixMap *pixels);
103 void bitBltWax8(
Sprite *sprite, PixMap *pixels);
104 void eraseSprite(byte *data);
105 void dissolve(int32 location, int32 width, int32 height, PixMap *buf);
106 void doErase(byte *data);
109 void modifyPalette(uint16 *data, uint32 size);
111 void setGammaLevel(
int level);
112 void initLuminosityValues(int16 rMask, int16 gMask, int16 bMask);
113 void initDecomp(PixMap *data,
TBM *tbm);
114 void decompR(byte *data, int32 size);
115 void decompG(byte *data, int32 size);
116 void decompB(byte *data, int32 size);
117 bool decomp16(byte *data, int32 size);
120 void drawItem(
int cursor, int32 x, int32 y);
121 void drawItemDim(
int cursor, int32 x, int32 y,
int brightness);
126 void burstMouseArea(
bool updateScreen =
true);
127 void burstBox(int32 x, int32 y, int32 width, int32 height,
bool updateScreen =
true);
129 void setMouseDrawable(
bool drawable);
133 PixMap *_frontBuffer =
nullptr;
134 PixMap *_backBuffer =
nullptr;
135 PixMap _mouseBackBuffer[32 * 32];
137 byte *_backgroundCompBuffer =
nullptr;
138 PixMap _subtitlesBackBuffer[36480];
140 bool _mainSurfaceIsInit =
false;
145 int32 _dissolveSteps = 3;
147 bool _luminosityIsInit =
false;
149 uint16 _brightnessData[6] = {
150 0x0000, 0x7BDE, 0x739C,
151 0x6318, 0x4210, 0x0000
154 int16 _brightnessMaskedBits = 0;
155 int16 _brightnessUnmaskedBits = 0;
157 TBM *_bgDecompTargetRect =
nullptr;
158 byte *_bgDecompOutBuffer =
nullptr;
159 byte *_bgDecompOutBufferTemp =
nullptr;
160 int32 _bgDecompFlags = 0;
161 byte _bgLastCompItem = 0;
162 int32 _bgOutChannelDataSizes[3] = { 0, 0, 0 };
165 PixMap *_frameData =
nullptr;
166 PixMap *_decompressedOffset =
nullptr;
169 bool _disableCharacterDrawing =
false;
170 bool _stepBGRecursionFlag =
false;
171 bool _shouldDrawEggOrHourglass =
false;
173 int32 _mouseScreenBufStart = 0;
174 TBM _mouseAreaRect =
TBM(320, 240, 32, 32);
175 bool _canDrawMouse =
false;
178 PixMap *_iconsBitmapData =
nullptr;
179 uint8 _luminosityData[32 * 7] = {
180 0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 31,
181 0, 1, 2, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29, 31,
182 0, 1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 31,
183 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
184 0, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, 28, 28, 29, 30, 31,
185 0, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 29, 30, 31,
186 0, 3, 4, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 23, 24, 25, 26, 27, 27, 28, 29, 30, 30, 31
192 #endif // LASTEXPRESS_GRAPHICS_H
Definition: subtitle.h:57
Definition: lastexpress.h:523
Out copy(In first, In last, Out dst)
Definition: algorithm.h:52
Definition: gold_archive.h:37
Definition: graphics.h:64
Definition: lastexpress.h:159
Definition: graphics.h:31