[Scummvm-cvs-logs] SF.net SVN: scummvm: [24029] scummvm/trunk/engines/agos
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat Sep 30 09:07:00 CEST 2006
Revision: 24029
http://svn.sourceforge.net/scummvm/?rev=24029&view=rev
Author: eriktorbjorn
Date: 2006-09-30 00:06:55 -0700 (Sat, 30 Sep 2006)
Log Message:
-----------
Re-use FF's _variableArray2[] instead of creating a new one for PP. Free the
variable arrays on exit.
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/items.cpp
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2006-09-30 07:00:42 UTC (rev 24028)
+++ scummvm/trunk/engines/agos/agos.cpp 2006-09-30 07:06:55 UTC (rev 24029)
@@ -331,7 +331,6 @@
_variableArray = 0;
_variableArray2 = 0;
_variableArrayPtr = 0;
- _variableBackupArray = 0;
memset(_windowArray, 0, sizeof(_windowArray));
@@ -617,7 +616,6 @@
_variableArray = (int16 *)calloc(_numVars, sizeof(int16));
_variableArray2 = (int16 *)calloc(_numVars, sizeof(int16));
- _variableBackupArray = (int16 *)calloc(_numVars, sizeof(int16));
setupOpcodes();
@@ -659,6 +657,9 @@
free(_backBuf);
free(_scaleBuf);
+ free(_variableArray);
+ free(_variableArray2);
+
delete _dummyItem1;
delete _dummyItem2;
delete _dummyItem3;
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2006-09-30 07:00:42 UTC (rev 24028)
+++ scummvm/trunk/engines/agos/agos.h 2006-09-30 07:06:55 UTC (rev 24029)
@@ -412,7 +412,6 @@
int16 *_variableArray;
int16 *_variableArray2;
int16 *_variableArrayPtr;
- int16 *_variableBackupArray;
WindowBlock *_windowArray[16];
Modified: scummvm/trunk/engines/agos/items.cpp
===================================================================
--- scummvm/trunk/engines/agos/items.cpp 2006-09-30 07:00:42 UTC (rev 24028)
+++ scummvm/trunk/engines/agos/items.cpp 2006-09-30 07:06:55 UTC (rev 24029)
@@ -2571,7 +2571,7 @@
getNextItemPtr();
if (_oopsValid) {
for (uint i = 0; i < _numVars; i++) {
- _variableArray[i] = _variableBackupArray[i];
+ _variableArray[i] = _variableArray2[i];
}
// i=FlagData[999]*100+11;
// C_PICTURE(4,i);
@@ -2644,7 +2644,7 @@
// if (IsVQueueEmpty() == 0) {
_oopsValid = true;
for (uint i = 0; i < _numVars; i++) {
- _variableBackupArray[i] = _variableArray[i];
+ _variableArray2[i] = _variableArray[i];
}
// } else
// _oopsValid = false;
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