aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray2003-08-14 11:40:50 +0000
committerJonathan Gray2003-08-14 11:40:50 +0000
commit413f09eff5ad8b26dcfff3a2dc1b98b361153136 (patch)
treea17bbe602dc50f8292ae3d45c3931eda85964c86
parent50482ded7ba3bae14b136d3122747370aa1af297 (diff)
downloadscummvm-rg350-413f09eff5ad8b26dcfff3a2dc1b98b361153136.tar.gz
scummvm-rg350-413f09eff5ad8b26dcfff3a2dc1b98b361153136.tar.bz2
scummvm-rg350-413f09eff5ad8b26dcfff3a2dc1b98b361153136.zip
add maniacnes target, rather prelimary so people would be well advised not to add to compatibility at this point
svn-id: r9690
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/resource_v2.cpp7
-rw-r--r--scumm/script_v2.cpp12
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/scummvm.cpp5
5 files changed, 25 insertions, 1 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 1133e84b74..12cff79fc1 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -285,6 +285,7 @@ protected:
void o2_startScript();
void o2_subtract();
void o2_subIndirect();
+ void o2_switchCostumeSet();
void o2_verbOps();
void o2_waitForActor();
void o2_waitForMessage();
diff --git a/scumm/resource_v2.cpp b/scumm/resource_v2.cpp
index 7576803634..dac033053e 100644
--- a/scumm/resource_v2.cpp
+++ b/scumm/resource_v2.cpp
@@ -168,6 +168,13 @@ void Scumm_v2::readIndexFile() {
_version = 1;
readClassicIndexFile();
break;
+ case 0x4643:
+ if (!(_features & GF_NES))
+ error("use maniacnes target");
+ warning("NES V1 game detected");
+ _version = 1;
+ readClassicIndexFile();
+ break;
default:
error("Unknown magic id (0x%X) - this version is unsupported", magic);
break;
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index cab9465c34..bf8f570d5d 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -246,7 +246,7 @@ void Scumm_v2::setupOpcodes() {
OPCODE(o5_notEqualZero),
OPCODE(o2_setOwnerOf),
OPCODE(o2_addIndirect),
- OPCODE(o2_dummy),
+ OPCODE(o2_switchCostumeSet),
/* AC */
OPCODE(o2_drawSentence),
OPCODE(o5_putActorInRoom),
@@ -1488,6 +1488,16 @@ void Scumm_v2::o2_dummy() {
warning("o2_dummy invoked (opcode %d)", _opcode);
}
+void Scumm_v2::o2_switchCostumeSet() {
+ // NES version of maniac uses this to switch between the two
+ // groups of costumes it has
+ if (_features & GF_NES) {
+ warning("stub: o2_switchCostumeSet()");
+ fetchScriptByte();
+ } else
+ o2_dummy();
+}
+
void Scumm_v2::resetSentence() {
VAR(VAR_SENTENCE_VERB) = VAR(VAR_BACKUP_VERB);
VAR(VAR_SENTENCE_OBJECT1) = 0;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 54c9dd1d82..5787cc450a 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -85,6 +85,7 @@ enum GameFeatures {
GF_AFTER_HEV7 = 1 << 15,
GF_FMTOWNS = 1 << 16,
GF_FEW_LOCALS = 1 << 17,
+ GF_NES = 1 << 18,
GF_EXTERNAL_CHARSET = GF_SMALL_HEADER
};
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index b4ef0688b8..a1d4dd9fe7 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -70,6 +70,8 @@ static const VersionSettings scumm_settings[] = {
{"maniac", "Maniac Mansion", GID_MANIAC, 2, VersionSettings::ADLIB_ALWAYS,
GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, "00.LFL"},
+ {"maniacnes", "Maniac Mansion (NES)", GID_MANIAC, 2, VersionSettings::ADLIB_ALWAYS,
+ GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING | GF_NES, "00.LFL"},
{"zak", "Zak McKracken and the Alien Mindbenders", GID_ZAK, 2, VersionSettings::ADLIB_ALWAYS,
GF_SMALL_HEADER | GF_USE_KEY | GF_SMALL_NAMES | GF_16COLOR | GF_OLD_BUNDLE | GF_NO_SCALING, "00.LFL"},
@@ -562,6 +564,9 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
} else if (_gameId == GID_CMI) {
_screenWidth = 640;
_screenHeight = 480;
+ } else if (_features & GF_NES) {
+ _screenWidth = 256;
+ _screenHeight = 240;
} else {
_screenWidth = 320;
_screenHeight = 200;