diff options
author | Arnaud Boutonné | 2010-02-06 08:10:56 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-02-06 08:10:56 +0000 |
commit | 59c351a3b2a10677e061a7a2814179f9bd5b3c9f (patch) | |
tree | 7697f18633950be58967ef3c507e6acb57261cd0 /engines/gob | |
parent | dc12437390d47335395a29b46538efe59c8bfa49 (diff) | |
download | scummvm-rg350-59c351a3b2a10677e061a7a2814179f9bd5b3c9f.tar.gz scummvm-rg350-59c351a3b2a10677e061a7a2814179f9bd5b3c9f.tar.bz2 scummvm-rg350-59c351a3b2a10677e061a7a2814179f9bd5b3c9f.zip |
Fascination: Fix lamp problem in parking lot.
svn-id: r47927
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/inter.h | 7 | ||||
-rw-r--r-- | engines/gob/inter_fascin.cpp | 74 |
2 files changed, 78 insertions, 3 deletions
diff --git a/engines/gob/inter.h b/engines/gob/inter.h index df5e5ccda1..a9b6179e48 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -432,6 +432,9 @@ protected: void oFascin_playProtracker(OpGobParams ¶ms); + bool oFascin_copySprite(OpFuncParams ¶ms); + bool oFascin_keyFunc(OpFuncParams ¶ms); + void oFascin_playTirb(OpGobParams ¶ms); void oFascin_playTira(OpGobParams ¶ms); void oFascin_loadExtasy(OpGobParams ¶ms); @@ -447,8 +450,8 @@ protected: void oFascin_geUnknown1000(OpGobParams ¶ms); void oFascin_geUnknown1001(OpGobParams ¶ms); void oFascin_geUnknown1002(OpGobParams ¶ms); - bool oFascin_feUnknown4(OpFuncParams ¶ms); - bool oFascin_feUnknown27(OpFuncParams ¶ms); +// bool oFascin_feUnknown4(OpFuncParams ¶ms); +// bool oFascin_feUnknown27(OpFuncParams ¶ms); void oFascin_setWinSize(); void oFascin_closeWin(); void oFascin_activeWin(); diff --git a/engines/gob/inter_fascin.cpp b/engines/gob/inter_fascin.cpp index 4319230893..b5d7e6f0ad 100644 --- a/engines/gob/inter_fascin.cpp +++ b/engines/gob/inter_fascin.cpp @@ -25,6 +25,7 @@ #include "common/endian.h" +#include "gob/hotspots.h" #include "gob/gob.h" #include "gob/inter.h" #include "gob/global.h" @@ -85,6 +86,8 @@ void Inter_Fascination::setupOpcodesFunc() { Inter_v2::setupOpcodesFunc(); OPCODEFUNC(0x09, o1_assign); + OPCODEFUNC(0x14, oFascin_keyFunc); + OPCODEFUNC(0x32, oFascin_copySprite); } void Inter_Fascination::setupOpcodesGob() { @@ -108,6 +111,74 @@ void Inter_Fascination::setupOpcodesGob() { OPCODEGOB(1002, oFascin_geUnknown1002); //to be replaced by o2_stopProtracker when protrackerPlay is fixed } + +bool Inter_Fascination::oFascin_copySprite(OpFuncParams ¶ms) { + _vm->_draw->_sourceSurface = _vm->_game->_script->readInt16(); + _vm->_draw->_destSurface = _vm->_game->_script->readInt16(); + _vm->_draw->_spriteLeft = _vm->_game->_script->readValExpr(); + _vm->_draw->_spriteTop = _vm->_game->_script->readValExpr(); + _vm->_draw->_spriteRight = _vm->_game->_script->readValExpr(); + _vm->_draw->_spriteBottom = _vm->_game->_script->readValExpr(); + + _vm->_draw->_destSpriteX = _vm->_game->_script->readValExpr(); + _vm->_draw->_destSpriteY = _vm->_game->_script->readValExpr(); + + _vm->_draw->_transparency = _vm->_game->_script->readInt16(); + + _vm->_draw->spriteOperation(DRAW_BLITSURF); + return false; +} + +bool Inter_Fascination::oFascin_keyFunc(OpFuncParams ¶ms) { + static uint32 lastCalled = 0; + int16 cmd; + int16 key; + uint32 now; + + cmd = _vm->_game->_script->readInt16(); + animPalette(); + _vm->_draw->blitInvalidated(); + + now = _vm->_util->getTimeKey(); + if (!_noBusyWait) + if ((now - lastCalled) <= 20) + _vm->_util->longDelay(1); + lastCalled = now; + _noBusyWait = false; + + switch (cmd) { + case 0: + key = _vm->_game->_hotspots->check(0, 0); + storeKey(key); + + _vm->_util->clearKeyBuf(); + break; + + case 1: + key = _vm->_game->checkKeys(&_vm->_global->_inter_mouseX, + &_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons, 0); + storeKey(key); + break; + + case 2: +// _vm->_util->processInput(true); +// key = _vm->_util->checkKey(); +// WRITE_VAR(0, key); +// _vm->_util->clearKeyBuf(); + _vm->_util->delay(cmd); + break; + + default: + _vm->_util->processInput(true); + key = _vm->_util->checkKey(); + WRITE_VAR(0, key); + _vm->_util->clearKeyBuf(); + break; + } + + return false; +} + void Inter_Fascination::oFascin_playTirb(OpGobParams ¶ms) { warning("funcPlayImd with parameter : 'tirb.imd'"); @@ -187,6 +258,7 @@ void Inter_Fascination::oFascin_geUnknown1002(OpGobParams ¶ms) { warning("Fascination o2_stopProtracker - Commented out"); } +/* bool Inter_Fascination::oFascin_feUnknown4(OpFuncParams ¶ms) { warning("Fascination Unknown FE Function 4"); return true; @@ -196,6 +268,7 @@ bool Inter_Fascination::oFascin_feUnknown27(OpFuncParams ¶ms) { warning("Fascination Unknown FE Function 27h"); return true; } +*/ void Inter_Fascination::oFascin_setWinSize() { _vm->_draw->_winMaxWidth = _vm->_game->_script->readUint16(); @@ -244,5 +317,4 @@ void Inter_Fascination::oFascin_setWinFlags() { void Inter_Fascination::oFascin_playProtracker(OpGobParams ¶ms) { _vm->_sound->protrackerPlay("mod.extasy"); } - } // End of namespace Gob |