aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-04 05:20:56 +0000
committerMartin Kiewitz2009-10-04 05:20:56 +0000
commit10d70ec742f8b109257db2be7b0efaafeee9cb3a (patch)
tree9d642b692903bfd98ec38ce839ea367b340d119e
parentb6d7da6927d7fa3bfb0fd8a48330c6d876e61d53 (diff)
downloadscummvm-rg350-10d70ec742f8b109257db2be7b0efaafeee9cb3a.tar.gz
scummvm-rg350-10d70ec742f8b109257db2be7b0efaafeee9cb3a.tar.bz2
scummvm-rg350-10d70ec742f8b109257db2be7b0efaafeee9cb3a.zip
SCI/newgui: cleanup
svn-id: r44584
-rw-r--r--engines/sci/gui/gui_screen.cpp6
-rw-r--r--engines/sci/gui/gui_view.cpp4
2 files changed, 4 insertions, 6 deletions
diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp
index 9f4a9e6ce2..0f8b2e4dc1 100644
--- a/engines/sci/gui/gui_screen.cpp
+++ b/engines/sci/gui/gui_screen.cpp
@@ -163,12 +163,11 @@ void SciGUIscreen::BitsSave(Common::Rect rect, byte mask, byte *memoryPtr) {
void SciGUIscreen::BitsSaveScreen(Common::Rect rect, byte *screen, byte *&memoryPtr) {
int width = rect.width();
- int height = rect.height();
int y;
screen += (rect.top * _width) + rect.left;
- for (y=rect.top; y<rect.bottom; y++) {
+ for (y = rect.top; y < rect.bottom; y++) {
memcpy(memoryPtr, (void*)screen, width); memoryPtr += width;
screen += _width;
}
@@ -195,12 +194,11 @@ void SciGUIscreen::BitsRestore(byte *memoryPtr) {
void SciGUIscreen::BitsRestoreScreen(Common::Rect rect, byte *&memoryPtr, byte *screen) {
int width = rect.width();
- int height = rect.height();
int y;
screen += (rect.top * _width) + rect.left;
- for (y=rect.top; y<rect.bottom; y++) {
+ for (y = rect.top; y < rect.bottom; y++) {
memcpy((void*) screen, memoryPtr, width); memoryPtr += width;
screen += _width;
}
diff --git a/engines/sci/gui/gui_view.cpp b/engines/sci/gui/gui_view.cpp
index 0dacfb37d6..caa884b83c 100644
--- a/engines/sci/gui/gui_view.cpp
+++ b/engines/sci/gui/gui_view.cpp
@@ -74,7 +74,7 @@ void SciGUIview::initData(sciResourceId resourceId) {
palOffset = READ_LE_UINT16(_resourceData + 6);
if (palOffset && palOffset != 0x100) {
- _gfx->CreatePaletteFromData(_resourceData + palOffset, &_palette);
+ _gfx->CreatePaletteFromData(&_resourceData[palOffset], &_palette);
_embeddedPal = true;
}
@@ -121,7 +121,7 @@ void SciGUIview::initData(sciResourceId resourceId) {
cellSize = _resourceData[13];
if (palOffset) {
- _gfx->CreatePaletteFromData(_resourceData + palOffset, &_palette);
+ _gfx->CreatePaletteFromData(&_resourceData[palOffset], &_palette);
_embeddedPal = true;
}