[Scummvm-cvs-logs] SF.net SVN: scummvm:[34224] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Aug 31 12:43:33 CEST 2008
Revision: 34224
http://scummvm.svn.sourceforge.net/scummvm/?rev=34224&view=rev
Author: peres001
Date: 2008-08-31 10:43:32 +0000 (Sun, 31 Aug 2008)
Log Message:
-----------
Fixed leak with Input class, introduced in commit 34206.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/graphics.h
scummvm/trunk/engines/parallaction/input.cpp
Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h 2008-08-31 10:24:32 UTC (rev 34223)
+++ scummvm/trunk/engines/parallaction/graphics.h 2008-08-31 10:43:32 UTC (rev 34224)
@@ -313,6 +313,7 @@
uint16 _height; //
byte** field_8; // unused
byte* _data;
+ bool _freeData;
public:
Cnv() {
@@ -320,12 +321,14 @@
_data = NULL;
}
- Cnv(uint16 numFrames, uint16 width, uint16 height, byte* data) : _count(numFrames), _width(width), _height(height), _data(data) {
+ Cnv(uint16 numFrames, uint16 width, uint16 height, byte* data, bool freeData = false)
+ : _count(numFrames), _width(width), _height(height), _data(data), _freeData(freeData) {
}
~Cnv() {
- free(_data);
+ if (_freeData)
+ free(_data);
}
byte* getFramePtr(uint16 index) {
Modified: scummvm/trunk/engines/parallaction/input.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/input.cpp 2008-08-31 10:24:32 UTC (rev 34223)
+++ scummvm/trunk/engines/parallaction/input.cpp 2008-08-31 10:43:32 UTC (rev 34224)
@@ -421,10 +421,12 @@
void Input::initCursors() {
+ _dinoCursor = _donnaCursor = _dougCursor = 0;
+
switch (_gameType) {
case GType_Nippon:
_comboArrow = _vm->_disk->loadPointer("pointer");
- _mouseArrow = new Cnv(1, MOUSEARROW_WIDTH_NS, MOUSEARROW_HEIGHT_NS, _resMouseArrow_NS);
+ _mouseArrow = new Cnv(1, MOUSEARROW_WIDTH_NS, MOUSEARROW_HEIGHT_NS, _resMouseArrow_NS, false);
break;
case GType_BRA:
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