Skip to content

Commit

Permalink
DM: Add D24_FillScreenBox
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent 472778a commit 0597fdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engines/dm/gfx.cpp
Expand Up @@ -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);
}
1 change: 1 addition & 0 deletions engines/dm/gfx.h
Expand Up @@ -286,6 +286,7 @@ class DisplayMan {

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);
Expand Down

0 comments on commit 0597fdc

Please sign in to comment.