aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-01 16:20:24 -0400
committerPaul Gilbert2014-08-01 16:20:24 -0400
commit4d24209eae5e776fe150775771e7cd70579a518e (patch)
tree9e0b5a8e3ad764a7578a3caab072fb65a8d4a2fd
parentc2451b57bccc2a425a6e1376c2a116df48b1fcc6 (diff)
downloadscummvm-rg350-4d24209eae5e776fe150775771e7cd70579a518e.tar.gz
scummvm-rg350-4d24209eae5e776fe150775771e7cd70579a518e.tar.bz2
scummvm-rg350-4d24209eae5e776fe150775771e7cd70579a518e.zip
ACCESS: Add Amazon floppy detection and skeleton for Amazon engine
-rw-r--r--engines/access/access.cpp6
-rw-r--r--engines/access/access.h7
-rw-r--r--engines/access/amazon/amazon_game.cpp35
-rw-r--r--engines/access/amazon/amazon_game.h43
-rw-r--r--engines/access/detection.cpp9
-rw-r--r--engines/access/detection_tables.h9
-rw-r--r--engines/access/module.mk1
7 files changed, 101 insertions, 9 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 23b8fb9f45..e4b4159f9b 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -51,7 +51,6 @@ void AccessEngine::initialize() {
}
Common::Error AccessEngine::run() {
- initGraphics(320, 200, false);
initialize();
return Common::kNoError;
@@ -61,4 +60,9 @@ int AccessEngine::getRandomNumber(int maxNumber) {
return _randomSource.getRandomNumber(maxNumber);
}
+void AccessEngine::SETVGA() {
+ initGraphics(320, 200, false);
+}
+
+
} // End of namespace Access
diff --git a/engines/access/access.h b/engines/access/access.h
index ef9960e007..5c9207db22 100644
--- a/engines/access/access.h
+++ b/engines/access/access.h
@@ -53,11 +53,6 @@ enum AccessDebugChannels {
kDebugGraphics = 1 << 2
};
-enum {
- GType_Amazon = 0,
- GType_MeanStreets = 1
-};
-
struct AccessGameDescription;
@@ -75,6 +70,8 @@ private:
* Handles basic initialisation
*/
void initialize();
+
+ void SETVGA();
protected:
// Engine APIs
virtual Common::Error run();
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
new file mode 100644
index 0000000000..2b4196a406
--- /dev/null
+++ b/engines/access/amazon/amazon_game.cpp
@@ -0,0 +1,35 @@
+/* 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.
+ *
+ */
+
+#include "access/amazon/amazon_game.h"
+
+namespace Access {
+
+namespace Amazon {
+
+AmazonEngine::AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc) :
+ AccessEngine(syst, gameDesc) {
+}
+
+} // End of namespace Amazon
+
+} // End of namespace Access
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
new file mode 100644
index 0000000000..1bccd1cedc
--- /dev/null
+++ b/engines/access/amazon/amazon_game.h
@@ -0,0 +1,43 @@
+/* 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_GAME_H
+#define ACCESS_AMAZON_GAME_H
+
+#include "access/access.h"
+
+namespace Access {
+
+namespace Amazon {
+
+class AmazonEngine : public AccessEngine {
+public:
+ AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc);
+
+ virtual ~AmazonEngine() {}
+};
+
+} // End of namespace Amazon
+
+} // End of namespace Access
+
+#endif /* ACCESS_ACCESS_H */
diff --git a/engines/access/detection.cpp b/engines/access/detection.cpp
index aca594d60d..ca04a64b0d 100644
--- a/engines/access/detection.cpp
+++ b/engines/access/detection.cpp
@@ -22,6 +22,7 @@
*/
#include "access/access.h"
+#include "access/amazon/amazon_game.h"
#include "base/plugins.h"
#include "common/savefile.h"
@@ -114,7 +115,13 @@ bool Access::AccessEngine::hasFeature(EngineFeature f) const {
bool AccessMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
const Access::AccessGameDescription *gd = (const Access::AccessGameDescription *)desc;
if (gd) {
- *engine = new Access::AccessEngine(syst, gd);
+ switch (gd->gameID) {
+ case Access::GType_Amazon:
+ *engine = new Access::Amazon::AmazonEngine(syst, gd);
+ break;
+ default:
+ error("Unknown game");
+ }
}
return gd != 0;
}
diff --git a/engines/access/detection_tables.h b/engines/access/detection_tables.h
index 9100e52e30..90304290f1 100644
--- a/engines/access/detection_tables.h
+++ b/engines/access/detection_tables.h
@@ -22,14 +22,19 @@
namespace Access {
+enum {
+ GType_Amazon = 1,
+ GType_MeanStreets = 2
+};
+
static const AccessGameDescription gameDescriptions[] = {
{
- // Amazon Guadians of Eden
+ // Amazon Guadians of Eden - Floppy English
{
"amazon",
0,
{
- {"amazon", 0, "00000000000000000000000000000000", 1},
+ { "c00.ap", 0, "dcabf69d5a0d911168cb73511ebaead0", 331481 },
AD_LISTEND
},
Common::EN_ANY,
diff --git a/engines/access/module.mk b/engines/access/module.mk
index 11630335d1..f04e51630e 100644
--- a/engines/access/module.mk
+++ b/engines/access/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS := \
detection.o \
events.o \
resources.o \
+ amazon\amazon_game.o
# This module can be built as a plugin
ifeq ($(ENABLE_ACCESS), DYNAMIC_PLUGIN)