From 1f0832b4f2ebb9abf798ea5c31ea16275e316d11 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 2 Aug 2013 23:16:36 +0200 Subject: CGE: Prefer getBasePtr over direct Surface::pixels access. --- engines/cge/cge_main.cpp | 2 +- engines/cge/vga13h.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') 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 -- cgit v1.2.3