aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-28 22:26:07 -0500
committerPaul Gilbert2014-12-12 22:52:01 -0500
commit01124c3378f03f9fa0c7c7618879caff5926f735 (patch)
treedf671ca08665d116a3a584aeb43ba795c0a57862 /engines
parentec44c0504f7dc37f7d38894b5a7f764aa17721cc (diff)
downloadscummvm-rg350-01124c3378f03f9fa0c7c7618879caff5926f735.tar.gz
scummvm-rg350-01124c3378f03f9fa0c7c7618879caff5926f735.tar.bz2
scummvm-rg350-01124c3378f03f9fa0c7c7618879caff5926f735.zip
ACCESS: Moved help table data from AccessEngine to AmazonEngine
Diffstat (limited to 'engines')
-rw-r--r--engines/access/access.cpp11
-rw-r--r--engines/access/access.h4
-rw-r--r--engines/access/amazon/amazon_game.cpp14
-rw-r--r--engines/access/amazon/amazon_game.h4
-rw-r--r--engines/access/amazon/amazon_scripts.cpp2
5 files changed, 18 insertions, 17 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 1ab40a2de7..2d25ae9d00 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -84,12 +84,6 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_establishMode = 0;
_establishGroup = 0;
_establishCtrlTblOfs = 0;
- Common::fill(&_help1[0], &_help1[366], 0);
- Common::fill(&_help2[0], &_help2[366], 0);
- Common::fill(&_help1[0], &_help3[366], 0);
- _helpTbl[0] = _help1;
- _helpTbl[1] = _help2;
- _helpTbl[2] = _help3;
_travel = 0;
_ask = 0;
_lastTime = g_system->getMillis();
@@ -507,11 +501,6 @@ void AccessEngine::synchronize(Common::Serializer &s) {
for (int i = 0; i < 256; ++i)
s.syncAsUint16LE(_flags[i]);
- for (int i = 0; i < 366; ++i) {
- s.syncAsByte(_help1[i]);
- s.syncAsByte(_help2[i]);
- s.syncAsByte(_help3[i]);
- }
s.syncAsUint16LE(_travel);
s.syncAsUint16LE(_ask);
diff --git a/engines/access/access.h b/engines/access/access.h
index 0942c9eb8e..165ae83b28 100644
--- a/engines/access/access.h
+++ b/engines/access/access.h
@@ -207,10 +207,6 @@ public:
uint32 _newTime;
uint32 _newDate;
int _flags[256];
- byte _help1[366];
- byte _help2[366];
- byte _help3[366];
- byte *_helpTbl[3];
int _travel;
int _ask;
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index fb884897df..8958239a15 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -53,7 +53,13 @@ AccessEngine(syst, gameDesc),
Common::fill(&_esTabTable[0], &_esTabTable[100], 0);
memset(_tileData, 0, sizeof(_tileData));
-
+ Common::fill(&_help1[0], &_help1[366], 0);
+ Common::fill(&_help2[0], &_help2[366], 0);
+ Common::fill(&_help1[0], &_help3[366], 0);
+ _helpTbl[0] = _help1;
+ _helpTbl[1] = _help2;
+ _helpTbl[2] = _help3;
+
_chapterCells.push_back(CellIdent(0, 96, 17));
_inactive._spritesPtr = nullptr;
_inactive._altSpritesPtr = nullptr;
@@ -973,8 +979,14 @@ void AmazonEngine::synchronize(Common::Serializer &s) {
s.syncAsSint16LE(_rawInactiveX);
s.syncAsSint16LE(_rawInactiveY);
s.syncAsSint16LE(_inactiveYOff);
+
for (int i = 0; i < 100; ++i)
s.syncAsSint16LE(_esTabTable[i]);
+ for (int i = 0; i < 366; ++i) {
+ s.syncAsByte(_help1[i]);
+ s.syncAsByte(_help2[i]);
+ s.syncAsByte(_help3[i]);
+ }
_river.synchronize(s);
}
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
index d697b16c93..016ddf40f0 100644
--- a/engines/access/amazon/amazon_game.h
+++ b/engines/access/amazon/amazon_game.h
@@ -86,6 +86,10 @@ public:
InactivePlayer _inactive;
bool _charSegSwitch;
bool _skipStart;
+ byte _help1[366];
+ byte _help2[366];
+ byte _help3[366];
+ byte *_helpTbl[3];
// Fields that are mapped to flags
int &_guardLocation;
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index d6a57d7919..4c3b83869c 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -448,7 +448,7 @@ void AmazonScripts::cmdSetHelp() {
int arrayId = (_data->readUint16LE() && 0xFF) - 1;
int helpId = _data->readUint16LE() && 0xFF;
- byte *help = _vm->_helpTbl[arrayId];
+ byte *help = _game->_helpTbl[arrayId];
help[helpId] = 1;
if (_vm->_useItem == 0) {