aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-02 23:16:36 +0200
committerJohannes Schickel2013-08-03 02:52:32 +0200
commit1f0832b4f2ebb9abf798ea5c31ea16275e316d11 (patch)
treecefa201afc42e24cdd4fcb9f338543e683da01c4 /engines/cge
parent28b74b14ec5444d9f2558c05cea67f3567322b51 (diff)
downloadscummvm-rg350-1f0832b4f2ebb9abf798ea5c31ea16275e316d11.tar.gz
scummvm-rg350-1f0832b4f2ebb9abf798ea5c31ea16275e316d11.tar.bz2
scummvm-rg350-1f0832b4f2ebb9abf798ea5c31ea16275e316d11.zip
CGE: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/cge_main.cpp2
-rw-r--r--engines/cge/vga13h.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index f4f1cd3e0b..c6c7acd1f5 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -358,7 +358,7 @@ void CGEEngine::writeSavegameHeader(Common::OutSaveFile *out, SavegameHeader &he
// Create a thumbnail and save it
Graphics::Surface *thumb = new Graphics::Surface();
Graphics::Surface *s = _vga->_page[0];
- ::createThumbnail(thumb, (const byte *)s->pixels, kScrWidth, kScrHeight, thumbPalette);
+ ::createThumbnail(thumb, (const byte *)s->getBasePtr(0, 0), kScrWidth, kScrHeight, thumbPalette);
Graphics::saveThumbnail(*out, *thumb);
thumb->free();
delete thumb;
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 56a0754527..ddcbcea47c 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -845,7 +845,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 +898,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