aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2011-01-25 00:50:26 +0000
committerSven Hesse2011-01-25 00:50:26 +0000
commit176e49975c52d3686b8391c4f76f1e0af04ce657 (patch)
tree6f733502f6c5066eed49bfd02845fcbb69ff941b /engines
parent2846ce14f35afc029fe058b3ed50c229ef856615 (diff)
downloadscummvm-rg350-176e49975c52d3686b8391c4f76f1e0af04ce657.tar.gz
scummvm-rg350-176e49975c52d3686b8391c4f76f1e0af04ce657.tar.bz2
scummvm-rg350-176e49975c52d3686b8391c4f76f1e0af04ce657.zip
GOB: Adding stubs for Addy
svn-id: r55508
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/gob.cpp2
-rw-r--r--engines/gob/inter.h26
-rw-r--r--engines/gob/inter_playtoons.cpp4
-rw-r--r--engines/gob/inter_v1.cpp3
-rw-r--r--engines/gob/inter_v5.cpp3
-rw-r--r--engines/gob/inter_v7.cpp229
-rw-r--r--engines/gob/module.mk1
7 files changed, 267 insertions, 1 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index f2bec9b0f0..7cf97517bb 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -546,7 +546,7 @@ bool GobEngine::initGameParts() {
case kGameTypeAdi2:
_init = new Init_v2(this);
_video = new Video_v6(this);
- _inter = new Inter_Playtoons(this);
+ _inter = new Inter_v7(this);
_mult = new Mult_v2(this);
_draw = new Draw_v2(this);
_map = new Map_v2(this);
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 38bf7dba2b..910fe64e8e 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -583,6 +583,32 @@ protected:
void oPlaytoons_openItk();
};
+class Inter_v7 : public Inter_Playtoons {
+public:
+ Inter_v7(GobEngine *vm);
+ virtual ~Inter_v7() {}
+
+protected:
+ virtual void setupOpcodesDraw();
+ virtual void setupOpcodesFunc();
+ virtual void setupOpcodesGob();
+
+ void o7_draw0x0D();
+ void o7_draw0x44();
+ void o7_draw0x45();
+ void o7_draw0x57();
+ void o7_draw0x89();
+ void o7_draw0x8A();
+ void o7_draw0x8C();
+ void o7_draw0x90();
+ void o7_draw0x93();
+ void o7_draw0xA1();
+ void o7_draw0xA2();
+ void o7_draw0xA4();
+ void o7_draw0xC4();
+ void o7_draw0xC6();
+};
+
} // End of namespace Gob
#endif // GOB_INTER_H
diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp
index 584a9c6030..a46b7d8693 100644
--- a/engines/gob/inter_playtoons.cpp
+++ b/engines/gob/inter_playtoons.cpp
@@ -237,6 +237,10 @@ bool Inter_Playtoons::oPlaytoons_checkData(OpFuncParams &params) {
debugC(2, kDebugFileIO, "oPlaytoons_checkData: \"%s\" instead of \"%s\"", file + 3, file);
file += 3;
}
+ if (strncmp(file, "<STK>", 5) == 0) {
+ debugC(2, kDebugFileIO, "oPlaytoons_checkData: \"%s\" instead of \"%s\"", file + 5, file);
+ file += 5;
+ }
// WORKAROUND: In the Playtoons stick files found in german Addy 4, some paths are hardcoded
if ((backSlash = strrchr(file, '\\'))) {
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 6035f22d79..f45c7d19ba 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -1215,6 +1215,9 @@ bool Inter_v1::o1_keyFunc(OpFuncParams &params) {
WRITE_VAR(59, 4000);
switch (cmd) {
+ case -1:
+ break;
+
case 0:
_vm->_draw->_showCursor &= ~2;
_vm->_util->longDelay(1);
diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp
index 1c82f79ab9..23164cea99 100644
--- a/engines/gob/inter_v5.cpp
+++ b/engines/gob/inter_v5.cpp
@@ -130,6 +130,9 @@ void Inter_v5::o5_initScreen() {
width = _vm->_game->_script->readValExpr();
height = _vm->_game->_script->readValExpr();
+ if (videoMode == 0)
+ videoMode = 0x14;
+
_vm->_video->clearScreen();
if (videoMode == 0x13) {
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
new file mode 100644
index 0000000000..3c4e42912a
--- /dev/null
+++ b/engines/gob/inter_v7.cpp
@@ -0,0 +1,229 @@
+/* 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.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "common/endian.h"
+
+#include "gob/gob.h"
+#include "gob/inter.h"
+#include "gob/game.h"
+#include "gob/script.h"
+
+namespace Gob {
+
+#define OPCODEVER Inter_v7
+#define OPCODEDRAW(i, x) _opcodesDraw[i]._OPCODEDRAW(OPCODEVER, x)
+#define OPCODEFUNC(i, x) _opcodesFunc[i]._OPCODEFUNC(OPCODEVER, x)
+#define OPCODEGOB(i, x) _opcodesGob[i]._OPCODEGOB(OPCODEVER, x)
+
+Inter_v7::Inter_v7(GobEngine *vm) : Inter_Playtoons(vm) {
+}
+
+void Inter_v7::setupOpcodesDraw() {
+ Inter_Playtoons::setupOpcodesDraw();
+
+ OPCODEDRAW(0x0D, o7_draw0x0D);
+ OPCODEDRAW(0x44, o7_draw0x44);
+ OPCODEDRAW(0x45, o7_draw0x45);
+ OPCODEDRAW(0x57, o7_draw0x57);
+ OPCODEDRAW(0x89, o7_draw0x89);
+ OPCODEDRAW(0x8A, o7_draw0x8A);
+ OPCODEDRAW(0x8C, o7_draw0x8C);
+ OPCODEDRAW(0x90, o7_draw0x90);
+ OPCODEDRAW(0x93, o7_draw0x93);
+ OPCODEDRAW(0xA1, o7_draw0xA1);
+ OPCODEDRAW(0xA2, o7_draw0xA2);
+ OPCODEDRAW(0xA4, o7_draw0xA4);
+ OPCODEDRAW(0xC4, o7_draw0xC4);
+ OPCODEDRAW(0xC6, o7_draw0xC6);
+}
+
+void Inter_v7::setupOpcodesFunc() {
+ Inter_Playtoons::setupOpcodesFunc();
+}
+
+void Inter_v7::setupOpcodesGob() {
+ Inter_Playtoons::setupOpcodesGob();
+}
+
+void Inter_v7::o7_draw0x0D() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+
+ int16 expr0 = _vm->_game->_script->readValExpr();
+
+ warning("Addy Stub Draw 0x0D: \"%s\", %d", str0.c_str(), expr0);
+}
+
+void Inter_v7::o7_draw0x44() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str1 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str2 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str3 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str4 = _vm->_game->_script->getResultStr();
+
+ warning("Addy Stub Draw 0x44: \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"",
+ str0.c_str(), str1.c_str(), str2.c_str(), str3.c_str(), str4.c_str());
+}
+
+void Inter_v7::o7_draw0x45() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str1 = _vm->_game->_script->getResultStr();
+
+ warning("Addy Stub Draw 0x45: \"%s\", \"%s\"", str0.c_str(), str1.c_str());
+}
+
+void Inter_v7::o7_draw0x57() {
+ int16 index0 = _vm->_game->_script->readVarIndex();
+ int16 index1 = _vm->_game->_script->readVarIndex();
+
+ warning("Addy Stub Draw 0x57: %d, %d", index0, index1);
+}
+
+void Inter_v7::o7_draw0x89() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str1 = _vm->_game->_script->getResultStr();
+
+ int16 index0 = _vm->_game->_script->readVarIndex();
+
+ warning("Addy Stub Draw 0x89: \"%s\", \"%s\", %d", str0.c_str(), str1.c_str(), index0);
+}
+
+void Inter_v7::o7_draw0x8A() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+
+ int16 index0 = _vm->_game->_script->readVarIndex();
+ int16 index1 = _vm->_game->_script->readVarIndex();
+
+ warning("Addy Stub Draw 0x8A: \"%s\", %d, %d", str0.c_str(), index0, index1);
+}
+
+void Inter_v7::o7_draw0x8C() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+
+ int16 index0 = _vm->_game->_script->readVarIndex();
+
+ warning("Addy Stub Draw 0x8C: \"%s\", %d", str0.c_str(), index0);
+}
+
+void Inter_v7::o7_draw0x90() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+
+ int16 expr0 = _vm->_game->_script->readValExpr();
+ int16 expr1 = _vm->_game->_script->readValExpr();
+ int16 expr2 = _vm->_game->_script->readValExpr();
+ int16 expr3 = _vm->_game->_script->readValExpr();
+ int16 expr4 = _vm->_game->_script->readValExpr();
+ int16 expr5 = _vm->_game->_script->readValExpr();
+ int16 expr6 = _vm->_game->_script->readValExpr();
+ int16 expr7 = _vm->_game->_script->readValExpr();
+
+ warning("Addy Stub Draw 0x90: \"%s\", %d, %d, %d, %d, %d, %d, %d, %d",
+ str0.c_str(), expr0, expr1, expr2, expr3, expr4, expr5, expr6, expr7);
+}
+
+void Inter_v7::o7_draw0x93() {
+ uint32 expr0 = _vm->_game->_script->readValExpr();
+
+ warning("Addy Stub Draw 0x93: %d", expr0);
+}
+
+void Inter_v7::o7_draw0xA1() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str1 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str2 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str3 = _vm->_game->_script->getResultStr();
+
+ int16 index0 = _vm->_game->_script->readVarIndex();
+
+ warning("Addy Stub Draw 0xA1: \"%s\", \"%s\", \"%s\", \"%s\", %d",
+ str0.c_str(), str1.c_str(), str2.c_str(), str3.c_str(), index0);
+}
+
+void Inter_v7::o7_draw0xA2() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str1 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str2 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str3 = _vm->_game->_script->getResultStr();
+
+ warning("Addy Stub Draw 0xA2: \"%s\", \"%s\", \"%s\", \"%s\"",
+ str0.c_str(), str1.c_str(), str2.c_str(), str3.c_str());
+}
+
+void Inter_v7::o7_draw0xA4() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+
+ int16 expr0 = _vm->_game->_script->readValExpr();
+ int16 expr1 = _vm->_game->_script->readValExpr();
+
+ warning("Addy Stub Draw 0xA4: \"%s\", %d, %d", str0.c_str(), expr0, expr1);
+}
+
+void Inter_v7::o7_draw0xC4() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str1 = _vm->_game->_script->getResultStr();
+
+ warning("Addy Stub Draw 0xC4: \"%s\", \"%s\"", str0.c_str(), str1.c_str());
+}
+
+void Inter_v7::o7_draw0xC6() {
+ _vm->_game->_script->evalExpr(0);
+ Common::String str0 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str1 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str2 = _vm->_game->_script->getResultStr();
+ _vm->_game->_script->evalExpr(0);
+ Common::String str3 = _vm->_game->_script->getResultStr();
+
+ int16 index0 = _vm->_game->_script->readVarIndex();
+
+ warning("Addy Stub Draw 0xC6: \"%s\", \"%s\", \"%s\", \"%s\", %d",
+ str0.c_str(), str1.c_str(), str2.c_str(), str3.c_str(), index0);
+}
+
+} // End of namespace Gob
diff --git a/engines/gob/module.mk b/engines/gob/module.mk
index 80db80843d..6ff685d9bb 100644
--- a/engines/gob/module.mk
+++ b/engines/gob/module.mk
@@ -38,6 +38,7 @@ MODULE_OBJS := \
inter_v4.o \
inter_v5.o \
inter_v6.o \
+ inter_v7.o \
map.o \
map_v1.o \
map_v2.o \