aboutsummaryrefslogtreecommitdiff
path: root/gob
diff options
context:
space:
mode:
authorSven Hesse2006-01-14 12:25:27 +0000
committerSven Hesse2006-01-14 12:25:27 +0000
commita4bf1a016bdb0a83107617b780beccc678cfaaf8 (patch)
treec551ae29e68372f068fa0d7afc2bc1bacc576466 /gob
parent3c14ef483184c002204199e721caad2c331ef698 (diff)
downloadscummvm-rg350-a4bf1a016bdb0a83107617b780beccc678cfaaf8.tar.gz
scummvm-rg350-a4bf1a016bdb0a83107617b780beccc678cfaaf8.tar.bz2
scummvm-rg350-a4bf1a016bdb0a83107617b780beccc678cfaaf8.zip
Added a Gob2 opcode stub
svn-id: r20024
Diffstat (limited to 'gob')
-rw-r--r--gob/gob.cpp11
-rw-r--r--gob/inter.h1
-rw-r--r--gob/inter_v2.cpp11
3 files changed, 21 insertions, 2 deletions
diff --git a/gob/gob.cpp b/gob/gob.cpp
index 18db730eee..ce2a1d9492 100644
--- a/gob/gob.cpp
+++ b/gob/gob.cpp
@@ -195,7 +195,16 @@ Engine *Engine_GOB_create(GameDetector * detector, OSystem *syst) {
// TODO
// Fallback. Maybe we will be able to determine game type from game
// data contents
- uint32 features = Gob::GF_GOB1;
+ Common::String realGame;
+ uint32 features;
+ if (ConfMan.hasKey("gameid"))
+ realGame = ConfMan.get("gameid");
+ else
+ realGame = detector->_targetName;
+ if (!strcmp(realGame.c_str(), "gob2"))
+ features = Gob::GF_GOB2;
+ else
+ features = Gob::GF_GOB1;
for (g = gob_games; g->name; g++) {
if (strcmp(g->md5sum, (char *)md5str) == 0) {
diff --git a/gob/inter.h b/gob/inter.h
index 6a41835e97..1fde84f780 100644
--- a/gob/inter.h
+++ b/gob/inter.h
@@ -299,6 +299,7 @@ protected:
virtual const char *getOpcodeGoblinDesc(int i);
void o2_drawStub(void) { warning("Gob2 stub"); }
+ void o2_stub0x80(void);
};
} // End of namespace Gob
diff --git a/gob/inter_v2.cpp b/gob/inter_v2.cpp
index 8c5b376d0c..0165d812ac 100644
--- a/gob/inter_v2.cpp
+++ b/gob/inter_v2.cpp
@@ -276,7 +276,7 @@ void Inter_v2::setupOpcodes(void) {
{NULL, ""},
{NULL, ""},
/* 80 */
- OPCODE(o2_drawStub),
+ OPCODE(o2_stub0x80),
OPCODE(o2_drawStub),
OPCODE(o2_drawStub),
OPCODE(o2_drawStub),
@@ -703,4 +703,13 @@ const char *Inter_v2::getOpcodeGoblinDesc(int i) {
return "";
}
+void Inter_v2::o2_stub0x80(void) {
+ _vm->_global->_inter_execPtr += 2;
+
+ int16 expr1 = _vm->_parse->parseValExpr();
+ int16 expr2 = _vm->_parse->parseValExpr();
+
+ warning("STUB: Gob2 drawOperation 0x80 (%d %d)", expr1, expr2);
+}
+
} // End of namespace Gob