aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2011-02-02 16:50:23 +0000
committerSven Hesse2011-02-02 16:50:23 +0000
commit729be647a03970710d8dc15f3105f581abb4bb27 (patch)
tree2ed12b6d89bb59ad4b0132d4cdf6ace136b84f16 /engines
parentb9b7b449b90f4bdb1a3ef5bd3166cb74574c6682 (diff)
downloadscummvm-rg350-729be647a03970710d8dc15f3105f581abb4bb27.tar.gz
scummvm-rg350-729be647a03970710d8dc15f3105f581abb4bb27.tar.bz2
scummvm-rg350-729be647a03970710d8dc15f3105f581abb4bb27.zip
GOB: o7_draw0xA4 is o7_loadLBMPalette
Stubbing that one for now. svn-id: r55731
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/inter.h2
-rw-r--r--engines/gob/inter_v7.cpp13
2 files changed, 9 insertions, 6 deletions
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 38ef872983..bd060b951a 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -617,7 +617,7 @@ protected:
void o7_zeroVar();
void o7_getINIValue();
void o7_setINIValue();
- void o7_draw0xA4();
+ void o7_loadLBMPalette();
void o7_opendBase();
void o7_closedBase();
void o7_getDBString();
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index e2668dff6a..65afbd998b 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -67,7 +67,7 @@ void Inter_v7::setupOpcodesDraw() {
OPCODEDRAW(0x95, o7_zeroVar);
OPCODEDRAW(0xA1, o7_getINIValue);
OPCODEDRAW(0xA2, o7_setINIValue);
- OPCODEDRAW(0xA4, o7_draw0xA4);
+ OPCODEDRAW(0xA4, o7_loadLBMPalette);
OPCODEDRAW(0xC4, o7_opendBase);
OPCODEDRAW(0xC5, o7_closedBase);
OPCODEDRAW(0xC6, o7_getDBString);
@@ -431,15 +431,18 @@ void Inter_v7::o7_setINIValue() {
_inis.setValue(file, section, key, value);
}
-void Inter_v7::o7_draw0xA4() {
+void Inter_v7::o7_loadLBMPalette() {
Common::String file = _vm->_game->_script->evalString();
if (!file.contains('.'))
file += ".LBM";
- int16 expr0 = _vm->_game->_script->readValExpr();
- int16 expr1 = _vm->_game->_script->readValExpr();
+ int16 startIndex = CLIP<int16>(_vm->_game->_script->readValExpr(), 0, 255);
+ int16 stopIndex = CLIP<int16>(_vm->_game->_script->readValExpr(), 0, 255);
- warning("Addy Stub Draw 0xA4: \"%s\", %d, %d", file.c_str(), expr0, expr1);
+ if (startIndex > stopIndex)
+ SWAP(startIndex, stopIndex);
+
+ warning("Addy Stub: Load LBM palette: \"%s\", %d-%d", file.c_str(), startIndex, stopIndex);
}
void Inter_v7::o7_opendBase() {