aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/game.cpp11
-rw-r--r--engines/gob/game.h6
-rw-r--r--engines/gob/game_v6.cpp57
3 files changed, 10 insertions, 64 deletions
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp
index d8db743450..97a4c265fd 100644
--- a/engines/gob/game.cpp
+++ b/engines/gob/game.cpp
@@ -409,6 +409,9 @@ void Game::start(void) {
void Game::totSub(int8 flags, const char *newTotFile) {
int8 curBackupPos;
+ if ((flags == 16) || (flags == 17))
+ warning("Urban Stub: Game::totSub(), flags == %d", flags);
+
if (_numEnvironments >= Environments::kEnvironmentCount)
return;
@@ -420,13 +423,14 @@ void Game::totSub(int8 flags, const char *newTotFile) {
_script = new Script(_vm);
_resources = new Resources(_vm);
+
+ if (flags & 0x80)
+ warning("Urban Stub: Game::totSub(), flags & 0x80");
+
if (flags & 1)
_vm->_inter->_variables = 0;
strncpy0(_curTotFile, newTotFile, 9);
-// if (_vm->getGameType() == kGameTypeGeisha)
-// strcat(_curTotFile, ".0OT");
-// else
strcat(_curTotFile, ".TOT");
if (_vm->_inter->_terminate != 0) {
@@ -444,6 +448,7 @@ void Game::totSub(int8 flags, const char *newTotFile) {
if (_vm->_inter->_terminate != 2)
_vm->_inter->_terminate = 0;
+ _hotspots->clear();
_hotspots->pop();
if ((flags & 1) && _vm->_inter->_variables) {
diff --git a/engines/gob/game.h b/engines/gob/game.h
index 2c2c89a490..7f4f9e2cd2 100644
--- a/engines/gob/game.h
+++ b/engines/gob/game.h
@@ -105,8 +105,8 @@ public:
MouseButtons *pButtons = 0, char handleMouse = 0);
void start(void);
- virtual void totSub(int8 flags, const char *newTotFile);
- virtual void switchTotSub(int16 index, int16 skipPlay);
+ void totSub(int8 flags, const char *newTotFile);
+ void switchTotSub(int16 index, int16 skipPlay);
virtual void playTot(int16 skipPlay) = 0;
@@ -150,8 +150,6 @@ public:
Game_v6(GobEngine *vm);
virtual ~Game_v6() {}
- virtual void totSub(int8 flags, const char *newTotFile);
-
virtual void prepareStart(void);
};
diff --git a/engines/gob/game_v6.cpp b/engines/gob/game_v6.cpp
index 4881772aed..be6bdff5b0 100644
--- a/engines/gob/game_v6.cpp
+++ b/engines/gob/game_v6.cpp
@@ -42,63 +42,6 @@ namespace Gob {
Game_v6::Game_v6(GobEngine *vm) : Game_v2(vm) {
}
-// 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 (_numEnvironments >= Environments::kEnvironmentCount)
- return;
-
- _environments->set(_numEnvironments);
-
- curBackupPos = _curEnvironment;
- _numEnvironments++;
- _curEnvironment = _numEnvironments;
-
- _script = new Script(_vm);
- _resources = new Resources(_vm);
-
- 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) {
- clearUnusedEnvironment();
- return;
- }
-
- _hotspots->push(0, true);
-
- if (flags & 6)
- playTot(-1);
- else
- playTot(0);
-
- if (_vm->_inter->_terminate < 2)
- _vm->_inter->_terminate = 0;
-
- _hotspots->clear();
- _hotspots->pop();
-
- if ((flags & 5) && _vm->_inter->_variables) {
- _vm->_inter->delocateVars();
- }
-
- clearUnusedEnvironment();
-
- _numEnvironments--;
- _curEnvironment = curBackupPos;
- _environments->get(_numEnvironments);
-}
-
void Game_v6::prepareStart(void) {
_noCd = false;