aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/saga.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2008-12-21 15:59:05 +0000
committerFilippos Karapetis2008-12-21 15:59:05 +0000
commitd0f4f97ea9d8ded6280c2c023a55febecabef5d2 (patch)
tree17d9fb42b1a80ba38270bf11b03bfa35b03c6daf /engines/saga/saga.cpp
parente11c17a005a1efb1be077ceb856c48446e11d95c (diff)
downloadscummvm-rg350-d0f4f97ea9d8ded6280c2c023a55febecabef5d2.tar.gz
scummvm-rg350-d0f4f97ea9d8ded6280c2c023a55febecabef5d2.tar.bz2
scummvm-rg350-d0f4f97ea9d8ded6280c2c023a55febecabef5d2.zip
Cleaned up the mess with game IDs and game types: removed game types, reduced the game IDs and added game features where necessary
svn-id: r35467
Diffstat (limited to 'engines/saga/saga.cpp')
-rw-r--r--engines/saga/saga.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 428579ef06..316f4b7cc5 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -216,7 +216,7 @@ Common::Error SagaEngine::init() {
_gfx->initPalette();
if (_voiceFilesExist) {
- if (getGameType() == GType_IHNM) {
+ if (getGameId() == GID_IHNM) {
if (!ConfMan.hasKey("voices")) {
_voicesEnabled = true;
ConfMan.setBool("voices", true);
@@ -234,7 +234,7 @@ Common::Error SagaEngine::init() {
// well for 320x200 but it's unclear how well it will work for
// 640x480.
- if (getGameType() == GType_ITE)
+ if (getGameId() == GID_ITE)
_system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true);
return Common::kNoError;
@@ -248,19 +248,19 @@ Common::Error SagaEngine::go() {
if (ConfMan.hasKey("start_scene")) {
_scene->changeScene(ConfMan.getInt("start_scene"), 0, kTransitionNoFade);
} else if (ConfMan.hasKey("boot_param")) {
- if (getGameType() == GType_ITE)
+ if (getGameId() == GID_ITE)
_interface->addToInventory(_actor->objIndexToId(0)); // Magic hat
_scene->changeScene(ConfMan.getInt("boot_param"), 0, kTransitionNoFade);
} else if (ConfMan.hasKey("save_slot")) {
// Init the current chapter to 8 (character selection) for IHNM
- if (getGameType() == GType_IHNM)
+ if (getGameId() == GID_IHNM)
_scene->changeScene(-2, 0, kTransitionFade, 8);
// First scene sets up palette
_scene->changeScene(getStartSceneNumber(), 0, kTransitionNoFade);
_events->handleEvents(0); // Process immediate events
- if (getGameType() != GType_IHNM)
+ if (getGameId() == GID_ITE)
_interface->setMode(kPanelMain);
else
_interface->setMode(kPanelChapterSelection);
@@ -374,13 +374,13 @@ const char *SagaEngine::getObjectName(uint16 objectId) {
const HitZone *hitZone;
// Disable the object names in IHNM when the chapter is 8
- if (getGameType() == GType_IHNM && _scene->currentChapterNumber() == 8)
+ if (getGameId() == GID_IHNM && _scene->currentChapterNumber() == 8)
return "";
switch (objectTypeId(objectId)) {
case kGameObjectObject:
obj = _actor->getObj(objectId);
- if (getGameType() == GType_ITE)
+ if (getGameId() == GID_ITE)
return _script->_mainStrings.getString(obj->_nameIndex);
return _actor->_objectsStrings.getString(obj->_nameIndex);
case kGameObjectActor:
@@ -452,7 +452,7 @@ void SagaEngine::getExcuseInfo(int verb, const char *&textString, int &soundReso
ColorId SagaEngine::KnownColor2ColorId(KnownColor knownColor) {
ColorId colorId = kITEColorTransBlack;
- if (getGameType() == GType_ITE) {
+ if (getGameId() == GID_ITE) {
switch (knownColor) {
case(kKnownColorTransparent):
colorId = kITEColorTransBlack;
@@ -482,10 +482,10 @@ ColorId SagaEngine::KnownColor2ColorId(KnownColor knownColor) {
default:
error("SagaEngine::KnownColor2ColorId unknown color %i", knownColor);
}
- } else if (getGameType() == GType_IHNM) {
+ } else if (getGameId() == GID_IHNM) {
// The default colors in the Spanish version of IHNM are shifted by one
// Fixes bug #1848016 - "IHNM: Wrong Subtitles Color (Spanish)"
- int offset = (getGameId() == GID_IHNM_CD_ES) ? 1 : 0;
+ int offset = (getLanguage() == Common::ES_ESP) ? 1 : 0;
switch (knownColor) {
case(kKnownColorTransparent):