diff options
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/anims.cpp | 2 | ||||
-rw-r--r-- | sword2/function.cpp | 2 | ||||
-rw-r--r-- | sword2/maketext.cpp | 2 | ||||
-rw-r--r-- | sword2/resman.cpp | 2 | ||||
-rw-r--r-- | sword2/sound.cpp | 2 | ||||
-rw-r--r-- | sword2/sword2.cpp | 15 | ||||
-rw-r--r-- | sword2/sword2.h | 6 |
7 files changed, 14 insertions, 17 deletions
diff --git a/sword2/anims.cpp b/sword2/anims.cpp index adcfb92c61..c378394546 100644 --- a/sword2/anims.cpp +++ b/sword2/anims.cpp @@ -754,7 +754,7 @@ int32 Logic::fnPlaySequence(int32 *params) { MoviePlayer player; - if (sequenceTextLines && g_sword2->_gameId == GID_SWORD2) + if (sequenceTextLines && !(g_sword2->_features & GF_DEMO)) rv = player.play(filename, sequenceSpeechArray, leadOut); else rv = player.play(filename, NULL, leadOut); diff --git a/sword2/function.cpp b/sword2/function.cpp index 34ba74b70e..13a64dc0c5 100644 --- a/sword2/function.cpp +++ b/sword2/function.cpp @@ -455,7 +455,7 @@ int32 Logic::fnPlayCredits(int32 *params) { // FIXME: This probably isn't the correct way of shutting down ScummVM // Anyway, I don't know if we ever call this from the demo. - if (g_sword2->_gameId == GID_SWORD2_DEMO) { + if (g_sword2->_features & GF_DEMO) { Close_game(); // close engine systems down exit(0); // quit the game } diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp index 1a0584aa4c..5a233ad444 100644 --- a/sword2/maketext.cpp +++ b/sword2/maketext.cpp @@ -590,7 +590,7 @@ void Sword2Engine::initialiseFontResourceFlags(void) { // Get the text line - skip the 2 chars containing the wavId - if (g_sword2->_gameId == GID_SWORD2_DEMO) + if (g_sword2->_features & GF_DEMO) textLine = FetchTextLine(textFile, 451) + 2; else textLine = FetchTextLine(textFile, 54) + 2; diff --git a/sword2/resman.cpp b/sword2/resman.cpp index 679adfcc32..d5047ed4d3 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -1222,7 +1222,7 @@ void ResourceManager::getCd(int cd) { // don't ask for CD's in the playable demo downloaded from our // web-site! - if (g_sword2->_gameId == GID_SWORD2_DEMO) + if (g_sword2->_features & GF_DEMO) return; #ifdef _PCGUIDE diff --git a/sword2/sound.cpp b/sword2/sound.cpp index b807e5d895..0eb9457b39 100644 --- a/sword2/sound.cpp +++ b/sword2/sound.cpp @@ -368,7 +368,7 @@ int32 Logic::fnPlayMusic(int32 *params) { // add the appropriate file extension & play it - if (g_sword2->_gameId == GID_SWORD2_DEMO) { + if (g_sword2->_features & GF_DEMO) { // The demo I found didn't come with any music file, but you // could use the music from the first CD of the complete game, // I suppose... diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp index 636b58d72a..d94d6b60ef 100644 --- a/sword2/sword2.cpp +++ b/sword2/sword2.cpp @@ -57,10 +57,10 @@ extern uint16 _debugLevel; static const GameSettings sword2_settings[] = { /* Broken Sword 2 */ - {"sword2", "Broken Sword II", GID_SWORD2, 99, MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "players.clu" }, - {"sword2alt", "Broken Sword II (alt)", GID_SWORD2, 99, MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "r2ctlns.ocx" }, - {"sword2demo", "Broken Sword II (Demo)", GID_SWORD2_DEMO, 99, MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "players.clu" }, - {NULL, NULL, 0, 0, MDT_NONE, 0, NULL} + {"sword2", "Broken Sword II", MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "players.clu" }, + {"sword2alt", "Broken Sword II (alt)", MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "r2ctlns.ocx" }, + {"sword2demo", "Broken Sword II (Demo)", MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER | GF_DEMO, "players.clu" }, + {NULL, NULL, MDT_NONE, 0, NULL} }; GameList Engine_SWORD2_gameList() { @@ -123,7 +123,6 @@ Sword2Engine::Sword2Engine(GameDetector *detector, OSystem *syst) _newgui = NULL; _debugger = NULL; _features = detector->_game.features; - _gameId = detector->_game.id; _targetName = strdup(detector->_targetName.c_str()); _bootParam = ConfMan.getInt("boot_param"); _saveSlot = ConfMan.getInt("save_slot"); @@ -221,7 +220,7 @@ int32 Sword2Engine::InitialiseGame(void) { Init_fx_queue(); // all demos (not just web) - if (_gameId == GID_SWORD2_DEMO) { + if (_features & GF_DEMO) { // set script variable DEMO = 1; } @@ -374,7 +373,7 @@ void Sword2Engine::go() { } else if (c == 'P') { // 'P' while not paused = pause! PauseGame(); - } else if (c == 'C' && _gameId == GID_SWORD2) { + } else if (c == 'C' && !(_features & GF_DEMO)) { g_logic.fnPlayCredits(NULL); } #ifdef _SWORD2_DEBUG @@ -426,7 +425,7 @@ void Sword2Engine::Start_game(void) { debug(5, "Start_game() STARTING:"); // all demos not just web - if (_gameId == GID_SWORD2_DEMO) + if (_features & GF_DEMO) screen_manager_id = 19; // DOCKS SECTION START else screen_manager_id = 949; // INTRO & PARIS START diff --git a/sword2/sword2.h b/sword2/sword2.h index 3f0ad2d41f..21d30cff22 100644 --- a/sword2/sword2.h +++ b/sword2/sword2.h @@ -29,9 +29,8 @@ #include "bs2/driver/d_sound.h" #include "bs2/driver/d_draw.h" -enum BSGameId { - GID_SWORD2 = GID_SWORD2_FIRST, - GID_SWORD2_DEMO +enum { + GF_DEMO = 1 << 0 }; class NewGui; @@ -73,7 +72,6 @@ public: int32 InitialiseGame(void); GameDetector *_detector; uint32 _features; - byte _gameId; char *_targetName; // target name for saves Sound *_sound; |