[Scummvm-cvs-logs] SF.net SVN: scummvm:[43783] scummvm/trunk/engines/gob

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Fri Aug 28 23:08:59 CEST 2009


Revision: 43783
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43783&view=rev
Author:   strangerke
Date:     2009-08-28 21:08:59 +0000 (Fri, 28 Aug 2009)

Log Message:
-----------
Playtoons - Add new freeSprite function for Playtoons & Bambou. This fixes the crash that occurred when exiting the game.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter.h
    scummvm/trunk/engines/gob/inter_playtoons.cpp

Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h	2009-08-28 19:28:54 UTC (rev 43782)
+++ scummvm/trunk/engines/gob/inter.h	2009-08-28 21:08:59 UTC (rev 43783)
@@ -558,6 +558,7 @@
 	virtual void setupOpcodesGob();
 
 	bool oPlaytoons_F_1B(OpFuncParams &params);
+	bool oPlaytoons_freeSprite(OpFuncParams &params);
 	bool oPlaytoons_checkData(OpFuncParams &params);
 	bool oPlaytoons_readData(OpFuncParams &params);
 	void oPlaytoons_CD_20_23();

Modified: scummvm/trunk/engines/gob/inter_playtoons.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_playtoons.cpp	2009-08-28 19:28:54 UTC (rev 43782)
+++ scummvm/trunk/engines/gob/inter_playtoons.cpp	2009-08-28 21:08:59 UTC (rev 43783)
@@ -82,7 +82,8 @@
 
 	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 @@
 	return false;
 }
 
+bool Inter_Playtoons::oPlaytoons_freeSprite(OpFuncParams &params) {
+	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 &params) {
 	int16 handle;
 	uint16 varOff;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list