aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/vga13h.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cge/vga13h.cpp')
-rw-r--r--engines/cge/vga13h.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 56a0754527..4954e638ab 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -214,8 +214,7 @@ Sprite *Sprite::expand() {
for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
len = line.size();
- assert(len <= 513);
- strcpy(tmpStr, line.c_str());
+ Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
lcnt++;
if (len == 0 || *tmpStr == '.')
continue;
@@ -826,7 +825,7 @@ void Vga::update() {
}
}
- g_system->copyRectToScreen(Vga::_page[0]->getBasePtr(0, 0), kScrWidth, 0, 0, kScrWidth, kScrHeight);
+ g_system->copyRectToScreen(Vga::_page[0]->getPixels(), kScrWidth, 0, 0, kScrWidth, kScrHeight);
g_system->updateScreen();
}
@@ -845,7 +844,7 @@ void Bitmap::xShow(int16 x, int16 y) {
debugC(4, kCGEDebugBitmap, "Bitmap::xShow(%d, %d)", x, y);
const byte *srcP = (const byte *)_v;
- byte *destEndP = (byte *)_vm->_vga->_page[1]->pixels + (kScrWidth * kScrHeight);
+ byte *destEndP = (byte *)_vm->_vga->_page[1]->getBasePtr(0, kScrHeight);
byte *lookupTable = _m;
// Loop through processing data for each plane. The game originally ran in plane mapped mode, where a
@@ -898,7 +897,7 @@ void Bitmap::show(int16 x, int16 y) {
debugC(5, kCGEDebugBitmap, "Bitmap::show(%d, %d)", x, y);
const byte *srcP = (const byte *)_v;
- byte *destEndP = (byte *)_vm->_vga->_page[1]->pixels + (kScrWidth * kScrHeight);
+ byte *destEndP = (byte *)_vm->_vga->_page[1]->getBasePtr(0, kScrHeight);
// Loop through processing data for each plane. The game originally ran in plane mapped mode, where a
// given plane holds each fourth pixel sequentially. So to handle an entire picture, each plane's data