mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
Playtoons - Add new freeSprite function for Playtoons & Bambou. This fixes the crash that occurred when exiting the game.
svn-id: r43783
This commit is contained in:
parent
42848e1276
commit
af3e23b291
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user