aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-04-08 20:49:13 +0000
committerEugene Sandulenko2005-04-08 20:49:13 +0000
commit249134ede3a85f09601a962136bbffdae2eed764 (patch)
treee83767aac2ee5903ef85ebedfbcf39a4e30bb75e
parentb8385b0af1b7e25e9d9f64c2c1fff5403a407ce7 (diff)
downloadscummvm-rg350-249134ede3a85f09601a962136bbffdae2eed764.tar.gz
scummvm-rg350-249134ede3a85f09601a962136bbffdae2eed764.tar.bz2
scummvm-rg350-249134ede3a85f09601a962136bbffdae2eed764.zip
Add NES platform
svn-id: r17454
-rw-r--r--base/gameDetector.cpp2
-rw-r--r--common/util.cpp1
-rw-r--r--common/util.h4
-rw-r--r--scumm/scumm.cpp5
4 files changed, 8 insertions, 4 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index cd5b260ac5..282be9165e 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -90,7 +90,7 @@ static const char USAGE_STRING[] =
" --joystick[=NUM] Enable input with joystick (default: 0 = first\n"
" joystick)\n"
" --platform=WORD Specify version of game (allowed values: amiga,\n"
- " atari, fmtowns, mac, pc, windows)\n"
+ " atari, fmtowns, nes, mac, pc, windows)\n"
" --savepath=PATH Path to where savegames are stored\n"
" --multi-midi Enable combination Adlib and native MIDI\n"
" --native-mt32 True Roland MT-32 (disable GM emulation)\n"
diff --git a/common/util.cpp b/common/util.cpp
index 1effff310c..a203d32ea4 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -168,6 +168,7 @@ const PlatformDescription g_platforms[] = {
{"fmtowns", "towns", "FM-TOWNS", kPlatformFMTowns},
{"macintosh", "mac", "Macintosh", kPlatformMacintosh},
+ {"nes", "nes", "NES", kPlatformNES},
{"pc", "dos", "DOS", kPlatformPC},
{"windows", "windows", "Windows", kPlatformWindows},
diff --git a/common/util.h b/common/util.h
index a57d14efb4..5800023dfb 100644
--- a/common/util.h
+++ b/common/util.h
@@ -130,9 +130,9 @@ enum Platform {
kPlatformAtariST = 2,
kPlatformMacintosh = 3,
kPlatformFMTowns = 4,
- kPlatformWindows = 5
+ kPlatformWindows = 5,
+ kPlatformNES = 6
/*
- kPlatformNES,
kPlatformSEGA,
kPlatformPCEngine
*/
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 423365b606..a7ed441d98 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -664,7 +664,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
// We read data directly from NES ROM instead of extracting it with
// external tool
- if (_features & GF_NES)
+ if ((_features & GF_NES) && _substResFileNameIndex)
_fileHandle = new ScummNESFile();
else
_fileHandle = new ScummFile();
@@ -3255,6 +3255,9 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
case Common::kPlatformMacintosh:
game.features |= GF_MACINTOSH;
break;
+ case Common::kPlatformNES:
+ game.features |= GF_NES;
+ break;
case Common::kPlatformWindows:
game.features |= GF_WINDOWS;