[Scummvm-cvs-logs] SF.net SVN: scummvm: [30769] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Feb 3 17:02:21 CET 2008
Revision: 30769
http://scummvm.svn.sourceforge.net/scummvm/?rev=30769&view=rev
Author: peres001
Date: 2008-02-03 08:02:21 -0800 (Sun, 03 Feb 2008)
Log Message:
-----------
- Character is now initialized when needed (for the moment only by NS)
- Forward lists are now bigger since BRA scripts are larger
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parallaction.cpp
scummvm/trunk/engines/parallaction/parallaction.h
scummvm/trunk/engines/parallaction/parallaction_ns.cpp
scummvm/trunk/engines/parallaction/parser_br.cpp
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2008-02-03 14:58:16 UTC (rev 30768)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2008-02-03 16:02:21 UTC (rev 30769)
@@ -55,30 +55,11 @@
uint16 _score = 1;
char _password[8];
-Command * _forwardedCommands[20] = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+Command * _forwardedCommands[MAX_FORWARDS] = {
NULL
};
-char _forwardedAnimationNames[20][20];
+char _forwardedAnimationNames[MAX_FORWARDS][20];
uint16 _numForwards = 0;
uint32 _commandFlags = 0;
@@ -125,8 +106,6 @@
delete _zoneTypeNames;
delete _zoneFlagNames;
- _animations.remove(&_char._ani);
-
freeLocation();
freeCharacter();
@@ -170,7 +149,6 @@
_hoverZone = NULL;
- _animations.push_front(&_char._ani);
_gfx = new Gfx(this);
_debugger = new Debugger(this);
Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h 2008-02-03 14:58:16 UTC (rev 30768)
+++ scummvm/trunk/engines/parallaction/parallaction.h 2008-02-03 16:02:21 UTC (rev 30769)
@@ -146,6 +146,7 @@
extern uint16 _score;
extern uint16 _language;
extern uint32 _engineFlags;
+#define MAX_FORWARDS 50
extern Command *_forwardedCommands[];
extern char _forwardedAnimationNames[][20];
extern uint16 _numForwards;
Modified: scummvm/trunk/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2008-02-03 14:58:16 UTC (rev 30768)
+++ scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2008-02-03 16:02:21 UTC (rev 30769)
@@ -137,6 +137,8 @@
initOpcodes();
initParsers();
+ _animations.push_front(&_char._ani);
+
Parallaction::init();
return 0;
@@ -151,6 +153,8 @@
delete _instructionNames;
delete _locationStmt;
+ _animations.remove(&_char._ani);
+
}
Modified: scummvm/trunk/engines/parallaction/parser_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_br.cpp 2008-02-03 14:58:16 UTC (rev 30768)
+++ scummvm/trunk/engines/parallaction/parser_br.cpp 2008-02-03 16:02:21 UTC (rev 30769)
@@ -427,6 +427,7 @@
_locParseCtxt.nextToken++;
if (_locParseCtxt.cmd->u._zone == NULL) {
+ assert(_numForwards < MAX_FORWARDS);
strcpy(_forwardedAnimationNames[_numForwards], _tokens[_locParseCtxt.nextToken-1]);
_forwardedCommands[_numForwards] = _locParseCtxt.cmd;
_numForwards++;
@@ -947,13 +948,6 @@
free(_locParseCtxt.maskName);
free(_locParseCtxt.pathName);
- AnimationList::iterator it = _animations.begin();
- for ( ; it != _animations.end(); it++) {
- if ((*it)->_scriptName) {
- loadProgram(*it, (*it)->_scriptName);
- }
- }
-
// drawZones();
return;
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