diff options
author | Bendegúz Nagy | 2016-06-19 11:47:22 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 0597fdc6584f806f9dcae69c2456464014227908 (patch) | |
tree | 64b1062782dc6b02ecd808516a579fca605a58bc | |
parent | 472778a06e141188dd157fd088873279970608db (diff) | |
download | scummvm-rg350-0597fdc6584f806f9dcae69c2456464014227908.tar.gz scummvm-rg350-0597fdc6584f806f9dcae69c2456464014227908.tar.bz2 scummvm-rg350-0597fdc6584f806f9dcae69c2456464014227908.zip |
DM: Add D24_FillScreenBox
-rw-r--r-- | engines/dm/gfx.cpp | 6 | ||||
-rw-r--r-- | engines/dm/gfx.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 790c055784..ea05f44b76 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -1500,3 +1500,9 @@ void DisplayMan::blitToBitmapShrinkWithPalChange(byte *srcBitmap, int16 srcWidth byte* DisplayMan::getBitmap(uint16 index) { return _bitmaps[index]; } + +void DisplayMan::clearScreenBox(Color color, Box &box) { + uint16 width = box._x2 - box._x1; + for (int y = box._y1; y < box._y2; ++y) + memset(_vgaBuffer + y * _screenWidth + box._x1, color, sizeof(byte) * width); +} diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index 86a152af9c..749d4874fb 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -286,6 +286,7 @@ public: void clearBitmap(byte *bitmap, uint16 width, uint16 height, Color color); void clearScreen(Color color); + void clearScreenBox(Color color, Box &box); // @ D24_FillScreenBox void drawDungeon(direction dir, int16 posX, int16 posY); // @ F0128_DUNGEONVIEW_Draw_CPSF void updateScreen(); byte* getBitmap(uint16 index); |