27 #include "common/rect.h" 28 #include "graphics/surface.h" 57 s.
left += destPoint.
x;
60 s.bottom += destPoint.
y;
68 drawSource.
x = s.
left - sourceRect.
left - destPoint.
x;
69 drawSource.
y = s.top - sourceRect.top - destPoint.
y;
72 drawWidth = s.
width();
79 #include "common/pack-start.h" 87 #include "common/pack-end.h" 98 void transitionDissolve(
const byte *sourceBuffer,
const Common::Rect &sourceRect,
int flags,
double percent);
100 void drawPolyLine(
const Point *points,
int count,
int color);
101 void blit(
const Common::Rect &destRect,
const byte *sourceBuffer);
104 rect.
left = rect.top = 0;
109 void drawRect(
const Common::Rect &destRect,
int color) {
114 fillRect(rect, color);
127 #define PAL_ENTRIES 256 131 #define CURSOR_PC98_W 16 132 #define CURSOR_PC98_H 16 134 #define CURSOR_ORIGIN_X 4 135 #define CURSOR_ORIGIN_Y 4 137 bool hitTestPoly(
const Point *points,
unsigned int npoints,
const Point& test_point);
147 void setPalette(
const PalEntry *pal,
bool full =
false);
148 void loadECSExtraPalettes();
149 void setPaletteColor(
int n,
int r,
int g,
int b);
150 void getCurrentPal(
PalEntry *src_pal);
151 void savePalette() { getCurrentPal(_savedPalette); }
152 void restorePalette() { setPalette(_savedPalette,
true); }
153 void palToBlack(
PalEntry *src_pal,
double percent);
154 void blackToPal(
PalEntry *src_pal,
double percent);
155 void palFade(
PalEntry *srcPal, int16 from, int16 to, int16 start, int16 numColors,
double percent);
156 void showCursor(
bool state);
157 void setCursor(CursorType cursorType = kCursorNormal);
169 void fillRect(
const Common::Rect &destRect, uint32 color);
172 void drawRegion(
const Common::Rect &destRect,
const byte *sourceBuffer);
175 void drawBgRegion(
const Common::Rect &destRect,
const byte *sourceBuffer);
179 _backBuffer.drawPalette();
185 void hLine(
int x,
int y,
int x2, uint32 color) {
186 _backBuffer.hLine(x, y, x2, color);
188 _sjisBackBuffer.clearRect2x(
Common::Rect(x, y, x2, y + 1));
194 void vLine(
int x,
int y,
int y2, uint32 color) {
195 _backBuffer.vLine(x, y, y2, color);
197 _sjisBackBuffer.clearRect2x(
Common::Rect(x, y, x + 1, y2));
203 void setPixelColor(
int x,
int y, byte color) {
204 ((byte *)_backBuffer.getBasePtr(x, y))[0] = color;
206 if (_sjisBackBuffer.getPixels()) {
207 *((uint16 *)_sjisBackBuffer.getBasePtr(x << 1, y << 1)) = 0;
208 *((uint16 *)_sjisBackBuffer.getBasePtr(x << 1, (y << 1) + 1)) = 0;
215 void drawPolyLine(
const Common::Point *points,
int count,
int color) {
216 _backBuffer.drawPolyLine(points, count, color);
222 byte *getBackBufferPixels() {
223 return (byte *)_backBuffer.getPixels();
227 byte *getSJISBackBufferPixels() {
228 return (byte *)_sjisBackBuffer.getPixels();
235 return _sjisBackBuffer;
238 uint16 getBackBufferWidth() {
239 return _backBuffer.
w;
242 uint16 getSJISBackBufferWidth() {
243 return _sjisBackBuffer.w;
246 uint16 getBackBufferHeight() {
247 return _backBuffer.h;
250 uint16 getSJISBackBufferHeight() {
251 return _sjisBackBuffer.h;
254 uint16 getBackBufferPitch() {
255 return _backBuffer.pitch;
258 uint16 getSJISBackBufferPitch() {
259 return _sjisBackBuffer.pitch;
263 _backBuffer.getRect(rect);
269 byte _currentPal[PAL_ENTRIES * 3];
273 PalEntry _globalPalette[PAL_ENTRIES];
274 PalEntry _savedPalette[PAL_ENTRIES];
int16 right
Definition: rect.h:146
int16 width() const
Definition: rect.h:191
int16 left
Definition: rect.h:145
int16 x
Definition: rect.h:46
bool isValidRect() const
Definition: rect.h:337
int16 y
Definition: rect.h:47
int16 w
Definition: surface.h:71
void clip(const Rect &r)
Definition: rect.h:300
int16 height() const
Definition: rect.h:192