[Scummvm-cvs-logs] SF.net SVN: scummvm: [31909] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed May 7 00:05:26 CEST 2008
Revision: 31909
http://scummvm.svn.sourceforge.net/scummvm/?rev=31909&view=rev
Author: lordhoto
Date: 2008-05-06 15:05:26 -0700 (Tue, 06 May 2008)
Log Message:
-----------
Fixed crash when qutting kyra2 main menu.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_hof.cpp
scummvm/trunk/engines/kyra/kyra_hof.h
Modified: scummvm/trunk/engines/kyra/kyra_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_hof.cpp 2008-05-06 21:56:16 UTC (rev 31908)
+++ scummvm/trunk/engines/kyra/kyra_hof.cpp 2008-05-06 22:05:26 UTC (rev 31909)
@@ -56,7 +56,6 @@
};
KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _hofEngineDesc), _updateFunctor(this, &KyraEngine_HoF::update) {
- _mouseSHPBuf = 0;
_screen = 0;
_text = 0;
@@ -151,7 +150,6 @@
cleanup();
seq_uninit();
- delete [] _mouseSHPBuf;
delete _screen;
delete _text;
delete _gui;
@@ -223,11 +221,14 @@
if (_flags.isDemo && !_flags.isTalkie)
return 0;
- _mouseSHPBuf = _res->fileData("PWGMOUSE.SHP", 0);
- assert(_mouseSHPBuf);
+ _res->exists("PWGMOUSE.SHP", true);
+ uint8 *shapes = _res->fileData("PWGMOUSE.SHP", 0);
+ assert(shapes);
for (int i = 0; i < 2; i++)
- addShapeToPool(_screen->getPtrToShape(_mouseSHPBuf, i), i);
+ addShapeToPool(shapes, i, i);
+
+ delete[] shapes;
_screen->setMouseCursor(0, 0, getShapePtr(0));
return 0;
@@ -285,10 +286,7 @@
allocAnimObjects(1, 10, 30);
_screen->_curPage = 0;
- delete [] _mouseSHPBuf;
- _mouseSHPBuf = 0;
- _gameShapes.clear();
memset(_sceneShapeTable, 0, sizeof(_sceneShapeTable));
_gamePlayBuffer = new uint8[46080];
_unkBuf500Bytes = new uint8[500];
Modified: scummvm/trunk/engines/kyra/kyra_hof.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_hof.h 2008-05-06 21:56:16 UTC (rev 31908)
+++ scummvm/trunk/engines/kyra/kyra_hof.h 2008-05-06 22:05:26 UTC (rev 31909)
@@ -291,8 +291,6 @@
TextDisplayer_HoF *_text;
TIMInterpreter *_tim;
- uint8 *_mouseSHPBuf;
-
static const int8 _dosTrackMap[];
static const int _dosTrackMapSize;
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