aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/access.cpp19
-rw-r--r--engines/access/access.h19
-rw-r--r--engines/access/amazon/amazon_game.cpp8
-rw-r--r--engines/access/amazon/amazon_game.h6
-rw-r--r--engines/access/amazon/amazon_globals.cpp48
-rw-r--r--engines/access/amazon/amazon_globals.h58
-rw-r--r--engines/access/globals.cpp75
-rw-r--r--engines/access/globals.h84
-rw-r--r--engines/access/module.mk4
9 files changed, 320 insertions, 1 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index af64612e01..3639115455 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -34,11 +34,30 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_debugger = nullptr;
_events = nullptr;
_files = nullptr;
+ _globals = nullptr;
_screen = nullptr;
_sound = nullptr;
_destIn = nullptr;
_objectsTable = nullptr;
+ _pCount = 0;
+ _currentMan = 0;
+ _currentManOld = -1;
+ _man1 = nullptr;
+ _manPal1 = nullptr;
+ _music = nullptr;
+ _playField = nullptr;
+ _script = nullptr;
+ _anim = nullptr;
+ _title = nullptr;
+ _converseMode = 0;
+ _startInvItem = 0;
+ _startAboutItem = 0;
+ _startTravelItem = 0;
+ _startInvBox = 0;
+ _startAboutBox = 0;
+ _startTravelBox = 0;
+
}
AccessEngine::~AccessEngine() {
diff --git a/engines/access/access.h b/engines/access/access.h
index f6d51cc744..34287116ba 100644
--- a/engines/access/access.h
+++ b/engines/access/access.h
@@ -33,6 +33,7 @@
#include "access/debugger.h"
#include "access/events.h"
#include "access/files.h"
+#include "access/globals.h"
#include "access/screen.h"
#include "access/sound.h"
@@ -93,6 +94,7 @@ public:
Debugger *_debugger;
EventsManager *_events;
FileManager *_files;
+ Globals *_globals;
Screen *_screen;
SoundManager *_sound;
@@ -102,6 +104,23 @@ public:
byte *_objectsTable;
int _pCount;
+ int _currentMan;
+ int _currentManOld;
+ byte *_man1;
+ byte *_manPal1;
+ byte *_music;
+ byte *_playField;
+ byte *_script;
+ byte *_anim;
+ byte *_title;
+ int _converseMode;
+ int _startInvItem;
+ int _startAboutItem;
+ int _startTravelItem;
+ int _startInvBox;
+ int _startAboutBox;
+ int _startTravelBox;
+
public:
AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc);
virtual ~AccessEngine();
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 681819f602..af7b77e743 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -21,6 +21,7 @@
*/
#include "access/amazon/amazon_game.h"
+#include "access/amazon/amazon_globals.h"
namespace Access {
@@ -28,10 +29,12 @@ namespace Amazon {
AmazonEngine::AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc) :
AccessEngine(syst, gameDesc) {
+ _globals = new AmazonGlobals();
_skipStart = false;
}
AmazonEngine::~AmazonEngine() {
+ delete _globals;
}
void AmazonEngine::playGame() {
@@ -62,6 +65,10 @@ void AmazonEngine::playGame() {
return;
_screen->clearScreen();
+ _screen->setPanel(0);
+ _screen->forceFadeOut();
+
+
}
void AmazonEngine::doTitle() {
@@ -111,6 +118,7 @@ void AmazonEngine::doTent() {
// TODO
}
+
} // End of namespace Amazon
} // End of namespace Access
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
index 79a74b329f..42fc31d724 100644
--- a/engines/access/amazon/amazon_game.h
+++ b/engines/access/amazon/amazon_game.h
@@ -24,6 +24,7 @@
#define ACCESS_AMAZON_GAME_H
#include "access/access.h"
+#include "access/amazon/amazon_globals.h"
namespace Access {
@@ -47,6 +48,11 @@ private:
* Do tent scene of introduction
*/
void doTent();
+
+ /**
+ * Get globals reference
+ */
+ AmazonGlobals &globals() { return *(AmazonGlobals *)_globals; }
protected:
/**
* Play the game
diff --git a/engines/access/amazon/amazon_globals.cpp b/engines/access/amazon/amazon_globals.cpp
new file mode 100644
index 0000000000..7982233730
--- /dev/null
+++ b/engines/access/amazon/amazon_globals.cpp
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software = 0; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation = 0; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY = 0; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program = 0; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/algorithm.h"
+#include "access/amazon/amazon_globals.h"
+
+namespace Access {
+
+namespace Amazon {
+
+AmazonGlobals::AmazonGlobals() : Globals() {
+ _canoeLane = 0;
+ _canoeYPos = 0;
+ _hitCount = 0;
+ _saveRiver = 0;
+ _hitSafe = 0;
+ _chapter = 0;
+ _topList = 0;
+ _botList = 0;
+ _riverIndex = 0;
+ _rawInactiveX = 0;
+ _rawInactiveY = 0;
+ _inactiveYOff = 0;
+ Common::fill(&_esTabTable[0], &_esTabTable[100], 0);
+}
+
+} // End of namespace Amazon
+
+} // End of namespace Access
diff --git a/engines/access/amazon/amazon_globals.h b/engines/access/amazon/amazon_globals.h
new file mode 100644
index 0000000000..d9631f7450
--- /dev/null
+++ b/engines/access/amazon/amazon_globals.h
@@ -0,0 +1,58 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef ACCESS_AMAZON_GLOBALS_H
+#define ACCESS_AMAZON_GLOBALS_H
+
+#include "common/scummsys.h"
+#include "access/globals.h"
+
+namespace Access {
+
+namespace Amazon {
+
+class AmazonGlobals: public Globals {
+public:
+ int _canoeLane;
+ int _canoeYPos;
+ int _hitCount;
+ int _saveRiver;
+ int _hitSafe;
+ int _chapter;
+ int _topList;
+ int _botList;
+ int _riverIndex;
+ int _rawInactiveX;
+ int _rawInactiveY;
+ int _inactiveYOff;
+ int _esTabTable[100];
+public:
+ AmazonGlobals();
+
+ virtual ~AmazonGlobals() {}
+};
+
+} // End of namespace Amazon
+
+} // End of namespace Access
+
+#endif /* ACCESS_AMAZON_GLOBALS_H */
diff --git a/engines/access/globals.cpp b/engines/access/globals.cpp
new file mode 100644
index 0000000000..ab0c37b168
--- /dev/null
+++ b/engines/access/globals.cpp
@@ -0,0 +1,75 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software = 0; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation = 0; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY = 0; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program = 0; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/algorithm.h"
+#include "access/globals.h"
+
+namespace Access {
+
+Globals::Globals() {
+ _startData = 0;
+ _rawPlayerXLow = 0;
+ _rawPlayerX = 0;
+ _rawPlayerYLow = 0;
+ _rawPlayerY = 0;
+ _conversation = 0;
+ _currentMan = 0;
+ _newTime = 0;
+ _newDate = 0;
+ _intTim[3] = 0;
+ _timer[3] = 0;
+ _timerFlag = false;
+ Common::fill(&_flags[0], &_flags[99], 0);
+ Common::fill(&_useItem[0], &_useItem[23], 0);
+ _guardLoc = 0;
+ _guardFind = 0;
+ _helpLevel = 0;
+ _jasMayaFlag = 0;
+ _moreHelp = 0;
+ _startup = 0;
+ _flashbackFlag = false;
+ _manScaleOff = 0;
+ _riverFlag = false;
+ _antOutFlag = false;
+ _badEnd = 0;
+ _noHints = false;
+ _antFlag = false;
+ _allenFlag = false;
+ _noSound = false;
+ Common::fill(&inv[0], &inv[85], 0);
+ Common::fill(&_help1[0], &_help1[366], 0);
+ Common::fill(&_help2[0], &_help2[366], 0);
+ Common::fill(&_help1[0], &_help3[366], 0);
+ _travel = 0;
+ _ask = 0;
+ _rScrollRow = 0;
+ _rScrollCol = 0;
+ _rSrcollX = 0;
+ _rScrollY = 0;
+ _rOldRectCount = 0;
+ _rNewRectCount = 0;
+ _rKeyFlag = 0;
+ _mapOffset = 0;
+ _screenVirtX = 0;
+}
+
+} // End of namespace Access
diff --git a/engines/access/globals.h b/engines/access/globals.h
new file mode 100644
index 0000000000..30dbd46ad8
--- /dev/null
+++ b/engines/access/globals.h
@@ -0,0 +1,84 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef ACCESS_GLOBALS_H
+#define ACCESS_GLOBALS_H
+
+#include "common/scummsys.h"
+
+namespace Access {
+
+class Globals {
+public:
+ int _startData;
+ int _rawPlayerXLow;
+ int _rawPlayerX;
+ int _rawPlayerYLow;
+ int _rawPlayerY;
+ int _conversation;
+ int _currentMan;
+ uint32 _newTime;
+ uint32 _newDate;
+ int _intTim[3];
+ int _timer[3];
+ bool _timerFlag;
+ byte _flags[99];
+ byte _useItem[23];
+ int _guardLoc;
+ int _guardFind;
+ int _helpLevel;
+ int _jasMayaFlag;
+ int _moreHelp;
+ int _startup;
+ bool _flashbackFlag;
+ int _manScaleOff;
+ bool _riverFlag;
+ bool _antOutFlag;
+ int _badEnd;
+ bool _noHints;
+ bool _antFlag;
+ bool _allenFlag;
+ bool _noSound;
+ int inv[85];
+ byte _help1[366];
+ byte _help2[366];
+ byte _help3[366];
+ int _travel;
+ int _ask;
+ int _rScrollRow;
+ int _rScrollCol;
+ int _rSrcollX;
+ int _rScrollY;
+ int _rOldRectCount;
+ int _rNewRectCount;
+ int _rKeyFlag;
+ int _mapOffset;
+ int _screenVirtX;
+public:
+ Globals();
+
+ virtual ~Globals() {}
+};
+
+} // End of namespace Access
+
+#endif /* ACCESS_GLOBALS_H */
diff --git a/engines/access/module.mk b/engines/access/module.mk
index ff4cedbdc6..e49a11be41 100644
--- a/engines/access/module.mk
+++ b/engines/access/module.mk
@@ -8,10 +8,12 @@ MODULE_OBJS := \
detection.o \
events.o \
files.o \
+ globals.o \
resources.o \
screen.o \
sound.o \
- amazon\amazon_game.o
+ amazon\amazon_game.o \
+ amazon\amazon_globals.o
# This module can be built as a plugin
ifeq ($(ENABLE_ACCESS), DYNAMIC_PLUGIN)