From 3766e0a77df3839c1622b254390e665c009d4b74 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 30 Jan 2007 22:32:51 +0000 Subject: eplaced platform-specific game features with common platform setting. svn-id: r25294 --- engines/gob/detection.cpp | 9 +++++---- engines/gob/game_v1.cpp | 2 +- engines/gob/game_v2.cpp | 2 +- engines/gob/gob.cpp | 4 ++-- engines/gob/gob.h | 5 ++--- engines/gob/inter_v1.cpp | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index fec355e798..1b3c5ac5af 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -129,7 +129,7 @@ static const GOBGameDescription gameDescriptions[] = { UNK_LANG, kPlatformAmiga, }, - GF_GOB1 | GF_AMIGA, + GF_GOB1, "intro" }, { @@ -151,7 +151,7 @@ static const GOBGameDescription gameDescriptions[] = { UNK_LANG, kPlatformMacintosh, }, - GF_GOB1 | GF_MAC, + GF_GOB1, "intro" }, { @@ -217,7 +217,7 @@ static const GOBGameDescription gameDescriptions[] = { DE_DEU, kPlatformAmiga, }, - GF_GOB2 | GF_AMIGA, + GF_GOB2, "intro" }, { // Supplied by blackwhiteeagle in bug report #1605235 @@ -283,7 +283,7 @@ static const GOBGameDescription gameDescriptions[] = { UNK_LANG, kPlatformPC, }, - GF_GOB2 | GF_AMIGA, + GF_GOB2, "intro" }, { @@ -510,6 +510,7 @@ bool GobEngine::detectGame() { _features = gameDescriptions[i].features; _language = gameDescriptions[i].desc.language; + _platform = gameDescriptions[i].desc.platform; return true; } diff --git a/engines/gob/game_v1.cpp b/engines/gob/game_v1.cpp index 47f5475950..a25e02244f 100644 --- a/engines/gob/game_v1.cpp +++ b/engines/gob/game_v1.cpp @@ -81,7 +81,7 @@ void Game_v1::playTot(int16 skipPlay) { _vm->_draw->_fontToSprite[i].height = -1; } - if (_vm->_features & GF_MAC) { + if (_vm->_platform == Common::kPlatformMacintosh) { if (_vm->_adlib) _vm->_adlib->stopPlay(); } else diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index f9aa540308..5db03b067c 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -73,7 +73,7 @@ void Game_v2::playTot(int16 skipPlay) { while (!_vm->_quitRequested) { if (_vm->_global->_inter_variables != 0) _vm->_draw->animateCursor(4); - if (_vm->_features & GF_MAC) { + if (_vm->_platform == Common::kPlatformMacintosh) { if (_vm->_adlib) _vm->_adlib->stopPlay(); } else diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 90ca277a9e..c4dc5b1afb 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -614,8 +614,8 @@ int GobEngine::init() { else error("GobEngine::init(): Unknown version of game engine"); _noMusic = MidiDriver::parseMusicDriver(ConfMan.get("music_driver")) == MD_NULL; - if (!_noMusic && !(_features & Gob::GF_AMIGA) && - (((_features & Gob::GF_MAC) && (_features & Gob::GF_GOB1)) || + if (!_noMusic && !(_platform == Common::kPlatformAmiga) && + (((_platform == Common::kPlatformMacintosh) && (_features & Gob::GF_GOB1)) || (_features & Gob::GF_GOB2))) _adlib = new Adlib(this); _vm = this; diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 6e5abd491b..14aa128f2a 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -91,9 +91,7 @@ enum { GF_GOB3 = 1 << 2, GF_WOODRUFF = 1 << 3, GF_CD = 1 << 4, - GF_MAC = 1 << 5, - GF_EGA = 1 << 6, - GF_AMIGA = 1 << 7 + GF_EGA = 1 << 5 }; enum { @@ -144,6 +142,7 @@ public: int32 _features; Common::Language _language; + Common::Platform _platform; char *_startTot; char *_startTot0; bool _copyProtection; diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 788f9a0f2a..e130293d63 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1641,7 +1641,7 @@ void Inter_v1::o1_loadCurLayer(void) { void Inter_v1::o1_playCDTrack(void) { evalExpr(0); - if (_vm->_features & GF_MAC) { + if (_vm->_platform == Common::kPlatformMacintosh) { if (_vm->_adlib) _vm->_adlib->playTrack(_vm->_global->_inter_resStr); } else @@ -1665,7 +1665,7 @@ void Inter_v1::o1_getCDTrackPos(void) { } void Inter_v1::o1_stopCD(void) { - if (_vm->_features & GF_MAC) { + if (_vm->_platform == Common::kPlatformMacintosh) { if (_vm->_adlib) _vm->_adlib->stopPlay(); } else @@ -2590,7 +2590,7 @@ void Inter_v1::o1_animateObjects(int16 &extraData, int32 *retVarPtr, Goblin::Gob void Inter_v1::o1_drawObjects(int16 &extraData, int32 *retVarPtr, Goblin::Gob_Object *objDesc) { _vm->_goblin->drawObjects(); - if (_vm->_features & GF_MAC) { + if (_vm->_platform == Common::kPlatformMacintosh) { if (_vm->_adlib) _vm->_adlib->playBgMusic(); } else if (_vm->_cdrom->getTrackPos() == -1) -- cgit v1.2.3