[Scummvm-cvs-logs] SF.net SVN: scummvm:[35467] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Dec 21 16:59:05 CET 2008


Revision: 35467
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35467&view=rev
Author:   thebluegr
Date:     2008-12-21 15:59:05 +0000 (Sun, 21 Dec 2008)

Log Message:
-----------
Cleaned up the mess with game IDs and game types: removed game types, reduced the game IDs and added game features where necessary

Modified Paths:
--------------
    scummvm/trunk/engines/saga/actor.cpp
    scummvm/trunk/engines/saga/actor_path.cpp
    scummvm/trunk/engines/saga/actor_walk.cpp
    scummvm/trunk/engines/saga/animation.cpp
    scummvm/trunk/engines/saga/animation.h
    scummvm/trunk/engines/saga/detection.cpp
    scummvm/trunk/engines/saga/detection_tables.h
    scummvm/trunk/engines/saga/events.cpp
    scummvm/trunk/engines/saga/font.cpp
    scummvm/trunk/engines/saga/gfx.cpp
    scummvm/trunk/engines/saga/image.cpp
    scummvm/trunk/engines/saga/interface.cpp
    scummvm/trunk/engines/saga/introproc_ihnm.cpp
    scummvm/trunk/engines/saga/introproc_ite.cpp
    scummvm/trunk/engines/saga/music.cpp
    scummvm/trunk/engines/saga/palanim.cpp
    scummvm/trunk/engines/saga/render.cpp
    scummvm/trunk/engines/saga/rscfile.cpp
    scummvm/trunk/engines/saga/saga.cpp
    scummvm/trunk/engines/saga/saga.h
    scummvm/trunk/engines/saga/saveload.cpp
    scummvm/trunk/engines/saga/scene.cpp
    scummvm/trunk/engines/saga/scene.h
    scummvm/trunk/engines/saga/script.cpp
    scummvm/trunk/engines/saga/sfuncs.cpp
    scummvm/trunk/engines/saga/sndres.cpp
    scummvm/trunk/engines/saga/sprite.cpp
    scummvm/trunk/engines/saga/sthread.cpp

Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/actor.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -128,7 +128,7 @@
 	// Load ITE actor strings. (IHNM actor strings are loaded by
 	// loadGlobalResources() instead.)
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 
 		_vm->_resource->loadResource(_actorContext, _vm->getResourceDescription()->actorsStringsResourceId, stringsPointer, stringsLength);
 
