diff options
-rw-r--r-- | engines/gob/inter.h | 2 | ||||
-rw-r--r-- | engines/gob/inter_v7.cpp | 13 |
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() { |