[Scummvm-cvs-logs] SF.net SVN: scummvm:[35371] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Mon Dec 15 01:27:06 CET 2008
Revision: 35371
http://scummvm.svn.sourceforge.net/scummvm/?rev=35371&view=rev
Author: drmccoy
Date: 2008-12-15 00:27:05 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Some more Urban Runner changes. Still no cylindrical smoking device, though
Modified Paths:
--------------
scummvm/trunk/engines/gob/game.h
scummvm/trunk/engines/gob/game_v6.cpp
scummvm/trunk/engines/gob/inter.h
scummvm/trunk/engines/gob/inter_v6.cpp
scummvm/trunk/engines/gob/parse.cpp
Modified: scummvm/trunk/engines/gob/game.h
===================================================================
--- scummvm/trunk/engines/gob/game.h 2008-12-15 00:11:23 UTC (rev 35370)
+++ scummvm/trunk/engines/gob/game.h 2008-12-15 00:27:05 UTC (rev 35371)
@@ -111,9 +111,10 @@
int16 checkKeys(int16 *pMousex = 0, int16 *pMouseY = 0,
int16 *pButtons = 0, char handleMouse = 0);
void start(void);
- void totSub(int8 flags, const char *newTotFile);
- void switchTotSub(int16 index, int16 skipPlay);
+ virtual void totSub(int8 flags, const char *newTotFile);
+ virtual void switchTotSub(int16 index, int16 skipPlay);
+
void freeCollision(int16 id);
virtual void playTot(int16 skipPlay) = 0;
@@ -300,6 +301,8 @@
class Game_v6 : public Game_v2 {
public:
+ virtual void totSub(int8 flags, const char *newTotFile);
+
virtual int16 addNewCollision(int16 id, uint16 left, uint16 top,
uint16 right, uint16 bottom, int16 flags, int16 key,
uint16 funcEnter, uint16 funcLeave, uint16 funcSub = 0);
Modified: scummvm/trunk/engines/gob/game_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v6.cpp 2008-12-15 00:11:23 UTC (rev 35370)
+++ scummvm/trunk/engines/gob/game_v6.cpp 2008-12-15 00:27:05 UTC (rev 35371)
@@ -39,6 +39,82 @@
_dword_63E44 = 0;
}
+// flagbits: 5 = freeInterVariables, 6 = skipPlay
+void Game_v6::totSub(int8 flags, const char *newTotFile) {
+ int8 curBackupPos;
+
+ if ((flags == 16) || (flags == 17))
+ warning("Urban Stub: Game_v6::totSub(), flags == %d", flags);
+
+ if (_backupedCount >= 5)
+ return;
+
+ _cursorHotspotXArray[_backupedCount] = _vm->_draw->_cursorHotspotXVar;
+ _cursorHotspotYArray[_backupedCount] = _vm->_draw->_cursorHotspotYVar;
+ _totTextDataArray[_backupedCount] = _totTextData;
+ _totFileDataArray[_backupedCount] = _totFileData;
+ _totResourceTableArray[_backupedCount] = _totResourceTable;
+ _extTableArray[_backupedCount] = _extTable;
+ _extHandleArray[_backupedCount] = _extHandle;
+ _imFileDataArray[_backupedCount] = _imFileData;
+ _variablesArray[_backupedCount] = _vm->_inter->_variables;
+ strcpy(_curTotFileArray[_backupedCount], _curTotFile);
+
+ curBackupPos = _curBackupPos;
+ _backupedCount++;
+ _curBackupPos = _backupedCount;
+
+ _totTextData = 0;
+ _totFileData = 0;
+ _totResourceTable = 0;
+
+ if (flags & 0x80)
+ warning("Urban Stub: Game_v6::totSub(), flags & 0x80");
+
+ if (flags & 5)
+ _vm->_inter->_variables = 0;
+
+ strncpy0(_curTotFile, newTotFile, 9);
+ strcat(_curTotFile, ".TOT");
+
+ if (_vm->_inter->_terminate != 0)
+ return;
+
+ pushCollisions(0);
+
+ if (flags & 6)
+ playTot(-1);
+ else
+ playTot(0);
+
+ if (_vm->_inter->_terminate < 2)
+ _vm->_inter->_terminate = 0;
+
+ clearCollisions();
+ popCollisions();
+
+ if ((flags & 5) && _vm->_inter->_variables) {
+ _vm->_inter->delocateVars();
+ }
+
+ _backupedCount--;
+ _curBackupPos = curBackupPos;
+
+ _vm->_draw->_cursorHotspotXVar = _cursorHotspotXArray[_backupedCount];
+ _vm->_draw->_cursorHotspotYVar = _cursorHotspotYArray[_backupedCount];
+ _totTextData = _totTextDataArray[_backupedCount];
+ _totFileData = _totFileDataArray[_backupedCount];
+ _totResourceTable = _totResourceTableArray[_backupedCount];
+ _extTable = _extTableArray[_backupedCount];
+ _extHandle = _extHandleArray[_backupedCount];
+ _imFileData = _imFileDataArray[_backupedCount];
+ _vm->_inter->_variables = _variablesArray[_backupedCount];
+ strcpy(_curTotFile, _curTotFileArray[_backupedCount]);
+ strcpy(_curExtFile, _curTotFile);
+ _curExtFile[strlen(_curExtFile) - 4] = '\0';
+ strcat(_curExtFile, ".EXT");
+}
+
int16 Game_v6::addNewCollision(int16 id, uint16 left, uint16 top,
uint16 right, uint16 bottom, int16 flags, int16 key,
uint16 funcEnter, uint16 funcLeave, uint16 funcSub) {
Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h 2008-12-15 00:11:23 UTC (rev 35370)
+++ scummvm/trunk/engines/gob/inter.h 2008-12-15 00:27:05 UTC (rev 35371)
@@ -624,6 +624,7 @@
virtual const char *getOpcodeFuncDesc(byte i, byte j);
virtual const char *getOpcodeGoblinDesc(int i);
+ void o6_totSub();
void o6_playVmdOrMusic();
bool o6_loadCursor(OpFuncParams ¶ms);
Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp 2008-12-15 00:11:23 UTC (rev 35370)
+++ scummvm/trunk/engines/gob/inter_v6.cpp 2008-12-15 00:27:05 UTC (rev 35371)
@@ -133,7 +133,7 @@
{NULL, ""},
{NULL, ""},
/* 40 */
- OPCODE(o2_totSub),
+ OPCODE(o6_totSub),
OPCODE(o2_switchTotSub),
OPCODE(o2_copyVars),
OPCODE(o2_pasteVars),
@@ -653,6 +653,33 @@
return "";
}
+void Inter_v6::o6_totSub() {
+ char totFile[14];
+ byte length;
+ int flags;
+ int i;
+
+ length = *_vm->_global->_inter_execPtr++;
+ if ((length & 0x7F) > 13)
+ error("Length in o2_totSub is greater than 13 (%d)", length);
+
+ if (length & 0x80) {
+ evalExpr(0);
+ strcpy(totFile, _vm->_global->_inter_resStr);
+ } else {
+ for (i = 0; i < length; i++)
+ totFile[i] = (char) *_vm->_global->_inter_execPtr++;
+ totFile[i] = 0;
+ }
+
+ flags = *_vm->_global->_inter_execPtr++;
+
+ if (flags & 0x40)
+ warning("Urban Stub: o6_totSub(), flags & 0x40");
+
+ _vm->_game->totSub(flags, totFile);
+}
+
void Inter_v6::o6_playVmdOrMusic() {
char fileName[128];
int16 x, y;
Modified: scummvm/trunk/engines/gob/parse.cpp
===================================================================
--- scummvm/trunk/engines/gob/parse.cpp 2008-12-15 00:11:23 UTC (rev 35370)
+++ scummvm/trunk/engines/gob/parse.cpp 2008-12-15 00:27:05 UTC (rev 35371)
@@ -85,8 +85,14 @@
while (1) {
operation = *_vm->_global->_inter_execPtr++;
- if ((operation >= 16) && (operation <= 29)) {
+ if ((operation >= 14) && (operation <= 29)) {
switch (operation) {
+ case 14:
+ _vm->_global->_inter_execPtr += 4;
+ if (*_vm->_global->_inter_execPtr == 97)
+ _vm->_global->_inter_execPtr++;
+ break;
+
case 17:
case 18:
case 20:
@@ -116,6 +122,9 @@
}
break;
+ case 15:
+ _vm->_global->_inter_execPtr += 2;
+
case 16:
case 26:
case 27:
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