[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.396,1.397 floodfill_he.h,2.1,2.2 resource_v7he.cpp,1.55,1.56 saveload.cpp,1.258,1.259 saveload.h,1.73,1.74 script.cpp,1.237,1.238 script_v100he.cpp,2.185,2.186 script_v90he.cpp,2.291,2.292 scumm.cpp,1.674,1.675 scumm.h,1.661,1.662
Gregory Montoir
cyx at users.sourceforge.net
Tue Jan 10 13:40:01 CET 2006
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11794/scumm
Modified Files:
actor.cpp floodfill_he.h resource_v7he.cpp saveload.cpp
saveload.h script.cpp script_v100he.cpp script_v90he.cpp
scumm.cpp scumm.h
Log Message:
Get rid of unused variables and removed them from the save data ; FloodFill.unk1C and _curExecScript.
Concerning _curExecScript, I checked several interpreters (even one with windex compiled in), the only function where it's used is runAllScripts.
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -d -r1.396 -r1.397
--- actor.cpp 6 Jan 2006 10:14:59 -0000 1.396
+++ actor.cpp 10 Jan 2006 21:39:13 -0000 1.397
@@ -912,7 +912,7 @@
Actor *ScummEngine::derefActor(int id, const char *errmsg) const {
if (id == 0)
debugC(DEBUG_ACTORS, "derefActor(0, \"%s\") in script %d, opcode 0x%x",
- errmsg, vm.slot[_curExecScript].number, _opcode);
+ errmsg, vm.slot[_currentScript].number, _opcode);
if (id < 0 || id >= _numActors || _actors[id]._number != id) {
if (errmsg)
@@ -926,11 +926,11 @@
Actor *ScummEngine::derefActorSafe(int id, const char *errmsg) const {
if (id == 0)
debugC(DEBUG_ACTORS, "derefActorSafe(0, \"%s\") in script %d, opcode 0x%x",
- errmsg, vm.slot[_curExecScript].number, _opcode);
+ errmsg, vm.slot[_currentScript].number, _opcode);
if (id < 0 || id >= _numActors || _actors[id]._number != id) {
debugC(DEBUG_ACTORS, "Invalid actor %d in %s (script %d, opcode 0x%x)",
- id, errmsg, vm.slot[_curExecScript].number, _opcode);
+ id, errmsg, vm.slot[_currentScript].number, _opcode);
return NULL;
}
return &_actors[id];
Index: floodfill_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/floodfill_he.h,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -d -r2.1 -r2.2
--- floodfill_he.h 18 Oct 2005 19:17:20 -0000 2.1
+++ floodfill_he.h 10 Jan 2006 21:39:13 -0000 2.2
@@ -32,7 +32,6 @@
int32 x;
int32 y;
int32 flags;
- int32 unk1C; /* unused */
};
struct FloodFillLine {
Index: resource_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v7he.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- resource_v7he.cpp 10 Jan 2006 21:10:48 -0000 1.55
+++ resource_v7he.cpp 10 Jan 2006 21:39:13 -0000 1.56
@@ -37,8 +37,8 @@
namespace Scumm {
-ResExtractor::ResExtractor(ScummEngine_v70he *scumm) {
- _vm = scumm;
+ResExtractor::ResExtractor(ScummEngine_v70he *scumm)
+ : _vm(scumm) {
_fileName[0] = 0;
memset(_cursorCache, 0, sizeof(_cursorCache));
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -d -r1.258 -r1.259
--- saveload.cpp 20 Nov 2005 08:29:17 -0000 1.258
+++ saveload.cpp 10 Jan 2006 21:39:13 -0000 1.259
@@ -701,7 +701,7 @@
MKARRAY_OLD(ScummEngine, _charsetData[0][0], sleByte, 10 * 16, VER(8), VER(9)),
MKARRAY(ScummEngine, _charsetData[0][0], sleByte, 15 * 16, VER(10)),
- MKLINE(ScummEngine, _curExecScript, sleUint16, VER(8)),
+ MK_OBSOLETE(ScummEngine, _curExecScript, sleUint16, VER(8), VER(62)),
MKLINE(ScummEngine, camera._dest.x, sleInt16, VER(8)),
MKLINE(ScummEngine, camera._dest.y, sleInt16, VER(8)),
@@ -1280,7 +1280,7 @@
MKLINE(FloodFillParameters, x, sleInt32, VER(51)),
MKLINE(FloodFillParameters, y, sleInt32, VER(51)),
MKLINE(FloodFillParameters, flags, sleInt32, VER(51)),
- MKLINE(FloodFillParameters, unk1C, sleInt32, VER(51)),
+ MK_OBSOLETE(FloodFillParameters, unk1C, sleInt32, VER(51), VER(62)),
MKEND()
};
Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- saveload.h 27 Nov 2005 23:48:14 -0000 1.73
+++ saveload.h 10 Jan 2006 21:39:13 -0000 1.74
@@ -45,7 +45,7 @@
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 62
+#define CURRENT_VER 63
/**
* An auxillary macro, used to specify savegame versions. We use this instead
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -d -r1.237 -r1.238
--- script.cpp 17 Nov 2005 10:49:39 -0000 1.237
+++ script.cpp 10 Jan 2006 21:39:13 -0000 1.238
@@ -889,17 +889,13 @@
for (i = 0; i < NUM_SCRIPT_SLOT; i++)
vm.slot[i].didexec = 0;
- // FIXME - why is _curExecScript?!? The only place it is ever set is here.
- // The outer world will only see it as consequence of the calls made in the following
- // for loop. But in that case, _curExecScript will be equal to _currentScript. Hence
- // it would seem we can replace all occurances of _curExecScript by _currentScript.
_currentScript = 0xFF;
int numCycles = (_heversion >= 90) ? VAR(VAR_NUM_SCRIPT_CYCLES) : 1;
for (int cycle = 1; cycle <= numCycles; cycle++) {
- for (_curExecScript = 0; _curExecScript < NUM_SCRIPT_SLOT; _curExecScript++) {
- if (vm.slot[_curExecScript].cycle == cycle && vm.slot[_curExecScript].status == ssRunning && vm.slot[_curExecScript].didexec == 0) {
- _currentScript = (byte)_curExecScript;
+ for (i = 0; i < NUM_SCRIPT_SLOT; i++) {
+ if (vm.slot[i].cycle == cycle && vm.slot[i].status == ssRunning && vm.slot[i].didexec == 0) {
+ _currentScript = (byte)i;
getScriptBaseAddress();
getScriptEntryPoint();
executeScript();
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.185
retrieving revision 2.186
diff -u -d -r2.185 -r2.186
--- script_v100he.cpp 10 Jan 2006 05:11:51 -0000 2.185
+++ script_v100he.cpp 10 Jan 2006 21:39:13 -0000 2.186
@@ -887,7 +887,7 @@
_floodFillParams.flags = pop();
break;
case 67:
- _floodFillParams.unk1C = pop();
+ pop();
break;
case 92:
floodFill(&_floodFillParams, this);
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.291
retrieving revision 2.292
diff -u -d -r2.291 -r2.292
--- script_v90he.cpp 5 Jan 2006 07:06:47 -0000 2.291
+++ script_v90he.cpp 10 Jan 2006 21:39:13 -0000 2.292
@@ -1767,7 +1767,7 @@
switch (subOp) {
case 0:
- _floodFillParams.unk1C = pop();
+ pop();
break;
case 3:
memset(&_floodFillParams, 0, sizeof(_floodFillParams));
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.674
retrieving revision 1.675
diff -u -d -r1.674 -r1.675
--- scumm.cpp 10 Jan 2006 21:13:43 -0000 1.674
+++ scumm.cpp 10 Jan 2006 21:39:13 -0000 1.675
@@ -1104,7 +1104,6 @@
_scriptOrgPointer = NULL;
_opcode = 0;
vm.numNestedScripts = 0;
- _curExecScript = 0;
_lastCodePtr = NULL;
_resultVarNumber = 0;
_scummStackPos = 0;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.661
retrieving revision 1.662
diff -u -d -r1.661 -r1.662
--- scumm.h 5 Jan 2006 07:06:47 -0000 1.661
+++ scumm.h 10 Jan 2006 21:39:14 -0000 1.662
@@ -616,7 +616,6 @@
uint32 _localScriptOffsets[1024];
const byte *_scriptPointer, *_scriptOrgPointer;
byte _opcode, _currentScript;
- uint16 _curExecScript;
const byte * const *_lastCodePtr;
int _resultVarNumber, _scummStackPos;
int _vmStack[150];
More information about the Scummvm-git-logs
mailing list