diff options
author | Arnaud Boutonné | 2009-08-28 21:08:59 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2009-08-28 21:08:59 +0000 |
commit | af3e23b291a6c0cc9065f3a14328f682772b5ccb (patch) | |
tree | ead66b7631423df69323e6d8deec08f8070d4ffe /engines | |
parent | 42848e1276543d5da38a15c19c4a9d1cab9ee450 (diff) | |
download | scummvm-rg350-af3e23b291a6c0cc9065f3a14328f682772b5ccb.tar.gz scummvm-rg350-af3e23b291a6c0cc9065f3a14328f682772b5ccb.tar.bz2 scummvm-rg350-af3e23b291a6c0cc9065f3a14328f682772b5ccb.zip |
Playtoons - Add new freeSprite function for Playtoons & Bambou. This fixes the crash that occurred when exiting the game.
svn-id: r43783
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/inter.h | 1 | ||||
-rw-r--r-- | engines/gob/inter_playtoons.cpp | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/engines/gob/inter.h b/engines/gob/inter.h index df65e309cd..c8d1ce2998 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -558,6 +558,7 @@ protected: virtual void setupOpcodesGob(); bool oPlaytoons_F_1B(OpFuncParams ¶ms); + bool oPlaytoons_freeSprite(OpFuncParams ¶ms); bool oPlaytoons_checkData(OpFuncParams ¶ms); bool oPlaytoons_readData(OpFuncParams ¶ms); void oPlaytoons_CD_20_23(); diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index a62f05a8f2..2c14e64a57 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -82,7 +82,8 @@ void Inter_Playtoons::setupOpcodesFunc() { CLEAROPCODEFUNC(0x3D); - OPCODEFUNC(0x1B, oPlaytoons_F_1B); + OPCODEFUNC(0x1B, oPlaytoons_F_1B); + OPCODEFUNC(0x27, oPlaytoons_freeSprite); OPCODEFUNC(0x3F, oPlaytoons_checkData); OPCODEFUNC(0x4D, oPlaytoons_readData); } @@ -113,6 +114,16 @@ bool Inter_Playtoons::oPlaytoons_F_1B(OpFuncParams ¶ms) { return false; } +bool Inter_Playtoons::oPlaytoons_freeSprite(OpFuncParams ¶ms) { + int16 index; + if (_vm->_game->_script->peekByte(1) == 0) + index = _vm->_game->_script->readInt16(); + else + index = _vm->_game->_script->readValExpr(); + _vm->_draw->freeSprite(index); + return false; +} + bool Inter_Playtoons::oPlaytoons_checkData(OpFuncParams ¶ms) { int16 handle; uint16 varOff; |