@@ -136,7 +136,7 @@
 		free(stringsPointer);
 	}
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		_actorsCount = ITE_ACTORCOUNT;
 		_actors = (ActorData **)malloc(_actorsCount * sizeof(*_actors));
 		for (i = 0; i < _actorsCount; i++) {
@@ -244,7 +244,7 @@
 		for (int orient = 0; orient < ACTOR_DIRECTIONS_COUNT; orient++) {
 			// Load all four orientations
 			framesPointer[i].directions[orient].frameIndex = readS.readUint16();
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				framesPointer[i].directions[orient].frameCount = readS.readSint16();
 			} else {
 				framesPointer[i].directions[orient].frameCount = readS.readByte();
@@ -272,7 +272,7 @@
 		// It's normal for some actors to have no frames
 		//warning("Frame List ID = 0 for actor index %d", actor->_index);
 
-		//if (_vm->getGameType() == GType_ITE)
+		//if (_vm->getGameId() == GID_ITE)
 		return true;
 	}
 
@@ -313,7 +313,7 @@
 
 	_vm->_sprite->loadList(resourceId, actor->_spriteList);
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		if (actor->_flags & kExtended) {
 			while ((lastFrame >= actor->_spriteList.spriteCount)) {
 				resourceId++;
@@ -612,7 +612,7 @@
 void Actor::setProtagState(int state) {
 	_protagState = state;
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		if (!_protagonist->_shareFrames)
 			free(_protagonist->_frames);
 
@@ -624,7 +624,7 @@
 
 int Actor::getFrameType(ActorFrameTypes frameType) {
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		switch (frameType) {
 		case kFrameStand:
 			return kFrameITEStand;
@@ -678,7 +678,7 @@
 	if ((actor->_facingDirection < kDirUp) || (actor->_facingDirection > kDirUpLeft))
 		error("Actor::getActorFrameRange Wrong direction 0x%X actorId 0x%X", actor->_facingDirection, actorId);
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		if (frameType >= actor->_framesCount) {
 			warning("Actor::getActorFrameRange Wrong frameType 0x%X (%d) actorId 0x%X", frameType, actor->_framesCount, actorId);
 			return &def;
@@ -689,7 +689,7 @@
 		return &actor->_frames[frameType].directions[fourDirection];
 	}
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		// It is normal for some actors to have no frames for a given frameType
 		// These are mainly actors with no frames at all (e.g. narrators or immovable actors)
 		// Examples are AM and the boy when he is talking to Benny via the computer screen.
@@ -819,12 +819,12 @@
 			width = _activeSpeech.speechBox.width();
 			height = _vm->_font->getHeight(kKnownFontScript, _activeSpeech.strings[0], width - 2, _activeSpeech.getFontFlags(0)) + 1;
 
-			if (_vm->getGameType() == GType_IHNM) {
+			if (_vm->getGameId() == GID_IHNM) {
 				if (height > _vm->_scene->getHeight(true) / 2 && width < _vm->getDisplayWidth() - 20) {
 					width = _vm->getDisplayWidth() - 20;
 					height = _vm->_font->getHeight(kKnownFontScript, _activeSpeech.strings[0], width - 2, _activeSpeech.getFontFlags(0)) + 1;
 				}
-			} else if (_vm->getGameType() == GType_ITE) {
+			} else if (_vm->getGameId() == GID_ITE) {
 				if (height > 40 && width < _vm->getDisplayWidth() - 100) {
 					width = _vm->getDisplayWidth() - 100;
 					height = _vm->_font->getHeight(kKnownFontScript, _activeSpeech.strings[0], width - 2, _activeSpeech.getFontFlags(0)) + 1;
@@ -875,9 +875,9 @@
 
 		if (middle <= beginSlope) {
 			commonObjectData->_screenScale = 256;
-		} else if (_vm->getGameType() == GType_IHNM && (objectTypeId(commonObjectData->_id) & kGameObjectObject)) {
+		} else if (_vm->getGameId() == GID_IHNM && (objectTypeId(commonObjectData->_id) & kGameObjectObject)) {
 			commonObjectData->_screenScale = 256;
-		} else if (_vm->getGameType() == GType_IHNM && (commonObjectData->_flags & kNoScale)) {
+		} else if (_vm->getGameId() == GID_IHNM && (commonObjectData->_flags & kNoScale)) {
 			commonObjectData->_screenScale = 256;
 		} else if (middle >= endSlope) {
 			commonObjectData->_screenScale = 1;
@@ -940,7 +940,7 @@
 		}
 		if (_vm->_sprite->hitTest(*spriteList, frameNumber, drawObject->_screenPosition, drawObject->_screenScale, testPoint)) {
 			result = drawObject->_id;
-			if (_vm->getGameType() == GType_ITE)
+			if (_vm->getGameId() == GID_ITE)
 				return result;		// in ITE, return the first result found (read above)
 		}
 	}
@@ -956,7 +956,7 @@
 	if (_vm->_scene->getFlags() & kSceneFlagISO) {
 		compareFunction = &tileCommonObjectCompare;
 	} else {
-		if (_vm->getGameType() == GType_ITE)
+		if (_vm->getGameId() == GID_ITE)
 			compareFunction = &commonObjectCompare;
 		else
 			compareFunction = &commonObjectCompareIHNM;
@@ -1068,8 +1068,8 @@
 
 void Actor::drawSpeech(void) {
 	if (!isSpeaking() || !_activeSpeech.playing || _vm->_script->_skipSpeeches
-		|| (!_vm->_subtitlesEnabled && (_vm->getFeatures() & GF_CD_FX))
-		|| (!_vm->_subtitlesEnabled && (_vm->getGameType() == GType_IHNM)))
+		|| (!_vm->_subtitlesEnabled && _vm->getGameId() == GID_ITE && !(_vm->getFeatures() & GF_ITE_FLOPPY))
+		|| (!_vm->_subtitlesEnabled && (_vm->getGameId() == GID_IHNM)))
 		return;
 
 	Point textPoint;
@@ -1093,9 +1093,9 @@
 
 			textPoint.x = CLIP(actor->_screenPosition.x - width / 2, 10, _vm->getDisplayWidth() - 10 - width);
 
-			if (_vm->getGameType() == GType_ITE)
+			if (_vm->getGameId() == GID_ITE)
 				textPoint.y = CLIP(actor->_screenPosition.y - 58, 10, _vm->_scene->getHeight(true) - 10 - height);
-			else if (_vm->getGameType() == GType_IHNM)
+			else if (_vm->getGameId() == GID_IHNM)
 				textPoint.y = 10; // CLIP(actor->_screenPosition.y - 160, 10, _vm->_scene->getHeight(true) - 10 - height);
 
 			_vm->_font->textDraw(kKnownFontScript, outputString, textPoint,
@@ -1132,7 +1132,7 @@
 
 	dist = MIN(actor->_screenPosition.x - 10, _vm->getDisplayWidth() - 10 - actor->_screenPosition.x);
 
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		dist = CLIP<int16>(dist, 60, 150);
 	else
 		dist = CLIP<int16>(dist, 120, 300);
@@ -1154,7 +1154,7 @@
 	// scene. After speaking with AM, the compact disk is visible. She always says this line
 	// when entering room 59, after speaking with AM, if the compact disk is not picked up yet
 	// Check Script::sfDropObject for the other part of this hack
-	if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 3 &&
+	if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 3 &&
 		_vm->_scene->currentSceneNumber() == 59 && _activeSpeech.sampleResourceId == 286) {
 		for (i = 0; i < _objsCount; i++) {
 			if (_objs[i]->_id == 16385) {	// the compact disk
@@ -1178,7 +1178,7 @@
 	_activeSpeech.speechFlags = speechFlags;
 	_activeSpeech.actorsCount = 1;
 	_activeSpeech.actorIds[0] = 0;
-	if (!(_vm->getFeatures() & GF_CD_FX))
+	if (_vm->getFeatures() & GF_ITE_FLOPPY)
 		_activeSpeech.sampleResourceId = -1;
 	else
 		_activeSpeech.sampleResourceId = sampleResourceId;
@@ -1212,7 +1212,7 @@
 void Actor::abortAllSpeeches() {
 	// WORKAROUND: Don't abort speeches in scene 31 (tree with beehive). This prevents the
 	// making fire animation from breaking
-	if (_vm->getGameType() == GType_ITE && _vm->_scene->currentSceneNumber() == 31)
+	if (_vm->getGameId() == GID_ITE && _vm->_scene->currentSceneNumber() == 31)
 		return;
 
 	abortSpeech();

Modified: scummvm/trunk/engines/saga/actor_path.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor_path.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/actor_path.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -233,7 +233,7 @@
 	const PathDirectionData *samplePathDirection;
 	Point nextPoint;
 	int directionCount;
-	int16 compressX = (_vm->getGameType() == GType_ITE) ? 2 : 1;
+	int16 compressX = (_vm->getGameId() == GID_ITE) ? 2 : 1;
 
 	_pathDirectionListCount = 0;
 	pointCounter = 0;

Modified: scummvm/trunk/engines/saga/actor_walk.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor_walk.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/actor_walk.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -207,7 +207,7 @@
 			if (actor->_flags & kProtagonist) {
 				actor->_finalTarget = actor->_location;
 				_centerActor = _protagonist = actor;
-			} else if (_vm->getGameType() == GType_ITE &&
+			} else if (_vm->getGameId() == GID_ITE &&
 					   _vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP) {
 				continue;
 			}
@@ -247,7 +247,7 @@
 		//
 		// After stepping on an action zone, Rif is trying to exit.
 		// Shift Rif's entry position to a non action zone area.
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			if ((_vm->_scene->currentSceneNumber() >= 53) && (_vm->_scene->currentSceneNumber() <= 66))
 				_protagonist->_location.y += 10;
 		}
@@ -341,7 +341,7 @@
 		if (!actor->_inScene)
 			continue;
 
-		if ((_vm->getGameType() == GType_ITE) && (i == ACTOR_DRAGON_INDEX)) {
+		if ((_vm->getGameId() == GID_ITE) && (i == ACTOR_DRAGON_INDEX)) {
 			moveDragon(actor);
 			continue;
 		}
@@ -455,7 +455,7 @@
 					}
 
 					actor->_partialTarget.fromScreenPoint(actor->_walkStepsPoints[actor->_walkStepIndex++]);
-					if (_vm->getGameType() == GType_ITE) {
+					if (_vm->getGameId() == GID_ITE) {
 						if (actor->_partialTarget.x > 224 * 2 * ACTOR_LMULT) {
 							actor->_partialTarget.x -= 256 * 2 * ACTOR_LMULT;
 						}
@@ -474,7 +474,7 @@
 					}
 				}
 
-				if (_vm->getGameType() == GType_ITE)
+				if (_vm->getGameId() == GID_ITE)
 					speed = (ACTOR_LMULT * 2 * actor->_screenScale + 63) / 256;
 				else
 					speed = (ACTOR_SPEED * actor->_screenScale + 128) >> 8;
@@ -482,7 +482,7 @@
 				if (speed < 1)
 					speed = 1;
 
-				if (_vm->getGameType() == GType_IHNM)
+				if (_vm->getGameId() == GID_IHNM)
 					speed = speed / 2;
 
 				if ((actor->_actionDirection == kDirUp) || (actor->_actionDirection == kDirDown)) {
@@ -539,7 +539,7 @@
 				actor->cycleWrap(frameRange->frameCount);
 				actor->_frameNumber = frameRange->frameIndex + actor->_actionCycle;
 			} else {
-				if (_vm->getGameType() == GType_ITE) {
+				if (_vm->getGameId() == GID_ITE) {
 					actor->_location.x += directionLUT[actor->_actionDirection][0] * 2;
 					actor->_location.y += directionLUT[actor->_actionDirection][1] * 2;
 				} else {
@@ -696,7 +696,7 @@
 			// to the left, which makes him exit the screen when the graffiti is examined.
 			// We effectively change the left side of the hitzone here so that it starts from
 			// pixel 301 onwards. The same workaround is applied in Script::whichObject
-			if (_vm->getGameType() == GType_IHNM) {
+			if (_vm->getGameId() == GID_IHNM) {
 				if (_vm->_scene->currentChapterNumber() == 1 && _vm->_scene->currentSceneNumber() == 22)
 					if (hitPoint.x <= 300)
 						hitZone = NULL;
@@ -710,7 +710,7 @@
 				// (room 51) for hitzone 24577 (the door with the copy protection) to avoid the glitch. This glitch
 				// happens because the copy protection is supposed to kick in at this point, but it's bypassed
 				// (with permission from Wyrmkeep Entertainment)
-				if (hitZone && !(_vm->getGameType() == GType_ITE && _vm->_scene->currentSceneNumber() == 51 && hitZone->getHitZoneId() == 24577)) {
+				if (hitZone && !(_vm->getGameId() == GID_ITE && _vm->_scene->currentSceneNumber() == 51 && hitZone->getHitZoneId() == 24577)) {
 					stepZoneAction(actor, hitZone, false, false);
 				}
 			}
@@ -891,7 +891,7 @@
 
 	if (_vm->_scene->getFlags() & kSceneFlagISO) {
 
-		if ((_vm->getGameType() == GType_ITE) && (actor->_index == ACTOR_DRAGON_INDEX)) {
+		if ((_vm->getGameId() == GID_ITE) && (actor->_index == ACTOR_DRAGON_INDEX)) {
 			return false;
 		}
 
@@ -938,10 +938,10 @@
 
 			if (
 				((actor->_currentAction >= kActionWalkToPoint && actor->_currentAction <= kActionWalkDir) ||
-				(_vm->getGameType() == GType_ITE && actor == _protagonist)) &&
+				(_vm->getGameId() == GID_ITE && actor == _protagonist)) &&
 				!_vm->_scene->canWalk(pointFrom)) {
 
-				int max = _vm->getGameType() == GType_ITE ? 8 : 4;
+				int max = _vm->getGameId() == GID_ITE ? 8 : 4;
 
 				for (i = 1; i < max; i++) {
 					pointAdd = pointFrom;
@@ -956,7 +956,7 @@
 						pointFrom = pointAdd;
 						break;
 					}
-					if (_vm->getGameType() == GType_ITE) {
+					if (_vm->getGameId() == GID_ITE) {
 						pointAdd = pointFrom;
 						pointAdd.x += i;
 						if (_vm->_scene->canWalk(pointAdd)) {
@@ -1087,7 +1087,7 @@
 	actor = getActor(actorId);
 	actor->_actorFlags &= ~kActorBackwards;
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 
 		if (actor->_location.distance(actor->_finalTarget) > 8 && (actor->_flags & kProtagonist) && recurse && !(actor->_actorFlags & kActorNoCollide)) {
 			actor->_actorFlags |= kActorNoCollide;
@@ -1107,7 +1107,7 @@
 	if (actor == _protagonist) {
 		_vm->_script->wakeUpActorThread(kWaitTypeWalk, actor);
 		if (_vm->_script->_pendingVerb == _vm->_script->getVerbType(kVerbWalkTo)) {
-			if (_vm->getGameType() == GType_ITE)
+			if (_vm->getGameId() == GID_ITE)
 				actor->_location.toScreenPointUV(testPoint); // it's wrong calculation, but it is used in ITE
 			else
 				actor->_location.toScreenPointXY(testPoint);

Modified: scummvm/trunk/engines/saga/animation.cpp
===================================================================
--- scummvm/trunk/engines/saga/animation.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/animation.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -320,7 +320,7 @@
 		_vm->_interface->restoreMode();
 		_vm->_gfx->showCursor(true);
 
-		if (_vm->getGameId() == GID_IHNM_DEMO) {
+		if (_vm->getFeatures() & GF_IHNM_DEMO) {
 			// Enable the save reminder state after each cutaway for the IHNM demo
 			_vm->_interface->setSaveReminderState(true);
 		}

Modified: scummvm/trunk/engines/saga/animation.h
===================================================================
--- scummvm/trunk/engines/saga/animation.h	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/animation.h	2008-12-21 15:59:05 UTC (rev 35467)
@@ -179,7 +179,7 @@
 	}
 
 	bool isLongData() const {
-		if ((_vm->getGameType() == GType_ITE) && (_vm->getPlatform() != Common::kPlatformMacintosh)) {
+		if ((_vm->getGameId() == GID_ITE) && (_vm->getPlatform() != Common::kPlatformMacintosh)) {
 			return false;
 		}
 		return true;

Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/detection.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -45,7 +45,6 @@
 struct SAGAGameDescription {
 	Common::ADGameDescription desc;
 
-	int gameType;
 	int gameId;
 	uint32 features;
 	int startSceneNumber;
@@ -79,7 +78,6 @@
 int SagaEngine::getFontsCount() const { return _gameDescription->fontsCount; }
 
 int SagaEngine::getGameId() const { return _gameDescription->gameId; }
-int SagaEngine::getGameType() const { return _gameDescription->gameType; }
 
 uint32 SagaEngine::getFeatures() const {
 	uint32 result = _gameDescription->features;
@@ -317,29 +315,29 @@
 }
 
 const GameDisplayInfo &SagaEngine::getDisplayInfo() {
-	return _gameDescription->gameType == GType_ITE ? ITE_DisplayInfo : IHNM_DisplayInfo;
+	return _gameDescription->gameId == GID_ITE ? ITE_DisplayInfo : IHNM_DisplayInfo;
 }
 
 int SagaEngine::getDisplayWidth() const {
-	const GameDisplayInfo &di = _gameDescription->gameType == GType_ITE ? ITE_DisplayInfo : IHNM_DisplayInfo;
+	const GameDisplayInfo &di = _gameDescription->gameId == GID_ITE ? ITE_DisplayInfo : IHNM_DisplayInfo;
 	return di.logicalWidth;
 }
 
 int SagaEngine::getDisplayHeight() const {
-	const GameDisplayInfo &di = _gameDescription->gameType == GType_ITE ? ITE_DisplayInfo : IHNM_DisplayInfo;
+	const GameDisplayInfo &di = _gameDescription->gameId == GID_ITE ? ITE_DisplayInfo : IHNM_DisplayInfo;
 	return di.logicalHeight;
 }
 
 Common::Error SagaEngine::loadGameState(int 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);

Modified: scummvm/trunk/engines/saga/detection_tables.h
===================================================================
--- scummvm/trunk/engines/saga/detection_tables.h	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/detection_tables.h	2008-12-21 15:59:05 UTC (rev 35467)
@@ -203,9 +203,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_DEMO
 		},
-		GType_ITE,
-		GID_ITE_DEMO_G, // Game id
-		0, // features
+		GID_ITE, // Game id
+		GF_OLD_ITE_DOS, // features
 		ITE_DEFAULT_SCENE, // Starting scene number
 		&ITEDemo_Resources,
 		ARRAYSIZE(ITEDEMO_GameFonts),
@@ -230,9 +229,8 @@
 			Common::kPlatformMacintosh,
 			Common::ADGF_DEMO
 		},
-		GType_ITE,
-		GID_ITE_MACDEMO2,
-		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES,
+		GID_ITE,
+		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_SCENE_SUBSTITUTES | GF_MONO_MUSIC,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -258,9 +256,8 @@
 			Common::kPlatformMacintosh,
 			Common::ADGF_DEMO
 		},
-		GType_ITE,
-		GID_ITE_MACDEMO1,
-		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX | GF_NON_INTERACTIVE,
+		GID_ITE,
+		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_NON_INTERACTIVE,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -286,9 +283,8 @@
 			Common::kPlatformWindows,
 			Common::ADGF_DEMO
 		},
-		GType_ITE,
-		GID_ITE_WINDEMO3,
-		GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES,
+		GID_ITE,
+		GF_WYRMKEEP | GF_SCENE_SUBSTITUTES,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -314,9 +310,8 @@
 			Common::kPlatformWindows,
 			Common::ADGF_DEMO
 		},
-		GType_ITE,
-		GID_ITE_WINDEMO1,
-		GF_WYRMKEEP | GF_CD_FX | GF_NON_INTERACTIVE,
+		GID_ITE,
+		GF_WYRMKEEP | GF_NON_INTERACTIVE,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -349,9 +344,8 @@
 			Common::kPlatformMacintosh,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_MACCD_G,
-		GF_BIG_ENDIAN_DATA | GF_CD_FX,
+		GID_ITE,
+		GF_BIG_ENDIAN_DATA,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -375,9 +369,8 @@
 			Common::kPlatformMacintosh,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_MACCD,
-		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX,
+		GID_ITE,
+		GF_BIG_ENDIAN_DATA | GF_WYRMKEEP,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -409,9 +402,8 @@
 			Common::kPlatformUnknown,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_MULTICD,
-		GF_WYRMKEEP | GF_CD_FX,
+		GID_ITE,
+		GF_WYRMKEEP,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -441,9 +433,8 @@
 			Common::kPlatformUnknown,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_MULTICD,
-		GF_WYRMKEEP | GF_CD_FX,
+		GID_ITE,
+		GF_WYRMKEEP,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -467,9 +458,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_CD,
-		GF_CD_FX,
+		GID_ITE,
+		GF_EXTRA_ITE_CREDITS,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -493,9 +483,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_CD,
-		GF_CD_FX,
+		GID_ITE,
+		0,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -519,9 +508,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_CD_G,
-		GF_CD_FX,
+		GID_ITE,
+		0,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -546,9 +534,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_CD_DE,
-		GF_CD_FX,
+		GID_ITE,
+		0,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -575,9 +562,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_DISK_DE,
-		0,
+		GID_ITE,
+		GF_ITE_FLOPPY,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -601,9 +587,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_DISK_G,
-		0,
+		GID_ITE,
+		GF_ITE_FLOPPY,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -627,9 +612,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_ITE,
-		GID_ITE_DISK_G,
-		0,
+		GID_ITE,
+		GF_ITE_FLOPPY,
 		ITE_DEFAULT_SCENE,
 		&ITE_Resources,
 		ARRAYSIZE(ITE_GameFonts),
@@ -662,9 +646,8 @@
 			Common::kPlatformPC,
 			Common::ADGF_DEMO
 		},
-		GType_IHNM,
-		GID_IHNM_DEMO,
-		0,
+		GID_IHNM,
+		GF_IHNM_DEMO,
 		IHNMDEMO_DEFAULT_SCENE,
 		&IHNMDEMO_Resources,
 		ARRAYSIZE(IHNMDEMO_GameFonts),
@@ -696,8 +679,7 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_IHNM,
-		GID_IHNM_CD,
+		GID_IHNM,
 		0,
 		IHNM_DEFAULT_SCENE,
 		&IHNM_Resources,
@@ -728,8 +710,7 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_IHNM,
-		GID_IHNM_CD_DE,
+		GID_IHNM,
 		0,
 		IHNM_DEFAULT_SCENE,
 		&IHNM_Resources,
@@ -758,8 +739,7 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_IHNM,
-		GID_IHNM_CD_ES,
+		GID_IHNM,
 		0,
 		IHNM_DEFAULT_SCENE,
 		&IHNM_Resources,
@@ -789,8 +769,7 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_IHNM,
-		GID_IHNM_CD_FR,
+		GID_IHNM,
 		0,
 		IHNM_DEFAULT_SCENE,
 		&IHNM_Resources,
@@ -819,8 +798,7 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_IHNM,
-		GID_IHNM_CD_ITA,
+		GID_IHNM,
 		0,
 		IHNM_DEFAULT_SCENE,
 		&IHNM_Resources,
@@ -846,8 +824,7 @@
 			Common::kPlatformMacintosh,
 			Common::ADGF_NO_FLAGS
 		},
-		GType_IHNM,
-		GID_IHNM_CD_MAC,
+		GID_IHNM,
 		0, // GF_BIG_ENDIAN_DATA
 		IHNM_DEFAULT_SCENE,
 		&IHNM_Resources,
@@ -857,7 +834,7 @@
 		&MAC_GameSound,
 		NULL,
 	},
-	{ AD_TABLE_END_MARKER, 0, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL }
+	{ AD_TABLE_END_MARKER, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL }
 };
 
 } // End of namespace Saga

Modified: scummvm/trunk/engines/saga/events.cpp
===================================================================
--- scummvm/trunk/engines/saga/events.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/events.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -338,7 +338,7 @@
 				if (event->param == kEvPSetPalette) {
 					PalEntry *palPointer;
 
-					if (_vm->getGameType() == GType_IHNM) {
+					if (_vm->getGameId() == GID_IHNM) {
 						if (_vm->_spiritualBarometer > 255)
 							_vm->_gfx->setPaletteColor(kIHNMColorPortrait, 0xff, 0xff, 0xff);
 						else
@@ -507,12 +507,14 @@
 			break;
 		case kEventSetNormalCursor:
 			// in ITE and IHNM demo there is just one cursor
-			if (_vm->getGameType() == GType_IHNM && _vm->getGameId() != GID_IHNM_DEMO)
+			// ITE never makes this call
+			if (!(_vm->getFeatures() & GF_IHNM_DEMO))
 				_vm->_gfx->setCursor(kCursorNormal);
 			break;
 		case kEventSetBusyCursor:
 			// in ITE and IHNM demo there is just one cursor
-			if (_vm->getGameType() == GType_IHNM && _vm->getGameId() != GID_IHNM_DEMO)
+			// ITE never makes this call
+			if (!(_vm->getFeatures() & GF_IHNM_DEMO))
 				_vm->_gfx->setCursor(kCursorBusy);
 			break;
 		default:

Modified: scummvm/trunk/engines/saga/font.cpp
===================================================================
--- scummvm/trunk/engines/saga/font.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/font.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -341,7 +341,7 @@
 			// versions of IHNM, so it has been changed to apply for ITE only.
 			// It doesn't make any difference for the English version of IHNM.
 			// Fixes bug #1796045: "IHNM: Spanish font wrong".
-			if (!(flags & kFontDontmap) && _vm->getGameType() == GType_ITE) {
+			if (!(flags & kFontDontmap) && _vm->getGameId() == GID_ITE) {
 				c_code = translateChar(c_code);
 			}
 		} else if (_fontMapping == 1) {
@@ -659,7 +659,7 @@
 	FontId fontId = kSmallFont;
 
 	// The demo version of IHNM has 3 font types (like ITE), not 6 (like the full version of IHNM)
-	if (_vm->getGameType() == GType_ITE || _vm->getGameId() == GID_IHNM_DEMO) {
+	if (_vm->getGameId() == GID_ITE || _vm->getFeatures() & GF_IHNM_DEMO) {
 		switch (font) {
 		case (kKnownFontSmall):
 			fontId = kSmallFont;
@@ -681,7 +681,7 @@
 			fontId = _vm->_font->valid(kBigFont) ? kBigFont : kMediumFont;
 			break;
 		}
-	} else if (_vm->getGameType() == GType_IHNM && _vm->getGameId() != GID_IHNM_DEMO) {
+	} else if (_vm->getGameId() == GID_IHNM && !(_vm->getFeatures() & GF_IHNM_DEMO)) {
 		switch (font) {
 		case (kKnownFontSmall):
 			fontId = kSmallFont;

Modified: scummvm/trunk/engines/saga/gfx.cpp
===================================================================
--- scummvm/trunk/engines/saga/gfx.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/gfx.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -164,7 +164,7 @@
 }
 
 void Gfx::initPalette() {
-	if (_vm->getGameType() != GType_IHNM)
+	if (_vm->getGameId() == GID_ITE)
 		return;
 
 	ResourceContext *resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
@@ -196,7 +196,7 @@
 	byte *ppal;
 	int from, numcolors;
 
-	if (_vm->getGameType() != GType_IHNM || full) {
+	if (_vm->getGameId() == GID_ITE || full) {
 		from = 0;
 		numcolors = PAL_ENTRIES;
 	} else {
@@ -212,7 +212,7 @@
 	}
 
 	// Color 0 should always be black in IHNM
-	if (_vm->getGameType() == GType_IHNM)
+	if (_vm->getGameId() == GID_IHNM)
 		memset(&_currentPal[0 * 4], 0, 4);
 
 	// Make 256th color black. See bug #1256368
@@ -270,7 +270,7 @@
 
 	double fpercent;
 
-	if (_vm->getGameType() != GType_IHNM) {
+	if (_vm->getGameId() == GID_ITE) {
 		from = 0;
 		numcolors = PAL_ENTRIES;
 	} else {
@@ -321,7 +321,7 @@
 	}
 
 	// Color 0 should always be black in IHNM
-	if (_vm->getGameType() == GType_IHNM)
+	if (_vm->getGameId() == GID_IHNM)
 		memset(&_currentPal[0 * 4], 0, 4);
 
 	// Make 256th color black. See bug #1256368
@@ -339,7 +339,7 @@
 	PalEntry *palE;
 	int from, numcolors;
 
-	if (_vm->getGameType() != GType_IHNM) {
+	if (_vm->getGameId() == GID_ITE) {
 		from = 0;
 		numcolors = PAL_ENTRIES;
 	} else {
@@ -388,7 +388,7 @@
 	}
 
 	// Color 0 should always be black in IHNM
-	if (_vm->getGameType() == GType_IHNM)
+	if (_vm->getGameId() == GID_IHNM)
 		memset(&_currentPal[0 * 4], 0, 4);
 
 	// Make 256th color black. See bug #1256368
@@ -473,7 +473,7 @@
 }
 
 void Gfx::setCursor(CursorType cursorType) {
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		// Set up the mouse cursor
 		const byte A = kITEColorLightGrey;
 		const byte B = kITEColorWhite;
@@ -494,7 +494,7 @@
 
 		switch (cursorType) {
 		case kCursorBusy:
-			if (_vm->getGameId() != GID_IHNM_DEMO)
+			if (!(_vm->getFeatures() & GF_IHNM_DEMO))
 				resourceId = RID_IHNM_HOURGLASS_CURSOR;
 			else
 				resourceId = (uint32)-1;

Modified: scummvm/trunk/engines/saga/image.cpp
===================================================================
--- scummvm/trunk/engines/saga/image.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/image.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -91,7 +91,7 @@
 	unbankBGImage(out_buf, decode_buf, hdr.width, hdr.height);
 
 	// For some reason bg images in IHNM are upside down
-	if (getGameType() == GType_IHNM && !flip) {
+	if (getGameId() == GID_IHNM && !flip) {
 		flipImage(out_buf, hdr.width, hdr.height);
 	}
 

Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/interface.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -192,7 +192,7 @@
 	free(resource);
 
 	// Quit panel
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		_quitPanel.buttons = _vm->getDisplayInfo().quitPanelButtons;
 		_quitPanel.buttonsCount = _vm->getDisplayInfo().quitPanelButtonsCount;
 
@@ -203,7 +203,7 @@
 	}
 
 	// Save panel
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		_savePanel.buttons = _vm->getDisplayInfo().savePanelButtons;
 		_savePanel.buttonsCount = _vm->getDisplayInfo().savePanelButtonsCount;
 
@@ -214,7 +214,7 @@
 	}
 
 	// Load panel
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		_loadPanel.buttons = _vm->getDisplayInfo().loadPanelButtons;
 		_loadPanel.buttonsCount = _vm->getDisplayInfo().loadPanelButtonsCount;
 
@@ -235,7 +235,7 @@
 	// Quit panel sprites
 	_vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _quitPanel.sprites);
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		_vm->_sprite->loadList(_vm->getResourceDescription()->defaultPortraitsResourceId, _defPortraits);
 	}
 
@@ -362,7 +362,7 @@
 		_saveReminderState = _saveReminderState % _vm->getDisplayInfo().saveReminderNumSprites + 1;
 		drawStatusBar();
 		_vm->_timer->removeTimerProc(&saveReminderCallback);
-		_vm->_timer->installTimerProc(&saveReminderCallback, ((_vm->getGameType() == GType_ITE) ? TIMETOBLINK_ITE : TIMETOBLINK_IHNM), this);
+		_vm->_timer->installTimerProc(&saveReminderCallback, ((_vm->getGameId() == GID_ITE) ? TIMETOBLINK_ITE : TIMETOBLINK_IHNM), this);
 	}
 }
 
@@ -374,7 +374,7 @@
 		unlockMode();
 		if (_panelMode == kPanelMain || _panelMode == kPanelChapterSelection) {
 			_saveReminderState = 1;
-		} else if (_panelMode == kPanelNull && _vm->getGameId() == GID_IHNM_DEMO) {
+		} else if (_panelMode == kPanelNull && _vm->getFeatures() & GF_IHNM_DEMO) {
 			_saveReminderState = 1;
 		}
 		_vm->_gfx->showCursor(true);
@@ -425,7 +425,7 @@
 	} else if (mode == kPanelChapterSelection) {
 		_saveReminderState = 1;
 	} else if (mode == kPanelNull) {
-		if (_vm->getGameId() == GID_IHNM_DEMO) {
+		if (_vm->getFeatures() & GF_IHNM_DEMO) {
 			_inMainMode = true;
 			_saveReminderState = 1;
 		}
@@ -487,7 +487,7 @@
 		_vm->_render->setFlag(RF_DEMO_SUBST);
 		break;
 	case kPanelProtect:
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			// This is used as the copy protection panel in ITE
 			_protectPanel.currentButton = NULL;
 			_textInputMaxWidth = _protectEdit->width - 10;
@@ -672,7 +672,7 @@
 		case '7':
 		case '8':
 		case '9':
-			if (_vm->getGameType() == GType_IHNM)
+			if (_vm->getGameId() == GID_IHNM)
 				converseSetPos(ascii);
 			break;
 		}
@@ -695,7 +695,7 @@
 		keyBossExit();
 		break;
 	case kPanelProtect:
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			if (_textInput && processTextInput(keystate)) {
 				return true;
 			}
@@ -715,9 +715,9 @@
 		}
 		break;
 	case kPanelPlacard:
-		if (_vm->getGameType() == GType_IHNM) {
+		if (_vm->getGameId() == GID_IHNM) {
 			// Any keypress here returns the user back to the game
-			if (_vm->getGameId() != GID_IHNM_DEMO) {
+			if (!(_vm->getFeatures() & GF_IHNM_DEMO)) {
 				_vm->_scene->clearPsychicProfile();
 			} else {
 				setMode(kPanelConverse);
@@ -733,11 +733,11 @@
 void Interface::setStatusText(const char *text, int statusColor) {
 
 	// Disable the status text in IHNM when the chapter is 8
-	if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 8)
+	if (_vm->getGameId() == GID_IHNM && !(_vm->getFeatures() & GF_IHNM_DEMO) && _vm->_scene->currentChapterNumber() == 8)
 		return;
 
 	// Disable the status text in the introduction of the IHNM demo
-	if (_vm->getGameId() == GID_IHNM_DEMO && _vm->_scene->currentSceneNumber() == 0)
+	if (_vm->getFeatures() & GF_IHNM_DEMO && _vm->_scene->currentSceneNumber() == 0)
 		return;
 
 	assert(text != NULL);
@@ -799,7 +799,7 @@
 	drawStatusBar();
 
 	if (_panelMode == kPanelMain || _panelMode == kPanelMap ||
-		(_panelMode == kPanelNull && _vm->getGameId() == GID_IHNM_DEMO)) {
+		(_panelMode == kPanelNull && _vm->getFeatures() & GF_IHNM_DEMO)) {
 		_mainPanel.getRect(rect);
 		_vm->_gfx->drawRegion(rect, _mainPanel.image);
 
@@ -816,7 +816,7 @@
 
 	if (_panelMode == kPanelMain || _panelMode == kPanelConverse ||
 		_lockedMode == kPanelMain || _lockedMode == kPanelConverse ||
-		(_panelMode == kPanelNull && _vm->getGameId() == GID_IHNM_DEMO)) {
+		(_panelMode == kPanelNull && _vm->getFeatures() & GF_IHNM_DEMO)) {
 		leftPortraitPoint.x = _mainPanel.x + _vm->getDisplayInfo().leftPortraitXOffset;
 		leftPortraitPoint.y = _mainPanel.y + _vm->getDisplayInfo().leftPortraitYOffset;
 		_vm->_sprite->draw(_defPortraits, _leftPortrait, leftPortraitPoint, 256);
@@ -851,7 +851,7 @@
 		totalFiles = visibleFiles;
 	}
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		// ITE's save file list slider has a dynamically computed height, depending on
 		// the number of save games
 		sliderHeight = visibleFiles * height / totalFiles;
@@ -889,12 +889,12 @@
 	KnownFont textFont = kKnownFontMedium;
 
 	// Button differs for CD version
-	if (panelButton->id == kTextReadingSpeed && _vm->getFeatures() & GF_CD_FX)
+	if (panelButton->id == kTextReadingSpeed && _vm->getGameId() == GID_ITE && !(_vm->getFeatures() & GF_ITE_FLOPPY))
 		return;
-	if (panelButton->id == kTextShowDialog && !(_vm->getFeatures() & GF_CD_FX))
+	if (panelButton->id == kTextShowDialog && _vm->getFeatures() & GF_ITE_FLOPPY)
 		return;
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		text = _vm->getTextString(panelButton->id);
 		textFont = kKnownFontMedium;
 		textShadowKnownColor = kKnownColorVerbTextShadow;
@@ -916,7 +916,7 @@
 
 	panel->calcPanelButtonRect(panelButton, rect);
 	if (panelButton->xOffset < 0) {
-		if (_vm->getGameType() == GType_ITE)
+		if (_vm->getGameId() == GID_ITE)
 			textWidth = _vm->_font->getStringWidth(kKnownFontMedium, text, 0, kFontNormal);
 		else
 			textWidth = _vm->_font->getStringWidth(kKnownFontVerb, text, 0, kFontNormal);
@@ -951,7 +951,7 @@
 		panelButton = &_optionPanel.buttons[i];
 
 		if (panelButton->type == kPanelButtonOption) {
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				drawPanelButtonText(&_optionPanel, panelButton);
 			} else {
 				drawPanelButtonText(&_optionPanel, panelButton, spritenum);
@@ -964,11 +964,11 @@
 	}
 
 	if (_optionSaveRectTop.height() > 0) {
-		if (_vm->getGameType() == GType_ITE)
+		if (_vm->getGameId() == GID_ITE)
 			_vm->_gfx->drawRect(_optionSaveRectTop, kITEColorDarkGrey);
 	}
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		drawButtonBox(_optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
 	} else {
 		panelButton = &_optionPanel.buttons[0];
@@ -987,7 +987,7 @@
 	rect2 = rect;
 	fontHeight = _vm->_font->getHeight(kKnownFontSmall);
 	for (uint j = 0; j < _vm->getDisplayInfo().optionSaveFileVisible; j++) {
-		if (_vm->getGameType() == GType_ITE)
+		if (_vm->getGameId() == GID_ITE)
 			bgColor = kITEColorDarkGrey0C;
 		else
 			bgColor = _vm->KnownColor2ColorId(kKnownColorBlack);
@@ -1004,7 +1004,7 @@
 			text = _vm->getSaveFile(idx)->name;
 			textPoint.x = rect.left + 1;
 			textPoint.y = rect2.top;
-			if (_vm->getGameType() == GType_ITE)
+			if (_vm->getGameId() == GID_ITE)
 				_vm->_font->textDraw(kKnownFontSmall, text, textPoint, fgColor, 0, kFontNormal);
 			else
 				_vm->_font->textDraw(kKnownFontVerb, text, textPoint, fgColor, 0, kFontNormal);
@@ -1019,7 +1019,7 @@
 	PanelButton *panelButton;
 
 	_quitPanel.getRect(rect);
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		drawButtonBox(rect, kButton, false);
 	else
 		_vm->_gfx->drawRegion(rect, _quitPanel.image);
@@ -1069,7 +1069,7 @@
 			setMode(kPanelOption);
 			break;
 		case kTextQuit:
-			if (_vm->getGameId() == GID_IHNM_DEMO)
+			if (_vm->getFeatures() & GF_IHNM_DEMO)
 				_vm->_scene->creditsScene();	// display sales info for IHNM demo
 			else
 				_vm->quitGame();
@@ -1083,7 +1083,7 @@
 	PanelButton *panelButton;
 
 	_loadPanel.getRect(rect);
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		drawButtonBox(rect, kButton, false);
 	else
 		_vm->_gfx->drawRegion(rect, _loadPanel.image);
@@ -1130,7 +1130,7 @@
 	_loadPanel.currentButton = NULL;
 	switch (panelButton->id) {
 		case kTextOK:
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				setMode(kPanelMain);
 			} else {
 				if (_vm->getSaveFilesCount() > 0) {
@@ -1189,7 +1189,7 @@
 	ch[1] = 0;
 	// IHNM has a smaller save title size than ITE. We only limit the save title size during text input
 	// in IHNM, to preserve backwards compatibility with older save games
-	uint save_title_size = _vm->getGameType() == GType_ITE ? SAVE_TITLE_SIZE : IHNM_SAVE_TITLE_SIZE;
+	uint save_title_size = _vm->getGameId() == GID_ITE ? SAVE_TITLE_SIZE : IHNM_SAVE_TITLE_SIZE;
 
 	switch (keystate.keycode) {
 	case Common::KEYCODE_RETURN:
@@ -1303,7 +1303,7 @@
 	PanelButton *panelButton;
 
 	_savePanel.getRect(rect);
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		drawButtonBox(rect, kButton, false);
 	else
 		_vm->_gfx->drawRegion(rect, _savePanel.image);
@@ -1578,7 +1578,7 @@
 	switch (panelButton->id) {
 	case kTextContinuePlaying:
 		ConfMan.flushToDisk();
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			setMode(kPanelMain);
 		} else {
 			if (_vm->_scene->currentChapterNumber() == 8) {
@@ -1594,7 +1594,7 @@
 		setMode(kPanelQuit);
 		break;
 	case kTextLoad:
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			if (_vm->getSaveFilesCount() > 0) {
 				if (_vm->isSaveListFull() || (_optionSaveFileTitleNumber > 0)) {
 					debug(1, "Loading save game %d", _vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber);
@@ -1620,7 +1620,7 @@
 		setMode(kPanelSave);
 		break;
 	case kTextReadingSpeed:
-		if (_vm->getFeatures() & GF_CD_FX) {
+		if (_vm->getGameId() == GID_ITE && !(_vm->getFeatures() & GF_ITE_FLOPPY)) {
 			_vm->_subtitlesEnabled = !_vm->_subtitlesEnabled;
 			ConfMan.setBool("subtitles", _vm->_subtitlesEnabled);
 		} else {
@@ -1677,7 +1677,7 @@
 		// When opening the psychic profile, or the options screen in the non-interactive part of the IHNM demo,
 		// the interface is locked (_active is false)
 		// Don't return in those cases, so that mouse actions can be processed
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			return;
 		} else {
 			if (_panelMode == kPanelPlacard && (updateFlag & UPDATE_MOUSECLICK)) {
@@ -1836,10 +1836,10 @@
 		break;
 
 	case kPanelPlacard:
-		if (_vm->getGameType() == GType_IHNM) {
+		if (_vm->getGameId() == GID_IHNM) {
 			// Any mouse click here returns the user back to the game
 			if (updateFlag & UPDATE_MOUSECLICK) {
-				if (_vm->getGameId() != GID_IHNM_DEMO) {
+				if (!(_vm->getFeatures() & GF_IHNM_DEMO)) {
 					_vm->_scene->clearPsychicProfile();
 				} else {
 					setMode(kPanelConverse);
@@ -1866,10 +1866,10 @@
 	int color;
 	// The default colors in the Spanish version of IHNM are shifted by one
 	// Fixes bug #1848016 - "IHNM: Wrong Subtitles Color (Spanish)"
-	int offset = (_vm->getGameId() == GID_IHNM_CD_ES) ? 1 : 0;
+	int offset = (_vm->getLanguage() == Common::ES_ESP) ? 1 : 0;
 
 	// Disable the status text in IHNM when the chapter is 8
-	if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 8)
+	if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 8)
 		return;
 
 	// Don't draw the status bar while fading out
@@ -1893,7 +1893,7 @@
 
 	textPoint.x = _vm->getDisplayInfo().statusXOffset + (_vm->getDisplayInfo().statusWidth - stringWidth) / 2;
 	textPoint.y = _vm->getDisplayInfo().statusYOffset + _vm->getDisplayInfo().statusTextY;
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		_vm->_font->textDraw(kKnownFontSmall, _statusText, textPoint, color, 0, kFontNormal);
 	else
 		_vm->_font->textDraw(kKnownFontVerb, _statusText, textPoint, color, 0, kFontNormal);
@@ -2111,7 +2111,7 @@
 		}
 		_mainPanel.calcPanelButtonRect(&_mainPanel.buttons[i], rect);
 
-		if (_vm->getGameType() == GType_ITE)
+		if (_vm->getGameId() == GID_ITE)
 			_vm->_gfx->drawRect(rect, kITEColorDarkGrey);
 		else
 			_vm->_gfx->drawRect(rect, _vm->KnownColor2ColorId(kKnownColorBlack));
@@ -2154,7 +2154,7 @@
 			solidColor = down ? kITEColorLightBlue94 : kITEColorLightBlue96;
 			break;
 		case kEdit:
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				cornerColor = frameColor = fillColor = kITEColorLightBlue96;
 				our = kITEColorDarkBlue8a;
 				odl = kITEColorLightBlue94;
@@ -2247,7 +2247,7 @@
 	textId = panelButton->id;
 	switch (panelButton->id) {
 	case kTextReadingSpeed:
-		if (_vm->getFeatures() & GF_CD_FX) {
+		if (_vm->getGameId() == GID_ITE && !(_vm->getFeatures() & GF_ITE_FLOPPY)) {
 			if (_vm->_subtitlesEnabled)
 				textId = kTextOn;
 			else
@@ -2277,7 +2277,7 @@
 			textId = kTextAudio;
 		break;
 	}
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		text = _vm->getTextString(textId);
 		textFont = kKnownFontMedium;
 		textShadowKnownColor = kKnownColorVerbTextShadow;
@@ -2309,7 +2309,7 @@
 	}
 
 	panel->calcPanelButtonRect(panelButton, rect);
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		drawButtonBox(rect, kButton, panelButton->state > 0);
 	} else {
 		litButton = panelButton->state > 0;
@@ -2361,7 +2361,7 @@
 	point.x = panel->x + panelButton->xOffset;
 	point.y = panel->y + panelButton->yOffset;
 
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		_vm->_sprite->draw(_vm->_sprite->_mainSprites, spriteNumber, point, 256);
 	else
 		_vm->_sprite->draw(_vm->_sprite->_arrowSprites, spriteNumber, point, 256);
@@ -2373,7 +2373,7 @@
 	Point point;
 	int textId;
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		textId = verbTypeToTextStringsIdLUT[0][panelButton->id];
 		text = _vm->getTextString(textId);
 	} else {
@@ -2384,7 +2384,7 @@
 
 	textWidth = _vm->_font->getStringWidth(kKnownFontVerb, text, 0, kFontNormal);
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		point.x = _mainPanel.x + panelButton->xOffset + 1 + (panelButton->width - 1 - textWidth) / 2;
 		point.y = _mainPanel.y + panelButton->yOffset + 1;
 	} else {
@@ -2440,7 +2440,7 @@
 		for (i = len; i >= 0; i--) {
 			c = _converseWorkString[i];
 
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				if ((c == ' ' || c == '\0') && (_vm->_font->getStringWidth(kKnownFontSmall, _converseWorkString, i, kFontNormal) <= _vm->getDisplayInfo().converseMaxTextWidth))
 					break;
 			} else {
@@ -2521,7 +2521,7 @@
 
 	assert(_conversePanel.buttonsCount >= 6);
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		bulletForegnd = kITEColorGreen;
 		bulletBackgnd = kITEColorBlack;
 	} else {
@@ -2533,7 +2533,7 @@
 	rect.moveTo(_conversePanel.x + _conversePanel.buttons[0].xOffset,
 		_conversePanel.y + _conversePanel.buttons[0].yOffset);
 
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		_vm->_gfx->drawRect(rect, kITEColorDarkGrey);	//fill bullet place
 	else
 		_vm->_gfx->drawRect(rect, _vm->KnownColor2ColorId(kKnownColorBlack));	//fill bullet place
@@ -2546,7 +2546,7 @@
 		}
 
 		if (_conversePos >= 0 && _converseText[_conversePos].stringNum == _converseText[relPos].stringNum) {
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				foregnd = kITEColorBrightWhite;
 				backgnd = (!_vm->leftMouseButtonPressed()) ? kITEColorDarkGrey : kITEColorGrey;
 			} else {
@@ -2554,7 +2554,7 @@
 				backgnd = _vm->KnownColor2ColorId(kKnownColorVerbTextActive);
 			}
 		} else {
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				foregnd = kITEColorBlue;
 				backgnd = kITEColorDarkGrey;
 			} else {
@@ -2573,14 +2573,14 @@
 			textPoint.x = rect.left - 6;
 			textPoint.y = rect.top;
 
-			if (_vm->getGameType() == GType_ITE)
+			if (_vm->getGameId() == GID_ITE)
 				_vm->_font->textDraw(kKnownFontSmall, bullet, textPoint, bulletForegnd, bulletBackgnd, (FontEffectFlags)(kFontShadow | kFontDontmap));
 			else
 				_vm->_font->textDraw(kKnownFontVerb, bullet, textPoint, bulletForegnd, bulletBackgnd, (FontEffectFlags)(kFontShadow | kFontDontmap));
 		}
 		textPoint.x = rect.left + 1;
 		textPoint.y = rect.top;
-		if (_vm->getGameType() == GType_ITE)
+		if (_vm->getGameId() == GID_ITE)
 			_vm->_font->textDraw(kKnownFontSmall, str, textPoint, foregnd, kITEColorBlack, kFontShadow);
 		else
 			_vm->_font->textDraw(kKnownFontVerb, str, textPoint, foregnd, _vm->KnownColor2ColorId(kKnownColorBlack), kFontShadow);
@@ -2797,7 +2797,7 @@
 }
 
 void Interface::keyBoss() {
-	if (_vm->getGameType() != GType_IHNM)
+	if (_vm->getGameId() == GID_ITE)
 		return;
 
 	if (_bossMode != -1 || _fadeMode != kNoFade)

Modified: scummvm/trunk/engines/saga/introproc_ihnm.cpp
===================================================================
--- scummvm/trunk/engines/saga/introproc_ihnm.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/introproc_ihnm.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -51,7 +51,7 @@
 
 	IHNMLoadCutaways();
 
-	if (_vm->getGameId() != GID_IHNM_DEMO) {
+	if (!(_vm->getFeatures() & GF_IHNM_DEMO)) {
 		int logoLength = -168;
 
 		if (_vm->getLanguage() == Common::DE_DEU || _vm->getLanguage() == Common::ES_ESP)
@@ -102,7 +102,7 @@
 
 	_vm->_music->play(0, MUSIC_NORMAL);
 
-	if (_vm->getGameId() != GID_IHNM_DEMO) {
+	if (!(_vm->getFeatures() & GF_IHNM_DEMO)) {
 		// Display the credits for 400 frames
 		playTitle(4, -400, true);
 	} else {
@@ -127,7 +127,7 @@
 		error("Scene::IHNMStartProc() resource context not found");
 	}
 
-	if (_vm->getGameId() != GID_IHNM_DEMO)
+	if (!(_vm->getFeatures() & GF_IHNM_DEMO))
 		_vm->_resource->loadResource(resourceContext, RID_IHNM_INTRO_CUTAWAYS, resourcePointer, resourceLength);
 	else
 		_vm->_resource->loadResource(resourceContext, RID_IHNMDEMO_INTRO_CUTAWAYS, resourcePointer, resourceLength);

Modified: scummvm/trunk/engines/saga/introproc_ite.cpp
===================================================================
--- scummvm/trunk/engines/saga/introproc_ite.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/introproc_ite.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -193,7 +193,7 @@
 		game = kITEWyrmKeep;
 	} else if (_vm->getPlatform() == Common::kPlatformMacintosh) {
 		game = kITEMac;
-	} else if (_vm->getGameId() == GID_ITE_CD_G) {
+	} else if (_vm->getFeatures() & GF_EXTRA_ITE_CREDITS) {
 		game = kITEPCCD;
 	} else {
 		game = kITEPC;

Modified: scummvm/trunk/engines/saga/music.cpp
===================================================================
--- scummvm/trunk/engines/saga/music.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/music.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -76,7 +76,7 @@
 	bool endOfData() const	{ return eosIntern(); }
 	bool isStereo() const	{
 		// The digital music in the ITE Mac demo version is not stereo
-		return _vm->getGameId() == GID_ITE_MACDEMO2 ? false : true;
+		return _vm->getFeatures() & GF_MONO_MUSIC ? false : true;
 	}
 	int getRate() const	{ return 11025; }
 };
@@ -453,7 +453,7 @@
 	
 	int realTrackNumber;
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		if (flags == MUSIC_DEFAULT) {
 			if (resourceId == 13 || resourceId == 19) {
 				flags = MUSIC_NORMAL;
@@ -482,13 +482,13 @@
 		}
 	}
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		if (resourceId >= 9 && resourceId <= 34) {
 			if (_digitalMusicContext != NULL) {
 				//TODO: check resource size
 				loopStart = 0;
 				// fix ITE sunstatm/sunspot score
-				if ((_vm->getGameType() == GType_ITE) && (resourceId == MUSIC_SUNSPOT)) {
+				if ((_vm->getGameId() == GID_ITE) && (resourceId == MUSIC_SUNSPOT)) {
 					loopStart = 4 * 18727;
 				}
 
@@ -511,12 +511,12 @@
 
 	// Load MIDI/XMI resource data
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		context = _vm->_resource->getContext(GAME_MUSICFILE_GM);
 		if (context == NULL) {
 			context = _vm->_resource->getContext(GAME_RESOURCEFILE);
 		}
-	} else if (_vm->getGameType() == GType_IHNM && _vm->isMacResources()) {
+	} else if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
 		// The music of the Mac version of IHNM is loaded from its
 		// associated external file later on
 	} else {
@@ -545,7 +545,7 @@
 		// Note that the IHNM demo has only got one music file
 		// (music.rsc). It is assumed that it contains FM music
 
-		if (hasAdlib() || _vm->getGameId() == GID_IHNM_DEMO) {
+		if (hasAdlib() || _vm->getFeatures() & GF_IHNM_DEMO) {
 			context = _vm->_resource->getContext(GAME_MUSICFILE_FM);
 		} else {
 			context = _vm->_resource->getContext(GAME_MUSICFILE_GM);
@@ -554,7 +554,7 @@
 
 	_player->setGM(true);
 
-	if (_vm->getGameType() == GType_IHNM && _vm->isMacResources()) {
+	if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
 		// Load the external music file for Mac IHNM
 		Common::File musicFile;
 		char musicFileName[40];
@@ -577,7 +577,7 @@
 	}
 
 	if (xmidiParser->loadMusic(resourceData, resourceSize)) {
-		if (_vm->getGameType() == GType_ITE)
+		if (_vm->getGameId() == GID_ITE)
 			_player->setGM(false);
 
 		parser = xmidiParser;

Modified: scummvm/trunk/engines/saga/palanim.cpp
===================================================================
--- scummvm/trunk/engines/saga/palanim.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/palanim.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -58,7 +58,7 @@
 
 	MemoryReadStreamEndian readS(resdata, resdata_len, _vm->isBigEndian());
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		return SUCCESS;
 	}
 

Modified: scummvm/trunk/engines/saga/render.cpp
===================================================================
--- scummvm/trunk/engines/saga/render.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/render.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -101,7 +101,7 @@
 	if (!(_flags & (RF_DEMO_SUBST | RF_MAP) || curMode == kPanelPlacard)) {
 		if (_vm->_interface->getFadeMode() != kFadeOut) {
 			// Display scene background
-			if (!(_flags & RF_DISABLE_ACTORS) || _vm->getGameType() == GType_ITE)
+			if (!(_flags & RF_DISABLE_ACTORS) || _vm->getGameId() == GID_ITE)
 				_vm->_scene->draw();
 
 			if (_vm->_puzzle->isActive()) {
@@ -176,7 +176,7 @@
 
 	// Display "paused game" message, if applicable
 	if (_flags & RF_RENDERPAUSE) {
-		const char *pauseString = (_vm->getGameType() == GType_ITE) ? pauseStringITE : pauseStringIHNM;
+		const char *pauseString = (_vm->getGameId() == GID_ITE) ? pauseStringITE : pauseStringIHNM;
 		textPoint.x = (_vm->_gfx->getBackBufferWidth() - _vm->_font->getStringWidth(kKnownFontPause, pauseString, 0, kFontOutline)) / 2;
 		textPoint.y = 90;
 

Modified: scummvm/trunk/engines/saga/rscfile.cpp
===================================================================
--- scummvm/trunk/engines/saga/rscfile.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/rscfile.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -330,7 +330,7 @@
 					// ITE uses several patch files which are loaded and then not needed
 					// anymore (as they're in memory), so close them here. IHNM uses only
 					// 1 patch file, which is reused, so don't close it
-					if (_vm->getGameType() == GType_ITE)
+					if (_vm->getGameId() == GID_ITE)
 						resourceData->patchData->_patchFile->close();
 				} else {
 					delete resourceData->patchData;
@@ -401,8 +401,8 @@
 	if (!soundFileInArray) {
 		// If the sound file is not specified in the detector table, add it here
 		fileFound = false;
-		curSoundfiles = _vm->getGameType() == GType_ITE ? sfxFilesITE : sfxFilesIHNM;
-		maxFile = _vm->getGameType() == GType_ITE ? 4 : 2;
+		curSoundfiles = _vm->getGameId() == GID_ITE ? sfxFilesITE : sfxFilesIHNM;
+		maxFile = _vm->getGameId() == GID_ITE ? 4 : 2;
 
 		for (i = 0; i < maxFile; i++) {
 			if (Common::File::exists(curSoundfiles[i].fileName)) {
@@ -418,7 +418,7 @@
 		if (!fileFound) {
 			// No sound file found, don't add any file to the array
 			soundFileInArray = true;
-			if (_vm->getGameType() == GType_ITE) {
+			if (_vm->getGameId() == GID_ITE) {
 				// ITE floppy versions have both voices and sounds in voices.rsc
 				voiceFileType = GAME_SOUNDFILE | GAME_VOICEFILE;
 			}
@@ -445,8 +445,8 @@
 
 	// Detect and add voice files
 	fileFound = false;
-	curSoundfiles = _vm->getGameType() == GType_ITE ? voiceFilesITE : voiceFilesIHNM;
-	maxFile = _vm->getGameType() == GType_ITE ? 7 : 4;
+	curSoundfiles = _vm->getGameId() == GID_ITE ? voiceFilesITE : voiceFilesIHNM;
+	maxFile = _vm->getGameId() == GID_ITE ? 7 : 4;
 
 	for (i = 0; i < maxFile; i++) {
 		if (Common::File::exists(curSoundfiles[i].fileName)) {
@@ -490,7 +490,7 @@
 	}
 
 	if (!fileFound) {
-		if (_vm->getGameType() == GType_IHNM && _vm->isMacResources()) {
+		if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
 			// The Macintosh version of IHNM has no voices.res, and it has all
 			// its voice files in subdirectories, so don't do anything here
 		} else {
@@ -511,7 +511,7 @@
 	};
 
 	// Check for digital music in ITE
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		fileFound = false;
 
 		for (i = 0; i < 4; i++) {
@@ -538,7 +538,7 @@
 		context->serial = 0;
 
 		// For ITE, add the digital music file and sfx file information here
-		if (_vm->getGameType() == GType_ITE && digitalMusic && i == _contextsCount - 1) {
+		if (_vm->getGameId() == GID_ITE && digitalMusic && i == _contextsCount - 1) {
 			context->fileName = musicFileName;
 			context->fileType = GAME_MUSICFILE;
 		} else if (!soundFileInArray && i == soundFileIndex) {
@@ -602,7 +602,7 @@
 
 uint32 Resource::convertResourceId(uint32 resourceId) {
 
-	if (_vm->getGameType() == GType_ITE && _vm->isMacResources()) {
+	if (_vm->getGameId() == GID_ITE && _vm->isMacResources()) {
 		if (resourceId > 1537) {
 			return resourceId - 2;
 		} else {
@@ -640,7 +640,7 @@
 	// ITE uses several patch files which are loaded and then not needed
 	// anymore (as they're in memory), so close them here. IHNM uses only
 	// 1 patch file, which is reused, so don't close it
-	if (resourceData->patchData != NULL && _vm->getGameType() == GType_ITE)
+	if (resourceData->patchData != NULL && _vm->getGameId() == GID_ITE)
 		file->close();
 }
 
@@ -649,7 +649,7 @@
 
 void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
 	if (chapter < 0)
-		chapter = (_vm->getGameId() != GID_IHNM_DEMO) ? 8 : 7;
+		chapter = (!(_vm->getFeatures() & GF_IHNM_DEMO)) ? 8 : 7;
 
 	_vm->_script->_globalVoiceLUT.freeMem();
 
@@ -672,7 +672,7 @@
 	byte *resourcePointer;
 	size_t resourceLength;
 
-	if (_vm->getGameId() != GID_IHNM_DEMO) {
+	if (!(_vm->getFeatures() & GF_IHNM_DEMO)) {
 		_vm->_resource->loadResource(resourceContext, metaResourceTable[chapter],
 									 resourcePointer, resourceLength);
 	} else {

Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/saga.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -216,7 +216,7 @@
 	_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 @@
 	//        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 @@
 	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 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 @@
 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 @@
 		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):

Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/saga.h	2008-12-21 15:59:05 UTC (rev 35467)
@@ -94,52 +94,9 @@
 	SUCCESS = 0
 };
 
-enum SAGAGameType {
-	GType_ITE = 0,
-	GType_IHNM = 1
-};
-
 enum GameIds {
-	// Dreamers Guild
-	GID_ITE_DEMO_G = 0,
-	GID_ITE_DISK_G,
-	GID_ITE_DISK_G2,
-	GID_ITE_CD_G,
-	GID_ITE_CD_G2,
-	GID_ITE_MACCD_G,
-
-	// Wyrmkeep
-	GID_ITE_CD,       // data for Win rerelease is same as in old DOS
-	GID_ITE_WINCD,    // but it has a bunch of patch files
-	GID_ITE_MACCD,
-	GID_ITE_LINCD,
-	GID_ITE_MULTICD,  // Wyrmkeep combined Windows/Mac/Linux version
-	GID_ITE_WINDEMO1, // older Wyrmkeep windows demo
-	GID_ITE_MACDEMO1, // older Wyrmkeep mac demo
-	GID_ITE_LINDEMO,
-	GID_ITE_WINDEMO2,
-	GID_ITE_WINDEMO3,
-	GID_ITE_MACDEMO2,
-
-	// German
-	GID_ITE_DISK_DE,
-	GID_ITE_DISK_DE2,
-	GID_ITE_AMIGACD_DE, // TODO
-	GID_ITE_OLDMAC_DE,  // TODO
-	GID_ITE_AMIGA_FL_DE,// TODO
-	GID_ITE_CD_DE,      // reported by mld. Bestsellergamers cover disk
-	GID_ITE_CD_DE2,
-	GID_ITE_AMIGA_AGA_DEMO, // TODO
-	GID_ITE_AMIGA_ECS_DEMO, // TODO
-
-	GID_IHNM_DEMO,
-	GID_IHNM_CD,
-	GID_IHNM_CD_DE,   // reported by mld. German retail
-	GID_IHNM_CD_ES,
-	GID_IHNM_CD_RU,
-	GID_IHNM_CD_FR,
-	GID_IHNM_CD_ITA,
-	GID_IHNM_CD_MAC
+	GID_ITE = 0,
+	GID_IHNM = 1
 };
 
 enum GameFileTypes {
@@ -159,10 +116,14 @@
 enum GameFeatures {
 	GF_BIG_ENDIAN_DATA   = 1 << 0,
 	GF_WYRMKEEP          = 1 << 1,
-	GF_CD_FX             = 1 << 2,
+	GF_ITE_FLOPPY        = 1 << 2,
 	GF_SCENE_SUBSTITUTES = 1 << 3,
 	GF_COMPRESSED_SOUNDS = 1 << 4,
-	GF_NON_INTERACTIVE   = 1 << 5
+	GF_NON_INTERACTIVE   = 1 << 5,
+	GF_OLD_ITE_DOS       = 1 << 6,
+	GF_MONO_MUSIC		 = 1 << 7,
+	GF_EXTRA_ITE_CREDITS = 1 << 8,
+	GF_IHNM_DEMO         = 1 << 9
 };
 
 enum VerbTypeIds {
@@ -604,7 +565,7 @@
 	}
 
 	inline int ticksToMSec(int tick) {
-		if (getGameType() == GType_ITE)
+		if (getGameId() == GID_ITE)
 			return tick * 1000 / kScriptTimeTicksPerSecond;
 		else
 			return tick * 1000 / kScriptTimeTicksPerSecondIHNM;
@@ -642,7 +603,6 @@
 	int getFontsCount() const;
 
 	int getGameId() const;
-	int getGameType() const;
 	uint32 getFeatures() const;
 	Common::Language getLanguage() const;
 	Common::Platform getPlatform() const;

Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/saveload.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -199,7 +199,7 @@
 
 	// Surrounding scene
 	out->writeSint32LE(_scene->getOutsetSceneNumber());
-	if (getGameType() != GType_ITE) {
+	if (getGameId() == GID_IHNM) {
 		out->writeSint32LE(_scene->currentChapterNumber());
 		// Protagonist
 		out->writeSint32LE(_scene->currentProtag());
@@ -210,7 +210,7 @@
 	// Inset scene
 	out->writeSint32LE(_scene->currentSceneNumber());
 
-	if (getGameType() != GType_ITE) {
+	if (getGameId() == GID_IHNM) {
 		out->writeUint32LE(_globalFlags);
 		for (int i = 0; i < ARRAYSIZE(_ethicsPoints); i++)
 			out->writeSint16LE(_ethicsPoints[i]);
@@ -288,7 +288,7 @@
 
 	// Surrounding scene
 	sceneNumber = in->readSint32LE();
-	if (getGameType() != GType_ITE) {
+	if (getGameId() == GID_IHNM) {
 		int currentChapter = _scene->currentChapterNumber();
 		_scene->setChapterNumber(in->readSint32LE());
 		_scene->setProtag(in->readSint32LE());
@@ -299,7 +299,7 @@
 		_music->stop();
 		if (_scene->currentChapterNumber() == 8)
 			_interface->setMode(kPanelChapterSelection);
-		if (getGameId() != GID_IHNM_DEMO) {
+		if (!(getFeatures() & GF_IHNM_DEMO)) {
 			_music->play(_music->_songTable[_scene->getCurrentMusicTrack()], _scene->getCurrentMusicRepeat() ? MUSIC_LOOP : MUSIC_NORMAL);
 		} else {
 			_music->play(3, MUSIC_LOOP);
@@ -309,7 +309,7 @@
 	// Inset scene
 	insetSceneNumber = in->readSint32LE();
 
-	if (getGameType() != GType_ITE) {
+	if (getGameId() == GID_IHNM) {
 		_globalFlags = in->readUint32LE();
 		for (int i = 0; i < ARRAYSIZE(_ethicsPoints); i++)
 			_ethicsPoints[i] = in->readSint16LE();
@@ -334,7 +334,7 @@
 	_isoMap->setMapPosition(mapx, mapy);
 
 	// Protagonist swapping
-	if (getGameType() != GType_ITE) {
+	if (getGameId() == GID_IHNM) {
 		if (_scene->currentProtag() != 0 && _scene->currentChapterNumber() != 6) {
 			ActorData *actor1 = _actor->getFirstActor();
 			ActorData *actor2;

Modified: scummvm/trunk/engines/saga/scene.cpp
===================================================================
--- scummvm/trunk/engines/saga/scene.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/scene.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -226,7 +226,7 @@
 }
 
 void Scene::getResourceTypes(SAGAResourceTypes *&types, int &typesCount) {
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		typesCount = ARRAYSIZE(IHNMSceneResourceTypes);
 		types = IHNMSceneResourceTypes;
 	} else {
@@ -270,11 +270,11 @@
 	event.op = kEventHide;
 	_vm->_events->queue(&event);
 
-	switch (_vm->getGameType()) {
-	case GType_ITE:
+	switch (_vm->getGameId()) {
+	case GID_ITE:
 		ITEStartProc();
 		break;
-	case GType_IHNM:
+	case GID_IHNM:
 		IHNMStartProc();
 		break;
 	default:
@@ -305,11 +305,11 @@
 	// Hide cursor during credits
 	_vm->_gfx->showCursor(false);
 
-	switch (_vm->getGameType()) {
-	case GType_ITE:
+	switch (_vm->getGameId()) {
+	case GID_ITE:
 		// Not called by ITE
 		break;
-	case GType_IHNM:
+	case GID_IHNM:
 		IHNMCreditsProc();
 		break;
 	default:
@@ -601,7 +601,7 @@
 
 	_chapterPointsChanged = false;
 
-	if ((_vm->getGameType() == GType_IHNM) && (loadSceneParams->chapter != NO_CHAPTER_CHANGE)) {
+	if ((_vm->getGameId() == GID_IHNM) && (loadSceneParams->chapter != NO_CHAPTER_CHANGE)) {
 		if (loadSceneParams->loadFlag != kLoadBySceneNumber) {
 			error("loadScene wrong usage");
 		}
@@ -622,7 +622,7 @@
 		_vm->_interface->activate();
 
 		if (loadSceneParams->chapter == 8 || loadSceneParams->chapter == -1) {
-			if (_vm->getGameId() != GID_IHNM_DEMO)
+			if (!(_vm->getFeatures() & GF_IHNM_DEMO))
 				_vm->_interface->setMode(kPanelChapterSelection);
 			else
 				_vm->_interface->setMode(kPanelNull);
@@ -646,7 +646,7 @@
 
 	_loadDescription = true;
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		if (loadSceneParams->loadFlag == kLoadBySceneNumber) // When will we get rid of it?
 			if (loadSceneParams->sceneDescriptor <= 0)
 				loadSceneParams->sceneDescriptor = _vm->_resource->_metaResource.sceneIndex;
@@ -813,14 +813,14 @@
 	}
 
 	if (loadSceneParams->sceneProc == NULL) {
-		if (!_inGame && _vm->getGameType() == GType_ITE) {
+		if (!_inGame && _vm->getGameId() == GID_ITE) {
 			_inGame = true;
 			_vm->_interface->setMode(kPanelMain);
 		}
 
 		_vm->_sound->stopAll();
 
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			if (_sceneDescription.musicResourceId >= 0) {
 				event.type = kEvTOneshot;
 				event.code = kMusicEvent;
@@ -997,7 +997,7 @@
 		case SAGA_ACTOR:
 			//for (a = actorsInScene; a; a = a->nextInScene)
 			//	if (a->obj.figID == glist->file_id)
-			//		if (_vm->getGameType() == GType_ITE ||
+			//		if (_vm->getGameId() == GID_ITE ||
 			//			((a->obj.flags & ACTORF_FINAL_FACE) & 0xff))
 			//			a->sprites = (xSpriteSet *)glist->offset;
 			warning("STUB: unimplemeted handler of SAGA_ACTOR resource");
@@ -1119,7 +1119,7 @@
 			_vm->_palanim->loadPalAnim(resourceData, resourceDataLength);
 			break;
 		case SAGA_FACES:
-			if (_vm->getGameType() == GType_ITE)
+			if (_vm->getGameId() == GID_ITE)
 				_vm->_interface->loadScenePortraits(_resourceList[i].resourceId);
 			break;
 		case SAGA_PALETTE:
@@ -1323,7 +1323,7 @@
 	event.duration = 0;
 	q_event = _vm->_events->chain(q_event, &event);
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		event.type = kEvTOneshot;
 		event.code = kTextEvent;
 		event.op = kEventRemove;
@@ -1340,7 +1340,7 @@
 	event.duration = 0;
 	q_event = _vm->_events->chain(q_event, &event);
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		// set mode to main
 		event.type = kEvTImmediate;
 		event.code = kInterfaceEvent;
@@ -1492,7 +1492,7 @@
 }
 
 void Scene::clearPsychicProfile() {
-	if (_vm->_interface->getMode() == kPanelPlacard || _vm->getGameId() == GID_IHNM_DEMO) {
+	if (_vm->_interface->getMode() == kPanelPlacard || _vm->getFeatures() & GF_IHNM_DEMO) {
 		_vm->_render->setFlag(RF_DISABLE_ACTORS);
 		_vm->_scene->clearPlacard();
 		_vm->_interface->activate();

Modified: scummvm/trunk/engines/saga/scene.h
===================================================================
--- scummvm/trunk/engines/saga/scene.h	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/scene.h	2008-12-21 15:59:05 UTC (rev 35467)
@@ -348,7 +348,7 @@
 	void drawTextList();
 
 	int getHeight(bool speech = false) const {
-		if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 8 && !speech)
+		if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 8 && !speech)
 			return _vm->getDisplayInfo().logicalHeight;
 		else
 			return _vm->getDisplayInfo().sceneHeight;
@@ -360,7 +360,7 @@
 	void showIHNMDemoSpecialScreen();
 
 	bool isNonInteractiveIHNMDemoPart() {
-		return _vm->getGameId() == GID_IHNM_DEMO && (_sceneNumber >= 144 && _sceneNumber <= 149);
+		return _vm->getFeatures() & GF_IHNM_DEMO && (_sceneNumber >= 144 && _sceneNumber <= 149);
 	}
 
  private:

Modified: scummvm/trunk/engines/saga/script.cpp
===================================================================
--- scummvm/trunk/engines/saga/script.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/script.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -289,7 +289,7 @@
 		return;
 	}
 
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		verbName = _mainStrings.getString(_leftButtonVerb - 1);
 	else
 		verbName = _mainStrings.getString(_leftButtonVerb + 1);
@@ -329,7 +329,7 @@
 }
 
 int Script::getVerbType(VerbTypes verbType) {
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		switch (verbType) {
 		case kVerbNone:
 			return kVerbITENone;
@@ -456,7 +456,7 @@
 			scriptModuleNumber = _vm->_scene->getScriptModuleNumber();
 		}
 		// IHNM never sets scriptModuleNumber to 0
-		if (_vm->getGameType() == GType_IHNM)
+		if (_vm->getGameId() == GID_IHNM)
 			scriptModuleNumber = _vm->_scene->getScriptModuleNumber();
 	} else {
 		if (_pendingVerb == getVerbType(kVerbUse)) {
@@ -488,7 +488,7 @@
 					scriptModuleNumber = 0;
 				}
 				// IHNM never sets scriptModuleNumber to 0
-				if (_vm->getGameType() == GType_IHNM)
+				if (_vm->getGameId() == GID_IHNM)
 					scriptModuleNumber = _vm->_scene->getScriptModuleNumber();
 			}
 		}
@@ -503,7 +503,7 @@
 	// choosing "[Cut out Edna's heart]", which works correctly. To disable this action, if the knife is used on Edna, we
 	// change the action here to "use knife with the knife", which yields a better reply ("I'd just dull my knife").
 	// Fixes bug #1826871 - "IHNM: Edna's got two hearts but loves to be on the hook"
-	if (_vm->getGameType() == GType_IHNM && _pendingObject[0] == 16385 && _pendingObject[1] == 8197 && _pendingVerb == 4)
+	if (_vm->getGameId() == GID_IHNM && _pendingObject[0] == 16385 && _pendingObject[1] == 8197 && _pendingVerb == 4)
 		_pendingObject[1] = 16385;
 
 	// WORKAROUND for a bug in the original game scripts of IHNM. Gorrister's heart is not supposed to have a
@@ -511,7 +511,7 @@
 	// reply is given to the player ("It's too narrow for me to pass", said when Gorrister tries to pick up the
 	// heart without a rope). Therefore, for object number 16397 (Gorrister's heart), when the active verb is
 	// "Use", set it to "Push", which gives a more appropriate reply ("What good will that do me?")
-	if (_vm->getGameType() == GType_IHNM && _pendingObject[0] == 16397 && _pendingVerb == 4)
+	if (_vm->getGameId() == GID_IHNM && _pendingObject[0] == 16397 && _pendingVerb == 4)
 		_pendingVerb = 8;
 
 	if (scriptEntrypointNumber > 0) {
@@ -530,11 +530,11 @@
 
 	} else {
 		// Show excuse text in ITE CD Versions
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			_vm->getExcuseInfo(_pendingVerb, excuseText, excuseSampleResourceId);
 			if (excuseText) {
 				// In Floppy versions we don't have excuse texts
-				if (!(_vm->getFeatures() & GF_CD_FX))
+				if (_vm->getFeatures() & GF_ITE_FLOPPY)
 					excuseSampleResourceId = -1;
 
 				_vm->_actor->actorSpeech(ID_PROTAG, &excuseText, 1, excuseSampleResourceId, 0);
@@ -660,14 +660,14 @@
 	}
 
 	if (hitZone != NULL) {
-		if (_vm->getGameType() == GType_ITE) {
+		if (_vm->getGameId() == GID_ITE) {
 			if (hitZone->getFlags() & kHitZoneNoWalk) {
 				_vm->_actor->actorFaceTowardsPoint(ID_PROTAG, pickLocation);
 				doVerb();
 				return;
 			}
 		} else {
-			if (_vm->getGameType() == GType_IHNM) {
+			if (_vm->getGameId() == GID_IHNM) {
 				if ((hitZone->getFlags() & kHitZoneNoWalk) && (_pendingVerb != getVerbType(kVerbWalkTo))) {
 					doVerb();
 					return;
@@ -693,7 +693,7 @@
 		}
 	}
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		if ((_pendingVerb == getVerbType(kVerbWalkTo)) ||
 			(_pendingVerb == getVerbType(kVerbPickUp)) ||
 			(_pendingVerb == getVerbType(kVerbOpen)) ||
@@ -716,7 +716,7 @@
 		}
 	}
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 
 		if ((_pendingVerb == getVerbType(kVerbWalkTo)) ||
 			(_pendingVerb == getVerbType(kVerbPickUp)) ||
@@ -809,14 +809,14 @@
 				} else {
 					actor = _vm->_actor->getActor(newObjectId);
 					objectId = newObjectId;
-					if (_vm->getGameType() == GType_ITE)
+					if (_vm->getGameId() == GID_ITE)
 						objectFlags = kObjUseWith;
 					// Note: for IHNM, the default right button action is "Look at" for actors,
 					// but "Talk to" makes much more sense
 					newRightButtonVerb = getVerbType(kVerbTalkTo);
 					// Slight hack because of the above change: the jukebox in Gorrister's chapter
 					// is an actor, so change the right button action to "Look at"
-					if (_vm->getGameType() == GType_IHNM && objectId == 8199)
+					if (_vm->getGameId() == GID_IHNM && objectId == 8199)
 						newRightButtonVerb = getVerbType(kVerbLookAt);
 
 					if ((_currentVerb == getVerbType(kVerbPickUp)) ||
@@ -824,7 +824,7 @@
 						(_currentVerb == getVerbType(kVerbClose)) ||
 						((_currentVerb == getVerbType(kVerbGive)) && !_firstObjectSet) ||
 						((_currentVerb == getVerbType(kVerbUse)) && !(actor->_flags & kFollower))) {
-							if (_vm->getGameType() == GType_ITE) {
+							if (_vm->getGameId() == GID_ITE) {
 								objectId = ID_NOTHING;
 								newObjectId = ID_NOTHING;
 							}
@@ -850,7 +850,7 @@
 				// to the left, which makes him exit the screen when the graffiti is examined.
 				// We effectively change the left side of the hitzone here so that it starts from
 				// pixel 301 onwards. The same workaround is applied in Actor::handleActions
-				if (_vm->getGameType() == GType_IHNM) {
+				if (_vm->getGameId() == GID_IHNM) {
 					if (_vm->_scene->currentChapterNumber() == 1 && _vm->_scene->currentSceneNumber() == 22)
 						if (hitZoneIndex == 8 && pickPoint.x <= 300)
 							hitZoneIndex = -1;
@@ -868,14 +868,14 @@
 					// hitzone contains (object ID 24578 - "The key") to the ID of the key
 					// object itself (object ID 16402 - "Edna's key"), as the user can keep
 					// hovering the cursor to both items, but can only pick up one
-					if (_vm->getGameType() == GType_IHNM) {
+					if (_vm->getGameId() == GID_IHNM) {
 						if (_vm->_scene->currentChapterNumber() == 1 && _vm->_scene->currentSceneNumber() == 24) {
 							if (objectId == 24578)
 								objectId = 16402;
 						}
 					}
 
-					if (_vm->getGameType() == GType_ITE) {
+					if (_vm->getGameId() == GID_ITE) {
 
 						if (newRightButtonVerb == getVerbType(kVerbWalkOnly)) {
 							if (_firstObjectSet) {

Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/sfuncs.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -243,7 +243,7 @@
 		OPCODE(sfQueueMusic),
 		OPCODE(sfDisableAbortSpeeches)
 	};
-	if (_vm->getGameType() == GType_IHNM)
+	if (_vm->getGameId() == GID_IHNM)
 		_scriptFunctionsList = IHNMscriptFunctionsList;
 	else
 		_scriptFunctionsList = ITEscriptFunctionsList;
@@ -282,7 +282,7 @@
 		// Fixes bugs #2057200 - "IHNM: Invisible inventory objects", 
 		// #1861126 - "IHNM: Crash when Gorrister cuts sheet in the mooring ring"
 		// and some incorrect objects in the IHNM demo
-		if (_vm->getGameType() == GType_IHNM)
+		if (_vm->getGameId() == GID_IHNM)
 			obj->_spriteListResourceId = obj->_index;
 
 		_vm->_interface->addToInventory(objectId);
@@ -324,7 +324,7 @@
 	// by an incorrect stored mode
 	_vm->_interface->rememberMode();
 
-	if (_vm->getGameType() == GType_ITE)
+	if (_vm->getGameId() == GID_ITE)
 		setPointerVerb();
 
 	// The early Windows and Mac demos of ITE were non-interactive. In those demos,
@@ -393,7 +393,7 @@
 				return;
 			}
 			moduleNumber = 0;
-			if (_vm->getGameType() == GType_IHNM)
+			if (_vm->getGameId() == GID_IHNM)
 				moduleNumber = _vm->_scene->getScriptModuleNumber();
 			break;
 		case kGameObjectActor:
@@ -407,7 +407,7 @@
 			} else {
 				moduleNumber = _vm->_scene->getScriptModuleNumber();
 			}
-			if (_vm->getGameType() == GType_IHNM)
+			if (_vm->getGameId() == GID_IHNM)
 				moduleNumber = _vm->_scene->getScriptModuleNumber();
 			break;
 		case kGameObjectHitZone:
@@ -550,16 +550,16 @@
 	int16 sceneNumber = thread->pop();
 	int16 entrance = thread->pop();
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		_vm->_gfx->setCursor(kCursorBusy);
 	}
 
-	if (_vm->getGameType() == GType_ITE && sceneNumber < 0) {
+	if (_vm->getGameId() == GID_ITE && sceneNumber < 0) {
 		_vm->quitGame();
 		return;
 	}
 
-	if (_vm->getGameType() == GType_IHNM && sceneNumber == 0) {
+	if (_vm->getGameId() == GID_IHNM && sceneNumber == 0) {
 		_vm->_scene->creditsScene();
 		return;
 	}
@@ -572,7 +572,7 @@
 	}
 
 	// changeScene calls loadScene which calls setVerb. setVerb resets all pending objects and object flags
-	if (sceneNumber == -1 && _vm->getGameType() == GType_IHNM) {
+	if (sceneNumber == -1 && _vm->getGameId() == GID_IHNM) {
 		// Return back to the character selection screen in IHNM
 		_vm->_scene->changeScene(154, entrance, kTransitionFade, 8);
 	} else {
@@ -590,7 +590,7 @@
 	_currentObject[0] = _currentObject[1] = ID_NOTHING;
 	showVerb();	// calls setStatusText("")
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		// There are some cutaways which are not removed by game scripts, like the cutaway
 		// after the intro of IHNM or the cutaway at the end of Ellen's part in the IHNM demo.
 		// Clear any remaining cutaways here
@@ -607,7 +607,7 @@
 	uint16 spriteId = thread->pop();
 	ObjectData *obj = _vm->_actor->getObj(objectId);
 
-	if (_vm->getGameType() == GType_IHNM)
+	if (_vm->getGameId() == GID_IHNM)
 		obj->_spriteListResourceId = spriteId;
 	else
 		obj->_spriteListResourceId = OBJ_SPRITE_BASE + spriteId;
@@ -631,7 +631,7 @@
 	uint16 objectId = thread->pop();
 	ObjectData *obj = _vm->_actor->getObj(objectId);
 
-	if (_vm->getGameType() == GType_IHNM)
+	if (_vm->getGameId() == GID_IHNM)
 		thread->_returnValue = obj->_spriteListResourceId;
 	else
 		thread->_returnValue = obj->_spriteListResourceId - OBJ_SPRITE_BASE;
@@ -825,11 +825,11 @@
 	// Change the scene number of the compact disk so that it's not shown. It will be shown
 	// once Ellen says that there's something different (i.e. after speaking with AM)
 	// See Actor::actorSpeech for the other part of this hack
-	if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 3 &&
+	if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 3 &&
 		_vm->_scene->currentSceneNumber() == 59 && obj->_id == 16385)
 			obj->_sceneNumber = -1;
 
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		// Don't update _spriteListResourceId if spriteId is 0 and the object is not the
 		// psychic profile. If spriteId == 0, the object's sprite is incorrectly reset.
 		// This occurs in the IHNM demo and with some incorrect scripts in the retail version
@@ -865,13 +865,13 @@
 		actor1->_flags &= ~kProtagonist;
 		actor2->_flags |= kProtagonist;
 		_vm->_actor->_protagonist = _vm->_actor->_centerActor = actor2;
-		if (_vm->getGameType() == GType_IHNM)
+		if (_vm->getGameId() == GID_IHNM)
 			_vm->_scene->setProtag(actorId2);
 	} else if (actor2->_flags & kProtagonist) {
 		actor2->_flags &= ~kProtagonist;
 		actor1->_flags |= kProtagonist;
 		_vm->_actor->_protagonist = _vm->_actor->_centerActor = actor1;
-		if (_vm->getGameType() == GType_IHNM)
+		if (_vm->getGameId() == GID_IHNM)
 			_vm->_scene->setProtag(actorId1);
 	}
 }
@@ -897,7 +897,7 @@
 		actorsIds[i] = thread->pop();
 
 	if (thread->_voiceLUT->voices) {
-		if (_vm->getGameType() == GType_IHNM && stringId >= 338) {
+		if (_vm->getGameId() == GID_IHNM && stringId >= 338) {
 			sampleResourceId = -1;
 		} else {
 			sampleResourceId = thread->_voiceLUT->voices[stringId];
@@ -964,7 +964,7 @@
 		actor->_actorFlags |= kActorRandom;
 	}
 	if (flags & kCycleReverse) {
-		if (_vm->getGameType() == GType_IHNM &&
+		if (_vm->getGameId() == GID_IHNM &&
 			_vm->_scene->currentChapterNumber() == 2 && _vm->_scene->currentSceneNumber() == 41) {
 			// WORKAROUND: Prevent Benny from walking backwards after talking to the child via the monitor. This
 			// occurs in the original as well, and is fixed by not setting the kActorBackwards flag at this point
@@ -1458,7 +1458,7 @@
 
 // Script function #63 (0x3F)
 void Script::sfPlayMusic(SCRIPTFUNC_PARAMS) {
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		int16 param = thread->pop() + 9;
 
 		if (param >= 9 && param <= 34) {
@@ -1568,7 +1568,7 @@
 
 	if (param >= 0 && param < _vm->_sndRes->_fxTableLen) {
 		res = _vm->_sndRes->_fxTable[param].res;
-		if (_vm->getFeatures() & GF_CD_FX)
+		if (_vm->getGameId() == GID_ITE && !(_vm->getFeatures() & GF_ITE_FLOPPY))
 			res -= 14;
 		_vm->_sndRes->playSound(res, _vm->_sndRes->_fxTable[param].vol, false);
 	} else {
@@ -1583,7 +1583,7 @@
 
 	if (param >= 0 && param < _vm->_sndRes->_fxTableLen) {
 		res = _vm->_sndRes->_fxTable[param].res;
-		if (_vm->getFeatures() & GF_CD_FX)
+		if (_vm->getGameId() == GID_ITE && !(_vm->getFeatures() & GF_ITE_FLOPPY))
 			res -= 14;
 
 		_vm->_sndRes->playSound(res, _vm->_sndRes->_fxTable[param].vol, true);
@@ -1647,7 +1647,7 @@
 	if (_conversingThread) {
 		_vm->_interface->setMode(kPanelNull);
 
-		if (_vm->getGameType() == GType_IHNM) {
+		if (_vm->getGameId() == GID_IHNM) {
 			str = _conversingThread->_strings->getString(strID);
 			if (*str != '[') {
 				int sampleResourceId = -1;

Modified: scummvm/trunk/engines/saga/sndres.cpp
===================================================================
--- scummvm/trunk/engines/saga/sndres.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/sndres.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -56,7 +56,7 @@
 
 	setVoiceBank(0);
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		_fxTable = ITE_SfxTable;
 		_fxTableLen = ITE_SFXCOUNT;
 	} else {
@@ -70,7 +70,7 @@
 		byte *resourcePointer;
 		size_t resourceLength;
 
-		if (_vm->getGameId() == GID_IHNM_DEMO) {
+		if (_vm->getFeatures() & GF_IHNM_DEMO) {
 			_vm->_resource->loadResource(resourceContext, RID_IHNMDEMO_SFX_LUT,
 									 resourcePointer, resourceLength);
 		} else {
@@ -97,7 +97,7 @@
 }
 
 SndRes::~SndRes() {
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		free(_fxTable);
 		free(_fxTableIDs);
 	}
@@ -109,7 +109,7 @@
 
 	// If we got the Macintosh version of IHNM, just set the voice bank
 	// so that we know which voices* subfolder to look for later
-	if (_vm->getGameType() == GType_IHNM && _vm->isMacResources()) {
+	if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
 		_voiceSerial = serial;
 		// Set a dummy voice context
 		_voiceContext = new ResourceContext();
@@ -155,7 +155,7 @@
 	if (!(_vm->_voiceFilesExist))
 		return;
 
-	if (_vm->getGameType() == GType_IHNM && !(_vm->_voicesEnabled))
+	if (_vm->getGameId() == GID_IHNM && !(_vm->_voicesEnabled))
 		return;
 
 	debug(4, "SndRes::playVoice %i", resourceId);
@@ -185,7 +185,7 @@
 		return false;
 	}
 
-	if (_vm->getGameType() == GType_IHNM && _vm->isMacResources()) {
+	if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
 		char soundFileName[40];
 		int dirIndex = resourceId / 64;
 	
@@ -221,7 +221,7 @@
 		soundInfo = _vm->getSfxInfo();
 	}
 
-	if (_vm->getGameType() == GType_IHNM && _vm->isMacResources() && (context->fileType & GAME_VOICEFILE) != 0) {
+	if (_vm->getGameId() == GID_IHNM && _vm->isMacResources() && (context->fileType & GAME_VOICEFILE) != 0) {
 		// No sound patch data for the voice files in the Mac version of IHNM
 	} else {
 		context->table[resourceId].fillSoundPatch(soundInfo);
@@ -247,11 +247,11 @@
 		bool uncompressedSound = false;
 		// If patch data exists for sound resource 4 (used in ITE intro), don't treat this sound as compressed
 		// Patch data for this resource is in file p2_a.iaf or p2_a.voc
-		if (_vm->getGameType() == GType_ITE && resourceId == 4 && context->table[resourceId].patchData != NULL)
+		if (_vm->getGameId() == GID_ITE && resourceId == 4 && context->table[resourceId].patchData != NULL)
 			uncompressedSound = true;
 
 		// FIXME: Currently, the SFX.RES file in IHNM cannot be compressed
-		if (_vm->getGameType() == GType_IHNM && (context->fileType & GAME_SOUNDFILE))
+		if (_vm->getGameId() == GID_IHNM && (context->fileType & GAME_SOUNDFILE))
 			uncompressedSound = true;
 
 		if ((_vm->getFeatures() & GF_COMPRESSED_SOUNDS) && !uncompressedSound) {
@@ -396,7 +396,7 @@
 	}
 
 
-	if (_vm->getGameType() == GType_IHNM && _vm->isMacResources()) {
+	if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
 		delete file;
 	}
 

Modified: scummvm/trunk/engines/saga/sprite.cpp
===================================================================
--- scummvm/trunk/engines/saga/sprite.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/sprite.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -58,24 +58,26 @@
 		memoryError("Sprite::Sprite");
 	}
 
-	if (_vm->getGameType() == GType_ITE) {
+	if (_vm->getGameId() == GID_ITE) {
 		loadList(_vm->getResourceDescription()->mainSpritesResourceId, _mainSprites);
 		_arrowSprites = _saveReminderSprites = _inventorySprites = _mainSprites;
-	} else {
-		if (_vm->getGameId() == GID_IHNM_DEMO) {
+	} else if (_vm->getGameId() == GID_IHNM) {
+		if (_vm->getFeatures() & GF_IHNM_DEMO) {
 			loadList(RID_IHNMDEMO_ARROW_SPRITES, _arrowSprites);
 			loadList(RID_IHNMDEMO_SAVEREMINDER_SPRITES, _saveReminderSprites);
 		} else {
 			loadList(RID_IHNM_ARROW_SPRITES, _arrowSprites);
 			loadList(RID_IHNM_SAVEREMINDER_SPRITES, _saveReminderSprites);
 		}
+	} else {
+		error("Sprite: unknown game type");
 	}
 }
 
 Sprite::~Sprite(void) {
 	debug(8, "Shutting down sprite subsystem...");
 	_mainSprites.freeMem();
-	if (_vm->getGameType() == GType_IHNM) {
+	if (_vm->getGameId() == GID_IHNM) {
 		_inventorySprites.freeMem();
 		_arrowSprites.freeMem();
 		_saveReminderSprites.freeMem();
@@ -118,7 +120,7 @@
 
 	spriteList.spriteCount = newSpriteCount;
 
-	bool bigHeader = _vm->getGameType() != GType_ITE || _vm->isMacResources();
+	bool bigHeader = _vm->getGameId() == GID_IHNM || _vm->isMacResources();
 
 	for (i = oldSpriteCount; i < spriteList.spriteCount; i++) {
 		spriteInfo = &spriteList.infoList[i];
@@ -169,7 +171,7 @@
 		// assume are perverse. To simplify things, flip them now. Not
 		// at drawing time.
 
-		if (_vm->getGameType() == GType_IHNM) {
+		if (_vm->getGameId() == GID_IHNM) {
 			byte *src = _decodeBuf + spriteInfo->width * (spriteInfo->height - 1);
 			byte *dst = spriteInfo->decodedBuffer;
 

Modified: scummvm/trunk/engines/saga/sthread.cpp
===================================================================
--- scummvm/trunk/engines/saga/sthread.cpp	2008-12-21 15:42:47 UTC (rev 35466)
+++ scummvm/trunk/engines/saga/sthread.cpp	2008-12-21 15:59:05 UTC (rev 35467)
@@ -61,7 +61,7 @@
 
 	newThread->_strings = &_modules[scriptModuleNumber].strings;
 
-	if (_vm->getGameType() == GType_IHNM)
+	if (_vm->getGameId() == GID_IHNM)
 		newThread->_voiceLUT = &_globalVoiceLUT;
 	else
 		newThread->_voiceLUT = &_modules[scriptModuleNumber].voiceLUT;
@@ -123,7 +123,7 @@
 			if (thread->_flags & kTFlagFinished)
 				setPointerVerb();
 
-			if (_vm->getGameType() == GType_IHNM) {
+			if (_vm->getGameId() == GID_IHNM) {
 				thread->_flags &= ~kTFlagFinished;
 				thread->_flags |= kTFlagAborted;
 				++threadIterator;
@@ -190,7 +190,7 @@
 }
 
 void Script::completeThread(void) {
-	int limit = (_vm->getGameType() == GType_IHNM) ? 100 : 40;
+	int limit = (_vm->getGameId() == GID_IHNM) ? 100 : 40;
 
 	for (int i = 0; i < limit && !_threadList.empty(); i++)
 		executeThreads(0);
@@ -343,7 +343,7 @@
 		CASEOP(opCcallV)
 			argumentsCount = scriptS.readByte();
 			functionNumber = scriptS.readUint16LE();
-			if (functionNumber >= ((_vm->getGameType() == GType_IHNM) ?
+			if (functionNumber >= ((_vm->getGameId() == GID_IHNM) ?
 								   IHNM_SCRIPT_FUNCTION_MAX : ITE_SCRIPT_FUNCTION_MAX)) {
 				error("Script::runThread() Invalid script function number (%d)", functionNumber);
 			}
@@ -653,7 +653,7 @@
 				}
 				// now data contains last string index
 
-				if (_vm->getGameId() == GID_ITE_DISK_G) { // special ITE dos
+				if (_vm->getFeatures() & GF_OLD_ITE_DOS) { // special ITE dos
 					if ((_vm->_scene->currentSceneNumber() == ITE_DEFAULT_SCENE) &&
 						(iparam1 >= 288) && (iparam1 <= (RID_SCENE1_VOICE_END - RID_SCENE1_VOICE_START + 288))) {
 						sampleResourceId = RID_SCENE1_VOICE_START + iparam1 - 288;
@@ -667,7 +667,7 @@
 				if (sampleResourceId < 0 || sampleResourceId > 4000)
 					sampleResourceId = -1;
 
-				if (_vm->getGameType() == GType_ITE && !sampleResourceId)
+				if (_vm->getGameId() == GID_ITE && !sampleResourceId)
 					sampleResourceId = -1;
 
 				_vm->_actor->actorSpeech(actorId, strings, stringsCount, sampleResourceId, speechFlags);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list