equal
deleted
inserted
replaced
113 } |
113 } |
114 |
114 |
115 |
115 |
116 void GfxFillRect(int left, int top, int right, int bottom, int color) |
116 void GfxFillRect(int left, int top, int right, int bottom, int color) |
117 { |
117 { |
118 DrawPixelInfo *dpi = _cur_dpi; |
118 const DrawPixelInfo* dpi = _cur_dpi; |
119 Pixel *dst; |
119 Pixel *dst; |
120 const int otop = top; |
120 const int otop = top; |
121 const int oleft = left; |
121 const int oleft = left; |
122 |
122 |
123 if (dpi->zoom != 0) return; |
123 if (dpi->zoom != 0) return; |
165 } |
165 } |
166 } |
166 } |
167 |
167 |
168 static void GfxSetPixel(int x, int y, int color) |
168 static void GfxSetPixel(int x, int y, int color) |
169 { |
169 { |
170 DrawPixelInfo *dpi = _cur_dpi; |
170 const DrawPixelInfo* dpi = _cur_dpi; |
171 if ((x-=dpi->left) < 0 || x>=dpi->width || (y-=dpi->top)<0 || y>=dpi->height) |
171 if ((x-=dpi->left) < 0 || x>=dpi->width || (y-=dpi->top)<0 || y>=dpi->height) |
172 return; |
172 return; |
173 dpi->dst_ptr[y * dpi->pitch + x] = color; |
173 dpi->dst_ptr[y * dpi->pitch + x] = color; |
174 } |
174 } |
175 |
175 |
424 else if (c == ASCII_BIGFONT) base = 448; |
424 else if (c == ASCII_BIGFONT) base = 448; |
425 } |
425 } |
426 } |
426 } |
427 |
427 |
428 num++; |
428 num++; |
429 str[-1] = 0; |
429 str[-1] = '\0'; |
430 } |
430 } |
431 } |
431 } |
432 |
432 |
433 void DrawStringMultiCenter(int x, int y, uint16 str, int maxw) |
433 void DrawStringMultiCenter(int x, int y, uint16 str, int maxw) |
434 { |
434 { |
1359 |
1359 |
1360 typedef void (*BlitZoomFunc)(BlitterParams *bp); |
1360 typedef void (*BlitZoomFunc)(BlitterParams *bp); |
1361 |
1361 |
1362 static void GfxMainBlitter(const Sprite* sprite, int x, int y, int mode) |
1362 static void GfxMainBlitter(const Sprite* sprite, int x, int y, int mode) |
1363 { |
1363 { |
1364 DrawPixelInfo *dpi = _cur_dpi; |
1364 const DrawPixelInfo* dpi = _cur_dpi; |
1365 int start_x, start_y; |
1365 int start_x, start_y; |
1366 byte info; |
1366 byte info; |
1367 BlitterParams bp; |
1367 BlitterParams bp; |
1368 int zoom_mask = ~((1 << dpi->zoom) - 1); |
1368 int zoom_mask = ~((1 << dpi->zoom) - 1); |
1369 |
1369 |
1869 void MarkWholeScreenDirty(void) |
1869 void MarkWholeScreenDirty(void) |
1870 { |
1870 { |
1871 SetDirtyBlocks(0, 0, _screen.width, _screen.height); |
1871 SetDirtyBlocks(0, 0, _screen.width, _screen.height); |
1872 } |
1872 } |
1873 |
1873 |
1874 bool FillDrawPixelInfo(DrawPixelInfo *n, DrawPixelInfo *o, int left, int top, int width, int height) |
1874 bool FillDrawPixelInfo(DrawPixelInfo* n, const DrawPixelInfo* o, int left, int top, int width, int height) |
1875 { |
1875 { |
1876 int t; |
1876 int t; |
1877 |
1877 |
1878 if (o == NULL) o = _cur_dpi; |
1878 if (o == NULL) o = _cur_dpi; |
1879 |
1879 |