[Scummvm-cvs-logs] SF.net SVN: scummvm: [26393] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Fri Apr 6 20:29:55 CEST 2007
Revision: 26393
http://scummvm.svn.sourceforge.net/scummvm/?rev=26393&view=rev
Author: peres001
Date: 2007-04-06 11:29:55 -0700 (Fri, 06 Apr 2007)
Log Message:
-----------
Made Program hold an explicit reference to its set of Instruction(s) instead of simply being a Node chained with them.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/animation.cpp
scummvm/trunk/engines/parallaction/zone.h
Modified: scummvm/trunk/engines/parallaction/animation.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/animation.cpp 2007-04-06 17:16:49 UTC (rev 26392)
+++ scummvm/trunk/engines/parallaction/animation.cpp 2007-04-06 18:29:55 UTC (rev 26393)
@@ -157,7 +157,7 @@
if (!program) return;
delete[] program->_locals;
- freeNodeList(program);
+ freeNodeList(&program->_start);
return;
}
@@ -261,7 +261,7 @@
a->_program = new Program;
a->_program->_locals = new LocalVariable[10];
- Node *vD0 = a->_program;
+ Node *vD0 = &a->_program->_start;
Instruction *vCC = new Instruction;
@@ -280,7 +280,7 @@
delete script;
- a->_program->_ip = (Instruction*)a->_program->_next;
+ a->_program->_ip = (Instruction*)a->_program->_start._next;
return;
}
@@ -588,7 +588,7 @@
a->_flags &= ~kFlagsActing;
_vm->runCommands(a->_commands, a);
}
- a->_program->_ip = (Instruction*)a->_program->_next;
+ a->_program->_ip = (Instruction*)a->_program->_start._next;
goto label1;
Modified: scummvm/trunk/engines/parallaction/zone.h
===================================================================
--- scummvm/trunk/engines/parallaction/zone.h 2007-04-06 17:16:49 UTC (rev 26392)
+++ scummvm/trunk/engines/parallaction/zone.h 2007-04-06 18:29:55 UTC (rev 26393)
@@ -279,11 +279,12 @@
};
-struct Program : public Node {
+struct Program {
LocalVariable *_locals;
uint16 _loopCounter;
Instruction *_ip;
Instruction *_loopStart;
+ Instruction _start;
Program() {
_locals = NULL;
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