[Scummvm-git-logs] scummvm master -> 78431e8cf358ec6c2f6ab7136debd8e10fc6af24

sev- noreply at scummvm.org
Thu Oct 27 12:45:54 UTC 2022


This automated email contains information about 11 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ab5f19af6c SAGA2: Rename small enums in actor.h and objproto.h
aa481ba77b SAGA2: Rename enums in actor.h
aaa2f0a009 SAGA2: Rename enums in assign.h
438a0b2c81 SAGA2: Rename enums in button.h
c97c7d7e0b SAGA2: Rename enums in code.h
7cc012e311 SAGA2: Reanme enums in contain.h
2d903d39dc SAGA2: Rename enums in display.h
32b75a6524 SAGA2: Rename enums in dispnode.h and document.h
39032c3743 SAGA2: Rename enums in effects.h
9937c3dcdb SAGA2: Rename enums in enchant.h
78431e8cf3 SAGA2: Rename enums in gamerate.h


Commit: ab5f19af6cae95d5a156c309a6d70c9460c0a5ab
    https://github.com/scummvm/scummvm/commit/ab5f19af6cae95d5a156c309a6d70c9460c0a5ab
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T12:49:43+02:00

Commit Message:
SAGA2: Rename small enums in actor.h and objproto.h

Changed paths:
    engines/saga2/actor.h
    engines/saga2/objproto.h


diff --git a/engines/saga2/actor.h b/engines/saga2/actor.h
index 0952f248b1f..64578cc8528 100644
--- a/engines/saga2/actor.h
+++ b/engines/saga2/actor.h
@@ -290,10 +290,10 @@ class ActorProto : public ProtoObj, public ResourceActorProtoExtension {
 
 private:
 	enum {
-		ViewableRows    = 3,
-		ViewableCols    = 3,
-		maxRows         = 3,
-		maxCols         = 3
+		kViewableRows    = 3,
+		kViewableCols    = 3,
+		kMaxRows         = 3,
+		kMaxCols         = 3
 	};
 
 public:
@@ -393,16 +393,16 @@ public:
 
 public:
 	virtual uint16 getViewableRows() {
-		return ViewableRows;
+		return kViewableRows;
 	}
 	virtual uint16 getViewableCols() {
-		return ViewableCols;
+		return kViewableCols;
 	}
 	virtual uint16 getMaxRows() {
-		return maxRows;
+		return kMaxRows;
 	}
 	virtual uint16 getMaxCols() {
-		return maxCols;
+		return kMaxCols;
 	}
 
 	virtual bool canFitBulkwise(GameObject *container, GameObject *obj);
diff --git a/engines/saga2/objproto.h b/engines/saga2/objproto.h
index e3bc5fe03b8..049bb0b6af3 100644
--- a/engines/saga2/objproto.h
+++ b/engines/saga2/objproto.h
@@ -378,10 +378,10 @@ class ProtoObj : public ResourceObjectPrototype {
 	// at appropriate subclasses
 private:
 	enum {
-		ViewableRows    = 6,
-		ViewableCols    = 4,
-		maxRows         = 8,
-		maxCols         = 4
+		kViewableRows    = 6,
+		kViewableCols    = 4,
+		kMaxRows         = 8,
+		kMaxCols         = 4
 	};
 
 public:
@@ -717,16 +717,16 @@ public:
 	// this is to determine size of containers
 public:
 	virtual uint16 getViewableRows() {
-		return ViewableRows;
+		return kViewableRows;
 	}
 	virtual uint16 getViewableCols() {
-		return ViewableCols;
+		return kViewableCols;
 	}
 	virtual uint16 getMaxRows() {
-		return maxRows;
+		return kMaxRows;
 	}
 	virtual uint16 getMaxCols() {
-		return maxCols;
+		return kMaxCols;
 	}
 
 	// this returns the type of charge an item can have


Commit: aa481ba77bc5aa521ca1973fda28f46771bb4a38
    https://github.com/scummvm/scummvm/commit/aa481ba77bc5aa521ca1973fda28f46771bb4a38
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T13:25:55+02:00

Commit Message:
SAGA2: Rename enums in actor.h

Changed paths:
    engines/saga2/actor.cpp
    engines/saga2/actor.h
    engines/saga2/assign.cpp
    engines/saga2/assign.h
    engines/saga2/dispnode.cpp
    engines/saga2/effects.cpp
    engines/saga2/intrface.cpp
    engines/saga2/magic.cpp
    engines/saga2/motion.cpp
    engines/saga2/motion.h
    engines/saga2/objproto.cpp
    engines/saga2/player.cpp
    engines/saga2/player.h
    engines/saga2/sagafunc.cpp
    engines/saga2/speech.cpp
    engines/saga2/task.cpp
    engines/saga2/tilemode.cpp


diff --git a/engines/saga2/actor.cpp b/engines/saga2/actor.cpp
index a03d8e3d29a..cb7bf5965c3 100644
--- a/engines/saga2/actor.cpp
+++ b/engines/saga2/actor.cpp
@@ -197,7 +197,7 @@ bool ActorProto::strikeAction(
 	ObjectSoundFXs  *soundFXs;
 	Location        al = Location(a->getLocation(), a->IDParent());
 
-	if (itemPtr->acceptStrike(enactor, dObj, effStats->getSkillLevel(skillIDBludgeon)))
+	if (itemPtr->acceptStrike(enactor, dObj, effStats->getSkillLevel(kSkillIDBludgeon)))
 		return true;
 
 	soundFXs = &objectSoundFXTable[soundFXClass];
@@ -232,7 +232,7 @@ bool ActorProto::damageAction(
 	    a,
 	    GameObject::objectAddress(target),
 	    GameObject::objectAddress(dObj),
-	    effStats->getSkillLevel(skillIDBrawn));
+	    effStats->getSkillLevel(kSkillIDBrawn));
 
 	return true;
 }
@@ -415,7 +415,7 @@ bool ActorProto::acceptDamageAction(
 		//  morale check
 		if (damageScore >= vitality) {
 			MotionTask::die(*a);
-			AddFactionTally(a->_faction, factionNumKills, 1);
+			AddFactionTally(a->_faction, kFactionNumKills, 1);
 			if (enactorPtr != nullptr)
 				enactorPtr->handleSuccessfulKill(a);
 		} else
@@ -497,8 +497,8 @@ bool ActorProto::acceptStrikeAction(
 	const int       avgHitChance = toHitBase / 2;
 	const int       skillScalingFactor =
 	    (avgHitChance
-	     +   ActorAttributes::skillLevels - 1)
-	    /   ActorAttributes::skillLevels;
+	     +   ActorAttributes::kSkillLevels - 1)
+	    /   ActorAttributes::kSkillLevels;
 	const int       dodgingBonus = 10;
 
 	Actor           *a = (Actor *)GameObject::objectAddress(dObj);
@@ -523,7 +523,7 @@ bool ActorProto::acceptStrikeAction(
 	//  Determine "to hit" percentage
 	hitChance =     avgHitChance
 	                + ((int)skillIndex
-	                   - (int)effStats->getSkillLevel(skillIDAgility))
+	                   - (int)effStats->getSkillLevel(kSkillIDAgility))
 	                *   skillScalingFactor;
 
 	//  Factor in armor bonus
@@ -590,7 +590,7 @@ bool ActorProto::acceptStrikeAction(
 		if (actorIDToPlayerID(dObj, playerID)) {
 			PlayerActor     *player = getPlayerActorAddress(playerID);
 
-			player->skillAdvance(skillIDAgility, 1);
+			player->skillAdvance(kSkillIDAgility, 1);
 		}
 	}
 
@@ -708,9 +708,9 @@ void ActorProto::initiateAttack(ObjectID attacker, ObjectID target) {
 
 	//  Start the attack motion
 	if (attackerPtr->_appearance != nullptr) {
-		if (attackerPtr->isActionAvailable(actionSwingHigh))
+		if (attackerPtr->isActionAvailable(kActionSwingHigh))
 			MotionTask::oneHandedSwing(*attackerPtr, *targetPtr);
-		else if (attackerPtr->isActionAvailable(actionTwoHandSwingHigh))
+		else if (attackerPtr->isActionAvailable(kActionTwoHandSwingHigh))
 			MotionTask::twoHandedSwing(*attackerPtr, *targetPtr);
 	} else
 		MotionTask::oneHandedSwing(*attackerPtr, *targetPtr);
@@ -745,7 +745,7 @@ void ActorProto::doBackgroundUpdate(GameObject *obj) {
 			//  If this is a temporary actor waiting for expiration,
 			//  then decrement the expiration counter and possibly
 			//  delete the actor
-			if ((a->_flags & Actor::temporary) || a->isDead()) {
+			if ((a->_flags & Actor::kAFTemporary) || a->isDead()) {
 				if (a->_deactivationCounter <= 0) {
 					a->deleteObjectRecursive();
 					return;
@@ -753,8 +753,8 @@ void ActorProto::doBackgroundUpdate(GameObject *obj) {
 			} else {
 				//  If the actor has failed morale there is a random
 				//  chance of him regaining his courage
-				if ((a->_flags & Actor::afraid) && g_vm->_rnd->getRandomNumber(127) == 0)
-					a->_flags &= ~Actor::afraid;
+				if ((a->_flags & Actor::kAFAfraid) && g_vm->_rnd->getRandomNumber(127) == 0)
+					a->_flags &= ~Actor::kAFAfraid;
 			}
 		}
 
@@ -803,10 +803,10 @@ void ActorProto::applySkillGrowth(ObjectID enactor, uint8 points) {
 	if (actorIDToPlayerID(enactor, playerID)) {
 		PlayerActor     *player = getPlayerActorAddress(playerID);
 
-		player->skillAdvance(skillIDBludgeon, points);
+		player->skillAdvance(kSkillIDBludgeon, points);
 
 		if (g_vm->_rnd->getRandomNumber(1))
-			player->skillAdvance(skillIDBrawn, points);
+			player->skillAdvance(kSkillIDBrawn, points);
 	}
 }
 
@@ -861,7 +861,7 @@ uint16 ActorProto::massCapacity(GameObject *container) {
 	ActorAttributes *effStats = a->getStats();
 
 	return      baseCarryingCapacity
-	            +       effStats->getSkillLevel(skillIDBrawn)
+	            +       effStats->getSkillLevel(kSkillIDBrawn)
 	            *   carryingCapacityBonusPerBrawn;
 }
 
@@ -939,7 +939,7 @@ void Actor::init(
     uint8   colorSchemeIndex,
     uint8   factionNum,
     uint8   initFlags) {
-	debugC(1, kDebugActors, "Actor init flags: %d, permanent: %d", initFlags, initFlags & actorPermanent);
+	debugC(1, kDebugActors, "Actor init flags: %d, permanent: %d", initFlags, initFlags & kActorPermanent);
 
 	//  Fixup the prototype pointer to point to an actor prototype
 	_prototype           = (ProtoObj *)g_vm->_actorProtos[protoIndex];
@@ -976,12 +976,12 @@ void Actor::init(
 	for (uint i = 0; i < ARRAYSIZE(_conversationMemory); ++i)
 		_conversationMemory[i] = 0;
 
-	_currentAnimation    = actionStand;
+	_currentAnimation    = kActionStand;
 	_currentPose         = 0;
 	_animationFlags      = 0;
 	_flags               = 0;
-	if (!(initFlags & actorPermanent))
-		_flags |= temporary;
+	if (!(initFlags & kActorPermanent))
+		_flags |= kAFTemporary;
 
 	_poseInfo.flags = 0;
 	_poseInfo.actorFrameIndex = 0;
@@ -997,7 +997,7 @@ void Actor::init(
 	_moveTask            = nullptr;
 	_enchantmentFlags    = 0L;
 	_curTask             = nullptr;
-	_currentGoal         = actorGoalFollowAssignment;
+	_currentGoal         = kActorGoalFollowAssignment;
 	_deactivationCounter = 0;
 	_assignment = nullptr;
 
@@ -1048,7 +1048,7 @@ Actor::Actor() {
 	for (uint i = 0; i < ARRAYSIZE(_conversationMemory); ++i)
 		_conversationMemory[i] = 0;
 
-	_currentAnimation    = actionStand;
+	_currentAnimation    = kActionStand;
 	_currentPose         = 0;
 	_animationFlags      = 0;
 	_flags               = 0;
@@ -1067,7 +1067,7 @@ Actor::Actor() {
 	_moveTask            = nullptr;
 	_enchantmentFlags    = 0L;
 	_curTask             = nullptr;
-	_currentGoal         = actorGoalFollowAssignment;
+	_currentGoal         = kActorGoalFollowAssignment;
 	_deactivationCounter = 0;
 	_assignment = nullptr;
 
@@ -1117,7 +1117,7 @@ Actor::Actor(const ResourceActor &res) : GameObject(res) {
 	for (uint i = 0; i < ARRAYSIZE(_conversationMemory); ++i)
 		_conversationMemory[i] = 0;
 
-	_currentAnimation    = actionStand;
+	_currentAnimation    = kActionStand;
 	_currentPose         = 0;
 	_animationFlags      = 0;
 	_flags               = 0;
@@ -1136,7 +1136,7 @@ Actor::Actor(const ResourceActor &res) : GameObject(res) {
 	_moveTask            = nullptr;
 	_enchantmentFlags    = 0L;
 	_curTask             = nullptr;
-	_currentGoal         = actorGoalFollowAssignment;
+	_currentGoal         = kActorGoalFollowAssignment;
 	_deactivationCounter = 0;
 	_assignment = nullptr;
 
@@ -1225,7 +1225,7 @@ Actor::Actor(Common::InSaveFile *in) : GameObject(in) {
 	for (int i = 0; i < ARRAYSIZE(_scriptVar); ++i)
 		_scriptVar[i] = in->readSint16LE();
 
-	if (_flags & hasAssignment) {
+	if (_flags & kAFHasAssignment) {
 		readAssignment(this, in);
 	} else {
 		_assignment = nullptr;
@@ -1290,7 +1290,7 @@ int32 Actor::archiveSize() {
 	int32   size = GameObject::archiveSize();
 
 	size += sizeof(ActorArchive);
-	if (_flags & hasAssignment)
+	if (_flags & kAFHasAssignment)
 		size += assignmentArchiveSize(this);
 
 	return size;
@@ -1361,7 +1361,7 @@ void Actor::write(Common::MemoryWriteStreamDynamic *out) {
 	out->writeUint16LE(_currentTargetID);
 	out->write(_scriptVar, sizeof(_scriptVar));
 
-	if (_flags & hasAssignment)
+	if (_flags & kAFHasAssignment)
 		writeAssignment(this, out);
 
 	debugC(4, kDebugSaveload, "... _faction = %d", _faction);
@@ -1426,7 +1426,7 @@ Actor *Actor::newActor(
 		for (i = kPlayerActors; i < kActorCount; i++) {
 			a = g_vm->_act->_actorList[i];
 
-			if ((a->_flags & temporary)
+			if ((a->_flags & kAFTemporary)
 			        &&  !a->isActivated()
 			        &&  isWorld(a->IDParent()))
 				break;
@@ -1455,7 +1455,7 @@ Actor *Actor::newActor(
 	    factionNum,
 	    initFlags);
 
-	if (a->_flags & temporary) {
+	if (a->_flags & kAFTemporary) {
 		incTempActorCount(protoNum);
 		debugC(1, kDebugActors, "Actors: Created temp actor %d (%s) new count:%d", a->thisID() - 32768, a->objName(), getTempActorCount(protoNum));
 	}
@@ -1467,7 +1467,7 @@ Actor *Actor::newActor(
 //	Delete this actor
 
 void Actor::deleteActor() {
-	if (_flags & temporary) {
+	if (_flags & kAFTemporary) {
 		uint16      protoNum = getProtoNum();
 
 		decTempActorCount(protoNum);
@@ -1594,16 +1594,16 @@ void Actor::vitalityUpdate() {
 		int16 fractionRecover;
 
 		// get the whole number first
-		recover = _recPointsPerUpdate / recPointsPerVitality;
+		recover = _recPointsPerUpdate / kRecPointsPerVitality;
 
 		// get the fraction
-		fractionRecover = _recPointsPerUpdate % recPointsPerVitality;
+		fractionRecover = _recPointsPerUpdate % kRecPointsPerVitality;
 
 		// if there is an overrun
-		if (_currentRecoveryPoints + fractionRecover > recPointsPerVitality) {
+		if (_currentRecoveryPoints + fractionRecover > kRecPointsPerVitality) {
 			// add the overrun to the whole number
 			recover++;
-			_currentRecoveryPoints = (_currentRecoveryPoints + fractionRecover) - recPointsPerVitality;
+			_currentRecoveryPoints = (_currentRecoveryPoints + fractionRecover) - kRecPointsPerVitality;
 		} else {
 			_currentRecoveryPoints += fractionRecover;
 		}
@@ -1657,7 +1657,7 @@ void Actor::deactivateActor() {
 	}
 
 	//  Temporary actors get deleted upon deactivation
-	if ((_flags & temporary) || isDead()) {
+	if ((_flags & kAFTemporary) || isDead()) {
 		_deactivationCounter = 10;       // actor lasts for 50 seconds
 	}
 }
@@ -1666,12 +1666,12 @@ void Actor::deactivateActor() {
 //	Delobotomize this actor
 
 void Actor::delobotomize() {
-	if (!(_flags & lobotomized)) return;
+	if (!(_flags & kAFLobotomized)) return;
 
 	ObjectID        dObj = thisID();
 	scriptCallFrame scf;
 
-	_flags &= ~lobotomized;
+	_flags &= ~kAFLobotomized;
 
 	scf.invokedObject   = dObj;
 	scf.enactor         = dObj;
@@ -1688,7 +1688,7 @@ void Actor::delobotomize() {
 //	Lobotomize this actor
 
 void Actor::lobotomize() {
-	if (_flags & lobotomized) return;
+	if (_flags & kAFLobotomized) return;
 
 	ObjectID        dObj = thisID();
 	scriptCallFrame scf;
@@ -1704,7 +1704,7 @@ void Actor::lobotomize() {
 	if (_moveTask != nullptr)
 		_moveTask->remove();
 
-	_flags |= lobotomized;
+	_flags |= kAFLobotomized;
 
 	scf.invokedObject   = dObj;
 	scf.enactor         = dObj;
@@ -1722,10 +1722,10 @@ void Actor::lobotomize() {
 //	structure.
 
 ActorAttributes *Actor::getBaseStats() {
-	if (_disposition < dispositionPlayer)
+	if (_disposition < kDispositionPlayer)
 		return &((ActorProto *)_prototype)->baseStats;
 	else
-		return &g_vm->_playerList[_disposition - dispositionPlayer]->_baseStats;
+		return &g_vm->_playerList[_disposition - kDispositionPlayer]->_baseStats;
 }
 
 //-----------------------------------------------------------------------
@@ -1733,7 +1733,7 @@ ActorAttributes *Actor::getBaseStats() {
 //	is a non-player actor, the base stats are in the prototype.
 
 uint32 Actor::getBaseEnchantmentEffects() {
-	//if ( disposition < dispositionPlayer )
+	//if ( disposition < kDispositionPlayer )
 	return ((ActorProto *)_prototype)->baseEffectFlags;
 }
 
@@ -1742,7 +1742,7 @@ uint32 Actor::getBaseEnchantmentEffects() {
 //	is a non-player actor, the base stats are in the prototype.
 
 uint16 Actor::getBaseResistance() {
-	//if ( disposition < dispositionPlayer )
+	//if ( disposition < kDispositionPlayer )
 	return ((ActorProto *)_prototype)->resistance;
 }
 
@@ -1751,7 +1751,7 @@ uint16 Actor::getBaseResistance() {
 //	is a non-player actor, the base stats are in the prototype.
 
 uint16 Actor::getBaseImmunity() {
-	//if ( disposition < dispositionPlayer )
+	//if ( disposition < kDispositionPlayer )
 	return ((ActorProto *)_prototype)->immunity;
 }
 
@@ -2056,8 +2056,8 @@ int16 Actor::setAction(int16 newState, int16 flags) {
 	_animationFlags = flags;
 
 	//  If they haven't set the "no reset" flag, then
-	if (!(flags & animateNoRestart)) {
-		if (flags & animateReverse) _currentPose = numPoses - 1;
+	if (!(flags & kAnimateNoRestart)) {
+		if (flags & kAnimateReverse) _currentPose = numPoses - 1;
 		else _currentPose = 0;
 	} else {
 		_currentPose = clamp(0, _currentPose, numPoses - 1);
@@ -2127,22 +2127,22 @@ bool Actor::nextAnimationFrame() {
 //  RUnlockHandle( appearance->animations );
 
 	if (_appearance == nullptr) {
-		if (_animationFlags & animateOnHold) {
+		if (_animationFlags & kAnimateOnHold) {
 			return false;
-		} else if (_animationFlags & animateRepeat) {
-			_animationFlags |= animateOnHold;
+		} else if (_animationFlags & kAnimateRepeat) {
+			_animationFlags |= kAnimateOnHold;
 			return false;
 		} else {
-			_animationFlags |= animateFinished;
+			_animationFlags |= kAnimateFinished;
 			return true;
 		}
-	} else _animationFlags &= ~animateOnHold;
+	} else _animationFlags &= ~kAnimateOnHold;
 
 	//  Get the number of frames in the animation
 	anim = _appearance->animation(_currentAnimation);
 	numPoses = anim->count[_currentFacing];
 	if (numPoses <= 0) {
-		_animationFlags |= animateFinished;
+		_animationFlags |= kAnimateFinished;
 		return true;                    // no poses, return DONE
 	}
 
@@ -2150,15 +2150,15 @@ bool Actor::nextAnimationFrame() {
 	//  been loaded, then don't update the animation state --
 	//  wait until the sprite gets loaded, and then continue
 	//  with the action.
-	if (_animationFlags & animateNotLoaded) return false;
+	if (_animationFlags & kAnimateNotLoaded) return false;
 
 	//  If the animation has reached the last frame, then exit.
-	if (_animationFlags & animateFinished) return true;
+	if (_animationFlags & kAnimateFinished) return true;
 
-	if (_animationFlags & animateRandom) {
+	if (_animationFlags & kAnimateRandom) {
 		//  Select a random frame from the series.
 		_currentPose = g_vm->_rnd->getRandomNumber(numPoses - 1);
-	} else if (_animationFlags & animateReverse) {
+	} else if (_animationFlags & kAnimateReverse) {
 		//  Note that the logic for forward repeats is slightly
 		//  different for reverse repeats. Specifically, the
 		//  "alternate" flag is always checked when going forward,
@@ -2170,16 +2170,16 @@ bool Actor::nextAnimationFrame() {
 			_currentPose--;
 
 			//  Check if this is the last frame
-			if (_currentPose <= 0 && !(_animationFlags & animateRepeat)) {
-				_animationFlags |= animateFinished;
+			if (_currentPose <= 0 && !(_animationFlags & kAnimateRepeat)) {
+				_animationFlags |= kAnimateFinished;
 			}
-		} else if (_animationFlags & animateRepeat) {
+		} else if (_animationFlags & kAnimateRepeat) {
 			//  If we're repeating, check for a back & forth,
 			//  or for a wraparound. Also checks for case of
 			//  a degenerate series (1 frame only)
 
-			if (_animationFlags & animateAlternate) {
-				_animationFlags &= ~animateReverse;
+			if (_animationFlags & kAnimateAlternate) {
+				_animationFlags &= ~kAnimateReverse;
 				_currentPose = MIN(1, numPoses - 1);
 			} else {
 				_currentPose = numPoses - 1;
@@ -2192,17 +2192,17 @@ bool Actor::nextAnimationFrame() {
 
 			//  Check if this is the last frame
 			if (_currentPose >= numPoses - 1 &&
-			        !(_animationFlags & (animateAlternate | animateRepeat)))
-				_animationFlags |= animateFinished;
-		} else if (_animationFlags & animateAlternate) {
+			        !(_animationFlags & (kAnimateAlternate | kAnimateRepeat)))
+				_animationFlags |= kAnimateFinished;
+		} else if (_animationFlags & kAnimateAlternate) {
 			//  At the end of the sequence, reverse direction
-			_animationFlags |= animateReverse;
+			_animationFlags |= kAnimateReverse;
 			_currentPose = MAX(_currentPose - 1, 0);
-		} else if (_animationFlags & animateRepeat) {
+		} else if (_animationFlags & kAnimateRepeat) {
 			//  Wrap back to beginning
 			_currentPose = 0;
 		} else //If Last Frame And Not Animate Repeat or Alternate
-			_animationFlags |= animateFinished;
+			_animationFlags |= kAnimateFinished;
 	}
 	return false;
 }
@@ -2291,7 +2291,7 @@ void Actor::updateAppearance(int32) {
 //    static uint16    count;
 //    count++;
 
-	if (isDead() || !isActivated() || (_flags & lobotomized)) return;
+	if (isDead() || !isActivated() || (_flags & kAFLobotomized)) return;
 
 #if DEBUG*0
 	WriteStatusF(4, "Wait Count %d Attitude %d", cycleCount, attitude);
@@ -2305,8 +2305,8 @@ void Actor::updateAppearance(int32) {
 #endif
 
 	if (_appearance) {
-		if (animationFrames(actionStand, _currentFacing) == 1) {
-			if (_flags & fightStance) {
+		if (animationFrames(kActionStand, _currentFacing) == 1) {
+			if (_flags & kAFFightStance) {
 				GameObject      *weapon = offensiveObject();
 
 				if (weapon == this) weapon = nullptr;
@@ -2316,10 +2316,10 @@ void Actor::updateAppearance(int32) {
 
 					setAction(weaponProto->fightStanceAction(thisID()), 0);
 				} else {
-					if (isActionAvailable(actionSwingHigh))
-						setAction(actionSwingHigh, 0);
+					if (isActionAvailable(kActionSwingHigh))
+						setAction(kActionSwingHigh, 0);
 					else
-						setAction(actionTwoHandSwingHigh, 0);
+						setAction(kActionTwoHandSwingHigh, 0);
 				}
 
 				_cycleCount = 0;
@@ -2327,7 +2327,7 @@ void Actor::updateAppearance(int32) {
 				if (_cycleCount > 0) { //If In Wait State Between Wait Animation
 					_cycleCount--;
 
-					setAction(actionStand, 0);   //Just stand still
+					setAction(kActionStand, 0);   //Just stand still
 				} else { // Wait Animation
 					if (_cycleCount == 0) { //If Just Starting Wait Animation
 						_cycleCount--;
@@ -2335,24 +2335,24 @@ void Actor::updateAppearance(int32) {
 						//Currently Attitude Not Set So Always Hits Zero
 						case 0:
 							//Returns True If Successful No Checking Yet
-							setAvailableAction(actionWaitAgressive,
-							                   actionWaitImpatient,
-							                   actionWaitFriendly,
-							                   actionStand); // This is default
+							setAvailableAction(kActionWaitAgressive,
+							                   kActionWaitImpatient,
+							                   kActionWaitFriendly,
+							                   kActionStand); // This is default
 							break;
 
 						case 1:
-							setAvailableAction(actionWaitImpatient,
-							                   actionWaitFriendly,
-							                   actionWaitAgressive,
-							                   actionStand);
+							setAvailableAction(kActionWaitImpatient,
+							                   kActionWaitFriendly,
+							                   kActionWaitAgressive,
+							                   kActionStand);
 							break;
 
 						case 2:
-							setAvailableAction(actionWaitFriendly,
-							                   actionWaitImpatient,
-							                   actionWaitAgressive,
-							                   actionStand);
+							setAvailableAction(kActionWaitFriendly,
+							                   kActionWaitImpatient,
+							                   kActionWaitAgressive,
+							                   kActionStand);
 
 						}
 					} else //Assume -1
@@ -2361,9 +2361,9 @@ void Actor::updateAppearance(int32) {
 				}
 			}
 		} else {
-			if (_currentAnimation != actionStand
-			        || (_animationFlags & animateRepeat) == 0)
-				setAction(actionStand, animateRepeat);
+			if (_currentAnimation != kActionStand
+			        || (_animationFlags & kAnimateRepeat) == 0)
+				setAction(kActionStand, kAnimateRepeat);
 			else
 				nextAnimationFrame();
 		}
@@ -2407,8 +2407,8 @@ void Actor::setGoal(uint8 newGoal) {
 void Actor::evaluateNeeds() {
 	if (!isDead()
 	        &&  isActivated()
-	        &&  !(_flags & lobotomized)) {
-		if (_disposition >= dispositionPlayer) {
+	        &&  !(_flags & kAFLobotomized)) {
+		if (_disposition >= kDispositionPlayer) {
 			if (g_vm->_act->_combatBehaviorEnabled) {
 				SenseInfo       info;
 
@@ -2420,28 +2420,28 @@ void Actor::evaluateNeeds() {
 				            info,
 				            maxSenseRange,
 				            actorPropIDEnemy)) {
-					PlayerActorID   playerID = _disposition - dispositionPlayer;
+					PlayerActorID   playerID = _disposition - kDispositionPlayer;
 
 					if (isAggressive(playerID))
-						setGoal(actorGoalAttackEnemy);
+						setGoal(kActorGoalAttackEnemy);
 					else {
 						if (_leader != nullptr && inBandingRange())
-							setGoal(actorGoalAvoidEnemies);
+							setGoal(kActorGoalAvoidEnemies);
 						else
-							setGoal(actorGoalPreserveSelf);
+							setGoal(kActorGoalPreserveSelf);
 					}
 				} else if (_leader != nullptr && inBandingRange()) {
-					setGoal(actorGoalFollowLeader);
+					setGoal(kActorGoalFollowLeader);
 				} else {
-					setGoal(actorGoalFollowAssignment);
+					setGoal(kActorGoalFollowAssignment);
 				}
 			} else if (_leader != nullptr && inBandingRange()) {
-				setGoal(actorGoalFollowLeader);
+				setGoal(kActorGoalFollowLeader);
 			} else {
-				setGoal(actorGoalFollowAssignment);
+				setGoal(kActorGoalFollowAssignment);
 			}
 		} else {
-			if (_disposition == dispositionEnemy
+			if (_disposition == kDispositionEnemy
 			        &&  _appearance != nullptr
 			        &&  !hasEffect(actorNotDefenseless)) {
 				GameObject              *obj;
@@ -2459,22 +2459,22 @@ void Actor::evaluateNeeds() {
 				}
 
 				if (!foundWeapon
-				        && (isActionAvailable(actionSwingHigh)
-				            ||  isActionAvailable(actionTwoHandSwingHigh)))
+				        && (isActionAvailable(kActionSwingHigh)
+				            ||  isActionAvailable(kActionTwoHandSwingHigh)))
 					foundWeapon = true;
 
 				if (!foundWeapon)
-					_flags |= afraid;
+					_flags |= kAFAfraid;
 			}
 
-			if (_flags & afraid || hasEffect(actorFear) || hasEffect(actorRepelUndead)) {
-				setGoal(actorGoalPreserveSelf);
+			if (_flags & kAFAfraid || hasEffect(actorFear) || hasEffect(actorRepelUndead)) {
+				setGoal(kActorGoalPreserveSelf);
 			} else if (_leader != nullptr && inBandingRange()) {
 				setGoal(_leader->evaluateFollowerNeeds(this));
 			} else {
 				SenseInfo       info;
 
-				if (_disposition == dispositionEnemy
+				if (_disposition == kDispositionEnemy
 				        && (getAssignment() == nullptr
 				            ||  canSenseProtaganist(
 				                info,
@@ -2482,9 +2482,9 @@ void Actor::evaluateNeeds() {
 				            ||  canSenseProtaganistIndirectly(
 				                info,
 				                maxSenseRange))) {
-					setGoal(actorGoalAttackEnemy);
+					setGoal(kActorGoalAttackEnemy);
 				} else {
-					setGoal(actorGoalFollowAssignment);
+					setGoal(kActorGoalFollowAssignment);
 				}
 			}
 		}
@@ -2498,7 +2498,7 @@ void Actor::updateState() {
 
 	GameObject::updateState();
 
-	if (_flags & lobotomized)
+	if (_flags & kAFLobotomized)
 		return;
 
 	//  Update the action counter
@@ -2510,11 +2510,11 @@ void Actor::updateState() {
 	        &&  isInterruptable()
 	        && (_moveTask == nullptr
 	            ||  _moveTask->_motionType != MotionTask::motionTypeDie)) {
-		int16       deadState = isActionAvailable(actionDead)
-		                        ?   actionDead
-		                        :   isActionAvailable(actionDie)
-		                        ?   actionDie
-		                        :   actionStand;
+		int16       deadState = isActionAvailable(kActionDead)
+		                        ?   kActionDead
+		                        :   isActionAvailable(kActionDie)
+		                        ?   kActionDie
+		                        :   kActionStand;
 
 		if (_currentAnimation != deadState)
 			MotionTask::die(*this);
@@ -2524,8 +2524,8 @@ void Actor::updateState() {
 	if (!isDead()) {
 		if (this == getCenterActor()) return;
 
-		if (_flags & specialAttack) {
-			_flags &= ~specialAttack;
+		if (_flags & kAFSpecialAttack) {
+			_flags &= ~kAFSpecialAttack;
 
 			if (_currentTarget != nullptr) {
 				scriptCallFrame scf;
@@ -2541,13 +2541,13 @@ void Actor::updateState() {
 
 				//  If this actor is now deactivated or lobotomized
 				//  return immediately
-				if (isDead() || !isActivated() || (_flags & lobotomized))
+				if (isDead() || !isActivated() || (_flags & kAFLobotomized))
 					return;
 			}
 		}
 
 		switch (_currentGoal) {
-		case actorGoalFollowAssignment: {
+		case kActorGoalFollowAssignment: {
 			ActorAssignment     *assign = getAssignment();
 
 			//  Iterate until there is no assignment, or the current
@@ -2568,9 +2568,9 @@ void Actor::updateState() {
 
 				runObjectMethod(dObj, Method_Actor_onEndAssignment, scf);
 
-				//  If this actor is now deactivated or lobotomized
+				//  If this actor is now deactivated or kAFLobotomized
 				//  return immediately
-				if (isDead() || !isActivated() || (_flags & lobotomized))
+				if (isDead() || !isActivated() || (_flags & kAFLobotomized))
 					return;
 
 				//  Re-get the assignment
@@ -2603,7 +2603,7 @@ void Actor::updateState() {
 		}
 		break;
 
-		case actorGoalPreserveSelf:
+		case kActorGoalPreserveSelf:
 
 			if (_leader != nullptr || _followers != nullptr)
 				disband();
@@ -2613,7 +2613,7 @@ void Actor::updateState() {
 					Task    *task = new GoAwayFromActorTask(
 					                    _curTask,
 					                    ActorPropertyTarget(
-					                        _disposition == dispositionEnemy
+					                        _disposition == kDispositionEnemy
 					                        ?   actorPropIDPlayerActor
 					                        :   actorPropIDEnemy),
 					                    true);
@@ -2628,7 +2628,7 @@ void Actor::updateState() {
 			}
 			break;
 
-		case actorGoalAttackEnemy:
+		case kActorGoalAttackEnemy:
 
 			if (_curTask == nullptr) {
 				if ((_curTask = newTaskStack(this)) != nullptr) {
@@ -2639,7 +2639,7 @@ void Actor::updateState() {
 					Task    *task = new    HuntToKillTask(
 					                    _curTask,
 					                    ActorPropertyTarget(
-					                        disp == dispositionEnemy
+					                        disp == kDispositionEnemy
 					                        ?   actorPropIDPlayerActor
 					                        :   actorPropIDEnemy));
 
@@ -2653,7 +2653,7 @@ void Actor::updateState() {
 			}
 			break;
 
-		case actorGoalFollowLeader:
+		case kActorGoalFollowLeader:
 
 			assert(isActor(_leader));
 			assert(_followers == nullptr);
@@ -2663,7 +2663,7 @@ void Actor::updateState() {
 
 			break;
 
-		case actorGoalAvoidEnemies:
+		case kActorGoalAvoidEnemies:
 
 			assert(isActor(_leader));
 			assert(_followers == nullptr);
@@ -2694,7 +2694,7 @@ void Actor::handleTaskCompletion(TaskResult result) {
 	_curTask = nullptr;
 
 	switch (_currentGoal) {
-	case actorGoalFollowAssignment: {
+	case kActorGoalFollowAssignment: {
 		ActorAssignment     *assign = getAssignment();
 
 		//  If we've gotten to this point, there had better be an
@@ -2723,9 +2723,9 @@ void Actor::handleOffensiveAct(Actor *attacker) {
 
 	runObjectMethod(dObj, Method_Actor_onAttacked, scf);
 
-	if (_disposition == dispositionFriendly) {
-		if (attacker->_disposition >= dispositionPlayer) {
-			_disposition = dispositionEnemy;
+	if (_disposition == kDispositionFriendly) {
+		if (attacker->_disposition >= kDispositionPlayer) {
+			_disposition = kDispositionEnemy;
 			evaluateNeeds();
 		}
 	}
@@ -2738,24 +2738,24 @@ void Actor::handleOffensiveAct(Actor *attacker) {
 void Actor::handleDamageTaken(uint8 damage) {
 	uint8       combatBehavior = ((ActorProto *)_prototype)->combatBehavior;
 
-	if (combatBehavior == behaviorHungry) return;
+	if (combatBehavior == kBehaviorHungry) return;
 
 	if (offensiveObject() == this
-	        &&  !isActionAvailable(actionSwingHigh)
-	        &&  !isActionAvailable(actionTwoHandSwingHigh)
+	        &&  !isActionAvailable(kActionSwingHigh)
+	        &&  !isActionAvailable(kActionTwoHandSwingHigh)
 	        &&  !hasEffect(actorNotDefenseless)) {
-		_flags |= afraid;
+		_flags |= kAFAfraid;
 		return;
 	}
 
-	if (combatBehavior != behaviorHungry
-	        && (_flags & temporary)
+	if (combatBehavior != kBehaviorHungry
+	        && (_flags & kAFTemporary)
 	        &&  !hasEffect(actorFear)
 	        &&  !hasEffect(actorRepelUndead)) {
-		if (_flags & afraid) {
+		if (_flags & kAFAfraid) {
 			//  Let's give monsters a small chance of regaining their courage
 			if ((uint16)g_vm->_rnd->getRandomNumber(0xffff) <= 0x3fff)
-				_flags &= ~afraid;
+				_flags &= ~kAFAfraid;
 		} else {
 			int16       i,
 			            fellowBandMembers,
@@ -2768,9 +2768,9 @@ void Actor::handleDamageTaken(uint8 damage) {
 			moraleBase /= 3;
 
 			//  Adjust morale base according to the combat behavior
-			if (combatBehavior == behaviorCowardly)
+			if (combatBehavior == kBehaviorCowardly)
 				moraleBase += moraleBase / 2;
-			else if (combatBehavior == behaviorBerserk)
+			else if (combatBehavior == kBehaviorBerserk)
 				moraleBase -= moraleBase / 2;
 
 			//  Determine how many fellow band members this actor has.
@@ -2791,7 +2791,7 @@ void Actor::handleDamageTaken(uint8 damage) {
 
 			//  Test this actor's morale
 			if ((uint16)g_vm->_rnd->getRandomNumber(0xffff) <= moraleBase)
-				_flags |= afraid;
+				_flags |= kAFAfraid;
 		}
 	}
 }
@@ -2924,7 +2924,7 @@ void Actor::evaluateMeleeAttack(Actor *attacker) {
 			    thisID(),
 			    attacker->thisID());
 		} else {
-			if (isActionAvailable(actionJumpUp))
+			if (isActionAvailable(kActionJumpUp))
 				MotionTask::dodge(*this, *attacker);
 		}
 	}
@@ -3048,20 +3048,20 @@ void Actor::removeFollower(Actor *bandMember) {
 			ActorProto  *proto = (ActorProto *)follower->_prototype;
 			uint8       combatBehavior = proto->combatBehavior;
 
-			if (follower->_currentGoal == actorGoalAttackEnemy
-			        &&  combatBehavior != behaviorHungry) {
+			if (follower->_currentGoal == kActorGoalAttackEnemy
+			        &&  combatBehavior != kBehaviorHungry) {
 				uint32      moraleBase;
 
-				moraleBase =    combatBehavior == behaviorCowardly
+				moraleBase =    combatBehavior == kBehaviorCowardly
 				                ? (1 << 16) / 4
-				                :   combatBehavior == behaviorSmart
+				                :   combatBehavior == kBehaviorSmart
 				                ? (1 << 16) / 8
 				                : (1 << 16) / 16;
 
 				moraleBase -= moraleBase * moraleBonus >> 16;
 
 				if ((uint16)g_vm->_rnd->getRandomNumber(0xffff) <= moraleBase)
-					follower->_flags |= afraid;
+					follower->_flags |= kAFAfraid;
 			}
 		}
 	}
@@ -3098,16 +3098,16 @@ uint8 Actor::evaluateFollowerNeeds(Actor *follower) {
 
 	SenseInfo       info;
 
-	if ((_disposition == dispositionEnemy
+	if ((_disposition == kDispositionEnemy
 	        &&  follower->canSenseProtaganist(info, maxSenseRange))
-	        || (_disposition >= dispositionPlayer
+	        || (_disposition >= kDispositionPlayer
 	            &&  follower->canSenseActorProperty(
 	                info,
 	                maxSenseRange,
 	                actorPropIDEnemy)))
-		return actorGoalAttackEnemy;
+		return kActorGoalAttackEnemy;
 
-	return actorGoalFollowLeader;
+	return kActorGoalFollowLeader;
 }
 
 //  Returns 0 if not moving, 1 if path being calculated,
@@ -3489,9 +3489,9 @@ void initActors() {
 		g_vm->_act->_actorList.push_back(a);
 	}
 
-	g_vm->_act->_actorList[0]->_disposition = dispositionPlayer + 0;
-	g_vm->_act->_actorList[1]->_disposition = dispositionPlayer + 1;
-	g_vm->_act->_actorList[2]->_disposition = dispositionPlayer + 2;
+	g_vm->_act->_actorList[0]->_disposition = kDispositionPlayer + 0;
+	g_vm->_act->_actorList[1]->_disposition = kDispositionPlayer + 1;
+	g_vm->_act->_actorList[2]->_disposition = kDispositionPlayer + 2;
 }
 
 void saveActors(Common::OutSaveFile *outS) {
@@ -3566,14 +3566,14 @@ int16 AddFactionTally(int faction, enum factionTallyTypes act, int amt) {
 		error("Scripter: Tell Talin to increase kMaxFactions!\n");
 	assert(faction >= 0);
 	assert(act >= 0);
-	assert(act < factionNumColumns);
+	assert(act < kFactionNumColumns);
 #endif
 	/*
 	        //  If faction attitude counts get to big then down-scale all of them
 	        //  in proportion.
 	    if ( g_vm->_act->_factionTable[faction][act] + amt > maxint16 )
 	    {
-	        for (int i = 0; i < factionNumColumns; i++)
+	        for (int i = 0; i < kFactionNumColumns; i++)
 	            g_vm->_act->_factionTable[faction][i] >>= 1;
 	    }
 
@@ -3597,7 +3597,7 @@ int16 GetFactionTally(int faction, enum factionTallyTypes act) {
 		error("Scripter: Tell Talin to increase kMaxFactions!\n");
 	assert(faction >= 0);
 	assert(act >= 0);
-	assert(act < factionNumColumns);
+	assert(act < kFactionNumColumns);
 #endif
 
 	return g_vm->_act->_factionTable[faction][act];
@@ -3616,7 +3616,7 @@ void saveFactionTallies(Common::OutSaveFile *outS) {
 	outS->write("FACT", 4);
 	CHUNK_BEGIN;
 	for (int i = 0; i < kMaxFactions; ++i) {
-		for (int j = 0; j < factionNumColumns; ++j)
+		for (int j = 0; j < kFactionNumColumns; ++j)
 			out->writeSint16LE(g_vm->_act->_factionTable[i][j]);
 	}
 	CHUNK_END;
@@ -3626,7 +3626,7 @@ void loadFactionTallies(Common::InSaveFile *in) {
 	debugC(2, kDebugSaveload, "Loading Faction Tallies");
 
 	for (int i = 0; i < kMaxFactions; ++i) {
-		for (int j = 0; j < factionNumColumns; ++j)
+		for (int j = 0; j < kFactionNumColumns; ++j)
 			g_vm->_act->_factionTable[i][j] = in->readSint16LE();
 	}
 }
diff --git a/engines/saga2/actor.h b/engines/saga2/actor.h
index 64578cc8528..8bdf3cb891d 100644
--- a/engines/saga2/actor.h
+++ b/engines/saga2/actor.h
@@ -46,20 +46,20 @@ const int   actorScriptVars = 4;
 //  Defines the colors of MANA
 
 enum ActorSkillID {
-	skillIDArchery      =  0,
-	skillIDSwordcraft,
-	skillIDShieldcraft,
-	skillIDBludgeon,
-	skillIDThrowing,    //  gone
-	skillIDSpellcraft,
-	skillIDStealth,     //  gone
-	skillIDAgility,
-	skillIDBrawn,
-	skillIDLockpick,    //  gone
-	skillIDPilfer,      //  gone
-	skillIDFirstAid,    //  gone
-	skillIDSpotHidden,  //  gone
-	numSkills
+	kSkillIDArchery      =  0,
+	kSkillIDSwordcraft,
+	kSkillIDShieldcraft,
+	kSkillIDBludgeon,
+	kSkillIDThrowing,    //  gone
+	kSkillIDSpellcraft,
+	kSkillIDStealth,     //  gone
+	kSkillIDAgility,
+	kSkillIDBrawn,
+	kSkillIDLockpick,    //  gone
+	kSkillIDPilfer,      //  gone
+	kSkillIDFirstAid,    //  gone
+	kSkillIDSpotHidden,  //  gone
+	kNumSkills
 };
 
 enum ArmorObjectTypes {
@@ -95,14 +95,14 @@ struct ArmorAttributes {
 //  This defines the basic skills possessed by an actor
 struct ActorAttributes {
 	enum skillInfo {
-		skillBasePercent            = 100,
-		skillFracPointsPerLevel     = 5,    // this being twenty and levels at 5
-		skillLevels                 = 20,   // will make the advancement calc quick & easy
-		skillMaxLevel               = skillFracPointsPerLevel * skillLevels
+		kSkillBasePercent            = 100,
+		kSkillFracPointsPerLevel     = 5,    // this being twenty and levels at 5
+		kSkillLevels                 = 20,   // will make the advancement calc quick & easy
+		kSkillMaxLevel               = kSkillFracPointsPerLevel * kSkillLevels
 	};
 
 	enum vitalityInfo {
-		vitalityLimit               = 256
+		kVitalityLimit               = 256
 	};
 
 	//  Automatic skills
@@ -138,19 +138,19 @@ struct ActorAttributes {
 
 	uint8 &skill(int16 id) {
 		switch (id) {
-		case skillIDArchery: return archery;
-		case skillIDSwordcraft: return swordcraft;
-		case skillIDShieldcraft: return shieldcraft;
-		case skillIDBludgeon: return bludgeon;
-		case skillIDThrowing: return throwing;
-		case skillIDSpellcraft: return spellcraft;
-		case skillIDStealth: return stealth;
-		case skillIDAgility: return agility;
-		case skillIDBrawn: return brawn;
-		case skillIDLockpick: return lockpick;
-		case skillIDPilfer: return pilfer;
-		case skillIDFirstAid: return firstAid;
-		case skillIDSpotHidden: return spotHidden;
+		case kSkillIDArchery: return archery;
+		case kSkillIDSwordcraft: return swordcraft;
+		case kSkillIDShieldcraft: return shieldcraft;
+		case kSkillIDBludgeon: return bludgeon;
+		case kSkillIDThrowing: return throwing;
+		case kSkillIDSpellcraft: return spellcraft;
+		case kSkillIDStealth: return stealth;
+		case kSkillIDAgility: return agility;
+		case kSkillIDBrawn: return brawn;
+		case kSkillIDLockpick: return lockpick;
+		case kSkillIDPilfer: return pilfer;
+		case kSkillIDFirstAid: return firstAid;
+		case kSkillIDSpotHidden: return spotHidden;
 		}
 		error("Incorrect skill id: %d", id);
 	}
@@ -167,7 +167,7 @@ struct ActorAttributes {
 	}
 
 	uint8 getSkillLevel(int16 id) {
-		return skill(id) / skillFracPointsPerLevel + 1;
+		return skill(id) / kSkillFracPointsPerLevel + 1;
 	}
 
 	void read(Common::InSaveFile *in) {
@@ -221,17 +221,17 @@ struct ActorAttributes {
 
 
 const int baseCarryingCapacity = 100;
-const int carryingCapacityBonusPerBrawn = 200 / ActorAttributes::skillLevels;
+const int carryingCapacityBonusPerBrawn = 200 / ActorAttributes::kSkillLevels;
 
 /* ===================================================================== *
    ResourceActorProtoExtension structure
  * ===================================================================== */
 
 enum combatBehaviorTypes {
-	behaviorHungry,
-	behaviorCowardly,
-	behaviorBerserk,
-	behaviorSmart
+	kBehaviorHungry,
+	kBehaviorCowardly,
+	kBehaviorBerserk,
+	kBehaviorSmart
 };
 
 //  This defines the additional data fields needed for actor prototypes
@@ -417,36 +417,36 @@ public:
  * ============================================================================ */
 
 enum actorCreationFlags {
-	actorPermanent = (1 << 0)
+	kActorPermanent = (1 << 0)
 };
 
 enum DispositionType {
-	dispositionFriendly,
-	dispositionEnemy,
+	kDispositionFriendly,
+	kDispositionEnemy,
 
-	dispositionPlayer
+	kDispositionPlayer
 };
 
 enum actionSequenceOptions {
 
 	//  Flags set by call to setAction
-	animateRepeat   = (1 << 0),             // repeat animation when done
-	animateReverse  = (1 << 1),             // animate in reverse direction
-	animateAlternate = (1 << 2),            // both directions, back & forth
-	animateRandom   = (1 << 3),             // pick a random frame
-	animateNoRestart = (1 << 4),            // don't reset from start
+	kAnimateRepeat    = (1 << 0),            // repeat animation when done
+	kAnimateReverse   = (1 << 1),            // animate in reverse direction
+	kAnimateAlternate = (1 << 2),            // both directions, back & forth
+	kAnimateRandom    = (1 << 3),            // pick a random frame
+	kAnimateNoRestart = (1 << 4),            // don't reset from start
 
 	//  This flag is set if the animation has been put on hold until
 	//  the actor's appearance is reloaded.
-	animateOnHold   = (1 << 5),
+	kAnimateOnHold   = (1 << 5),
 
 	//  This flag is set if the final frame of the animation has
 	//  been reached.
-	animateFinished = (1 << 6),
+	kAnimateFinished = (1 << 6),
 
 	//  This flag gets set if the sprite could not be displayed
 	//  because it's bank hasn't been loaded yet.
-	animateNotLoaded = (1 << 7)
+	kAnimateNotLoaded = (1 << 7)
 };
 
 //  Various types of action sequences
@@ -455,87 +455,87 @@ enum actionSequenceOptions {
 enum ActorAnimationTypes {
 
 	//  Various types of stands
-	actionStand = 0,                        // standing still
-	actionWaitAgressive,                    // an agressive wait cycle
-	actionWaitImpatient,                    // an impatient wait cycle
-	actionWaitFriendly,                     // a a friendly wait cycle
+	kActionStand = 0,                        // standing still
+	kActionWaitAgressive,                    // an agressive wait cycle
+	kActionWaitImpatient,                    // an impatient wait cycle
+	kActionWaitFriendly,                     // a a friendly wait cycle
 
 	//  Walking and running
-	actionWalk,                             // walking motion
-	actionRun,                              // running motion
+	kActionWalk,                             // walking motion
+	kActionRun,                              // running motion
 
 	//  Squatting
-	actionDuck,                             // stoop to dodge sword
-	actionStoop,                            // stoop to pick up object
+	kActionDuck,                             // stoop to dodge sword
+	kActionStoop,                            // stoop to pick up object
 
 	//  Jumping
-	actionFreeFall,                         // how he looks in ballistic
-	actionFreeFallRunning,                  // a running leap (free fall)
-	actionJumpUp,                           // begin jump straight up
-	actionJumpFwd,                          // begin jump forward
-	actionJumpBack,                         // begin jump back in surprise
-	actionLand,                             // land after jump
-	actionFallBadly,                        // after a very long fall
+	kActionFreeFall,                         // how he looks in ballistic
+	kActionFreeFallRunning,                  // a running leap (free fall)
+	kActionJumpUp,                           // begin jump straight up
+	kActionJumpFwd,                          // begin jump forward
+	kActionJumpBack,                         // begin jump back in surprise
+	kActionLand,                             // land after jump
+	kActionFallBadly,                        // after a very long fall
 
 	//  Climbing
-	actionClimbLadder,                      // climb a ladder (2 directions)
+	kActionClimbLadder,                      // climb a ladder (2 directions)
 
 	//  Talking & interacting
-	actionTalk,                             // talking
-	actionGesture,                          // gesture with hands or body
-	actionGiveItem,                         // give or take item
+	kActionTalk,                             // talking
+	kActionGesture,                          // gesture with hands or body
+	kActionGiveItem,                         // give or take item
 
 	//  Two-handed weapon use
-	actionTwoHandSwingHigh,                 // full overhead swing aim high
-	actionTwoHandSwingLow,                  // full overhead swing aim low
-	actionTwoHandSwingLeftHigh,             // partial swing on left (high)
-	actionTwoHandSwingLeftLow,              // partial swing on left (low)
-	actionTwoHandSwingRightHigh,            // partial swing on rgt (high)
-	actionTwoHandSwingRightLow,             // partial swing on rgt (low)
-	actionTwoHandParry,                     // hold sword up to parry
+	kActionTwoHandSwingHigh,                 // full overhead swing aim high
+	kActionTwoHandSwingLow,                  // full overhead swing aim low
+	kActionTwoHandSwingLeftHigh,             // partial swing on left (high)
+	kActionTwoHandSwingLeftLow,              // partial swing on left (low)
+	kActionTwoHandSwingRightHigh,            // partial swing on rgt (high)
+	kActionTwoHandSwingRightLow,             // partial swing on rgt (low)
+	kActionTwoHandParry,                     // hold sword up to parry
 
 	//  One-handed weapon use
-	actionSwingHigh,                        // one-handed swing (high)
-	actionSwingLow,                         // one-handed swing (low)
-	actionParryHigh,                        // one-handed parry (high)
-	actionParryLow,                         // one-handed parry (low)
-	actionShieldParry,                      // parry with shield
+	kActionSwingHigh,                        // one-handed swing (high)
+	kActionSwingLow,                         // one-handed swing (low)
+	kActionParryHigh,                        // one-handed parry (high)
+	kActionParryLow,                         // one-handed parry (low)
+	kActionShieldParry,                      // parry with shield
 
-	actionThrowObject,                      // throw
+	kActionThrowObject,                      // throw
 
 	//  Other combat actions
-	actionFireBow,                          // fire an arrow
-	actionCastSpell,                        // cast a magic spell
-	actionUseWand,                          // cast a magic spell w/wand
-	actionUseStaff,                         // cast a magic spell w/staff
-	actionHit,                              // show impact of blow
-	actionKnockedDown,                      // knocked down by opponent
-	actionDie,                              // death agony
+	kActionFireBow,                          // fire an arrow
+	kActionCastSpell,                        // cast a magic spell
+	kActionUseWand,                          // cast a magic spell w/wand
+	kActionUseStaff,                         // cast a magic spell w/staff
+	kActionHit,                              // show impact of blow
+	kActionKnockedDown,                      // knocked down by opponent
+	kActionDie,                              // death agony
 
 	//  Passive actions
-	actionSleep,                            // sleeping
-	actionDead,                             // dead body on ground
-	actionSit,                              // sitting at table
+	kActionSleep,                            // sleeping
+	kActionDead,                             // dead body on ground
+	kActionSit,                              // sitting at table
 
 	//  Misc actions built from other frames
-	actionListenAtDoor,                     // listening at doors
-	actionShoveDoor,                        // try to force a door open
-	actionSpecial1,                         // special Action
-	actionSpecial2,                         // special Action
-	actionSpecial3,                         // special Action
-	actionSpecial4,                         // special Action
-	actionSpecial5,                         // special Action
-	actionSpecial6,                         // special Action
-	actionSpecial7,                         // special Action
-	actionSpecial8                          // special Action
+	kActionListenAtDoor,                     // listening at doors
+	kActionShoveDoor,                        // try to force a door open
+	kActionSpecial1,                         // special Action
+	kActionSpecial2,                         // special Action
+	kActionSpecial3,                         // special Action
+	kActionSpecial4,                         // special Action
+	kActionSpecial5,                         // special Action
+	kActionSpecial6,                         // special Action
+	kActionSpecial7,                         // special Action
+	kActionSpecial8                          // special Action
 };
 
 enum ActorGoalTypes {
-	actorGoalFollowAssignment,
-	actorGoalPreserveSelf,
-	actorGoalAttackEnemy,
-	actorGoalFollowLeader,
-	actorGoalAvoidEnemies
+	kActorGoalFollowAssignment,
+	kActorGoalPreserveSelf,
+	kActorGoalAttackEnemy,
+	kActorGoalFollowLeader,
+	kActorGoalAvoidEnemies
 };
 
 //  The actor structure will be divided into two parts.  The
@@ -641,12 +641,12 @@ public:
 
 	//  Various actor flags
 	enum {
-		lobotomized     = (1 << 0),
-		temporary       = (1 << 1),
-		afraid          = (1 << 2),
-		hasAssignment   = (1 << 3),
-		specialAttack   = (1 << 4),
-		fightStance     = (1 << 5)
+		kAFLobotomized     = (1 << 0),
+		kAFTemporary       = (1 << 1),
+		kAFAfraid          = (1 << 2),
+		kAFHasAssignment   = (1 << 3),
+		kAFSpecialAttack   = (1 << 4),
+		kAFFightStance     = (1 << 5)
 	};
 
 	uint8           _flags;
@@ -693,7 +693,7 @@ public:
 	int16           _currentRecoveryPoints;  // fraction left from last recovery
 
 	enum vitalityRecovery {
-		recPointsPerVitality        = 10
+		kRecPointsPerVitality        = 10
 	};
 
 
@@ -791,7 +791,7 @@ public:
 
 	//  Return a pointer to the actor's current assignment
 	ActorAssignment *getAssignment() {
-		return  _flags & hasAssignment
+		return  _flags & kAFHasAssignment
 		        ? _assignment
 		        : nullptr;
 	}
@@ -866,7 +866,7 @@ public:
 	//  Give the actor a new disposition
 	int16 setDisposition(int16 newDisp) {
 		int16   oldDisp = _disposition;
-		if (newDisp < dispositionPlayer)
+		if (newDisp < kDispositionPlayer)
 			_disposition = newDisp;
 		return oldDisp;
 	}
@@ -1055,14 +1055,14 @@ public:
 
 	void setFightStance(bool val) {
 		if (val)
-			_flags |= fightStance;
+			_flags |= kAFFightStance;
 		else
-			_flags &= ~fightStance;
+			_flags &= ~kAFFightStance;
 	}
 };
 
 inline bool isPlayerActor(Actor *a) {
-	return a->_disposition >= dispositionPlayer;
+	return a->_disposition >= kDispositionPlayer;
 }
 
 inline bool isPlayerActor(ObjectID obj) {
@@ -1071,7 +1071,7 @@ inline bool isPlayerActor(ObjectID obj) {
 }
 
 inline bool isEnemy(Actor *a) {
-	return !a->isDead() && a->_disposition == dispositionEnemy;
+	return !a->isDead() && a->_disposition == kDispositionEnemy;
 }
 
 inline bool isEnemy(ObjectID obj) {
@@ -1097,11 +1097,11 @@ void addEnchantment(Actor *a, uint16 enchantmentID);
  * ============================================================================ */
 
 enum factionTallyTypes {
-	factionNumKills = 0,            // # of times faction member killed by PC
-	factionNumThefts,               // # of times PC steals from faction member
-	factionNumFavors,               // accumulated by SAGA script.
+	kFactionNumKills = 0,            // # of times faction member killed by PC
+	kFactionNumThefts,               // # of times PC steals from faction member
+	kFactionNumFavors,               // accumulated by SAGA script.
 
-	factionNumColumns
+	kFactionNumColumns
 };
 
 //  Get the attitude a particular faction has for a char.
@@ -1109,9 +1109,9 @@ int16 GetFactionTally(int faction, enum factionTallyTypes act);
 
 //  Increment / Decrement faction attitude
 //  Whenever an actor is killed, call:
-//      AddFactionAttitude( actor.faction, factionNumKills, 1 );
+//      AddFactionAttitude( actor.faction, kFactionNumKills, 1 );
 //  Whenever an actor is robbed, call:
-//      AddFactionAttitude( actor.faction, factionNumThefts, 1 );
+//      AddFactionAttitude( actor.faction, kFactionNumThefts, 1 );
 int16 AddFactionTally(int faction, enum factionTallyTypes act, int amt);
 
 //  Initialize the faction tally table
@@ -1138,7 +1138,7 @@ public:
 
 	int32 _updatesViaScript;
 	int32 _baseActorIndex;
-	int16 _factionTable[kMaxFactions][factionNumColumns];
+	int16 _factionTable[kMaxFactions][kFactionNumColumns];
 	bool _actorStatesPaused;
 	bool _combatBehaviorEnabled;
 
diff --git a/engines/saga2/assign.cpp b/engines/saga2/assign.cpp
index 2c1dc4973ab..3f839d684fc 100644
--- a/engines/saga2/assign.cpp
+++ b/engines/saga2/assign.cpp
@@ -46,7 +46,7 @@ ActorAssignment::ActorAssignment(Actor *a, uint16 until) :
 	debugC(2, kDebugActors, "New assignment for %p (%s) from %d until %d: %p",
 	      (void *)a, a->objName(), _startFrame, _endFrame, (void *)this);
 	a->_assignment = this;
-	a->_flags |= hasAssignment;
+	a->_flags |= kAFHasAssignment;
 }
 
 ActorAssignment::ActorAssignment(Actor *ac, Common::SeekableReadStream *stream) {
@@ -55,7 +55,7 @@ ActorAssignment::ActorAssignment(Actor *ac, Common::SeekableReadStream *stream)
 
 	_actor = ac;
 	ac->_assignment = this;
-	ac->_flags |= hasAssignment;
+	ac->_flags |= kAFHasAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -67,7 +67,7 @@ ActorAssignment::~ActorAssignment() {
 	      (void *)a, a->objName(), (void *)this);
 
 	//  Determine if the actor has a task initiated by this assignment
-	if (a->_currentGoal == actorGoalFollowAssignment
+	if (a->_currentGoal == kActorGoalFollowAssignment
 	        &&  a->_curTask != nullptr) {
 		//  If so, abort it
 		a->_curTask->abortTask();
@@ -75,7 +75,7 @@ ActorAssignment::~ActorAssignment() {
 		a->_curTask = nullptr;
 	}
 
-	a->_flags &= ~hasAssignment;
+	a->_flags &= ~kAFHasAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -144,7 +144,7 @@ void ActorAssignment::handleTaskCompletion(TaskResult) {
 void ActorAssignment::startTask() {
 	Actor   *a = getActor();
 
-	if (a->_currentGoal == actorGoalFollowAssignment)
+	if (a->_currentGoal == kActorGoalFollowAssignment)
 		a->_curTask = createTask();
 }
 
diff --git a/engines/saga2/assign.h b/engines/saga2/assign.h
index 2495d856aeb..794105672f8 100644
--- a/engines/saga2/assign.h
+++ b/engines/saga2/assign.h
@@ -51,7 +51,7 @@ enum AssignmentTypes {
 class ActorAssignment {
 
 	enum {
-		hasAssignment   = (1 << 3)
+		kAFHasAssignment   = (1 << 3)
 	};
 
 	uint16  _startFrame,     //  Time in day when this was constructed
diff --git a/engines/saga2/dispnode.cpp b/engines/saga2/dispnode.cpp
index c3a99d25b71..30a827cb748 100644
--- a/engines/saga2/dispnode.cpp
+++ b/engines/saga2/dispnode.cpp
@@ -608,13 +608,13 @@ void DisplayNode::drawObject() {
 				aa->requestBank(pose->actorFrameBank);
 
 				//  Indicate that animation is OK.
-				a->_animationFlags &= ~animateNotLoaded;
+				a->_animationFlags &= ~kAnimateNotLoaded;
 
 				//  Set up which bank and frame to use.
 				a->_poseInfo = pTemp;
 			} else {
 				//  Indicate that animation isn't loaded
-				a->_animationFlags |= animateNotLoaded;
+				a->_animationFlags |= kAnimateNotLoaded;
 
 				//  Initiate a load of the sprite bank needed.
 				/*  if (!RHandleLoading(
diff --git a/engines/saga2/effects.cpp b/engines/saga2/effects.cpp
index 9d3e4b72127..a22a9a83a62 100644
--- a/engines/saga2/effects.cpp
+++ b/engines/saga2/effects.cpp
@@ -52,7 +52,7 @@ int16 ProtoDamage::getRelevantStat(effectDamageTypes dt, Actor *a) {
 	case kDamageImpact     :
 	case kDamageSlash      :
 	case kDamageProjectile :
-		return a->getStats()->getSkillLevel(skillIDBrawn);
+		return a->getStats()->getSkillLevel(kSkillIDBrawn);
 	case kDamageFire       :
 	case kDamageAcid       :
 	case kDamageHeat       :
@@ -61,7 +61,7 @@ int16 ProtoDamage::getRelevantStat(effectDamageTypes dt, Actor *a) {
 	case kDamagePoison     :
 	case kDamageMental     :
 	case kDamageToUndead   :
-		return a->getStats()->getSkillLevel(skillIDSpellcraft);
+		return a->getStats()->getSkillLevel(kSkillIDSpellcraft);
 	case kDamageDirMagic   :
 	case kDamageOther      :
 	case kDamageStarve     :
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index 7b16ddd7e02..b7af9518733 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -2710,21 +2710,21 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
 		switch (eType) {
 		case effectAttrib:
 			switch (eSubType) {
-//			case skillIDArchery:
-//			case skillIDShieldcraft:
+//			case kSkillIDArchery:
+//			case kSkillIDShieldcraft:
 
-			case skillIDBludgeon:
-			case skillIDSwordcraft:
+			case kSkillIDBludgeon:
+			case kSkillIDSwordcraft:
 				if (eAmount > 0) newIconFlags[iconSurestrike] = duration;
 				else newIconFlags[iconClumsy] = duration;
 				break;
 
-			case skillIDAgility:
+			case kSkillIDAgility:
 				if (eAmount > 0) newIconFlags[iconInnerBalance] = duration;
 				else newIconFlags[iconClumsy] = duration;
 				break;
 
-			case skillIDBrawn:
+			case kSkillIDBrawn:
 				newIconFlags[iconBattleFever] = duration;
 				break;
 			}
diff --git a/engines/saga2/magic.cpp b/engines/saga2/magic.cpp
index 00e297cf504..f42ff6bc5f3 100644
--- a/engines/saga2/magic.cpp
+++ b/engines/saga2/magic.cpp
@@ -295,7 +295,7 @@ bool implementSpell(GameObject *enactor, Location   &target, SkillProto *spell)
 		if (actorIDToPlayerID(enactor->thisID(), playerID)) {
 			PlayerActor     *player = getPlayerActorAddress(playerID);
 
-			player->skillAdvance(skillIDSpellcraft, sProto.getManaAmt() / 10);
+			player->skillAdvance(kSkillIDSpellcraft, sProto.getManaAmt() / 10);
 		}
 	} else {
 		if (!enactor->deductCharge(ami, sProto.getManaAmt())) {
@@ -335,7 +335,7 @@ bool implementSpell(GameObject *enactor, ActiveItem *target, SkillProto *spell)
 		if (actorIDToPlayerID(enactor->thisID(), playerID)) {
 			PlayerActor     *player = getPlayerActorAddress(playerID);
 
-			player->skillAdvance(skillIDSpellcraft, sProto.getManaAmt() / 10);
+			player->skillAdvance(kSkillIDSpellcraft, sProto.getManaAmt() / 10);
 		}
 	} else {
 		if (!enactor->deductCharge(ami, sProto.getManaAmt())) {
@@ -373,7 +373,7 @@ bool implementSpell(GameObject *enactor, GameObject *target, SkillProto *spell)
 		if (actorIDToPlayerID(enactor->thisID(), playerID)) {
 			PlayerActor     *player = getPlayerActorAddress(playerID);
 
-			player->skillAdvance(skillIDSpellcraft, sProto.getManaAmt() / 10);
+			player->skillAdvance(kSkillIDSpellcraft, sProto.getManaAmt() / 10);
 		}
 	} else {
 		if (!enactor->deductCharge(ami, sProto.getManaAmt())) {
diff --git a/engines/saga2/motion.cpp b/engines/saga2/motion.cpp
index fa5026945d2..b54ce636e15 100644
--- a/engines/saga2/motion.cpp
+++ b/engines/saga2/motion.cpp
@@ -1281,7 +1281,7 @@ void MotionTask::walkTo(
 			mt->_flags = pathFind | reset;
 			mt->_runCount = 12;          // # of frames until we can run
 
-			if (run && actor.isActionAvailable(actionRun))
+			if (run && actor.isActionAvailable(kActionRun))
 				mt->_flags |= requestRun;
 			if (canAgitate)
 				mt->_flags |= agitatable;
@@ -1314,7 +1314,7 @@ void MotionTask::walkToDirect(
 			mt->_flags = reset;
 			mt->_runCount = 12;
 
-			if (run && actor.isActionAvailable(actionRun))
+			if (run && actor.isActionAvailable(kActionRun))
 				mt->_flags |= requestRun;
 			if (canAgitate)
 				mt->_flags |= agitatable;
@@ -1343,7 +1343,7 @@ void MotionTask::wander(
 			mt->_flags = reset | wandering;
 			mt->_runCount = 12;
 
-			if (run && actor.isActionAvailable(actionRun))
+			if (run && actor.isActionAvailable(kActionRun))
 				mt->_flags |= requestRun;
 
 			RequestWanderPath(mt, getPathFindIQ(&actor));
@@ -1377,7 +1377,7 @@ void MotionTask::tetheredWander(
 			mt->_flags = reset | wandering | tethered;
 			mt->_runCount = 12;
 
-			if (run && actor.isActionAvailable(actionRun))
+			if (run && actor.isActionAvailable(kActionRun))
 				mt->_flags |= requestRun;
 
 			RequestWanderPath(mt, getPathFindIQ(&actor));
@@ -1963,7 +1963,7 @@ void MotionTask::changeTarget(const TilePoint &newPos, bool run) {
 		//  Set run flag if requested
 		if (run
 		        //  Check if actor capable of running...
-		        && ((Actor *)_object)->isActionAvailable(actionRun))
+		        && ((Actor *)_object)->isActionAvailable(kActionRun))
 
 			_flags |= requestRun;
 		else
@@ -1990,7 +1990,7 @@ void MotionTask::changeDirectTarget(const TilePoint &newPos, bool run) {
 		//  Set run flag if requested
 		if (run
 		        //  Check if actor capable of running...
-		        && ((Actor *)_object)->isActionAvailable(actionRun))
+		        && ((Actor *)_object)->isActionAvailable(kActionRun))
 
 			_flags |= requestRun;
 		else
@@ -2020,8 +2020,8 @@ void MotionTask::finishTalking() {
 	if (_motionType == motionTypeTalk) {
 		if (isActor(_object)) {
 			Actor   *a = (Actor *)_object;
-			if (a->_currentAnimation != actionStand)
-				a->setAction(actionStand, 0);
+			if (a->_currentAnimation != kActionStand)
+				a->setAction(kActionStand, 0);
 		}
 		remove();
 	}
@@ -2105,8 +2105,8 @@ void MotionTask::ballisticAction() {
 	if (isActor(obj) && _velocity.magnitude() > 16) {
 		Actor       *a = (Actor *)obj;
 
-		if (a->isActionAvailable(actionFreeFall))
-			a->setAction(actionFreeFall, 0);
+		if (a->isActionAvailable(kActionFreeFall))
+			a->setAction(kActionFreeFall, 0);
 	}
 
 	for (int i = 0; i < vectorSteps; i++) {
@@ -2704,7 +2704,7 @@ void MotionTask::walkAction() {
 	if (moveTaskDone) {
 		remove(motionCompleted);
 	} else if (moveBlocked) {
-		a->setAction(actionStand, 0);
+		a->setAction(kActionStand, 0);
 		if (_flags & agitatable) {
 			if (freeFall(_object->_data.location, sti)) return;
 
@@ -2730,7 +2730,7 @@ void MotionTask::walkAction() {
 		//  When he starts running again, then have him walk only.
 		_runCount = MAX<int16>(_runCount, 8);
 
-		a->setAction(actionStand, 0);
+		a->setAction(kActionStand, 0);
 		freeFall(_object->_data.location, sti);
 	} else {
 		if (a == getCenterActor() && checkLadder(a, newPos)) return;
@@ -2758,7 +2758,7 @@ void MotionTask::walkAction() {
 
 			if (sti.surfaceTile != nullptr
 			        && (sti.surfaceTile->combinedTerrainMask() & terrainStair)
-			        &&  a->isActionAvailable(actionSpecial7)) {
+			        &&  a->isActionAvailable(kActionSpecial7)) {
 				Direction   stairsDir;
 				uint8       *cornerHeight;
 
@@ -2775,21 +2775,21 @@ void MotionTask::walkAction() {
 
 				if (a->_currentFacing == stairsDir) {
 					//  walk up stairs
-					newAction = actionSpecial7;
+					newAction = kActionSpecial7;
 					_flags |= onStairs;
 				} else if (a->_currentFacing == ((stairsDir - 4) & 0x7)) {
 					//  walk down stairs
-					newAction = actionSpecial8;
+					newAction = kActionSpecial8;
 					_flags |= onStairs;
 				} else {
 					_flags &= ~onStairs;
 					if (walkType == walkStairs) walkType = walkNormal;
-					newAction = (walkType == walkRun) ? actionRun : actionWalk;
+					newAction = (walkType == walkRun) ? kActionRun : kActionWalk;
 				}
 			} else {
 				_flags &= ~onStairs;
 				if (walkType == walkStairs) walkType = walkNormal;
-				newAction = (walkType == walkRun) ? actionRun : actionWalk;
+				newAction = (walkType == walkRun) ? kActionRun : kActionWalk;
 			}
 
 
@@ -2808,15 +2808,15 @@ void MotionTask::walkAction() {
 						a->nextAnimationFrame();
 					_flags ^= nextAnim;
 				}
-			} else if (a->_currentAnimation == actionWalk
-			           ||  a->_currentAnimation == actionRun
-			           ||  a->_currentAnimation == actionSpecial7
-			           ||  a->_currentAnimation == actionSpecial8) {
+			} else if (a->_currentAnimation == kActionWalk
+			           ||  a->_currentAnimation == kActionRun
+			           ||  a->_currentAnimation == kActionSpecial7
+			           ||  a->_currentAnimation == kActionSpecial8) {
 				//  If we are running instead of walking or
 				//  vice versa, then change to the new action
 				//  but don't break stride
 				a->setAction(newAction,
-				             animateRepeat | animateNoRestart);
+				             kAnimateRepeat | kAnimateNoRestart);
 
 				if (walkType != walkSlow)
 					a->nextAnimationFrame();
@@ -2828,7 +2828,7 @@ void MotionTask::walkAction() {
 			} else {
 				// If we weren't walking or running before, then start
 				// walking/running and reset the sequence.
-				a->setAction(newAction, animateRepeat);
+				a->setAction(newAction, kAnimateRepeat);
 				if (walkType == walkSlow) _flags |= nextAnim;
 			}
 
@@ -2845,7 +2845,7 @@ void MotionTask::upLadderAction() {
 	Actor               *a = (Actor *)_object;
 
 	if (_flags & reset) {
-		a->setAction(actionClimbLadder, animateRepeat);
+		a->setAction(kActionClimbLadder, kAnimateRepeat);
 		_flags &= ~reset;
 	} else {
 		TilePoint           loc = a->getLocation();
@@ -2959,7 +2959,7 @@ void MotionTask::upLadderAction() {
 			}
 		}
 
-		a->setAction(actionStand, 0);
+		a->setAction(kActionStand, 0);
 
 		remove();
 	}
@@ -2972,7 +2972,7 @@ void MotionTask::downLadderAction() {
 	Actor               *a = (Actor *)_object;
 
 	if (_flags & reset) {
-		a->setAction(actionClimbLadder, animateRepeat | animateReverse);
+		a->setAction(kActionClimbLadder, kAnimateRepeat | kAnimateReverse);
 		_flags &= ~reset;
 	} else {
 		TilePoint           loc = a->getLocation();
@@ -3080,7 +3080,7 @@ void MotionTask::downLadderAction() {
 			}
 		}
 
-		a->setAction(actionStand, 0);
+		a->setAction(kActionStand, 0);
 
 		remove();
 	}
@@ -3093,7 +3093,7 @@ void MotionTask::giveAction() {
 	                         -   a->getLocation()).quickDir();
 
 	if (_flags & reset) {
-		a->setAction(actionGiveItem, 0);
+		a->setAction(kActionGiveItem, 0);
 		_flags &= ~reset;
 	}
 
@@ -3183,12 +3183,12 @@ void MotionTask::twoHandedSwingAction() {
 
 		//  Create an animation type lookup table
 		static const uint8  animationTypeArray[] = {
-			actionTwoHandSwingHigh,
-			actionTwoHandSwingLow,
-			actionTwoHandSwingLeftHigh,
-			actionTwoHandSwingLeftLow,
-			actionTwoHandSwingRightHigh,
-			actionTwoHandSwingRightLow,
+			kActionTwoHandSwingHigh,
+			kActionTwoHandSwingLow,
+			kActionTwoHandSwingLeftHigh,
+			kActionTwoHandSwingLeftLow,
+			kActionTwoHandSwingRightHigh,
+			kActionTwoHandSwingRightLow,
 		};
 
 		Actor               *a = (Actor *)_object;
@@ -3297,8 +3297,8 @@ void MotionTask::oneHandedSwingAction() {
 
 		//  Create an animation type lookup table
 		static const uint8  animationTypeArray[] = {
-			actionSwingHigh,
-			actionSwingLow,
+			kActionSwingHigh,
+			kActionSwingLow,
 		};
 
 		Actor *const       a = (Actor *)_object;
@@ -3415,11 +3415,11 @@ void MotionTask::fireBowAction() {
 		_direction = (_targetObj->getLocation() - a->getLocation()).quickDir();
 
 		if (a->_appearance != nullptr
-		        &&  a->isActionAvailable(actionFireBow)) {
+		        &&  a->isActionAvailable(kActionFireBow)) {
 			//  Calculate the number of frames in the animation before the
 			//  projectile is actually fired
-			actionCounter = a->animationFrames(actionFireBow, _direction) - 1;
-			a->setAction(actionFireBow, 0);
+			actionCounter = a->animationFrames(kActionFireBow, _direction) - 1;
+			a->setAction(kActionFireBow, 0);
 
 			//  Set this flag to indicate that the animation is actually
 			//  being played
@@ -3510,11 +3510,11 @@ void MotionTask::castSpellAction() {
 	else {
 		if (_flags & reset) {
 			if (a->_appearance != nullptr
-			        &&  a->isActionAvailable(actionCastSpell)) {
+			        &&  a->isActionAvailable(kActionCastSpell)) {
 				//  Calculate the number of frames in the animation before the
 				//  spell is case
-				actionCounter = a->animationFrames(actionCastSpell, _direction) - 1;
-				a->setAction(actionCastSpell, 0);
+				actionCounter = a->animationFrames(kActionCastSpell, _direction) - 1;
+				a->setAction(kActionCastSpell, 0);
 
 				//  Set this flag to indicate that the animation is actually
 				//  being played
@@ -3577,9 +3577,9 @@ void MotionTask::useWandAction() {
 		_direction = (_targetObj->getLocation() - a->getLocation()).quickDir();
 
 		if (a->_appearance != nullptr
-		        &&  a->isActionAvailable(actionUseWand)) {
-			actionCounter = a->animationFrames(actionUseWand, _direction) - 1;
-			a->setAction(actionUseWand, 0);
+		        &&  a->isActionAvailable(kActionUseWand)) {
+			actionCounter = a->animationFrames(kActionUseWand, _direction) - 1;
+			a->setAction(kActionUseWand, 0);
 
 			//  Set this flag to indicate that the animation is actually
 			//  being played
@@ -3612,9 +3612,9 @@ void MotionTask::twoHandedParryAction() {
 		_direction = (_d.attacker->getLocation() - a->getLocation()).quickDir();
 
 		if (a->_appearance != nullptr
-		        &&  a->isActionAvailable(actionTwoHandParry)) {
-			a->setAction(actionTwoHandParry, 0);
-			animationFrames = a->animationFrames(actionTwoHandParry, _direction);
+		        &&  a->isActionAvailable(kActionTwoHandParry)) {
+			a->setAction(kActionTwoHandParry, 0);
+			animationFrames = a->animationFrames(kActionTwoHandParry, _direction);
 
 			//  Set this flag to indicate that the animation is actually
 			//  being played
@@ -3648,9 +3648,9 @@ void MotionTask::oneHandedParryAction() {
 
 		_combatMotionType = oneHandedParryHigh;
 		if (a->_appearance != nullptr
-		        &&  a->isActionAvailable(actionParryHigh)) {
-			a->setAction(actionParryHigh, 0);
-			animationFrames = a->animationFrames(actionParryHigh, _direction);
+		        &&  a->isActionAvailable(kActionParryHigh)) {
+			a->setAction(kActionParryHigh, 0);
+			animationFrames = a->animationFrames(kActionParryHigh, _direction);
 
 			//  Set this flag to indicate that the animation is actually
 			//  being played
@@ -3683,9 +3683,9 @@ void MotionTask::shieldParryAction() {
 		_direction = (_d.attacker->getLocation() - a->getLocation()).quickDir();
 
 		if (a->_appearance != nullptr
-		        &&  a->isActionAvailable(actionShieldParry)) {
-			a->setAction(actionShieldParry, 0);
-			animationFrames = a->animationFrames(actionShieldParry, _direction);
+		        &&  a->isActionAvailable(kActionShieldParry)) {
+			a->setAction(kActionShieldParry, 0);
+			animationFrames = a->animationFrames(kActionShieldParry, _direction);
 
 			//  Set this flag to indicate that the animation is actually
 			//  being played
@@ -3728,9 +3728,9 @@ void MotionTask::dodgeAction() {
 			int16       animationFrames;
 
 			if (a->_appearance != nullptr
-			        &&  a->isActionAvailable(actionJumpUp, a->_currentFacing)) {
-				a->setAction(actionJumpUp, 0);
-				animationFrames = a->animationFrames(actionJumpUp, a->_currentFacing);
+			        &&  a->isActionAvailable(kActionJumpUp, a->_currentFacing)) {
+				a->setAction(kActionJumpUp, 0);
+				animationFrames = a->animationFrames(kActionJumpUp, a->_currentFacing);
 
 				//  Set this flag to indicate that the animation is actually
 				//  being played
@@ -3784,9 +3784,9 @@ void MotionTask::acceptHitAction() {
 		    (_d.attacker->getWorldLocation() - a->getLocation()).quickDir();
 
 		if (a->_appearance != nullptr
-		        &&  a->isActionAvailable(actionHit, a->_currentFacing)) {
-			a->setAction(actionHit, 0);
-			animationFrames = a->animationFrames(actionHit, a->_currentFacing);
+		        &&  a->isActionAvailable(kActionHit, a->_currentFacing)) {
+			a->setAction(kActionHit, 0);
+			animationFrames = a->animationFrames(kActionHit, a->_currentFacing);
 
 			//  Set this flag to indicate that the animation is actually
 			//  being played
@@ -3842,10 +3842,10 @@ void MotionTask::fallDownAction() {
 		    (_d.attacker->getWorldLocation() - a->getLocation()).quickDir();
 
 		if (a->_appearance != nullptr
-		        &&  a->isActionAvailable(actionKnockedDown, a->_currentFacing)) {
-			a->setAction(actionKnockedDown, 0);
+		        &&  a->isActionAvailable(kActionKnockedDown, a->_currentFacing)) {
+			a->setAction(kActionKnockedDown, 0);
 			animationFrames =   a->animationFrames(
-			                        actionKnockedDown,
+			                        kActionKnockedDown,
 			                        a->_currentFacing);
 
 			//  Set this flag to indicate that the animation is actually
@@ -4081,17 +4081,17 @@ void MotionTask::updatePositions() {
 		case motionTypeTalk:
 
 			if (mt->_flags & reset) {
-				a->setAction(actionStand, 0);
+				a->setAction(kActionStand, 0);
 				a->_cycleCount = g_vm->_rnd->getRandomNumber(3);
 				mt->_flags &= ~(reset | nextAnim);
 			}
 			if (a->_cycleCount == 0) {
-				a->setAction(actionTalk, 0);
+				a->setAction(kActionTalk, 0);
 				mt->_flags |= nextAnim;
 				a->_cycleCount = -1;
 			} else if (mt->_flags & nextAnim) {
 				if (a->nextAnimationFrame()) {
-					a->setAction(actionStand, 0);
+					a->setAction(kActionStand, 0);
 					a->_cycleCount = g_vm->_rnd->getRandomNumber(3);
 					mt->_flags &= ~nextAnim;
 				}
@@ -4104,8 +4104,8 @@ void MotionTask::updatePositions() {
 
 			if (mt->_flags & reset) {
 				int16   newAction = mt->_motionType == motionTypeLand
-				                    ?   actionJumpUp
-				                    :   actionFallBadly;
+				                    ?   kActionJumpUp
+				                    :   kActionFallBadly;
 
 				if (!a->isActionAvailable(newAction)) {
 					if (mt->_prevMotionType == motionTypeWalk) {
@@ -4167,12 +4167,12 @@ void MotionTask::updatePositions() {
 		case motionTypeJump:
 
 			if (mt->_flags & reset) {
-				a->setAction(actionJumpUp, 0);
+				a->setAction(kActionJumpUp, 0);
 				a->setInterruptablity(false);
 				mt->_flags &= ~reset;
 			} else if (a->nextAnimationFrame()) {
 				mt->_motionType = motionTypeThrown;
-				a->setAction(actionFreeFall, 0);
+				a->setAction(kActionFreeFall, 0);
 			}
 			break;
 
@@ -4504,15 +4504,15 @@ void MotionTask::updatePositions() {
 
 		case motionTypeDie:
 			if (mt->_flags & reset) {
-				if (a->isActionAvailable(actionDie)) {
-					a->setAction(actionDie, 0);
+				if (a->isActionAvailable(kActionDie)) {
+					a->setAction(kActionDie, 0);
 					a->setInterruptablity(false);
 					mt->_flags &= ~reset;
 				} else {
 					moveTaskDone = true;
 					a->setInterruptablity(true);
 					if (!a->hasEffect(actorDisappearOnDeath)) {
-						a->setAction(actionDead, 0);
+						a->setAction(kActionDead, 0);
 						a->die();
 					} else {
 						a->die();
@@ -4524,7 +4524,7 @@ void MotionTask::updatePositions() {
 				moveTaskDone = true;
 				a->setInterruptablity(true);
 				if (!a->hasEffect(actorDisappearOnDeath)) {
-					a->setAction(actionDead, 0);
+					a->setAction(kActionDead, 0);
 					a->die();
 				} else {
 					a->die();
diff --git a/engines/saga2/motion.h b/engines/saga2/motion.h
index 82c869d70c0..56524541ac8 100644
--- a/engines/saga2/motion.h
+++ b/engines/saga2/motion.h
@@ -275,7 +275,7 @@ private:
 		Actor   *a = (Actor *)_object;
 
 		if (_flags & reset) {
-			a->setAction(actionStand, 0);
+			a->setAction(kActionStand, 0);
 			_flags &= ~reset;
 		}
 
diff --git a/engines/saga2/objproto.cpp b/engines/saga2/objproto.cpp
index b79f7388743..31a18ba544f 100644
--- a/engines/saga2/objproto.cpp
+++ b/engines/saga2/objproto.cpp
@@ -924,7 +924,7 @@ uint8 ProtoObj::adjustDamage(uint8 damage) {
 //	Return the fight stance approriate to this weapon
 
 int16 ProtoObj::fightStanceAction(ObjectID actor) {
-	return actionStand;
+	return kActionStand;
 }
 
 // ------------------------------------------------------------------------
@@ -1619,7 +1619,7 @@ bool MeleeWeaponProto::damageAction(
 	    a,
 	    targetPtr,
 	    GameObject::objectAddress(dObj),
-	    effStats->getSkillLevel(skillIDBrawn));
+	    effStats->getSkillLevel(kSkillIDBrawn));
 
 	return true;
 }
@@ -1646,7 +1646,7 @@ bool MeleeWeaponProto::isTwoHanded(ObjectID attackerID) {
 	//  This weapon must be wielded in two hands if its bulk is greater
 	//  than a quarter of the bulk of the wielder or if the actor does not
 	//  have one handed fighing animation.
-	return      !attackerPtr->isActionAvailable(actionSwingHigh)
+	return      !attackerPtr->isActionAvailable(kActionSwingHigh)
 	            ||  bulk > attackerProto->bulk / 4;
 }
 
@@ -1728,7 +1728,7 @@ uint8 MeleeWeaponProto::weaponRating(
 //	Return the fight stance approriate to this weapon
 
 int16 MeleeWeaponProto::fightStanceAction(ObjectID actor) {
-	return isTwoHanded(actor) ? actionTwoHandSwingHigh : actionSwingHigh;
+	return isTwoHanded(actor) ? kActionTwoHandSwingHigh : kActionSwingHigh;
 }
 
 // ------------------------------------------------------------------------
@@ -1780,7 +1780,7 @@ uint8 BludgeoningWeaponProto::getSkillValue(ObjectID enactor) {
 	a = (Actor *)GameObject::objectAddress(enactor);
 	effStats = a->getStats();
 
-	return effStats->getSkillLevel(skillIDBludgeon);
+	return effStats->getSkillLevel(kSkillIDBludgeon);
 }
 
 // ------------------------------------------------------------------------
@@ -1794,10 +1794,10 @@ void BludgeoningWeaponProto::applySkillGrowth(ObjectID enactor, uint8 points) {
 	if (actorIDToPlayerID(enactor, playerID)) {
 		PlayerActor     *player = getPlayerActorAddress(playerID);
 
-		player->skillAdvance(skillIDBludgeon, points);
+		player->skillAdvance(kSkillIDBludgeon, points);
 
 		if (g_vm->_rnd->getRandomNumber(1))
-			player->skillAdvance(skillIDBrawn, points);
+			player->skillAdvance(kSkillIDBrawn, points);
 	}
 }
 
@@ -1817,7 +1817,7 @@ uint8 SlashingWeaponProto::getSkillValue(ObjectID enactor) {
 	a = (Actor *)GameObject::objectAddress(enactor);
 	effStats = a->getStats();
 
-	return effStats->getSkillLevel(skillIDSwordcraft);
+	return effStats->getSkillLevel(kSkillIDSwordcraft);
 }
 
 // ------------------------------------------------------------------------
@@ -1831,10 +1831,10 @@ void SlashingWeaponProto::applySkillGrowth(ObjectID enactor, uint8 points) {
 	if (actorIDToPlayerID(enactor, playerID)) {
 		PlayerActor     *player = getPlayerActorAddress(playerID);
 
-		player->skillAdvance(skillIDSwordcraft, points);
+		player->skillAdvance(kSkillIDSwordcraft, points);
 
 		if (g_vm->_rnd->getRandomNumber(1))
-			player->skillAdvance(skillIDBrawn, points);
+			player->skillAdvance(kSkillIDBrawn, points);
 	}
 }
 
@@ -1944,7 +1944,7 @@ uint8 BowProto::weaponRating(
 
 	if (dist < maximumRange && !wielder->inReach(target->getLocation()))
 		rating += inRangeRatingBonus;
-	rating += wielder->getStats()->getSkillLevel(skillIDArchery);
+	rating += wielder->getStats()->getSkillLevel(kSkillIDArchery);
 
 	return rating;
 }
@@ -1953,7 +1953,7 @@ uint8 BowProto::weaponRating(
 //	Return the fight stance approriate to this weapon
 
 int16 BowProto::fightStanceAction(ObjectID actor) {
-	return actionFireBow;
+	return kActionFireBow;
 }
 
 /* ==================================================================== *
@@ -2044,7 +2044,7 @@ uint8 WeaponWandProto::weaponRating(
 
 	if (dist < maximumRange && !wielder->inReach(target->getLocation()))
 		rating += inRangeRatingBonus;
-	rating += wielder->getStats()->getSkillLevel(skillIDSpellcraft);
+	rating += wielder->getStats()->getSkillLevel(kSkillIDSpellcraft);
 
 	return rating;
 }
@@ -2053,7 +2053,7 @@ uint8 WeaponWandProto::weaponRating(
 //	Return the fight stance approriate to this weapon
 
 int16 WeaponWandProto::fightStanceAction(ObjectID actor) {
-	return actionUseWand;
+	return kActionUseWand;
 }
 
 /* ==================================================================== *
@@ -2114,7 +2114,7 @@ bool ArrowProto::strikeAction(
 	return  itemPtr->acceptStrike(
 	            enactor,
 	            dObj,
-	            a->getStats()->getSkillLevel(skillIDArchery));
+	            a->getStats()->getSkillLevel(kSkillIDArchery));
 }
 
 bool ArrowProto::damageAction(
@@ -2142,7 +2142,7 @@ bool ArrowProto::damageAction(
 	    a,
 	    GameObject::objectAddress(target),
 	    GameObject::objectAddress(dObj),
-	    effStats->getSkillLevel(skillIDBrawn));
+	    effStats->getSkillLevel(kSkillIDBrawn));
 
 	return true;
 }
@@ -2158,10 +2158,10 @@ void ArrowProto::applySkillGrowth(ObjectID enactor, uint8 points) {
 	if (actorIDToPlayerID(enactor, playerID)) {
 		PlayerActor     *player = getPlayerActorAddress(playerID);
 
-		player->skillAdvance(skillIDArchery, points);
+		player->skillAdvance(kSkillIDArchery, points);
 
 		if (g_vm->_rnd->getRandomNumber(1))
-			player->skillAdvance(skillIDBrawn, points);
+			player->skillAdvance(kSkillIDBrawn, points);
 	}
 }
 
@@ -2368,7 +2368,7 @@ uint8 ShieldProto::getSkillValue(ObjectID enactor) {
 	a = (Actor *)GameObject::objectAddress(enactor);
 	effStats = a->getStats();
 
-	return effStats->getSkillLevel(skillIDShieldcraft);
+	return effStats->getSkillLevel(kSkillIDShieldcraft);
 }
 
 // ------------------------------------------------------------------------
@@ -2382,10 +2382,10 @@ void ShieldProto::applySkillGrowth(ObjectID enactor, uint8 points) {
 	if (actorIDToPlayerID(enactor, playerID)) {
 		PlayerActor     *player = getPlayerActorAddress(playerID);
 
-		player->skillAdvance(skillIDShieldcraft, points);
+		player->skillAdvance(kSkillIDShieldcraft, points);
 
 		if (g_vm->_rnd->getRandomNumber(1))
-			player->skillAdvance(skillIDBrawn, points);
+			player->skillAdvance(kSkillIDBrawn, points);
 	}
 }
 
diff --git a/engines/saga2/player.cpp b/engines/saga2/player.cpp
index ca82e6f7859..dfdbc7a9e93 100644
--- a/engines/saga2/player.cpp
+++ b/engines/saga2/player.cpp
@@ -137,7 +137,7 @@ void PlayerActor::AttribUpdate() {
 	// get the effective stats for this player actor
 	ActorAttributes *effStats = &actor->_effectiveStats;
 
-	for (int16 i = 0; i < numSkills; i++) {
+	for (int16 i = 0; i < kNumSkills; i++) {
 		// go through each skill and update as needed
 		stdAttribUpdate(effStats->skill(i),
 		                _baseStats.skill(i),
@@ -272,7 +272,7 @@ void PlayerActor::skillAdvance(SkillProto *proto,
 	uint8 stat = getStatIndex(proto);
 
 	// get the percentile chance of advancing
-	uint8 advanceChance = ActorAttributes::skillBasePercent - skillLevel;
+	uint8 advanceChance = ActorAttributes::kSkillBasePercent - skillLevel;
 
 	// call the main body of code
 	skillAdvance(stat, advanceChance, points, useMult);
@@ -283,10 +283,10 @@ void PlayerActor::skillAdvance(ActorSkillID stat,
                                uint8 points,
                                uint8 useMult) { // useMult defaulted to 1
 	// get the skill level for the skill passed ( i.e. 1-100 )
-	uint8 skillLevel = clamp(0, _baseStats.skill(stat), ActorAttributes::skillMaxLevel);
+	uint8 skillLevel = clamp(0, _baseStats.skill(stat), ActorAttributes::kSkillMaxLevel);
 
 	// get the percentile chance of advancing
-	uint8 advanceChance = ActorAttributes::skillBasePercent - skillLevel;
+	uint8 advanceChance = ActorAttributes::kSkillBasePercent - skillLevel;
 
 	// call the main body of code
 	skillAdvance(stat, advanceChance, points, useMult);
@@ -302,27 +302,27 @@ void PlayerActor::skillAdvance(uint8 stat,
 	// roll percentile dice
 	if (g_vm->_rnd->getRandomNumber(99) < advanceChance) {
 		uint8 increase;
-		int16   oldValue = _baseStats.skill(stat) / ActorAttributes::skillFracPointsPerLevel;
+		int16   oldValue = _baseStats.skill(stat) / ActorAttributes::kSkillFracPointsPerLevel;
 
 		// success, now apply the multiplyer
 		_attribMemPools[stat] += points * useMult;
 
 		// get the amout of whole increase points
-		increase = _attribMemPools[stat] / ActorAttributes::skillFracPointsPerLevel;
+		increase = _attribMemPools[stat] / ActorAttributes::kSkillFracPointsPerLevel;
 
 		// now set the pool with the fraction
 		_attribMemPools[stat] =
 		    _attribMemPools[stat]
 		    -       increase
-		    *   ActorAttributes::skillFracPointsPerLevel;
+		    *   ActorAttributes::kSkillFracPointsPerLevel;
 
 		// now apply changes to the _baseStats
 		_baseStats.skill(stat) = clamp(
 		                            0,
 		                            _baseStats.skill(stat) += increase,
-		                            ActorAttributes::skillMaxLevel);
+		                            ActorAttributes::kSkillMaxLevel);
 
-		if (_baseStats.skill(stat) / ActorAttributes::skillFracPointsPerLevel != oldValue) {
+		if (_baseStats.skill(stat) / ActorAttributes::kSkillFracPointsPerLevel != oldValue) {
 			static const char *skillNames[] = {
 				ARCHERY_SKILL,
 				SWORD_SKILL,
@@ -343,7 +343,7 @@ void PlayerActor::skillAdvance(uint8 stat,
 
 void PlayerActor::vitalityAdvance(uint8 points) {
 	while (points-- > 0) {
-		if ((int16)g_vm->_rnd->getRandomNumber(ActorAttributes::vitalityLimit - 1) > _baseStats.vitality) {
+		if ((int16)g_vm->_rnd->getRandomNumber(ActorAttributes::kVitalityLimit - 1) > _baseStats.vitality) {
 			if (++_vitalityMemory >= vitalityLevelBump) {
 				_vitalityMemory -= vitalityLevelBump;
 				_baseStats.vitality++;
@@ -352,7 +352,7 @@ void PlayerActor::vitalityAdvance(uint8 points) {
 		}
 	}
 
-	assert(_baseStats.vitality < ActorAttributes::vitalityLimit);
+	assert(_baseStats.vitality < ActorAttributes::kVitalityLimit);
 }
 
 // this function will return a value of 0 - 4 to indicate
@@ -369,7 +369,7 @@ int8 PlayerActor::getSkillLevel(SkillProto *skill, bool base) { // basestats def
 
 	// check to see if this is a special case
 	if (skillID == skillVitality) {
-		return effStats->vitality / ActorAttributes::skillFracPointsPerLevel;
+		return effStats->vitality / ActorAttributes::kSkillFracPointsPerLevel;
 	} else if (skillID == skillCartography) {
 		// cartography has no levels
 		return 0;
@@ -380,16 +380,16 @@ int8 PlayerActor::getSkillLevel(SkillProto *skill, bool base) { // basestats def
 
 
 	// stat stored as skillLevel *
-	//                skillFracPointsPerLevel +
+	//                kSkillFracPointsPerLevel +
 	//                skillCurrentFracPoints
 	if (base) {
 		return clamp(0,
-		             _baseStats.skill(stat) / ActorAttributes::skillFracPointsPerLevel,
-		             ActorAttributes::skillLevels - 1);
+		             _baseStats.skill(stat) / ActorAttributes::kSkillFracPointsPerLevel,
+		             ActorAttributes::kSkillLevels - 1);
 	} else {
 		return clamp(0,
-		             effStats->skill(stat) / ActorAttributes::skillFracPointsPerLevel,
-		             ActorAttributes::skillLevels - 1);
+		             effStats->skill(stat) / ActorAttributes::kSkillFracPointsPerLevel,
+		             ActorAttributes::kSkillLevels - 1);
 	}
 }
 
@@ -402,55 +402,55 @@ uint8 PlayerActor::getStatIndex(SkillProto *proto) {
 	// attributeskilll enum for the allSkills array
 	switch (skillID) {
 	case skillPickpocket:
-		stat = skillIDPilfer;
+		stat = kSkillIDPilfer;
 		break;
 
 	case skillSeeHidden:
-		stat = skillIDSpotHidden;
+		stat = kSkillIDSpotHidden;
 		break;
 
 	case skillLockPick:
-		stat = skillIDLockpick;
+		stat = kSkillIDLockpick;
 		break;
 
 	case skillFirstAid:
-		stat = skillIDFirstAid;
+		stat = kSkillIDFirstAid;
 		break;
 
 	case skillArchery:
-		stat = skillIDArchery;
+		stat = kSkillIDArchery;
 		break;
 
 	case skillSwordcraft:
-		stat = skillIDSwordcraft;
+		stat = kSkillIDSwordcraft;
 		break;
 
 	case skillShieldcraft:
-		stat = skillIDShieldcraft;
+		stat = kSkillIDShieldcraft;
 		break;
 
 	case skillBludgeon:
-		stat = skillIDBludgeon;
+		stat = kSkillIDBludgeon;
 		break;
 
 	case skillThrowing:
-		stat = skillIDThrowing;
+		stat = kSkillIDThrowing;
 		break;
 
 	case skillSpellcraft:
-		stat = skillIDSpellcraft;
+		stat = kSkillIDSpellcraft;
 		break;
 
 	case skillStealth:
-		stat = skillIDStealth;
+		stat = kSkillIDStealth;
 		break;
 
 	case skillAgility:
-		stat = skillIDAgility;
+		stat = kSkillIDAgility;
 		break;
 
 	case skillBrawn:
-		stat = skillIDBrawn;
+		stat = kSkillIDBrawn;
 		break;
 
 	default:
@@ -459,7 +459,7 @@ uint8 PlayerActor::getStatIndex(SkillProto *proto) {
 	}
 
 	// make sure we have a good index
-	if (stat >= numSkills) {
+	if (stat >= kNumSkills) {
 		error("Invalid array index detected: Player.cpp-getSkillLevel()");
 	}
 
@@ -589,8 +589,8 @@ void setCenterActor(PlayerActorID newCenter) {
 //	Set a new center actor based upon an Actor address
 
 void setCenterActor(Actor *newCenter) {
-	assert(newCenter->_disposition >= dispositionPlayer);
-	setCenterActor(newCenter->_disposition - dispositionPlayer);
+	assert(newCenter->_disposition >= kDispositionPlayer);
+	setCenterActor(newCenter->_disposition - kDispositionPlayer);
 }
 
 //-----------------------------------------------------------------------
@@ -674,7 +674,7 @@ void autoAdjustAggression() {
 
 					a = (Actor *)obj;
 
-					if (a->_disposition == dispositionEnemy) {
+					if (a->_disposition == kDispositionEnemy) {
 						enemiesPresent = true;
 						break;
 					}
@@ -757,8 +757,8 @@ int16 getPortraitType(PlayerActorID id) {
 //	Given an actor, returns the corresponding player Actor ID
 
 bool actorToPlayerID(Actor *a, PlayerActorID &result) {
-	if (a->_disposition >= dispositionPlayer) {
-		result = a->_disposition - dispositionPlayer;
+	if (a->_disposition >= kDispositionPlayer) {
+		result = a->_disposition - kDispositionPlayer;
 		return true;
 	}
 
@@ -770,8 +770,8 @@ bool actorIDToPlayerID(ObjectID id, PlayerActorID &result) {
 
 	Actor       *a = (Actor *)GameObject::objectAddress(id);
 
-	if (a->_disposition >= dispositionPlayer) {
-		result = a->_disposition - dispositionPlayer;
+	if (a->_disposition >= kDispositionPlayer) {
+		result = a->_disposition - kDispositionPlayer;
 		return true;
 	}
 
@@ -886,8 +886,8 @@ struct PlayerActorArchive {
 	uint16              flags;
 	ActorAttributes     _baseStats;
 	int16               _manaMemory[numManas];
-	uint8               _attribRecPools[numSkills];
-	uint8               _attribMemPools[numSkills];
+	uint8               _attribRecPools[kNumSkills];
+	uint8               _attribMemPools[kNumSkills];
 	uint8               _vitalityMemory;
 	bool                _notifiedOfAttack;
 };
@@ -932,7 +932,7 @@ void initPlayerActors() {
 
 		//  Set the actor's disposition field to reflect that that
 		//  actor is a player actor
-		a->_disposition = dispositionPlayer + i;
+		a->_disposition = kDispositionPlayer + i;
 
 		//  Turn on banding for player actors
 		setBanded(i, true);
@@ -964,10 +964,10 @@ void savePlayerActors(Common::OutSaveFile *outS) {
 		for (int j = 0; j < numManas; ++j)
 			out->writeSint16LE(p->_manaMemory[j]);
 
-		for (int j = 0; j < numSkills; ++j)
+		for (int j = 0; j < kNumSkills; ++j)
 			out->writeByte(p->_attribRecPools[j]);
 
-		for (int j = 0; j < numSkills; ++j)
+		for (int j = 0; j < kNumSkills; ++j)
 			out->writeByte(p->_attribMemPools[j]);
 
 		//  Store the vitality memory
@@ -1005,10 +1005,10 @@ void loadPlayerActors(Common::InSaveFile *in) {
 		for (int j = 0; j < numManas; ++j)
 			p->_manaMemory[j] = in->readSint16LE();
 
-		for (int j = 0; j < numSkills; ++j)
+		for (int j = 0; j < kNumSkills; ++j)
 			p->_attribRecPools[j] = in->readByte();
 
-		for (int j = 0; j < numSkills; ++j)
+		for (int j = 0; j < kNumSkills; ++j)
 			p->_attribMemPools[j] = in->readByte();
 
 		//  Restore the vitality memory
diff --git a/engines/saga2/player.h b/engines/saga2/player.h
index d04bb16e2a5..eddde746726 100644
--- a/engines/saga2/player.h
+++ b/engines/saga2/player.h
@@ -78,10 +78,10 @@ public:
 	int16   _manaMemory[numManas];
 
 	// attrib recovery pools
-	uint8   _attribRecPools[numSkills];
+	uint8   _attribRecPools[kNumSkills];
 
 	// skills 'expericene' pool
-	uint8   _attribMemPools[numSkills];
+	uint8   _attribMemPools[kNumSkills];
 
 	// vitality pool
 	uint8 _vitalityMemory;
@@ -94,14 +94,14 @@ public:
 	PlayerActor(ObjectID a) :  _actorID(a), _portraitType(0), _flags(0), _readyNode(NULL),
 			_vitalityMemory(0), _notifiedOfAttack(false) {
 
-		assert(ActorAttributes::skillFracPointsPerLevel > 0);    // this is used in a divide
+		assert(ActorAttributes::kSkillFracPointsPerLevel > 0);    // this is used in a divide
 
 		memset(&_baseStats, 0, sizeof(_baseStats));
 
 		for (int i = 0; i < numManas; i++)
 			_manaMemory[i] = 0;
 
-		for (int i = 0; i < numSkills; i++) {
+		for (int i = 0; i < kNumSkills; i++) {
 			_attribRecPools[i] = 0;
 			_attribMemPools[i] = 0;
 		}
diff --git a/engines/saga2/sagafunc.cpp b/engines/saga2/sagafunc.cpp
index 0c17f2a48d4..705637383f4 100644
--- a/engines/saga2/sagafunc.cpp
+++ b/engines/saga2/sagafunc.cpp
@@ -328,7 +328,7 @@ int16 scriptActorSetProto(int16 *args) {
 	GameObject      *obj = ((ObjectData *)thisThread->_thisObject)->obj;
 	int16           oldProto = obj->getProtoNum();
 
-	if (isActor(obj) && (((Actor *)obj)->_flags & Actor::temporary)) {
+	if (isActor(obj) && (((Actor *)obj)->_flags & Actor::kAFTemporary)) {
 		decTempActorCount(oldProto);
 		incTempActorCount(args[0]);
 	}
@@ -2674,7 +2674,7 @@ int16 scriptMissionMakeActor(int16 *args) {
 
 	//  Call the regular make-actor function. Add in the "permanent"
 	//  flag, since actor will be deleted at mission end.
-	args[6] |= actorPermanent;
+	args[6] |= kActorPermanent;
 	id = scriptMakeActor(args);
 
 	//  And record it in the mission object
diff --git a/engines/saga2/speech.cpp b/engines/saga2/speech.cpp
index b164c51d434..36d6b1956eb 100644
--- a/engines/saga2/speech.cpp
+++ b/engines/saga2/speech.cpp
@@ -289,7 +289,7 @@ bool Speech::setupActive() {
 	//Turn Actor Towards Person They Are Talking To
 //	MotionTask::turnObject( *obj, GameObject::objectAddress(32794)->getLocation());
 //	Actor    *a = (Actor *)obj;
-//	if(!a->setAction( actionJumpUp, animateRandom ))
+//	if(!a->setAction( kActionJumpUp, kAnimateRandom ))
 //		throw gError( "Could Not Set Talk Animation");
 
 	// Set up temp gport for blitting to bitmap
@@ -511,8 +511,8 @@ bool Speech::displayText() {
 void Speech::dispose() {
 	if (speechList.currentActive() == this) {
 //		Actor   *a = (Actor *)sp->obj;
-//		a->animationFlags |= animateFinished;
-//		a->setAction( actionStand, animateRandom );
+//		a->animationFlags |= kAnimateFinished;
+//		a->setAction( kActionStand, kAnimateRandom );
 
 		if (!longEnough())
 			playVoice(0);
diff --git a/engines/saga2/task.cpp b/engines/saga2/task.cpp
index 7c2bd7c4978..17b879d101a 100644
--- a/engines/saga2/task.cpp
+++ b/engines/saga2/task.cpp
@@ -2974,7 +2974,7 @@ void HuntToKillTask::abortTask() {
 
 	Actor       *a = _stack->getActor();
 
-	a->_flags &= ~Actor::specialAttack;
+	a->_flags &= ~Actor::kAFSpecialAttack;
 
 	a->setFightStance(false);
 }
@@ -2983,7 +2983,7 @@ void HuntToKillTask::abortTask() {
 
 TaskResult HuntToKillTask::update() {
 	if (_specialAttackCtr == 0) {
-		_stack->getActor()->_flags |= Actor::specialAttack;
+		_stack->getActor()->_flags |= Actor::kAFSpecialAttack;
 		//  A little hack to make monsters with 99 spellcraft cast spells more often
 		if (_stack->getActor()->getStats()->spellcraft >= 99)
 			_specialAttackCtr = 3;
@@ -3024,7 +3024,7 @@ void HuntToKillTask::evaluateTarget() {
 		getTarget()->actor(a->world(), a->getLocation(), taa);
 
 		switch (proto->combatBehavior) {
-		case behaviorHungry:
+		case kBehaviorHungry:
 			//  Iterate through each actor in the array and determine if
 			//  there is a line of sight to that actor
 			for (i = 0; i < taa.actors; i++) {
@@ -3045,7 +3045,7 @@ void HuntToKillTask::evaluateTarget() {
 			}
 			break;
 
-		case behaviorCowardly: {
+		case kBehaviorCowardly: {
 			int16       bestScore = 0;
 
 			for (i = 0; i < taa.actors; i++) {
@@ -3074,7 +3074,7 @@ void HuntToKillTask::evaluateTarget() {
 		}
 		break;
 
-		case behaviorBerserk: {
+		case kBehaviorBerserk: {
 			int16       bestScore = 0;
 
 			for (i = 0; i < taa.actors; i++) {
@@ -3103,7 +3103,7 @@ void HuntToKillTask::evaluateTarget() {
 		}
 		break;
 
-		case behaviorSmart: {
+		case kBehaviorSmart: {
 			int16       bestScore = 0;
 
 			for (i = 0; i < taa.actors; i++) {
diff --git a/engines/saga2/tilemode.cpp b/engines/saga2/tilemode.cpp
index c64144213d4..75288a3be02 100644
--- a/engines/saga2/tilemode.cpp
+++ b/engines/saga2/tilemode.cpp
@@ -349,7 +349,7 @@ bool areThereActiveEnemies() {
 	for (iter.first(&obj); obj != nullptr; iter.next(&obj)) {
 		if (isActor(obj)
 		        &&  !((Actor *)obj)->isDead()
-		        && ((Actor *)obj)->_disposition == dispositionEnemy)
+		        && ((Actor *)obj)->_disposition == kDispositionEnemy)
 			return true;
 	}
 
@@ -385,8 +385,8 @@ void CheckCombatMood() {
 	for (iter8.first(&obj); obj != nullptr; iter8.next(&obj)) {
 		if (isActor(obj)
 		        &&  !((Actor *)obj)->isDead()
-		        && ((Actor *)obj)->_disposition == dispositionEnemy) {
-			if (agress || !(((Actor *)obj)->_flags & Actor::afraid)) {
+		        && ((Actor *)obj)->_disposition == kDispositionEnemy) {
+			if (agress || !(((Actor *)obj)->_flags & Actor::kAFAfraid)) {
 				incrementActiveFaction((Actor *) obj);
 				wasHostile = true;
 			}


Commit: aaa2f0a0091f5014bd4fbf41bbd4a537d53627a6
    https://github.com/scummvm/scummvm/commit/aaa2f0a0091f5014bd4fbf41bbd4a537d53627a6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T13:32:38+02:00

Commit Message:
SAGA2: Rename enums in assign.h

Changed paths:
    engines/saga2/assign.cpp
    engines/saga2/assign.h


diff --git a/engines/saga2/assign.cpp b/engines/saga2/assign.cpp
index 3f839d684fc..e41deea0d91 100644
--- a/engines/saga2/assign.cpp
+++ b/engines/saga2/assign.cpp
@@ -229,7 +229,7 @@ void PatrolRouteAssignment::write(Common::MemoryWriteStreamDynamic *out) const {
 //	reasons.
 
 int16 PatrolRouteAssignment::type() const {
-	return patrolRouteAssignment;
+	return kPatrolRouteAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -237,7 +237,7 @@ int16 PatrolRouteAssignment::type() const {
 //	of a task which the assignment had created.
 
 void PatrolRouteAssignment::handleTaskCompletion(TaskResult result) {
-	if (result == taskSucceeded) _flags |= routeCompleted;
+	if (result == taskSucceeded) _flags |= kRouteCompleted;
 }
 
 //----------------------------------------------------------------------
@@ -246,7 +246,7 @@ void PatrolRouteAssignment::handleTaskCompletion(TaskResult result) {
 bool PatrolRouteAssignment::isValid() {
 	//  If the route has already been completed, then the assignment is
 	//  no longer valid
-	if (_flags & routeCompleted) return false;
+	if (_flags & kRouteCompleted) return false;
 
 	return ActorAssignment::isValid();
 }
@@ -256,7 +256,7 @@ bool PatrolRouteAssignment::isValid() {
 
 bool PatrolRouteAssignment::taskNeeded() {
 	//  If the route has already been completed, then no task is needed
-	return !(_flags & routeCompleted);
+	return !(_flags & kRouteCompleted);
 }
 
 //----------------------------------------------------------------------
@@ -366,7 +366,7 @@ void HuntToBeNearLocationAssignment::write(Common::MemoryWriteStreamDynamic *out
 //	reasons.
 
 int16 HuntToBeNearLocationAssignment::type() const {
-	return huntToBeNearLocationAssignment;
+	return kHuntToBeNearLocationAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -424,7 +424,7 @@ void HuntToBeNearActorAssignment::initialize(
 	at.clone(_targetMem);
 
 	_range = r;
-	_flags = trackFlag ? track : 0;
+	_flags = trackFlag ? kTrack : 0;
 }
 
 HuntToBeNearActorAssignment::HuntToBeNearActorAssignment(Actor *a, Common::SeekableReadStream *stream) :
@@ -472,7 +472,7 @@ void HuntToBeNearActorAssignment::write(Common::MemoryWriteStreamDynamic *out) c
 //	reasons.
 
 int16 HuntToBeNearActorAssignment::type() const {
-	return huntToBeNearActorAssignment;
+	return kHuntToBeNearActorAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -495,7 +495,7 @@ Task *HuntToBeNearActorAssignment::getTask(TaskStack *ts) {
 	           ts,
 	           *getTarget(),
 	           _range,
-	           (_flags & track) != false);
+	           (_flags & kTrack) != false);
 }
 
 /* ===================================================================== *
@@ -532,8 +532,8 @@ void HuntToKillAssignment::initialize(
 	//  Copy the target
 	at.clone(_targetMem);
 
-	_flags = (trackFlag ? track : 0)
-	        | (specificActorFlag ? specificActor : 0);
+	_flags = (trackFlag ? kTrack : 0)
+	        | (specificActorFlag ? kSpecificActor : 0);
 }
 
 //----------------------------------------------------------------------
@@ -565,7 +565,7 @@ void HuntToKillAssignment::write(Common::MemoryWriteStreamDynamic *out) const {
 bool HuntToKillAssignment::isValid() {
 	//  If the target actor is already dead, then this is not a valid
 	//  assignment
-	if (_flags & specificActor) {
+	if (_flags & kSpecificActor) {
 		const SpecificActorTarget *sat = (const SpecificActorTarget *)getTarget();
 
 		if (sat->getTargetActor()->isDead()) return false;
@@ -581,7 +581,7 @@ bool HuntToKillAssignment::isValid() {
 //	reasons.
 
 int16 HuntToKillAssignment::type() const {
-	return huntToKillAssignment;
+	return kHuntToKillAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -590,7 +590,7 @@ int16 HuntToKillAssignment::type() const {
 bool HuntToKillAssignment::taskNeeded() {
 	//  If we're hunting a specific actor, we only need a task if that
 	//  actor is still alive.
-	if (_flags & specificActor) {
+	if (_flags & kSpecificActor) {
 		const SpecificActorTarget *sat = (const SpecificActorTarget *)getTarget();
 
 		return !sat->getTargetActor()->isDead();
@@ -607,7 +607,7 @@ Task *HuntToKillAssignment::getTask(TaskStack *ts) {
 	return new HuntToKillTask(
 	           ts,
 	           *getTarget(),
-	           (_flags & track) != false);
+	           (_flags & kTrack) != false);
 }
 
 /* ===================================================================== *
@@ -668,7 +668,7 @@ TetheredWanderAssignment::TetheredWanderAssignment(
 //	reasons.
 
 int16 TetheredWanderAssignment::type() const {
-	return tetheredWanderAssignment;
+	return kTetheredWanderAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -731,7 +731,7 @@ void AttendAssignment::write(Common::MemoryWriteStreamDynamic *out) const {
 //	reasons.
 
 int16 AttendAssignment::type() const {
-	return attendAssignment;
+	return kAttendAssignment;
 }
 
 //----------------------------------------------------------------------
@@ -751,23 +751,23 @@ void readAssignment(Actor *a, Common::InSaveFile *in) {
 
 	//  Based upon the type, call the correct constructor
 	switch (type) {
-	case patrolRouteAssignment:
+	case kPatrolRouteAssignment:
 		new PatrolRouteAssignment(a, in);
 		break;
 
-	case huntToBeNearActorAssignment:
+	case kHuntToBeNearActorAssignment:
 		new HuntToBeNearActorAssignment(a, in);
 		break;
 
-	case huntToBeNearLocationAssignment:
+	case kHuntToBeNearLocationAssignment:
 		new HuntToBeNearLocationAssignment(a, in);
 		break;
 
-	case tetheredWanderAssignment:
+	case kTetheredWanderAssignment:
 		new TetheredWanderAssignment(a, in);
 		break;
 
-	case attendAssignment:
+	case kAttendAssignment:
 		new AttendAssignment(a, in);
 		break;
 	}
diff --git a/engines/saga2/assign.h b/engines/saga2/assign.h
index 794105672f8..303a3544c13 100644
--- a/engines/saga2/assign.h
+++ b/engines/saga2/assign.h
@@ -36,12 +36,12 @@ class TaskStack;
 
 //  Constants representing the non-virtual ActorAssignment classes
 enum AssignmentTypes {
-	patrolRouteAssignment,
-	huntToBeNearLocationAssignment,
-	huntToBeNearActorAssignment,
-	huntToKillAssignment,
-	tetheredWanderAssignment,
-	attendAssignment
+	kPatrolRouteAssignment,
+	kHuntToBeNearLocationAssignment,
+	kHuntToBeNearActorAssignment,
+	kHuntToKillAssignment,
+	kTetheredWanderAssignment,
+	kAttendAssignment
 };
 
 /* ===================================================================== *
@@ -114,7 +114,7 @@ class PatrolRouteAssignment : public ActorAssignment {
 	//  assignment
 
 	enum {
-		routeCompleted  = (1 << 0)
+		kRouteCompleted  = (1 << 0)
 	};
 
 public:
@@ -225,7 +225,7 @@ class HuntToBeNearActorAssignment : public ActorAssignment {
 	uint8               _flags;
 
 	enum {
-		track           = (1 << 0)  //  This hunt is a track.
+		kTrack           = (1 << 0)  //  This hunt is a track.
 	};
 
 	//  An initialization function which provides a common ground for
@@ -303,8 +303,8 @@ class HuntToKillAssignment : public ActorAssignment {
 	uint8               _flags;
 
 	enum {
-		track           = (1 << 0), //  This hunt is a track.
-		specificActor   = (1 << 1)  //  The actor target is a specific actor
+		kTrack           = (1 << 0), //  This hunt is a track.
+		kSpecificActor   = (1 << 1)  //  The actor target is a specific actor
 	};
 
 	//  An initialization function which provides a common ground for


Commit: 438a0b2c81ec0e82fda81cb87a573112c7adfca3
    https://github.com/scummvm/scummvm/commit/438a0b2c81ec0e82fda81cb87a573112c7adfca3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T13:37:08+02:00

Commit Message:
SAGA2: Rename enums in button.h

Changed paths:
    engines/saga2/button.cpp
    engines/saga2/button.h
    engines/saga2/contain.cpp
    engines/saga2/intrface.cpp
    engines/saga2/objects.cpp


diff --git a/engines/saga2/button.cpp b/engines/saga2/button.cpp
index d19eef9d57f..b5ace026c69 100644
--- a/engines/saga2/button.cpp
+++ b/engines/saga2/button.cpp
@@ -191,7 +191,7 @@ void GfxCompImage::pointerMove(gPanelMessage &msg) {
 	// call the superclass's pointerMove
 	gControl::pointerMove(msg);
 
-	notify(gEventMouseMove, (msg._pointerEnter ? enter : 0) | (msg._pointerLeave ? leave : 0));
+	notify(gEventMouseMove, (msg._pointerEnter ? kEnter : 0) | (msg._pointerLeave ? kLeave : 0));
 }
 
 void GfxCompImage::enable(bool abled) {
diff --git a/engines/saga2/button.h b/engines/saga2/button.h
index 61c362ddf28..777441ef296 100644
--- a/engines/saga2/button.h
+++ b/engines/saga2/button.h
@@ -115,8 +115,8 @@ protected:
 public:
 
 	enum controlValue {
-		enter = (1 << 0),
-		leave = (1 << 1)
+		kEnter = (1 << 0),
+		kLeave = (1 << 1)
 	};
 
 	GfxCompImage(gPanelList &, const Rect16 &, void *, uint16, AppFunc *cmd = NULL);
diff --git a/engines/saga2/contain.cpp b/engines/saga2/contain.cpp
index 8a913c94b86..62d6699e46f 100644
--- a/engines/saga2/contain.cpp
+++ b/engines/saga2/contain.cpp
@@ -1861,7 +1861,7 @@ APPFUNC(cmdMindContainerFunc) {
 			g_vm->_mouseInfo->setText(textBuffer);
 		}
 
-		if (ev.value == GfxCompImage::leave) {
+		if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -1883,9 +1883,9 @@ APPFUNC(cmdCloseButtonFunc) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	} else if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			g_vm->_mouseInfo->setText(CLOSE_MOUSE);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -1903,9 +1903,9 @@ APPFUNC(cmdScrollFunc) {
 			cw->scrollDown();
 		ev.window->update(cw->getView().getExtent());
 	} else if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			g_vm->_mouseInfo->setText(SCROLL_MOUSE);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index b7af9518733..8af33329b65 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -2124,7 +2124,7 @@ APPFUNC(cmdPortrait) {
 
 	case gEventMouseMove:
 
-		if (ev.value == GfxCompImage::leave) {
+		if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 			g_vm->_mouseInfo->setDoable(true);
 			break;
@@ -2200,12 +2200,12 @@ APPFUNC(cmdAggressive) {
 //		}
 //		else setAggression( transBroID, !wasAggressive );
 	} else if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			// set the text in the cursor
 			g_vm->_mouseInfo->setText(isAggressive(transBroID)
 			                  ? ON_AGRESS
 			                  : OFF_AGRESS);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -2233,7 +2233,7 @@ APPFUNC( cmdJump )
 APPFUNC(cmdArmor) {
 	if (ev.eventType == gEventMouseMove) {
 
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			gArmorIndicator *gai = (gArmorIndicator *)ev.panel;
 			char    buf[128];
 
@@ -2250,7 +2250,7 @@ APPFUNC(cmdArmor) {
 				// set the text in the cursor
 				g_vm->_mouseInfo->setText(buf);
 			}
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -2265,12 +2265,12 @@ APPFUNC(cmdCenter) {
 		else setCenterBrother(transBroID);
 	}
 	if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			// set the text in the cursor
 			g_vm->_mouseInfo->setText(getCenterActorPlayerID() == transBroID
 			                  ? ON_CENTER
 			                  : OFF_CENTER);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -2299,12 +2299,12 @@ APPFUNC(cmdBand) {
 //		}
 //		else setBanded( transBroID, !wasBanded );
 	} else if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			// set the text in the cursor
 			g_vm->_mouseInfo->setText(isBanded(transBroID)
 			                  ? ON_BANDED
 			                  : OFF_BANDED);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -2315,8 +2315,8 @@ APPFUNC(cmdOptions) {
 		OptionsDialog();
 		//openOptionsPanel();
 	} else if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter)        g_vm->_mouseInfo->setText(OPTIONS_PANEL);
-		else if (ev.value == GfxCompImage::leave) g_vm->_mouseInfo->setText(nullptr);
+		if (ev.value == GfxCompImage::kEnter)        g_vm->_mouseInfo->setText(OPTIONS_PANEL);
+		else if (ev.value == GfxCompImage::kLeave) g_vm->_mouseInfo->setText(nullptr);
 	}
 }
 
@@ -2335,7 +2335,7 @@ APPFUNC(cmdBroChange) {
 
 		uint16  panID = ev.panel->_id;
 
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			// working buffer
 			char buf[bufSize];
 			char state[stateBufSize];
@@ -2356,7 +2356,7 @@ APPFUNC(cmdBroChange) {
 			}
 			// set the text in the cursor
 			g_vm->_mouseInfo->setText(buf);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -2366,12 +2366,12 @@ APPFUNC(cmdHealthStar) {
 	uint16 transBroID = translatePanID(ev.panel->_id);
 
 	if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::leave) {
+		if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 			return;
 		}
 
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			ev.panel->setMousePoll(true);
 		}
 
@@ -2391,7 +2391,7 @@ APPFUNC(cmdMassInd) {
 	GameObject      *_containerObject = nullptr;
 
 	if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			const   int bufSize     = 40;
 			int     curWeight;
 			uint16  baseWeight;
@@ -2417,7 +2417,7 @@ APPFUNC(cmdMassInd) {
 				g_vm->_mouseInfo->setText(buf);
 			} else
 				g_vm->_mouseInfo->setText(UNK_WEIGHT_HINT);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -2429,7 +2429,7 @@ APPFUNC(cmdBulkInd) {
 
 
 	if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::enter) {
+		if (ev.value == GfxCompImage::kEnter) {
 			const   int bufSize     = 40;
 			uint16  baseBulk    = 100;
 			char    buf[bufSize];
@@ -2455,7 +2455,7 @@ APPFUNC(cmdBulkInd) {
 				g_vm->_mouseInfo->setText(buf);
 			} else
 				g_vm->_mouseInfo->setText(UNK_BULK_HINT);
-		} else if (ev.value == GfxCompImage::leave) {
+		} else if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		}
 	}
@@ -2463,7 +2463,7 @@ APPFUNC(cmdBulkInd) {
 
 APPFUNC(cmdManaInd) {
 	if (ev.eventType == gEventMouseMove) {
-		if (ev.value != GfxCompImage::leave) {
+		if (ev.value != GfxCompImage::kLeave) {
 			const   int BUF_SIZE = 64;
 			char    textBuffer[BUF_SIZE];
 			int     manaType = -1;
diff --git a/engines/saga2/objects.cpp b/engines/saga2/objects.cpp
index 8402c136cc7..cdfae622b10 100644
--- a/engines/saga2/objects.cpp
+++ b/engines/saga2/objects.cpp
@@ -4386,7 +4386,7 @@ APPFUNC(cmdBrain) {
 			}
 		}
 	} else if (ev.eventType == gEventMouseMove) {
-		if (ev.value == GfxCompImage::leave) {
+		if (ev.value == GfxCompImage::kLeave) {
 			g_vm->_mouseInfo->setText(nullptr);
 		} else { //if (ev.value == gCompImage::enter)
 			// set the text in the cursor


Commit: c97c7d7e0bd3fa5d501df4a26857b190be4aa17c
    https://github.com/scummvm/scummvm/commit/c97c7d7e0bd3fa5d501df4a26857b190be4aa17c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T13:58:18+02:00

Commit Message:
SAGA2: Rename enums in code.h

Changed paths:
    engines/saga2/code.h
    engines/saga2/interp.cpp


diff --git a/engines/saga2/code.h b/engines/saga2/code.h
index 2dd50a3df46..46e80ac21f9 100644
--- a/engines/saga2/code.h
+++ b/engines/saga2/code.h
@@ -33,167 +33,167 @@ namespace Saga2 {
 // table to determine things like unary-op, binary-op, etc.
 
 enum op_types {
-	op_undefined = 0,
+	kOpUndefined = 0,
 
 	//  internal operations
 
-	op_nextblock,                           // continue execution at next block
-	op_dup,                                 // duplicate 16-bit value on stack
-	op_drop,                                // drop 16-bit value on stack
+	kOpNextblock,                           // continue execution at next block
+	kOpDup,                                 // duplicate 16-bit value on stack
+	kOpDrop,                                // drop 16-bit value on stack
 
 	//  primary values
 
-	op_zero,                                // push a zero on the stack
-	op_one,                                 // push a one on the stack
-	op_constint,                            // constant integer
-	op_constid,                             // constant id reference
-	op_strlit,                              // string literal
-	op_sym,                                 // symbol address
-	op_symref,                              // symbol contents
-	op_classref,                            // reference to "this"
-	op_deref,                               // dereference of an ID
+	kOpZero,                                // push a zero on the stack
+	kOpOne,                                 // push a one on the stack
+	kOpConstint,                            // constant integer
+	kOpConstid,                             // constant id reference
+	kOpStrlit,                              // string literal
+	kOpSym,                                 // symbol address
+	kOpSymref,                              // symbol contents
+	kOpClassref,                            // reference to "this"
+	kOpDeref,                               // dereference of an ID
 
 	//  references within this module
 
-	op_getflag,                             // read from flag bit (mode)
-	op_getbyte,                             // read from byte field (mode)
-	op_getint,                              // read from integer field (mode)
-	op_getstr,                              // read from string field (mode)
-	op_getid,                               // read from id field (mode)
+	kOpGetflag,                             // read from flag bit (mode)
+	kOpGetbyte,                             // read from byte field (mode)
+	kOpGetint,                              // read from integer field (mode)
+	kOpGetstr,                              // read from string field (mode)
+	kOpGetid,                               // read from id field (mode)
 
-	op_putflag,                             // put to flag bit (mode)
-	op_putbyte,                             // put to byte field (mode)
-	op_putint,                              // put to integer field (mode)
-	op_putstr,                              // put to string field (mode)
-	op_putid,                               // put to id field (mode)
+	kOpPutflag,                             // put to flag bit (mode)
+	kOpPutbyte,                             // put to byte field (mode)
+	kOpPutint,                              // put to integer field (mode)
+	kOpPutstr,                              // put to string field (mode)
+	kOpPutid,                               // put to id field (mode)
 
-	op_pea,                                 // push effective address onto stack
+	kOpPea,                                 // push effective address onto stack
 
 	//  'void' versions consume their arguments
 
-	op_putflag_v,                           // put to flag bit (mode)
-	op_putbyte_v,                           // put to byte field (mode)
-	op_putint_v,                            // put to integer field (mode)
-	op_putstr_v,                            // put to string field (mode)
-	op_putid_v,                             // put to id field (mode)
+	kOpPutflagV,                           // put to flag bit (mode)
+	kOpPutbyteV,                           // put to byte field (mode)
+	kOpPutintV,                            // put to integer field (mode)
+	kOpPutstrV,                            // put to string field (mode)
+	kOpPutidV,                             // put to id field (mode)
 
 	//  function call
 
-	op_call_near,                           // call function in same segment
-	op_call_far,                            // call function in other segment
-	op_ccall,                               // call C function
-	op_ccall_v,                             // call C function ()
-	op_call_member,                         // call member function
-	op_call_member_v,                       // call member function ()
+	kOpCallNear,                           // call function in same segment
+	kOpCallFar,                            // call function in other segment
+	kOpCcall,                               // call C function
+	kOpCcallV,                             // call C function ()
+	kOpCallMember,                         // call member function
+	kOpCallMemberV,                       // call member function ()
 
-	op_enter,                               // enter a function
-	op_return,                              // return from function
-	op_return_v,                            // return nothing from function
+	kOpEnter,                               // enter a function
+	kOpReturn,                              // return from function
+	kOpReturn_v,                            // return nothing from function
 
 	//  branches
 
-	op_jmp,
-	op_jmp_true_v,                          // test arg and consume
-	op_jmp_false_v,                         // test arg and consume
-	op_jmp_true,                            // test arg and don't consume
-	op_jmp_false,                           // test arg and don't consume
-	op_jmp_switch,                          // switch statement (integer)
-	op_jmp_strswitch,                       // switch statement (string)
-	op_jmp_random,                          // random jump
+	kOpJmp,
+	kOpJmpTrueV,                          // test arg and consume
+	kOpJmpFalseV,                         // test arg and consume
+	kOpJmpTrue,                            // test arg and don't consume
+	kOpJmpDalse,                           // test arg and don't consume
+	kOpJmpSwitch,                          // switch statement (integer)
+	kOpJmpStrswitch,                       // switch statement (string)
+	kOpJmpRandom,                          // random jump
 
 	//  unary operators
 
-	op_negate,
-	op_not,
-	op_compl,
+	kOpNegate,
+	kOpNot,
+	kOpCompl,
 
-	op_inc_v,                               // increment, don't push
-	op_dec_v,                               // decrement, don't push
-	op_postinc,
-	op_postdec,
+	kOpIncV,                               // increment, don't push
+	kOpDecV,                               // decrement, don't push
+	kOpPostinc,
+	kOpPostdec,
 
 	// arithmetic
 
-	op_add,
-	op_sub,
-	op_mul,
-	op_div,
-	op_mod,
+	kOpAdd,
+	kOpSub,
+	kOpMul,
+	kOpDiv,
+	kOpMod,
 
 	//  conditional
 
-	op_conditional,
-	op_comma,
+	kOpConditional,
+	kOpComma,
 
 	//  comparison
 
-	op_eq,
-	op_ne,
-	op_gt,
-	op_lt,
-	op_ge,
-	op_le,
+	kOpEq,
+	kOpNe,
+	kOpGt,
+	kOpLt,
+	kOpGe,
+	kOpLe,
 
 	//  string comparison
 
-	op_str_eq,
-	op_str_ne,
-	op_str_gt,
-	op_str_lt,
-	op_str_ge,
-	op_str_le,
+	kOpStrEq,
+	kOpStrNe,
+	kOpStrGt,
+	kOpStrLt,
+	kOpStrGe,
+	kOpStrLe,
 
 	//  shift
 
-	op_rsh,
-	op_lsh,
+	kOpRsh,
+	kOpLsh,
 
 	//  bitwise
 
-	op_and,
-	op_or,
-	op_xor,
+	kOpAnd,
+	kOpOr,
+	kOpXor,
 
 	//  logical
 
-	op_land,
-	op_lor,
-	op_lxor,
+	kOpLand,
+	kOpLor,
+	kOpLxor,
 
 	//  string functions
 
-	op_strcat,                  // string concatenation
-	op_strformat,               // string formatting
+	kOpStrcat,                  // string concatenation
+	kOpStrformat,               // string formatting
 
 	// assignment operators -- none of these are actually compiled into
 	// code (they become get/put type operations)
 
-	op_assign,
+	kOpAssign,
 	// none of these are even used currently...
-	op_asplus,
-	op_asminus,
-	op_astimes,
-	op_asdiv,
-	op_asmod,
-	op_asrshift,
-	op_aslshift,
-	op_asand,
-	op_asor,
+	kOpAsplus,
+	kOpAsminus,
+	kOpAstimes,
+	kOpAsdiv,
+	kOpAsmod,
+	kOpAsrshift,
+	kOpAslshift,
+	kOpAsand,
+	kOpAsor,
 
 	//  Special ops
 
-	op_speak,
-	op_dialog_begin,
-	op_dialog_end,
-	op_reply,
-	op_animate,
+	kOpSpeak,
+	kOpDialogBegin,
+	kOpDialogEnd,
+	kOpReply,
+	kOpAnimate,
 
 // New opcodes
 
-	op_jmp_seedrandom,                      // seeded random jump
-	op_symref_x,                            // get the export number of the symbol
+	kOpJmp_seedrandom,                      // seeded random jump
+	kOpSymrefX,                            // get the export number of the symbol
 
-	op_last         /* about 90 so far */
+	kOpLast         /* about 90 so far */
 };
 
 // addressing modes for get and put
@@ -202,37 +202,37 @@ enum addr_types {
 
 	//  Offset reference to the thread structure
 
-	addr_thread = 0,
+	skAddrThread = 0,
 
 	//  Offset reference to the stack
 
-	addr_stack,
+	skAddrStack,
 
 	//  Implicit reference to the currently executing segment
 
-	addr_near,
+	skAddrNear,
 
 	//  Implicit reference to data segment
 
-	addr_data,
+	skAddrData,
 
 	//  This addressing mode references any external segment
 	//  using a 16-bit segment number and a 16-bit segment offset
 	//  which immediately follow the instruction.
 
-	addr_far,
+	skAddrFar,
 
 	//  This addressing mode is used for segment-array addressing
 	//  it's a 16-bit segment followed by a 16-bit object number,
 	//  followed by a (byte or bit) offset within the object
 
-	addr_array,
+	skAddrArray,
 
 	//  This addressing mode uses a 16-bit segment number
 	//  and a 16-bit offset which have been put on the stack.
 
-//	addr_indirect,                           // use SEG:offset on stack
-//	addr_indirect_index,                 // use SEG:index:offset on stack
+//	skAddrIndirect,                      // use SEG:offset on stack
+//	skAddrIndirectIndex,                 // use SEG:index:offset on stack
 
 	//  This addressing mode is used for dereferencing objects.
 	//  It consists of an _embedded_ address for retrieving the
@@ -243,24 +243,24 @@ enum addr_types {
 	//  REM: We also need a "far deref" for computing the
 	//  dereferenced object's segment number.
 
-	addr_deref,
+	skAddrDeref,
 
 	//  Addressing mode used for class member functions. It
 	//  specified that the address is relative to whatever
 	//  object the 1st argument is referrring to.
 
-	addr_this                              // relative to arg 1
+	skAddrThis                              // relative to arg 1
 };
 
-#define IS_CONST(x)     ((x) >= op_constint && (x) <= op_conststr)
-#define IS_ADDRESS(x)   ((x) == op_sym)
-#define IS_UNOP(x)      ((x) >= op_negate && (x) <= op_postdec)
+#define IS_CONST(x)     ((x) >= kOpConstint && (x) <= kOpConststr)
+#define IS_ADDRESS(x)   ((x) == kOpSym)
+#define IS_UNOP(x)      ((x) >= kOpNegate && (x) <= kOpPostdec)
 
-#define IS_BINOP(x)     ((x) >= op_add && (x) <= op_strcat)
-#define IS_ASOP(x)      ((x) >= op_assign && (x) <= op_asor)
+#define IS_BINOP(x)     ((x) >= kOpAdd && (x) <= kOpStrcat)
+#define IS_ASOP(x)      ((x) >= kOpAssign && (x) <= kOpAsor)
 
-// #define IS_UNOP2(x)      ((x) == op_getarray || (x) == op_putarray)
-// #define CONST(op)        ((op) >= op_constflag && (op) <= op_conststr)
+// #define IS_UNOP2(x)      ((x) == kOpGetarray || (x) == kOpPutarray)
+// #define CONST(op)        ((op) >= kOpConstflag && (op) <= kOpConststr)
 
 //  Flags for special statements
 
@@ -311,13 +311,13 @@ typedef struct _BasicBlock {
 //  Jump types
 
 enum jump_types {
-	jump_never = 0,                         /* never jump                   */
-	jump_false,                             /* jump on expression if false  */
-	jump_true,                              /* jump on expression if true   */
-	jump_always,                            /* jump always                  */
-	jump_cjump,                             /* 'c' goto stm, jumpto is a label # */
-	jump_return,                            /* block ends with a 'return' statement */
-	jump_switch,                            /* jumps to lots of places      */
+	kJumpNever = 0,                         /* never jump                   */
+	kJumpFalse,                             /* jump on expression if false  */
+	kJumpTrue,                              /* jump on expression if true   */
+	kJumpAlways,                            /* jump always                  */
+	kJumpCjump,                             /* 'c' goto stm, jumpto is a label # */
+	kJumpReturn,                            /* block ends with a 'return' statement */
+	kJumpSwitch,                            /* jumps to lots of places      */
 };
 #endif
 /*
diff --git a/engines/saga2/interp.cpp b/engines/saga2/interp.cpp
index bc8710dec39..edbf81c9100 100644
--- a/engines/saga2/interp.cpp
+++ b/engines/saga2/interp.cpp
@@ -227,19 +227,19 @@ uint8 *byteAddress(Thread *th, uint8 **pcPtr) {
 	                *arg;
 
 	switch (*pc++) {
-	case addr_data:
+	case skAddrData:
 		IMMED_WORD(offset);
 		debugC(3, kDebugScripts, "byteAddress: data[%d] = %d", offset, dataSegment[offset]);
 		*pcPtr = pc;
 		return &dataSegment[offset];
 
-	case addr_near:
+	case skAddrNear:
 		IMMED_WORD(offset);
 		debugC(3, kDebugScripts, "byteAddress: near[%d] = %d", offset, th->_codeSeg[offset]);
 		*pcPtr = pc;
 		return th->_codeSeg + offset;
 
-	case addr_far:
+	case skAddrFar:
 		IMMED_WORD(seg);
 		IMMED_WORD(offset);
 		debugC(3, kDebugScripts, "byteAddress: far[%s:%d] = %d", seg2str(seg).c_str(), offset, *segmentAddress(seg, offset));
@@ -255,7 +255,7 @@ uint8 *byteAddress(Thread *th, uint8 **pcPtr) {
 
 		return segmentAddress(seg, offset);
 
-	case addr_array:
+	case skAddrArray:
 		IMMED_WORD(seg);
 		IMMED_WORD(offset);
 		addr = segmentArrayAddress(seg, offset);
@@ -264,19 +264,19 @@ uint8 *byteAddress(Thread *th, uint8 **pcPtr) {
 		*pcPtr = pc;
 		return addr + offset2;
 
-	case addr_stack:
+	case skAddrStack:
 		IMMED_WORD(offset);
 		debugC(3, kDebugScripts, "byteAddress: stack[%d] = %d", offset, *(th->_stackBase + th->_framePtr + (int16)offset));
 		*pcPtr = pc;
 		return th->_stackBase + th->_framePtr + (int16)offset;
 
-	case addr_thread:
+	case skAddrThread:
 		IMMED_WORD(offset);
 		debugC(3, kDebugScripts, "byteAddress: thread[%d] = %d", offset, *((uint8 *)&th->_threadArgs + offset));
 		*pcPtr = pc;
 		return (uint8 *)&th->_threadArgs + offset;
 
-	case addr_this:
+	case skAddrThis:
 		IMMED_WORD(offset);
 		arg = (uint16 *)(th->_stackBase + th->_framePtr + 8);
 		*pcPtr = pc;
@@ -287,7 +287,7 @@ uint8 *byteAddress(Thread *th, uint8 **pcPtr) {
 		debugC(3, kDebugScripts, "byteAddress: thisS[%s:%d:%d] = %d", seg2str(arg[0]).c_str(), arg[1], offset, *(segmentArrayAddress(arg[0], arg[1]) + offset));
 		return segmentArrayAddress(arg[0], arg[1]) + offset;
 
-	case addr_deref:
+	case skAddrDeref:
 
 		//  First, get the address of the reference.
 		*pcPtr = pc;
@@ -326,21 +326,21 @@ uint8 *objectAddress(
 	                *arg;
 
 	switch (*pc++) {
-	case addr_data:
+	case skAddrData:
 		IMMED_WORD(index);
 		seg = dataSegIndex;
 		addr = &dataSegment[index];
 		debugC(3, kDebugScripts, "objectAddress: data[%s:%d] = %d", seg2str(seg).c_str(), index, *addr);
 		break;
 
-	case addr_far:
+	case skAddrFar:
 		IMMED_WORD(seg);
 		IMMED_WORD(index);
 		addr = segmentAddress(seg, index);
 		debugC(3, kDebugScripts, "objectAddress: far[%s:%d] = %d", seg2str(seg).c_str(), index, *addr);
 		break;
 
-	case addr_array:
+	case skAddrArray:
 		IMMED_WORD(seg);
 		IMMED_WORD(index);
 		IMMED_WORD(offset);
@@ -348,7 +348,7 @@ uint8 *objectAddress(
 		debugC(3, kDebugScripts, "objectAddress: array[%s:%d:%d] = %d", seg2str(seg).c_str(), index, offset, *addr);
 		break;
 
-	case addr_this:
+	case skAddrThis:
 		IMMED_WORD(offset);
 		arg = (uint16 *)(th->_stackBase + th->_framePtr + 8);
 		seg = arg[0];
@@ -361,7 +361,7 @@ uint8 *objectAddress(
 			debugC(3, kDebugScripts, "objectAddress: thisS[%s:%d:%d] = %d", seg2str(seg).c_str(), index, offset, *addr);
 		break;
 
-	case addr_deref:
+	case skAddrDeref:
 
 		//  First, get the address of the reference.
 		*pcPtr = pc;
@@ -399,21 +399,21 @@ uint8 *bitAddress(Thread *th, uint8 **pcPtr, int16 *mask) {
 	                offset;
 
 	switch (*pc++) {
-	case addr_data:
+	case skAddrData:
 		IMMED_WORD(offset);
 		*pcPtr = pc;
 		*mask = (1 << (offset & 7));
 		debugC(3, kDebugScripts, "bitAddress: data[%d] = %d", offset, (dataSegment[offset >> 3] & *mask) != 0);
 		return &dataSegment[(offset >> 3)];
 
-	case addr_near:
+	case skAddrNear:
 		IMMED_WORD(offset);
 		*pcPtr = pc;
 		*mask = (1 << (offset & 7));
 		debugC(3, kDebugScripts, "bitAddress: near[%d] = %d", offset, (*(th->_codeSeg + (offset >> 3)) & *mask) != 0);
 		return th->_codeSeg + (offset >> 3);
 
-	case addr_far:
+	case skAddrFar:
 		IMMED_WORD(seg);
 		IMMED_WORD(offset);
 		*pcPtr = pc;
@@ -421,7 +421,7 @@ uint8 *bitAddress(Thread *th, uint8 **pcPtr, int16 *mask) {
 		debugC(3, kDebugScripts, "bitAddress: far[%s:%d] = %d", seg2str(seg).c_str(), offset, (*segmentAddress(seg, offset >> 3) & *mask) != 0);
 		return segmentAddress(seg, (offset >> 3));
 
-	case addr_array:
+	case skAddrArray:
 		IMMED_WORD(seg);
 		IMMED_WORD(offset);
 		addr = segmentArrayAddress(seg, offset);
@@ -431,21 +431,21 @@ uint8 *bitAddress(Thread *th, uint8 **pcPtr, int16 *mask) {
 		debugC(3, kDebugScripts, "bitAddress: array[%s:%d:%d] = %d", seg2str(seg).c_str(), offset, offset, (addr[offset >> 3] & *mask) != 0);
 		return addr + (offset >> 3);
 
-	case addr_stack:
+	case skAddrStack:
 		IMMED_WORD(offset);
 		*pcPtr = pc;
 		*mask = (1 << (offset & 7));
 		debugC(3, kDebugScripts, "bitAddress: stack[%d] = %d", offset, (*(th->_stackBase + th->_framePtr + (offset >>3)) & *mask) != 0);
 		return th->_stackBase + th->_framePtr + (offset >> 3);
 
-	case addr_thread:
+	case skAddrThread:
 		IMMED_WORD(offset);
 		*pcPtr = pc;
 		*mask = (1 << (offset & 7));
 		debugC(3, kDebugScripts, "bitAddress: thread[%d] = %d", offset, (*((uint8 *)&th->_threadArgs + (offset >> 3)) & *mask) != 0);
 		return (uint8 *)&th->_threadArgs + (offset >> 3);
 
-	case addr_this:
+	case skAddrThis:
 		error("Addressing relative to 'this' not supported just yet.\n");
 
 	}
@@ -515,9 +515,9 @@ void print_script_name(uint8 *codePtr, const char *descr = nullptr) {
 	scriptName[length] = '\0';
 
 	if (descr)
-		debugC(1, kDebugScripts, "Scripts: %d op_enter: [%s].%s ", lastExport, descr, scriptName);
+		debugC(1, kDebugScripts, "Scripts: %d kOpEnter: [%s].%s ", lastExport, descr, scriptName);
 	else
-		debugC(1, kDebugScripts, "Scripts: %d op_enter: ::%s ", lastExport, scriptName);
+		debugC(1, kDebugScripts, "Scripts: %d kOpEnter: ::%s ", lastExport, scriptName);
 }
 
 const char *objectName(int16 segNum, uint16 segOff) {
@@ -583,100 +583,100 @@ bool Thread::interpret() {
 		print_stack((int16 *)_stackBase, stack);
 
 		switch (op = *pc++) {
-		case op_dup:
+		case kOpDup:
 			--stack;
 			*stack = stack[1];              // duplicate value on stack
-			D_OP1(op_dup);
+			D_OP1(kOpDup);
 			break;
 
-		case op_drop:                           // drop word on stack
-			D_OP(op_drop);
+		case kOpDrop:                           // drop word on stack
+			D_OP(kOpDrop);
 			stack++;
 			break;
 
-		case op_zero:                           // constant integer of zero
-			D_OP(op_zero);
+		case kOpZero:                           // constant integer of zero
+			D_OP(kOpZero);
 			*--stack = 0;                       // push integer on stack
 			break;
 
-		case op_one:                            // constant integer of one
-			D_OP(op_one);
+		case kOpOne:                            // constant integer of one
+			D_OP(kOpOne);
 			*--stack = 1;                       // push integer on stack
 			break;
 
-		case op_strlit:                         // string literal (also pushes word)
-		case op_constint:                       // constant integer
+		case kOpStrlit:                         // string literal (also pushes word)
+		case kOpConstint:                       // constant integer
 			IMMED_WORD(w);                      // pick up word after opcode
 			*--stack = w;                       // push integer on stack
 
-			if (op == op_strlit)
-				D_OP1(op_strlit);
+			if (op == kOpStrlit)
+				D_OP1(kOpStrlit);
 			else
-				D_OP1(op_constint);
+				D_OP1(kOpConstint);
 			break;
 
-		case op_getflag:                        // get a flag
+		case kOpGetflag:                        // get a flag
 			addr = bitAddress(this, &pc, &w);    // get address of bit
 			*--stack = ((*addr) & w) ? 1 : 0;     // true or false if bit set
-			D_OP2(op_getflag);
+			D_OP2(kOpGetflag);
 			break;
 
-		case op_getint:                         // read from integer field (mode)
+		case kOpGetint:                         // read from integer field (mode)
 			addr = byteAddress(this, &pc);   // get address of integer
 			*--stack = *(uint16 *)addr;         // get integer from address
-			D_OP2(op_getint);
+			D_OP2(kOpGetint);
 			break;
 
-		case op_getbyte:                        // read from integer field (mode)
+		case kOpGetbyte:                        // read from integer field (mode)
 			addr = byteAddress(this, &pc);       // get address of integer
 			*--stack = *addr;                   // get byte from address
-			D_OP2(op_getbyte);
+			D_OP2(kOpGetbyte);
 			break;
 
 		//  Note that in the current implementation, "put" ops leave
 		//  the value that was stored on the stack. We mat also do a
 		//  'vput' which consumes the variable.
 
-		case op_putflag:                    // put to flag bit (mode)
+		case kOpPutflag:                    // put to flag bit (mode)
 			addr = bitAddress(this, &pc, &w);  // get address of bit
 			if (*stack) *addr |= w;         // set bit if stack non-zero
 			else *addr &= ~w;               // else clear it
-			D_OP3(op_putflag);
+			D_OP3(kOpPutflag);
 			break;
 
-		case op_putflag_v:                  // put to flag bit (mode)
+		case kOpPutflagV:                  // put to flag bit (mode)
 			addr = bitAddress(this, &pc, &w);  // get address of bit
 			if (*stack++) *addr |= w;       // set bit if stack non-zero
 			else *addr &= ~w;               // else clear it
-			D_OP3(op_putflag_v);
+			D_OP3(kOpPutflagV);
 			break;
 
-		case op_putint:                     // put to integer field (mode)
+		case kOpPutint:                     // put to integer field (mode)
 			addr = byteAddress(this, &pc);   // get address of integer
 			*(uint16 *)addr = *stack;       // put integer to address
-			D_OP3(op_putint);
+			D_OP3(kOpPutint);
 			break;
 
-		case op_putint_v:                   // put to integer field (mode)
+		case kOpPutintV:                   // put to integer field (mode)
 			addr = byteAddress(this, &pc);   // get address of integer
 			*(uint16 *)addr = *stack++;     // put integer to address
-			D_OP3(op_putint_v);
+			D_OP3(kOpPutintV);
 			break;
 
-		case op_putbyte:                    // put to byte field (mode)
+		case kOpPutbyte:                    // put to byte field (mode)
 			addr = byteAddress(this, &pc);   // get address of integer
 			*addr = *stack;                 // put integer to address
-			D_OP3(op_putbyte);
+			D_OP3(kOpPutbyte);
 			break;
 
-		case op_putbyte_v:                  // put to byte field (mode)
+		case kOpPutbyteV:                  // put to byte field (mode)
 			addr = byteAddress(this, &pc);   // get address of integer
 			*addr = *stack++;               // put integer to address
-			D_OP3(op_putbyte_v);
+			D_OP3(kOpPutbyteV);
 			break;
 
-		case op_enter:
-			D_OP(op_enter);
+		case kOpEnter:
+			D_OP(kOpEnter);
 			print_script_name(pc - 1);
 			*--stack = _framePtr;            // save old frame ptr on stack
 			_framePtr = (uint8 *)stack - _stackBase;  // new frame pointer
@@ -686,13 +686,13 @@ bool Thread::interpret() {
 
 		//  function calls
 
-		case op_return:                     // return with value
-			D_OP(op_return);
+		case kOpReturn:                     // return with value
+			D_OP(kOpReturn);
 			_returnVal = *stack++;
 			// fall through
 
-		case op_return_v:                   // return with void
-			D_OP(op_return_v);
+		case kOpReturn_v:                   // return with void
+			D_OP(kOpReturn_v);
 			stack = (int16 *)(_stackBase + _framePtr);    // pop autos
 			_framePtr = *stack++;        // restore frame pointer
 
@@ -713,13 +713,13 @@ bool Thread::interpret() {
 				n = *stack++;               // get argument count from call
 				stack += n;                 // pop that many args
 
-				if (op == op_return)        // if not void
+				if (op == kOpReturn)        // if not void
 					*--stack = _returnVal;// push return value
 			}
 			break;
 
-		case op_call_near:                  // call function in same seg
-			D_OP(op_call_near);
+		case kOpCallNear:                  // call function in same seg
+			D_OP(kOpCallNear);
 
 			n = *pc++;                      // get argument count
 
@@ -738,8 +738,8 @@ bool Thread::interpret() {
 			print_script_name(pc);
 			break;
 
-		case op_call_far:                   // call function in other seg
-			D_OP(op_call_far);
+		case kOpCallFar:                   // call function in other seg
+			D_OP(kOpCallFar);
 
 			n = *pc++;                      // get argument count
 
@@ -761,10 +761,10 @@ bool Thread::interpret() {
 			print_script_name(pc);
 			break;
 
-		case op_ccall:                      // call C function
-		case op_ccall_v:                    // call C function
-			if (op == op_ccall)
-				D_OP(op_ccall);
+		case kOpCcall:                      // call C function
+		case kOpCcallV:                    // call C function
+			if (op == kOpCcall)
+				D_OP(kOpCcall);
 			else
 				D_OP(op_call_v);
 
@@ -779,7 +779,7 @@ bool Thread::interpret() {
 
 			stack += n;                     // pop args of of the stack
 
-			if (op == op_ccall) {           // push the return value
+			if (op == kOpCcall) {           // push the return value
 				*--stack = _returnVal;       // onto the stack
 				_flags |= expectResult;      // script expecting result
 			} else _flags &= ~expectResult;  // script not expecting result
@@ -790,12 +790,12 @@ bool Thread::interpret() {
 
 			break;
 
-		case op_call_member:                // call member function
-		case op_call_member_v:              // call member function ()
-			if (op == op_call_member)
-				D_OP(op_call_member);
+		case kOpCallMember:                // call member function
+		case kOpCallMemberV:              // call member function ()
+			if (op == kOpCallMember)
+				D_OP(kOpCallMember);
 			else
-				D_OP(op_call_member_v);
+				D_OP(kOpCallMemberV);
 
 			n = *pc++;                      // get argument count
 			w = *pc++;                      // index of member function
@@ -883,7 +883,7 @@ bool Thread::interpret() {
 
 					//  Push the return value onto the stack if it's
 					//  not a 'void' call.
-					if (op == op_call_member) {
+					if (op == kOpCallMember) {
 						*--stack = _returnVal;   // onto the stack
 						_flags |= expectResult;  // script expecting result
 					} else _flags &= ~expectResult; // script not expecting result
@@ -897,28 +897,28 @@ bool Thread::interpret() {
 
 			//  REM: Call the member function
 
-			if (op == op_call_member)       // push the return value
+			if (op == kOpCallMember)       // push the return value
 				*--stack = 0;               // onto the stack
 
 			break;
 
-		case op_jmp_true_v:
-			D_OP(op_jmp_true_v);
+		case kOpJmpTrueV:
+			D_OP(kOpJmpTrueV);
 			IMMED_WORD(w);               // pick up word after address
 			if (*stack++ != 0) {
 				BRANCH(w);    // if stack is non-zero, jump
 			}
 			break;
 
-		case op_jmp_false_v:
-			D_OP(op_jmp_false_v);
+		case kOpJmpFalseV:
+			D_OP(kOpJmpFalseV);
 			IMMED_WORD(w);               // pick up word after address
 			if (*stack++ == 0) {
 				BRANCH(w);    // if stack is zero, jump
 			}
 			break;
 
-		case op_jmp_true:
+		case kOpJmpTrue:
 			D_OP(op_true);
 			IMMED_WORD(w);               // pick up word after address
 			if (*stack != 0) {
@@ -926,7 +926,7 @@ bool Thread::interpret() {
 			}
 			break;
 
-		case op_jmp_false:
+		case kOpJmpDalse:
 			D_OP(op_false);
 			IMMED_WORD(w);               // pick up word after address
 			if (*stack == 0) {
@@ -934,14 +934,14 @@ bool Thread::interpret() {
 			}
 			break;
 
-		case op_jmp:
-			D_OP(op_jmp);
+		case kOpJmp:
+			D_OP(kOpJmp);
 			IMMED_WORD(w);               // pick up word after address
 			BRANCH(w);                   // jump relative to module
 			break;
 
-		case op_jmp_switch:
-			D_OP(op_jmp_switch);
+		case kOpJmpSwitch:
+			D_OP(kOpJmpSwitch);
 			IMMED_WORD(n);                  // n = number of cases
 			w = *stack++;                   // w = value on stack
 			{
@@ -965,14 +965,14 @@ bool Thread::interpret() {
 			}
 			break;
 
-		case op_jmp_seedrandom:             // seeded random jump
-		case op_jmp_random:                 // random jump
-			if (op == op_jmp_seedrandom)
-				D_OP(op_jmp_seedrandom);
+		case kOpJmp_seedrandom:             // seeded random jump
+		case kOpJmpRandom:                 // random jump
+			if (op == kOpJmp_seedrandom)
+				D_OP(kOpJmp_seedrandom);
 			else
 				D_OP(op_random);
 
-			if (op == op_jmp_random) {
+			if (op == kOpJmpRandom) {
 				IMMED_WORD(n);              // n = number of cases
 				IMMED_WORD(n);              // total probability
 				n = (uint16)(g_vm->_rnd->getRandomNumber(n - 1));     // random number between 0 and n-1
@@ -1003,40 +1003,40 @@ bool Thread::interpret() {
 			}
 			break;
 
-		case op_negate:
-			D_OP(op_negate);
+		case kOpNegate:
+			D_OP(kOpNegate);
 			*stack = - *stack;
 			break;   // negate TOS
-		case op_not:
-			D_OP(op_not);
+		case kOpNot:
+			D_OP(kOpNot);
 			*stack = ! *stack;
 			break;   // not TOS
-		case op_compl:
-			D_OP(op_compl);
+		case kOpCompl:
+			D_OP(kOpCompl);
 			*stack = ~ *stack;
 			break;   // complement TOS
 
-		case op_inc_v:
-			D_OP(op_inc_v);
+		case kOpIncV:
+			D_OP(kOpIncV);
 			addr = byteAddress(this, &pc);   // get address of integer
 			*(uint16 *)addr += 1;           // bump value by one
 			break;
 
-		case op_dec_v:
-			D_OP(op_dec_v);
+		case kOpDecV:
+			D_OP(kOpDecV);
 			addr = byteAddress(this, &pc);   // get address of integer
 			*(uint16 *)addr -= 1;           // bump value by one
 			break;
 
-		case op_postinc:
-			D_OP(op_postinc);
+		case kOpPostinc:
+			D_OP(kOpPostinc);
 			addr = byteAddress(this, &pc);   // get address of integer
 			*--stack = *(uint16 *)addr;     // get integer from address
 			*(uint16 *)addr += 1;           // bump value by one
 			break;
 
-		case op_postdec:
-			D_OP(op_postdec);
+		case kOpPostdec:
+			D_OP(kOpPostdec);
 			addr = byteAddress(this, &pc);   // get address of integer
 			*--stack = *(uint16 *)addr;     // get integer from address
 			*(uint16 *)addr -= 1;           // bump value by one
@@ -1047,107 +1047,107 @@ bool Thread::interpret() {
 		//  stack is incremented before storing to skip over the
 		//  dropped variable.
 
-		case op_add:
-			D_OP(op_add);
+		case kOpAdd:
+			D_OP(kOpAdd);
 			w = (stack[1] +  stack[0]);
 			*++stack = w;
 			break;
-		case op_sub:
-			D_OP(op_sub);
+		case kOpSub:
+			D_OP(kOpSub);
 			w = (stack[1] -  stack[0]);
 			*++stack = w;
 			break;
-		case op_mul:
-			D_OP(op_mul);
+		case kOpMul:
+			D_OP(kOpMul);
 			w = (stack[1] *  stack[0]);
 			*++stack = w;
 			break;
-		case op_div:
-			D_OP(op_div);
+		case kOpDiv:
+			D_OP(kOpDiv);
 			w = (stack[1] /  stack[0]);
 			*++stack = w;
 			break;
-		case op_mod:
-			D_OP(op_mod);
+		case kOpMod:
+			D_OP(kOpMod);
 			w = (stack[1] %  stack[0]);
 			*++stack = w;
 			break;
-		case op_eq:
-			D_OP(op_eq);
+		case kOpEq:
+			D_OP(kOpEq);
 			w = (stack[1] == stack[0]);
 			*++stack = w;
 			break;
-		case op_ne:
-			D_OP(op_ne);
+		case kOpNe:
+			D_OP(kOpNe);
 			w = (stack[1] != stack[0]);
 			*++stack = w;
 			break;
-		case op_gt:
-			D_OP(op_gt);
+		case kOpGt:
+			D_OP(kOpGt);
 			w = (stack[1] >  stack[0]);
 			*++stack = w;
 			break;
-		case op_lt:
-			D_OP(op_lt);
+		case kOpLt:
+			D_OP(kOpLt);
 			w = (stack[1] <  stack[0]);
 			*++stack = w;
 			break;
-		case op_ge:
-			D_OP(op_ge);
+		case kOpGe:
+			D_OP(kOpGe);
 			w = (stack[1] >= stack[0]);
 			*++stack = w;
 			break;
-		case op_le:
-			D_OP(op_le);
+		case kOpLe:
+			D_OP(kOpLe);
 			w = (stack[1] <= stack[0]);
 			*++stack = w;
 			break;
-		case op_rsh:
-			D_OP(op_rsh);
+		case kOpRsh:
+			D_OP(kOpRsh);
 			w = (stack[1] >> stack[0]);
 			*++stack = w;
 			break;
-		case op_lsh:
-			D_OP(op_lsh);
+		case kOpLsh:
+			D_OP(kOpLsh);
 			w = (stack[1] << stack[0]);
 			*++stack = w;
 			break;
-		case op_and:
-			D_OP(op_and);
+		case kOpAnd:
+			D_OP(kOpAnd);
 			w = (stack[1] &  stack[0]);
 			*++stack = w;
 			break;
-		case op_or:
-			D_OP(op_or);
+		case kOpOr:
+			D_OP(kOpOr);
 			w = (stack[1] |  stack[0]);
 			*++stack = w;
 			break;
-		case op_xor:
-			D_OP(op_xor);
+		case kOpXor:
+			D_OP(kOpXor);
 			w = (stack[1] ^  stack[0]);
 			*++stack = w;
 			break;
-		case op_land:
-			D_OP(op_land);
+		case kOpLand:
+			D_OP(kOpLand);
 			w = (stack[1] && stack[0]);
 			*++stack = w;
 			break;
-		case op_lor:
-			D_OP(op_lor);
+		case kOpLor:
+			D_OP(kOpLor);
 			w = (stack[1] || stack[0]);
 			*++stack = w;
 			break;
-		case op_lxor:
-			D_OP(op_lxor);
+		case kOpLxor:
+			D_OP(kOpLxor);
 			w = (stack[1] && !stack[0]) || (!stack[1] && stack[0]);
 			*++stack = w;
 			break;
 
-		case op_speak:
-		case op_dialog_begin:
-		case op_dialog_end:
-		case op_reply:
-		case op_animate:
+		case kOpSpeak:
+		case kOpDialogBegin:
+		case kOpDialogEnd:
+		case kOpReply:
+		case kOpAnimate:
 			script_error("Feature not implemented.\n");
 			break;
 
@@ -1445,7 +1445,7 @@ Thread::Thread(uint16 segNum, uint16 segOff, scriptCallFrame &args) {
 	_framePtr = _stackSize;
 	_valid = true;
 
-	if ((_codeSeg)[_programCounter.offset] != op_enter) {
+	if ((_codeSeg)[_programCounter.offset] != kOpEnter) {
 		//warning("SAGA failure: Invalid script entry point (export=%d) [segment=%d:%d]\n", lastExport, segNum, segOff);
 		_valid = false;
 	}


Commit: 7cc012e311cb947b6479c26a3ae2e04a3724b9fc
    https://github.com/scummvm/scummvm/commit/7cc012e311cb947b6479c26a3ae2e04a3724b9fc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T14:06:11+02:00

Commit Message:
SAGA2: Reanme enums in contain.h

Changed paths:
    engines/saga2/actor.cpp
    engines/saga2/contain.cpp
    engines/saga2/contain.h
    engines/saga2/objproto.cpp


diff --git a/engines/saga2/actor.cpp b/engines/saga2/actor.cpp
index cb7bf5965c3..69d50db460a 100644
--- a/engines/saga2/actor.cpp
+++ b/engines/saga2/actor.cpp
@@ -168,7 +168,7 @@ bool ActorProto::closeAction(ObjectID dObj, ObjectID) {
 	assert(isActor(dObj));
 
 	GameObject      *dObjPtr = GameObject::objectAddress(dObj);
-	ContainerNode   *cn = g_vm->_cnm->find(dObj, ContainerNode::deadType);
+	ContainerNode   *cn = g_vm->_cnm->find(dObj, ContainerNode::kDeadType);
 
 	assert(dObjPtr->isOpen());
 	assert(cn);
diff --git a/engines/saga2/contain.cpp b/engines/saga2/contain.cpp
index 62d6699e46f..c9b89d802bf 100644
--- a/engines/saga2/contain.cpp
+++ b/engines/saga2/contain.cpp
@@ -375,14 +375,14 @@ void ContainerView::drawClipped(
 
 			// check to see if selecting amount for this objec
 			if (g_vm->_cnm->_objToGet == item) {
-				Point16 selectorPos = Point16(x + ((iconWidth - selectorX) >> 1),
-				                              y + ((iconHeight - selectorY) >> 1));
+				Point16 selectorPos = Point16(x + ((iconWidth - kSelectorX) >> 1),
+				                              y + ((iconHeight - kSelectorY) >> 1));
 
 				// draw the selector thingy
 				drawSelector(port, selectorPos);
 
 				// set the position of the inc center
-				g_vm->_cnm->_amountIndY = y - (selectorY >> 1) - 12;
+				g_vm->_cnm->_amountIndY = y - (kSelectorY >> 1) - 12;
 			} else drawQuantity(port, item, objProto, x, y);
 		}
 	}
@@ -1040,14 +1040,14 @@ void ReadyContainerView::drawClipped(
 
 			// check to see if selecting amount for this objec
 			if (g_vm->_cnm->_objToGet == item) {
-				Point16 selectorPos = Point16(x + ((iconWidth - selectorX) >> 1),
-				                              y + ((iconHeight - selectorY) >> 1));
+				Point16 selectorPos = Point16(x + ((iconWidth - kSelectorX) >> 1),
+				                              y + ((iconHeight - kSelectorY) >> 1));
 
 				// draw the selector thingy
 				drawSelector(port, selectorPos);
 
 				// set the position of the inc center
-				g_vm->_cnm->_amountIndY = y - (selectorY >> 1) + 28;   // extent.y;
+				g_vm->_cnm->_amountIndY = y - (kSelectorY >> 1) + 28;   // extent.y;
 			} else drawQuantity(port, item, objProto, x, y);
 		}
 	}
@@ -1117,7 +1117,7 @@ TangibleContainerWindow::TangibleContainerWindow(
 
 	const int weightIndicatorType = 2;
 	_objRect = app.iconRect;
-	_deathFlag = nd.getType() == ContainerNode::deadType;
+	_deathFlag = nd.getType() == ContainerNode::kDeadType;
 	_containerSpriteImg = nullptr;
 
 	// setup the mass and weight indicator
@@ -1268,33 +1268,33 @@ ContainerNode::ContainerNode(ContainerManager &cl, ObjectID id, int typ) {
 	//  if it is indeed a player actor; Else set to "nobody".
 	if (isActor(id)) {
 		if (actorIDToPlayerID(id, ownerID) == false)
-			ownerID = ContainerNode::nobody;
+			ownerID = ContainerNode::kNobody;
 	} else {
 		ObjectID        possessor = obj->possessor();
 
 		if (possessor == Nothing || actorIDToPlayerID(possessor, ownerID) == false)
-			ownerID = ContainerNode::nobody;
+			ownerID = ContainerNode::kNobody;
 	}
 
 	//  Compute the initial position of the container window
 	switch (typ) {
-	case readyType:
+	case kReadyType:
 		break;
 
-	case deadType:
+	case kDeadType:
 		_position = deathContainerAppearance.defaultWindowPos;
 		break;
 
-	case mentalType:
+	case kMentalType:
 		_mindType = 0; //protoClassIdeaContainer;
 		_position = mentalContainerAppearance.defaultWindowPos;
 		break;
 
-	case physicalType:
+	case kPhysicalType:
 		_position = physicalContainerAppearance.defaultWindowPos;
 		break;
 
-	case enchantType:
+	case kEnchantType:
 		_position = enchantmentContainerAppearance.defaultWindowPos;
 		break;
 	}
@@ -1374,7 +1374,7 @@ void ContainerNode::write(Common::MemoryWriteStreamDynamic *out) {
 //  Close the container window, but leave the node.
 void ContainerNode::hide() {
 	//  close the window, but don't close the object.
-	if (_type != readyType && _window != nullptr) {
+	if (_type != kReadyType && _window != nullptr) {
 		_position = _window->getExtent();     //  Save old window position
 		_window->close();
 		delete _window;
@@ -1391,29 +1391,29 @@ void ContainerNode::show() {
 	//  open the window; Object should already be "open"
 	if (_window == nullptr) {
 		switch (_type) {
-		case physicalType:
+		case kPhysicalType:
 			physicalContainerAppearance.rows    = proto->getViewableRows();
 			physicalContainerAppearance.cols    = proto->getViewableCols();
 			physicalContainerAppearance.totRows = proto->getMaxRows();
 			_window = new TangibleContainerWindow(*this, physicalContainerAppearance);
 			break;
 
-		case deadType:
+		case kDeadType:
 			deathContainerAppearance.rows       = proto->getViewableRows();
 			deathContainerAppearance.cols       = proto->getViewableCols();
 			deathContainerAppearance.totRows    = proto->getMaxRows();
 			_window = new TangibleContainerWindow(*this, deathContainerAppearance);
 			break;
 
-		case mentalType:
+		case kMentalType:
 			_window = new IntangibleContainerWindow(*this, mentalContainerAppearance);
 			break;
 
-		case enchantType:
+		case kEnchantType:
 			_window = new EnchantmentContainerWindow(*this, enchantmentContainerAppearance);
 			break;
 
-		case readyType:
+		case kReadyType:
 		default:
 			return;
 		}
@@ -1423,7 +1423,7 @@ void ContainerNode::show() {
 }
 
 void ContainerNode::update() {
-	if (_type == readyType) {
+	if (_type == kReadyType) {
 		//  Update ready containers if they are enabled
 		if (TrioCviews[_owner]->getEnabled())  TrioCviews[_owner]->invalidate();
 		if (indivCviewTop->getEnabled())        indivCviewTop->invalidate();
@@ -1499,7 +1499,7 @@ void ContainerManager::setPlayerNum(PlayerActorID playerNum) {
 	for (Common::List<ContainerNode *>::iterator it = _list.begin(); it != _list.end(); ++it) {
 		ContainerNode *n = *it;
 
-		if (n->_owner != ContainerNode::nobody && n->_owner != playerNum)
+		if (n->_owner != ContainerNode::kNobody && n->_owner != playerNum)
 			n->hide();
 	}
 
@@ -1526,7 +1526,7 @@ void ContainerManager::doDeferredActions() {
 		ContainerNode *n = *it;
 
 		//  If the object is not in a player inventory (i.e. on the ground)
-		if (n->_owner == ContainerNode::nobody) {
+		if (n->_owner == ContainerNode::kNobody) {
 			//  If the object is in a different world, or too far away
 			//  from the protagonist, then quietly close the object.
 			GameObject  *obj = GameObject::objectAddress(n->_object);
@@ -1539,16 +1539,16 @@ void ContainerManager::doDeferredActions() {
 			}
 		}
 
-		if (n->_action & ContainerNode::actionDelete) {
+		if (n->_action & ContainerNode::kActionDelete) {
 			delete n;
 			continue;
 		}
 
-		if (n->_action & ContainerNode::actionHide) {
+		if (n->_action & ContainerNode::kActionHide) {
 			n->hide();
 		} else {
-			if (n->_action & ContainerNode::actionShow) n->show();
-			if (n->_action & ContainerNode::actionUpdate) n->update();
+			if (n->_action & ContainerNode::kActionShow) n->show();
+			if (n->_action & ContainerNode::kActionUpdate) n->update();
 		}
 
 		n->_action = 0;
@@ -1563,7 +1563,7 @@ void ContainerManager::setUpdate(ObjectID id) {
 
 		if (n->_object == id)
 			n->update();
-		else if (n->_type == ContainerNode::mentalType    //  Special case for mind containers
+		else if (n->_type == ContainerNode::kMentalType    //  Special case for mind containers
 		         &&  n->_object == GameObject::objectAddress(id)->IDParent())
 			n->update();
 	}
@@ -1581,30 +1581,30 @@ ContainerNode *CreateContainerNode(ObjectID id, bool open, int16) {
 
 	if (isActor(id)) {
 		if (actorIDToPlayerID(id, owner) == false)
-			owner = ContainerNode::nobody;
+			owner = ContainerNode::kNobody;
 
 		if (((Actor *)obj)->isDead()) {
 			//  Open dead container for dead actor
-			if (!(cn = g_vm->_cnm->find(owner, ContainerNode::deadType)))
-				cn = new ContainerNode(*g_vm->_cnm, id, ContainerNode::deadType);
-		} else if (owner != ContainerNode::nobody) {
+			if (!(cn = g_vm->_cnm->find(owner, ContainerNode::kDeadType)))
+				cn = new ContainerNode(*g_vm->_cnm, id, ContainerNode::kDeadType);
+		} else if (owner != ContainerNode::kNobody) {
 			return OpenMindContainer(owner, open, /*mType*/ openMindType);
 		} else {
 			error("Attempt to open non-dead actor as a container");
 		}
 	} else {
 		if (actorIDToPlayerID(obj->possessor(), owner) == false)
-			owner = ContainerNode::nobody;
+			owner = ContainerNode::kNobody;
 
-		if (!(cn = g_vm->_cnm->find(id, ContainerNode::physicalType)))
-			cn = new ContainerNode(*g_vm->_cnm, id, ContainerNode::physicalType);
+		if (!(cn = g_vm->_cnm->find(id, ContainerNode::kPhysicalType)))
+			cn = new ContainerNode(*g_vm->_cnm, id, ContainerNode::kPhysicalType);
 	}
 
 	//  If node was successfull created, and we wanted it open, and the owner
 	//  is the center actor or no-actor then make the container window visible.
 	if (cn != nullptr
 	        &&  open
-	        && (owner == getCenterActorID() || owner == ContainerNode::nobody)) {
+	        && (owner == getCenterActorID() || owner == ContainerNode::kNobody)) {
 		cn->show();
 	}
 
@@ -1614,15 +1614,15 @@ ContainerNode *CreateContainerNode(ObjectID id, bool open, int16) {
 ContainerNode *CreateReadyContainerNode(PlayerActorID player) {
 	return new ContainerNode(*g_vm->_cnm,
 	                            getPlayerActorAddress(player)->getActorID(),
-	                            ContainerNode::readyType);
+	                            ContainerNode::kReadyType);
 }
 
 ContainerNode *OpenMindContainer(PlayerActorID player, int16 open, int16 type) {
 	ContainerNode   *cn;
 	ObjectID        id = getPlayerActorAddress(player)->getActorID();
 
-	if (!(cn = g_vm->_cnm->find(id, ContainerNode::mentalType))) {
-		cn = new ContainerNode(*g_vm->_cnm, id, ContainerNode::mentalType);
+	if (!(cn = g_vm->_cnm->find(id, ContainerNode::kMentalType))) {
+		cn = new ContainerNode(*g_vm->_cnm, id, ContainerNode::kMentalType);
 		cn->_mindType = type;
 
 		//  If node was successfull created, and we wanted it open, and the owner
@@ -1674,8 +1674,8 @@ void initContainerNodes() {
 	Common::List<ContainerNode *>::iterator it;
 
 	for (it = g_vm->_cnm->_list.begin(); it != g_vm->_cnm->_list.end(); ++it) {
-		if ((*it)->getType() != ContainerNode::readyType) {
-			error("initContainerNodes: ContainerNode type not readyType (%d != %d)", (*it)->getType(), ContainerNode::readyType);
+		if ((*it)->getType() != ContainerNode::kReadyType) {
+			error("initContainerNodes: ContainerNode type not readyType (%d != %d)", (*it)->getType(), ContainerNode::kReadyType);
 		}
 	}
 }
@@ -1693,7 +1693,7 @@ void saveContainerNodes(Common::OutSaveFile *outS) {
 	for (Common::List<ContainerNode *>::iterator it = g_vm->_cnm->_list.begin(); it != g_vm->_cnm->_list.end(); ++it) {
 		ContainerNode *n = *it;
 
-		if (n->getType() != ContainerNode::readyType)
+		if (n->getType() != ContainerNode::kReadyType)
 			numNodes++;
 	}
 
@@ -1708,7 +1708,7 @@ void saveContainerNodes(Common::OutSaveFile *outS) {
 	for (Common::List<ContainerNode *>::iterator it = g_vm->_cnm->_list.begin(); it != g_vm->_cnm->_list.end(); ++it) {
 		ContainerNode *n = *it;
 
-		if (n->getType() != ContainerNode::readyType) {
+		if (n->getType() != ContainerNode::kReadyType) {
 			debugC(3, kDebugSaveload, "Saving ContainerNode %d", i++);
 			n->write(out);
 		}
@@ -1751,7 +1751,7 @@ void cleanupContainerNodes() {
 	for (Common::List<ContainerNode *>::iterator it = g_vm->_cnm->_list.begin(); it != g_vm->_cnm->_list.end(); ++it) {
 		ContainerNode *n = *it;
 
-		if (n->getType() != ContainerNode::readyType)
+		if (n->getType() != ContainerNode::kReadyType)
 			deletionArray.push_back(*it);
 	}
 
@@ -1871,7 +1871,7 @@ APPFUNC(cmdCloseButtonFunc) {
 	if (ev.eventType == gEventNewValue && ev.value == 1) {
 		ContainerWindow     *win = (ContainerWindow *)ev.window;
 
-		if (win->getView()._node.getType() == ContainerNode::mentalType) {
+		if (win->getView()._node.getType() == ContainerNode::kMentalType) {
 			win->getView()._node.markForDelete();
 		} else {
 			win->containerObject()->close(getCenterActorID());
diff --git a/engines/saga2/contain.h b/engines/saga2/contain.h
index d48b0b52549..5278eba05cc 100644
--- a/engines/saga2/contain.h
+++ b/engines/saga2/contain.h
@@ -69,8 +69,8 @@ class ContainerView : public gControl {
 protected:
 
 	enum imageData {
-		selectorX = 10,
-		selectorY = 25
+		kSelectorX = 10,
+		kSelectorY = 25
 	};
 
 public:
@@ -359,22 +359,22 @@ class ContainerNode {
 
 public:
 	enum ContainerNodeOwnerType {
-		readyType   = 0,                    //  This is a player ready container
-		deadType,                           //  The "dead" container
-		mentalType,                         //  A player's mental container
-		physicalType,                       //  Physical container
-		enchantType                         //  Enchantment container
+		kReadyType   = 0,                    //  This is a player ready container
+		kDeadType,                           //  The "dead" container
+		kMentalType,                         //  A player's mental container
+		kPhysicalType,                       //  Physical container
+		kEnchantType                         //  Enchantment container
 	};
 
 	enum ContainerNodeOwners {
-		nobody = 255                        //  owner = 255 means it's on the ground
+		kNobody = 255                        //  owner = 255 means it's on the ground
 	};
 
 	enum containerAction {
-		actionUpdate    = (1 << 0),         //  Refresh this window
-		actionDelete    = (1 << 1),         //  Delete this window
-		actionHide      = (1 << 2),         //  Refresh this window
-		actionShow      = (1 << 3)          //  Refresh this window
+		kActionUpdate    = (1 << 0),         //  Refresh this window
+		kActionDelete    = (1 << 1),         //  Delete this window
+		kActionHide      = (1 << 2),         //  Refresh this window
+		kActionShow      = (1 << 3)          //  Refresh this window
 	};
 
 private:
@@ -424,18 +424,18 @@ public:
 
 	//  Set for lazy deletion
 	void markForDelete()   {
-		_action |= actionDelete;
+		_action |= kActionDelete;
 	}
 	void markForShow() {
-		_action |= actionShow;
-		_action &= ~actionHide;
+		_action |= kActionShow;
+		_action &= ~kActionHide;
 	}
 	void markForHide() {
-		_action |= actionHide;
-		_action &= ~actionShow;
+		_action |= kActionHide;
+		_action &= ~kActionShow;
 	}
 	void markForUpdate()   {
-		_action |= actionUpdate;
+		_action |= kActionUpdate;
 	}
 
 	//  Find the address of the window and/or view
diff --git a/engines/saga2/objproto.cpp b/engines/saga2/objproto.cpp
index 31a18ba544f..6dbc6225c8f 100644
--- a/engines/saga2/objproto.cpp
+++ b/engines/saga2/objproto.cpp
@@ -1264,7 +1264,7 @@ bool PhysicalContainerProto::openAction(ObjectID dObj, ObjectID) {
 
 bool PhysicalContainerProto::closeAction(ObjectID dObj, ObjectID) {
 	GameObject      *dObjPtr = GameObject::objectAddress(dObj);
-	ContainerNode   *cn = g_vm->_cnm->find(dObj, ContainerNode::physicalType);
+	ContainerNode   *cn = g_vm->_cnm->find(dObj, ContainerNode::kPhysicalType);
 
 	assert(dObjPtr->isOpen());
 	assert(cn);
@@ -2926,7 +2926,7 @@ bool IntangibleContainerProto::openAction(ObjectID dObj, ObjectID enactor) {
 }
 
 bool IntangibleContainerProto::closeAction(ObjectID dObj, ObjectID) {
-	ContainerNode *cn = g_vm->_cnm->find(dObj, ContainerNode::mentalType);
+	ContainerNode *cn = g_vm->_cnm->find(dObj, ContainerNode::kMentalType);
 
 	assert(cn);
 


Commit: 2d903d39dce4ea71457c6e0a103366c9605db8e4
    https://github.com/scummvm/scummvm/commit/2d903d39dce4ea71457c6e0a103366c9605db8e4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T14:09:09+02:00

Commit Message:
SAGA2: Rename enums in display.h

Changed paths:
    engines/saga2/display.cpp
    engines/saga2/display.h
    engines/saga2/tromode.cpp


diff --git a/engines/saga2/display.cpp b/engines/saga2/display.cpp
index 806b1a3001e..13d60b2c8d0 100644
--- a/engines/saga2/display.cpp
+++ b/engines/saga2/display.cpp
@@ -48,7 +48,7 @@ bool                        paletteMayHaveChanged = false;
    Locals
  * ===================================================================== */
 
-static uint32 displayStatus = GraphicsInit;
+static uint32 displayStatus = kDisGraphicsInit;
 static bool paletteSuspendFlag = false;
 
 
@@ -68,7 +68,7 @@ static void switchOff();
 
 void endGame() {
 	blackOut();
-	displayDisable(GameEnded);
+	displayDisable(kDisGameEnded);
 	g_vm->_gameRunning = false;
 }
 
@@ -165,14 +165,14 @@ bool displayOkay() {
 // Main on/off swiotch for display
 
 void mainEnable() {
-	displayEnable(GameNotInitialized);
+	displayEnable(kDisGameNotInitialized);
 }
 
 // ------------------------------------------------------------------------
 // This is a check to see if blitting is enabled
 
 void mainDisable() {
-	displayDisable(GameNotInitialized);
+	displayDisable(kDisGameNotInitialized);
 }
 
 // ------------------------------------------------------------------------
diff --git a/engines/saga2/display.h b/engines/saga2/display.h
index 6f419ca7414..e71e4ddfe2d 100644
--- a/engines/saga2/display.h
+++ b/engines/saga2/display.h
@@ -33,11 +33,11 @@ namespace Saga2 {
  * ===================================================================== */
 
 enum DisplayDisabledBecause {
-	GameNotInitialized      = 1 << 0,
-	PlayingVideo            = 1 << 1,
-	GraphicsInit            = 1 << 2,
-	GameSuspended           = 1 << 3,
-	GameEnded               = 1 << 4
+	kDisGameNotInitialized      = 1 << 0,
+	kDisPlayingVideo            = 1 << 1,
+	kDisGraphicsInit            = 1 << 2,
+	kDisGameSuspended           = 1 << 3,
+	kDisGameEnded               = 1 << 4
 };
 
 /* ===================================================================== *
diff --git a/engines/saga2/tromode.cpp b/engines/saga2/tromode.cpp
index 3aa1d0379d1..5be13f41ec5 100644
--- a/engines/saga2/tromode.cpp
+++ b/engines/saga2/tromode.cpp
@@ -149,7 +149,7 @@ static void TroModeSetup() {
 	g_vm->_pointer->hide();
 	g_vm->_pal->quickSavePalette();
 	blackOut();
-	displayDisable(PlayingVideo);
+	displayDisable(kDisPlayingVideo);
 	pushVidState();
 	resetInputDevices();
 	abortFlag = false;
@@ -161,7 +161,7 @@ static void TroModeSetup() {
 static void TroModeCleanup() {
 	g_vm->endVideo();
 	popVidState();
-	displayEnable(PlayingVideo);
+	displayEnable(kDisPlayingVideo);
 	blackOut();
 	g_vm->_pal->quickRestorePalette();
 	resumeAudio();


Commit: 32b75a6524cf2a34e78c8822864a9df66504c810
    https://github.com/scummvm/scummvm/commit/32b75a6524cf2a34e78c8822864a9df66504c810
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T14:17:57+02:00

Commit Message:
SAGA2: Rename enums in dispnode.h and document.h

Changed paths:
    engines/saga2/dispnode.cpp
    engines/saga2/dispnode.h
    engines/saga2/document.cpp
    engines/saga2/document.h


diff --git a/engines/saga2/dispnode.cpp b/engines/saga2/dispnode.cpp
index 30a827cb748..5520b5233a0 100644
--- a/engines/saga2/dispnode.cpp
+++ b/engines/saga2/dispnode.cpp
@@ -112,7 +112,7 @@ void  DisplayNodeList::init(uint16 s) {
 		_displayList[i]._efx = nullptr;
 		_displayList[i]._nextDisplayed = nullptr;
 		_displayList[i]._object = nullptr;
-		_displayList[i]._type = nodeTypeObject;
+		_displayList[i]._type = kNodeTypeObject;
 	}
 }
 //-----------------------------------------------------------------------
@@ -123,7 +123,7 @@ DisplayNode::DisplayNode() {
 	_sortDepth = 0;
 	_object = nullptr;
 	_flags = 0;                  // various flags
-	_type = nodeTypeObject;
+	_type = kNodeTypeObject;
 	_efx = nullptr;
 }
 
@@ -172,7 +172,7 @@ void DisplayNodeList::draw() {
 	}
 
 	for (dn = DisplayNodeList::_head; dn; dn = dn->_nextDisplayed) {
-		if (dn->_type == nodeTypeEffect)
+		if (dn->_type == kNodeTypeEffect)
 			dn->drawEffect();
 		else
 			dn->drawObject();
@@ -291,13 +291,13 @@ void DisplayNodeList::buildObjects(bool fromScratch) {
 		dn->_nextDisplayed = nullptr;
 		dn->_object = ob;
 
-		dn->_type = nodeTypeObject;
+		dn->_type = kNodeTypeObject;
 
 		dn->_flags = 0;
 		if (centerActorIndicatorEnabled
 		        &&  isActor(dn->_object)
 		        && ((Actor *)dn->_object) == centerActor)
-			dn->_flags |= DisplayNode::displayIndicator;
+			dn->_flags |= DisplayNode::kDisplayIndicator;
 
 		//  Various test data
 //		dn->spriteFrame = 0;
@@ -789,7 +789,7 @@ void DisplayNode::drawObject() {
 	_hitBox.width = bodySprite->size.x;
 	_hitBox.height = bodySprite->size.y;
 
-	if (_flags & displayIndicator) {
+	if (_flags & kDisplayIndicator) {
 		Point16     indicatorCoords;
 		gPixelMap   &indicator = *mouseCursors[kMouseCenterActorIndicatorImage];
 
@@ -814,7 +814,7 @@ ObjectID pickObject(const StaticPoint32 &mouse, StaticTilePoint &objPos) {
 		error("Object sprites have been dumped!");
 
 	for (dn = DisplayNodeList::_head; dn; dn = dn->_nextDisplayed) {
-		if (dn->_type == nodeTypeObject) {
+		if (dn->_type == kNodeTypeObject) {
 			GameObject  *obj = dn->_object;
 
 			if (obj->parent() == currentWorld && dn->_hitBox.ptInside(mouse.x, mouse.y)) {
@@ -907,7 +907,7 @@ void DisplayNodeList::buildEffects(bool) {
 			if (_displayList[i]._efx->isHidden() || _displayList[i]._efx->isDead())
 				continue;
 			// make sure it knows it's not a real object
-			_displayList[i]._type = nodeTypeEffect;
+			_displayList[i]._type = kNodeTypeEffect;
 
 			_displayList[i]._sortDepth = _displayList[i]._efx->_screenCoords.y + _displayList[i]._efx->_current.z / 2;
 			if (dn) {
diff --git a/engines/saga2/dispnode.h b/engines/saga2/dispnode.h
index 6901ae213db..dceb0d1174b 100644
--- a/engines/saga2/dispnode.h
+++ b/engines/saga2/dispnode.h
@@ -38,8 +38,8 @@ struct StaticTilePoint;
 class Effectron;
 
 enum nodeType {
-	nodeTypeObject = 0,
-	nodeTypeEffect
+	kNodeTypeObject = 0,
+	kNodeTypeEffect
 };
 
 
@@ -58,7 +58,7 @@ private:
 	uint8                   _flags;                  // various flags
 
 	enum {
-		displayIndicator = (1 << 0)
+		kDisplayIndicator = (1 << 0)
 	};
 
 public:
diff --git a/engines/saga2/document.cpp b/engines/saga2/document.cpp
index c75d28a2924..212b32493b2 100644
--- a/engines/saga2/document.cpp
+++ b/engines/saga2/document.cpp
@@ -69,7 +69,7 @@ static uint8 scrollTextColors[] = { 65, 65, 65, 65, 65, 65, 65, 66, 66, 67, 67,
 CDocumentAppearance scrollAppearance = {
 	{202, 54, 236, 317},
 	1,
-	pageOrientVertical,
+	kPageOrientVertical,
 	scrollTextColors,
 	{ {50, 64, 131, 169}, {0, 0, 0, 0} },
 	{184, 206,  44,  42},
@@ -95,7 +95,7 @@ static uint8 bookTextColors[] = { 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65
 CDocumentAppearance bookAppearance = {
 	{123, 76, 394, 252},
 	2,
-	pageOrientHorizontal,
+	kPageOrientHorizontal,
 	bookTextColors,
 	{ {40, 26, 135, 205}, {218, 26, 135, 205} },
 	{231, 217,  34,  27},
@@ -117,7 +117,7 @@ static StaticWindow parchDecorations[] = {
 CDocumentAppearance parchAppearance = {
 	{202, 54, 208, 256},
 	1,
-	pageOrientVertical,
+	kPageOrientVertical,
 	bookTextColors,
 	{ {27, 18, 149, 212}, {0, 0, 0, 0} },
 	{164, 229,  20,  20},
@@ -152,7 +152,7 @@ CDocument::CDocument(CDocumentAppearance &dApp,
 	_illustrationCon = nullptr;
 
 	// set the maxium string length
-	_maxSize = maxPages * maxLines * maxChars;
+	_maxSize = kMaxPages * kMaxLines * kMaxChars;
 
 	// get the org text size
 	_textSize = clamp(0, strlen(buffer), _maxSize);
@@ -179,7 +179,7 @@ CDocument::CDocument(CDocumentAppearance &dApp,
 	_pageBreakSet    = true;
 
 	// null out the image pointer array
-	for (int16 i = 0; i < maxPages; i++) {
+	for (int16 i = 0; i < kMaxPages; i++) {
 		_images[i] = nullptr;
 	}
 
@@ -200,7 +200,7 @@ CDocument::CDocument(CDocumentAppearance &dApp,
 CDocument::~CDocument() {
 	int16   i;
 
-	for (i = 0; i < maxPages; i++) {
+	for (i = 0; i < kMaxPages; i++) {
 		if (_images[i]) {
 			free(_images[i]);
 		}
@@ -279,7 +279,7 @@ void CDocument::pointerMove(gPanelMessage &msg) {
 	Point16 pos     = msg._pickPos;
 
 	if (msg._inPanel && Rect16(0, 0, _extent.width, _extent.height).ptInside(pos)) {
-		if (_app.orientation == pageOrientVertical) {
+		if (_app.orientation == kPageOrientVertical) {
 			// find out which end of the book we're on
 			if (pos.y < _extent.height / 2)   setMouseImage(kMousePgUpImage,   -7, -7);
 			else                            setMouseImage(kMousePgDownImage, -7, -7);
@@ -306,7 +306,7 @@ bool CDocument::pointerHit(gPanelMessage &msg) {
 
 	if (msg._inPanel && Rect16(0, 0, _extent.width, _extent.height).ptInside(pos)) {
 		gEvent ev;
-		if (_app.orientation == pageOrientVertical) {
+		if (_app.orientation == kPageOrientVertical) {
 			// find out which end of the book we're on
 			if (pos.y < _extent.height / 2)   cmdDocumentUp(ev); //gotoPage( _currentPage - _app.numPages );
 			else                            cmdDocumentDn(ev); //gotoPage( _currentPage + _app.numPages );
@@ -336,7 +336,7 @@ bool CDocument::pointerHit(gPanelMessage &msg) {
 }
 
 void CDocument::gotoPage(int8 page) {
-	page = clamp(0, page, maxPages);
+	page = clamp(0, page, kMaxPages);
 
 	while (page % _app.numPages) page++;
 
@@ -407,7 +407,7 @@ bool CDocument::checkForImage(char      *string,
 		_illustrationCon = resFile->newContext(MKTAG(argv[0], argv[1], argv[2], argv[3]),
 		                                      "book internal resources");
 		// set image for next page
-		if (offPageIndex < maxPages) {
+		if (offPageIndex < kMaxPages) {
 			// if the last entry is defined as a number
 			if (argv[7] == ':') {
 				// convert the text into a number
@@ -447,7 +447,7 @@ bool CDocument::checkForImage(char      *string,
 			// set the line offset
 			_lineOffset[offPageIndex] =
 				_imageSizes[offPageIndex].y / (_textHeight + 1) +
-				textPictureOffset;
+				kTextPictureOffset;
 		} else {
 			warning("CDocument: Document overflow");
 		}
@@ -475,7 +475,7 @@ void CDocument::makePages() {
 	bool    newPage         = false;
 
 
-	while (offset >= 0 && pageIndex < maxPages) {
+	while (offset >= 0 && pageIndex < kMaxPages) {
 		while (offset >= 0 &&
 		        lineIndex < linesPerPage &&
 		        !newPage) {
@@ -585,7 +585,7 @@ void CDocument::renderText() {
 			for (; lineIndex < _numLines[pageIndex]; lineIndex++) {
 				int16   temp = _lineLen[pageIndex][lineIndex];
 
-				assert(pageIndex < maxPages);
+				assert(pageIndex < kMaxPages);
 				assert(temp < 35);
 
 				str += _lineLen[pageIndex][lineIndex];
@@ -613,7 +613,7 @@ void CDocument::renderText() {
 			}
 
 			for (; lineIndex < _numLines[pageIndex]; lineIndex++) {
-				assert(pageIndex <= maxPages);
+				assert(pageIndex <= kMaxPages);
 
 				tPort.moveTo(pageRect->x, pageRect->y + (_textHeight * lineIndex) + 1);
 				tPort.setColor(_app.textColors[lineIndex]);
diff --git a/engines/saga2/document.h b/engines/saga2/document.h
index ffbeb9cc330..393e526e886 100644
--- a/engines/saga2/document.h
+++ b/engines/saga2/document.h
@@ -45,15 +45,15 @@ const uint32    bookGroupID     = MKTAG('B', 'O', 'O', 'K');
 const int maxVisiblePages = 2;
 
 enum {
-	pageLeft = 0,
-	pageRight,
-	pageUp,
-	pageDown
+	kPageLeft = 0,
+	kPageRight,
+	kPageUp,
+	kPageDown
 };
 
 enum pageOrientation {
-	pageOrientVertical = 0,
-	pageOrientHorizontal
+	kPageOrientVertical = 0,
+	kPageOrientHorizontal
 };
 
 struct CDocumentAppearance {
@@ -78,10 +78,10 @@ class CDocument : public ModalWindow {
 
 private:
 	enum {
-		maxPages            = 32,
-		maxLines            = 32,
-		maxChars            = 32,
-		textPictureOffset   = 1
+		kMaxPages            = 32,
+		kMaxLines            = 32,
+		kMaxChars            = 32,
+		kTextPictureOffset   = 1
 	};
 
 	struct ImageHeader {
@@ -93,7 +93,7 @@ private:
 	CDocumentAppearance &_app;
 
 	// image poiner array
-	void            *_images[maxPages];
+	void            *_images[kMaxPages];
 
 	uint16          _currentPage,
 	                _lineWidth,
@@ -104,10 +104,10 @@ private:
 	gFont           *_textFont;
 	uint16          _textHeight;
 	uint16          _pages;
-	uint16          _numLines[maxPages];
-	uint16          _lineLen[maxPages][maxLines];
-	uint16          _lineOffset[maxPages];
-	Extent16        _imageSizes[maxPages];
+	uint16          _numLines[kMaxPages];
+	uint16          _lineLen[kMaxPages][kMaxLines];
+	uint16          _lineOffset[kMaxPages];
+	Extent16        _imageSizes[kMaxPages];
 	bool            _pageBreakSet;
 
 	char            *_scan;                  // for parsing book text.


Commit: 39032c37437e67ec2318c1f82f6014151c92d7f0
    https://github.com/scummvm/scummvm/commit/39032c37437e67ec2318c1f82f6014151c92d7f0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T14:35:54+02:00

Commit Message:
SAGA2: Rename enums in effects.h

Changed paths:
    engines/saga2/actor.cpp
    engines/saga2/console.cpp
    engines/saga2/contain.cpp
    engines/saga2/dispnode.cpp
    engines/saga2/effects.cpp
    engines/saga2/effects.h
    engines/saga2/enchant.cpp
    engines/saga2/intrface.cpp
    engines/saga2/magic.cpp
    engines/saga2/motion.cpp
    engines/saga2/objects.cpp
    engines/saga2/objects.h
    engines/saga2/objproto.cpp
    engines/saga2/path.cpp
    engines/saga2/player.cpp
    engines/saga2/sagafunc.cpp
    engines/saga2/sensor.cpp
    engines/saga2/sensor.h
    engines/saga2/spellio.cpp
    engines/saga2/terrain.cpp
    engines/saga2/weapons.cpp


diff --git a/engines/saga2/actor.cpp b/engines/saga2/actor.cpp
index 69d50db460a..1569f99c660 100644
--- a/engines/saga2/actor.cpp
+++ b/engines/saga2/actor.cpp
@@ -157,7 +157,7 @@ bool ActorProto::openAction(ObjectID dObj, ObjectID) {
 
 	cn = CreateContainerNode(dObj, false, openMindType);
 	cn->markForShow();                                      //  Deferred open
-	dObjPtr->_data.objectFlags |= objectOpen;         //  Set open bit;
+	dObjPtr->_data.objectFlags |= kObjectOpen;         //  Set open bit;
 	return true;
 }
 
@@ -177,7 +177,7 @@ bool ActorProto::closeAction(ObjectID dObj, ObjectID) {
 	cn->markForDelete();
 
 	//  Clear open bit
-	dObjPtr->_data.objectFlags &= ~objectOpen;
+	dObjPtr->_data.objectFlags &= ~kObjectOpen;
 	return true;
 }
 
@@ -463,7 +463,7 @@ bool ActorProto::acceptHealingAction(
 	int16       maxVitality = (a->getBaseStats())->vitality;
 	PlayerActorID   pID;
 
-	if (vitality > 0 && !a->hasEffect(actorDiseased)) {
+	if (vitality > 0 && !a->hasEffect(kActorDiseased)) {
 
 		//  If we've just lost all vitality, we're dead, else make a
 		//  morale check
@@ -1506,7 +1506,7 @@ void Actor::deleteActor() {
 	}
 
 	//  Place in limbo
-	if (!(_data.objectFlags & objectNoRecycle)) {
+	if (!(_data.objectFlags & kObjectNoRecycle)) {
 		append(ActorLimbo);
 		actorLimboCount++;
 	}
@@ -1783,9 +1783,9 @@ bool Actor::inUseRange(const TilePoint &tp, GameObject *obj) {
 
 bool Actor::isImmobile() {
 	return      isDead()
-	            ||  hasEffect(actorImmobile)
-	            ||  hasEffect(actorAsleep)
-	            ||  hasEffect(actorParalyzed);
+	            ||  hasEffect(kActorImmobile)
+	            ||  hasEffect(kActorAsleep)
+	            ||  hasEffect(kActorParalyzed);
 }
 
 //-----------------------------------------------------------------------
@@ -2443,7 +2443,7 @@ void Actor::evaluateNeeds() {
 		} else {
 			if (_disposition == kDispositionEnemy
 			        &&  _appearance != nullptr
-			        &&  !hasEffect(actorNotDefenseless)) {
+			        &&  !hasEffect(kActorNotDefenseless)) {
 				GameObject              *obj;
 				bool                    foundWeapon = false;
 				ContainerIterator       iter(this);
@@ -2467,7 +2467,7 @@ void Actor::evaluateNeeds() {
 					_flags |= kAFAfraid;
 			}
 
-			if (_flags & kAFAfraid || hasEffect(actorFear) || hasEffect(actorRepelUndead)) {
+			if (_flags & kAFAfraid || hasEffect(kActorFear) || hasEffect(kActorRepelUndead)) {
 				setGoal(kActorGoalPreserveSelf);
 			} else if (_leader != nullptr && inBandingRange()) {
 				setGoal(_leader->evaluateFollowerNeeds(this));
@@ -2743,15 +2743,15 @@ void Actor::handleDamageTaken(uint8 damage) {
 	if (offensiveObject() == this
 	        &&  !isActionAvailable(kActionSwingHigh)
 	        &&  !isActionAvailable(kActionTwoHandSwingHigh)
-	        &&  !hasEffect(actorNotDefenseless)) {
+	        &&  !hasEffect(kActorNotDefenseless)) {
 		_flags |= kAFAfraid;
 		return;
 	}
 
 	if (combatBehavior != kBehaviorHungry
 	        && (_flags & kAFTemporary)
-	        &&  !hasEffect(actorFear)
-	        &&  !hasEffect(actorRepelUndead)) {
+	        &&  !hasEffect(kActorFear)
+	        &&  !hasEffect(kActorRepelUndead)) {
 		if (_flags & kAFAfraid) {
 			//  Let's give monsters a small chance of regaining their courage
 			if ((uint16)g_vm->_rnd->getRandomNumber(0xffff) <= 0x3fff)
diff --git a/engines/saga2/console.cpp b/engines/saga2/console.cpp
index 81112d4d4f4..67c24a6714d 100644
--- a/engines/saga2/console.cpp
+++ b/engines/saga2/console.cpp
@@ -463,9 +463,9 @@ bool Console::cmdInvisibility(int argc, const char **argv) {
 		for (ObjectID id = ActorBaseID; id < ActorBaseID + kPlayerActors; ++id) {
 			Actor *p = (Actor *)GameObject::objectAddress(id);
 			if (inv)
-				p->setEffect(actorInvisible, true);
+				p->setEffect(kActorInvisible, true);
 			else
-				p->setEffect(actorInvisible, false);
+				p->setEffect(kActorInvisible, false);
 		}
 	}
 
diff --git a/engines/saga2/contain.cpp b/engines/saga2/contain.cpp
index c9b89d802bf..39ba3093db5 100644
--- a/engines/saga2/contain.cpp
+++ b/engines/saga2/contain.cpp
@@ -1533,7 +1533,7 @@ void ContainerManager::doDeferredActions() {
 			if (obj->world() != world
 			        || (obj->getWorldLocation() - tp).quickHDistance() > kMaxOpenDistance) {
 				//  Close object image and window (silently)
-				obj->setFlags(0, objectOpen);
+				obj->setFlags(0, kObjectOpen);
 				delete n;
 				continue;
 			}
diff --git a/engines/saga2/dispnode.cpp b/engines/saga2/dispnode.cpp
index 5520b5233a0..7608a54e012 100644
--- a/engines/saga2/dispnode.cpp
+++ b/engines/saga2/dispnode.cpp
@@ -520,9 +520,9 @@ void DisplayNode::drawObject() {
 				return;
 			}
 
-			if (a->hasEffect(actorInvisible)) {
+			if (a->hasEffect(kActorInvisible)) {
 				if (!isPlayerActor(a)
-				        &&  !(getCenterActor()->hasEffect(actorSeeInvis))) {
+				        &&  !(getCenterActor()->hasEffect(kActorSeeInvis))) {
 					_hitBox.width = -1;
 					_hitBox.height = -1;
 					return;
@@ -998,7 +998,7 @@ void Effectron::drawEffect() {
 	    1,
 	    drawPos,
 	    objCoords,
-	    ((obscured) &&    //objectFlags & GameObject::objectObscured ) &&
+	    ((obscured) &&    //objectFlags & GameObject::kObjectObscured ) &&
 	     0
 	     ? sprFXGhosted : sprFXTerrainMask));
 
diff --git a/engines/saga2/effects.cpp b/engines/saga2/effects.cpp
index a22a9a83a62..0ff953738de 100644
--- a/engines/saga2/effects.cpp
+++ b/engines/saga2/effects.cpp
@@ -109,17 +109,17 @@ void ProtoDamage::implement(GameObject *cst, SpellTarget *trg, int8 deltaDamage)
 
 int16 ProtoDrainage::currentLevel(Actor *a, effectDrainsTypes edt) {
 	switch (edt) {
-	case drainsManaRed:
-	case drainsManaOrange:
-	case drainsManaYellow:
-	case drainsManaGreen:
-	case drainsManaBlue:
-	case drainsManaViolet:
-		return (&a->_effectiveStats.redMana)[edt - drainsManaRed];
-
-	case drainsLifeLevel:
+	case kDrainsManaRed:
+	case kDrainsManaOrange:
+	case kDrainsManaYellow:
+	case kDrainsManaGreen:
+	case kDrainsManaBlue:
+	case kDrainsManaViolet:
+		return (&a->_effectiveStats.redMana)[edt - kDrainsManaRed];
+
+	case kDrainsLifeLevel:
 		return (a->getBaseStats())->vitality;
-	case drainsVitality:
+	case kDrainsVitality:
 		return a->_effectiveStats.vitality;
 	default:
 		return 0;
@@ -128,14 +128,14 @@ int16 ProtoDrainage::currentLevel(Actor *a, effectDrainsTypes edt) {
 
 void ProtoDrainage::drainLevel(GameObject *cst, Actor *a, effectDrainsTypes edt, int16 amt) {
 	switch (edt) {
-	case drainsManaRed:
-	case drainsManaOrange:
-	case drainsManaYellow:
-	case drainsManaGreen:
-	case drainsManaBlue:
-	case drainsManaViolet:
+	case kDrainsManaRed:
+	case kDrainsManaOrange:
+	case kDrainsManaYellow:
+	case kDrainsManaGreen:
+	case kDrainsManaBlue:
+	case kDrainsManaViolet:
 		{
-			ActorManaID aType = (ActorManaID)(edt + (manaIDRed - drainsManaRed));
+			ActorManaID aType = (ActorManaID)(edt + (manaIDRed - kDrainsManaRed));
 			(&a->_effectiveStats.redMana)[aType] =
 				clamp(
 					0,
@@ -143,14 +143,14 @@ void ProtoDrainage::drainLevel(GameObject *cst, Actor *a, effectDrainsTypes edt,
 					(&(a->getBaseStats())->redMana)[aType]);
 		}
 		break;
-	case drainsLifeLevel:
+	case kDrainsLifeLevel:
 		{
 			int16 &maxVit = (a->getBaseStats())->vitality;
 			maxVit = clamp(0, maxVit - amt, absoluteMaximumVitality);
 			a->acceptDamage(cst->thisID(), amt > 0 ? 1 : -1, kDamageOther);
 		}
 		break;
-	case drainsVitality:
+	case kDrainsVitality:
 		a->acceptDamage(cst->thisID(), amt, kDamageOther);
 		break;
 	default:
@@ -188,7 +188,7 @@ void ProtoDrainage::implement(GameObject *cst, SpellTarget *trg, int8) {
 	if (!isActor(target))
 		return;
 	a = (Actor *) target;
-	if (a->hasEffect(actorNoDrain))
+	if (a->hasEffect(kActorNoDrain))
 		return;
 
 	if (totalDamage > 0 && target->makeSavingThrow())
@@ -229,7 +229,7 @@ void ProtoEnchantment::implement(GameObject *cst, SpellTarget *trg, int8) {
 		}
 
 
-		if (((Actor *)(trg->getObject()))->hasEffect(actorNoEnchant) &&
+		if (((Actor *)(trg->getObject()))->hasEffect(kActorNoEnchant) &&
 		        isHarmful(_enchID))
 			return;
 		if (canFail() && realSavingThrow((Actor *)(trg->getObject())))
@@ -247,11 +247,11 @@ void ProtoEnchantment::implement(GameObject *cst, SpellTarget *trg, int8) {
 void ProtoTAGEffect::implement(GameObject *cst, SpellTarget *trg, int8) {
 	ActiveItem *tag = trg->getTAG();
 	assert(tag);
-	if (_affectBit == settagLocked) {
+	if (_affectBit == kSettagLocked) {
 		//if ( tag->builtInBehavior()==ActiveItem::builtInDoor )
 		if (tag->isLocked() != _onOff)
 			tag->acceptLockToggle(cst->thisID(), tag->lockType());
-	} else if (_affectBit == settagOpen) {
+	} else if (_affectBit == kSettagOpen) {
 		tag->trigger(cst->thisID(), _onOff);
 	}
 }
@@ -301,7 +301,7 @@ bool ProtoEnchantment::applicable(SpellTarget &trg) {
 	return (trg.getType() == SpellTarget::spellTargetObject ||
 	        trg.getType() == SpellTarget::spellTargetObjectPoint) &&
 	       (isActor(trg.getObject()) ||
-	        getEnchantmentSubType(_enchID) == actorInvisible);
+	        getEnchantmentSubType(_enchID) == kActorInvisible);
 }
 
 bool ProtoTAGEffect::applicable(SpellTarget &trg) {
@@ -458,7 +458,7 @@ SPECIALSPELL(Resurrect) {
 SPECIALSPELL(DispellPoison) {
 	if (isActor(trg->getObject())) {
 		Actor *a = (Actor *) trg->getObject();
-		DispelObjectEnchantment(a->thisID(), makeEnchantmentID(actorPoisoned, true));
+		DispelObjectEnchantment(a->thisID(), makeEnchantmentID(kActorPoisoned, true));
 
 	}
 }
diff --git a/engines/saga2/effects.h b/engines/saga2/effects.h
index 7dad47bdc97..e74c7808a6c 100644
--- a/engines/saga2/effects.h
+++ b/engines/saga2/effects.h
@@ -58,20 +58,20 @@ class GameObject;
 //
 
 enum effectTypes {
-	effectNone          = 0, // no functional effect
-	effectAttrib,            // (enchant) affects attributes of actors
-	effectResist,            // (enchant) Enable resistance to various things
-	effectImmune,            // (enchant) Enable immunity to various things
-	effectOthers,            // (enchant) Enable immunity to various things
-	effectNonActor,          // (enchant) change an object
-	effectPoison,            // (enchant) change an object
+	kEffectNone          = 0, // no functional effect
+	kEffectAttrib,            // (enchant) affects attributes of actors
+	kEffectResist,            // (enchant) Enable resistance to various things
+	kEffectImmune,            // (enchant) Enable immunity to various things
+	kEffectOthers,            // (enchant) Enable immunity to various things
+	kEffectNonActor,          // (enchant) change an object
+	kEffectPoison,            // (enchant) change an object
 //  Effect types greater than 8 cannot be enchantments
-	effectDamage        = 8,   // does damage of various types
-	effectDrains,            // mana drain, money drain
-	effectTAG,               // mana drain, money drain
-	effectLocation,          // mana drain, money drain
-	effectSpecial,
-	effectStrike            // weapon strike effect
+	kEffectDamage        = 8,   // does damage of various types
+	kEffectDrains,            // mana drain, money drain
+	kEffectTAG,               // mana drain, money drain
+	kEffectLocation,          // mana drain, money drain
+	kEffectSpecial,
+	kEffectStrike            // weapon strike effect
 };
 
 
@@ -82,26 +82,26 @@ enum effectTypes {
 //
 
 enum effectResistTypes {
-	resistOther     = kDamageOther,
+	kResistOther     = kDamageOther,
 	// Combat resist
-	resistImpact    = kDamageImpact,
-	resistSlash     = kDamageSlash,
-	resistProjectile = kDamageProjectile,
+	kResistImpact    = kDamageImpact,
+	kResistSlash     = kDamageSlash,
+	kResistProjectile = kDamageProjectile,
 	// Magic resist
-	resistFire      = kDamageFire,
-	resistAcid      = kDamageAcid,
-	resistHeat      = kDamageHeat,
-	resistCold      = kDamageCold,
-	resistLightning = kDamageLightning,
-	resistPoison    = kDamagePoison,
+	kResistFire      = kDamageFire,
+	kResistAcid      = kDamageAcid,
+	kResistHeat      = kDamageHeat,
+	kResistCold      = kDamageCold,
+	kResistLightning = kDamageLightning,
+	kResistPoison    = kDamagePoison,
 	// Other magic resist
-	resistMental    = kDamageMental,
-	resistToUndead  = kDamageToUndead,
-	resistDirMagic  = kDamageDirMagic,
+	kResistMental    = kDamageMental,
+	kResistToUndead  = kDamageToUndead,
+	kResistDirMagic  = kDamageDirMagic,
 	// Physiological Damage
-	resistStarve    = kDamageStarve,
+	kResistStarve    = kDamageStarve,
 	// other
-	resistEnergy    = kDamageEnergy
+	kResistEnergy    = kDamageEnergy
 };
 
 //
@@ -110,26 +110,26 @@ enum effectResistTypes {
 
 // Types of damage an effect can give immunity to
 enum effectImmuneTypes {
-	immuneOther     = resistOther,
+	kImmuneOther     = kResistOther,
 	// Combat imm
-	immuneImpact    = resistImpact,
-	immuneSlash     = resistSlash,
-	immuneProjectile = resistProjectile,
+	kImmuneImpact    = kResistImpact,
+	kImmuneSlash     = kResistSlash,
+	kImmuneProjectile = kResistProjectile,
 	// Magic immu
-	immuneFire      = resistFire,
-	immuneAcid      = resistAcid,
-	immuneHeat      = resistHeat,
-	immuneCold      = resistCold,
-	immuneLightning = resistLightning,
-	immunePoison    = resistPoison,
+	kImmuneFire      = kResistFire,
+	kImmuneAcid      = kResistAcid,
+	kImmuneHeat      = kResistHeat,
+	kImmuneCold      = kResistCold,
+	kImmuneLightning = kResistLightning,
+	kImmunePoison    = kResistPoison,
 	// Other magimune
-	immuneMental    = resistMental,
-	immuneToUndead  = resistToUndead,
-	immuneDirMagic  = resistDirMagic,
+	kImmuneMental    = kResistMental,
+	kImmuneToUndead  = kResistToUndead,
+	kImmuneDirMagic  = kResistDirMagic,
 	// PhysiologiDamage
-	immuneStarve    = resistStarve,
+	kImmuneStarve    = kResistStarve,
 	// other
-	immuneEnergy    = resistEnergy
+	kImmuneEnergy    = kResistEnergy
 };
 
 //
@@ -139,42 +139,42 @@ enum effectImmuneTypes {
 
 enum effectOthersTypes {
 	// Movement flags
-	actorNoncorporeal   = 1,    // The creature can walk through things
-	actorWaterBreathe   = 2,    // death spell
-	actorSlowFall       = 3,    // the creature is not harmed by falling (but falls none the less)
-	actorLevitate       = 4,    // flying with no height control ?
-	actorFlying         = 5,    // the creature flys
+	kActorNoncorporeal   = 1,    // The creature can walk through things
+	kActorWaterBreathe   = 2,    // death spell
+	kActorSlowFall       = 3,    // the creature is not harmed by falling (but falls none the less)
+	kActorLevitate       = 4,    // flying with no height control ?
+	kActorFlying         = 5,    // the creature flys
 	// speed flags
-	actorFastMove       = 6,    //
-	actorFastAttack     = 7,    //
-	actorSlowAttack     = 8,    // come... back... here... lit... tle... bun... ny...
+	kActorFastMove       = 6,    //
+	kActorFastAttack     = 7,    //
+	kActorSlowAttack     = 8,    // come... back... here... lit... tle... bun... ny...
 
-	actorImmobile       = 9,    // I thought I told you to leave the piano at home
+	kActorImmobile       = 9,    // I thought I told you to leave the piano at home
 	// ill effects
-	actorAsleep         = 10,   // Zzzzzzzzzzz
-	actorParalyzed      = 11,   // the creature can't move an inch
-	actorFear           = 12,   // run away! run away
-	actorDiseased       = 13,   // cannot heal
-	actorPoisoned       = 14,   // death spell
+	kActorAsleep         = 10,   // Zzzzzzzzzzz
+	kActorParalyzed      = 11,   // the creature can't move an inch
+	kActorFear           = 12,   // run away! run away
+	kActorDiseased       = 13,   // cannot heal
+	kActorPoisoned       = 14,   // death spell
 	// perception & perceivability flags
-	actorBlind          = 15,   // can't see
-	actorSeeInvis       = 16,   // can see invisible
-	actorClairvoyant    = 17,  // unknown effects
-	actorInvisible      = 18,   // is invisible
-	actorUndetectable   = 19,   // can't be seen, smelled
-	actorDetPoison      = 20,   // poison things glow green
+	kActorBlind          = 15,   // can't see
+	kActorSeeInvis       = 16,   // can see invisible
+	kActorClairvoyant    = 17,  // unknown effects
+	kActorInvisible      = 18,   // is invisible
+	kActorUndetectable   = 19,   // can't be seen, smelled
+	kActorDetPoison      = 20,   // poison things glow green
 	// flags preventing changes to other flags
-	actorNoEnchant      = 21,   // no bad enchantments
-	actorNoDrain        = 22,   // no mana / food drains
+	kActorNoEnchant      = 21,   // no bad enchantments
+	kActorNoDrain        = 22,   // no mana / food drains
 	// flags that make things run away
-	actorRepelEvil      = 23,   // death spell
-	actorRepelGood      = 24,   // death spell
-	actorRepelUndead    = 25,   // death spell
+	kActorRepelEvil      = 23,   // death spell
+	kActorRepelGood      = 24,   // death spell
+	kActorRepelUndead    = 25,   // death spell
 	// miscellaneous
-	actorNotDefenseless = 26,   // forgo defenselessness check
-	actorDisappearOnDeath = 27, // gets deleted on death and spews inventory
+	kActorNotDefenseless = 26,   // forgo defenselessness check
+	kActorDisappearOnDeath = 27, // gets deleted on death and spews inventory
 	// dead or moved flags
-	actorWaterWalk           // can walk on water (same as float ?)
+	kActorWaterWalk           // can walk on water (same as float ?)
 };
 
 //
@@ -184,15 +184,15 @@ enum effectOthersTypes {
 
 enum effectDrainsTypes {
 	// mana pools
-	drainsManaRed       = 1,
-	drainsManaOrange,
-	drainsManaYellow,
-	drainsManaGreen,
-	drainsManaBlue,
-	drainsManaViolet,
-	drainsLifeLevel,
-	drainsVitality,
-	drainsMoney
+	kDrainsManaRed       = 1,
+	kDrainsManaOrange,
+	kDrainsManaYellow,
+	kDrainsManaGreen,
+	kDrainsManaBlue,
+	kDrainsManaViolet,
+	kDrainsLifeLevel,
+	kDrainsVitality,
+	kDrainsMoney
 };
 
 
@@ -201,8 +201,8 @@ enum effectDrainsTypes {
 //
 
 enum effectTAGTypes {
-	settagLocked        = 1,
-	settagOpen          = 2
+	kSettagLocked        = 1,
+	kSettagOpen          = 2
 };
 
 
@@ -210,26 +210,26 @@ enum effectTAGTypes {
 // Location Effects - effects that apply when a Location is the target
 //
 
-enum effectLocationTypes {
-	locateDummy         = 1
+enum kEffectLocationTypes {
+	kLocateDummy         = 1
 };
 
 enum objectFlags {
-	objectOpen          = (1 << 0),     // object is in the "open" state
-	objectLocked        = (1 << 1),     // object cannot be opened
-	objectImportant     = (1 << 2),     // object must be recycled when trashed
-	objectGhosted       = (1 << 3),     // object drawn translucent
-	objectInvisible     = (1 << 4),     // object cannot be seen
-	objectObscured      = (1 << 5),     // object obscured by terrain
-	objectMoving        = (1 << 6),     // object has attached motion task
-	objectScavengable   = (1 << 7),     // object can be deleted
-	objectFloating      = (1 << 8),     // object not affected by Gravity
-	objectNoRecycle     = (1 << 9),     // object is referred to by script, don't delete
-	objectActivated     = (1 << 10),    // object is activated
-	objectAlias         = (1 << 11),    // object is not real, just a copy of another object
-	objectTriggeringTAG = (1 << 12),    // object has triggerred TAG upon which it rests
-	objectOnScreen      = (1 << 13),    // object is on display list
-	objectSightedByCenter = (1 << 14)   // there is a line of sight to center actor
+	kObjectOpen          = (1 << 0),     // object is in the "open" state
+	kObjectLocked        = (1 << 1),     // object cannot be opened
+	kObjectImportant     = (1 << 2),     // object must be recycled when trashed
+	kObjectGhosted       = (1 << 3),     // object drawn translucent
+	kObjectInvisible     = (1 << 4),     // object cannot be seen
+	kObjectObscured      = (1 << 5),     // object obscured by terrain
+	kObjectMoving        = (1 << 6),     // object has attached motion task
+	kObjectScavengable   = (1 << 7),     // object can be deleted
+	kObjectFloating      = (1 << 8),     // object not affected by Gravity
+	kObjectNoRecycle     = (1 << 9),     // object is referred to by script, don't delete
+	kObjectActivated     = (1 << 10),    // object is activated
+	kObjectAlias         = (1 << 11),    // object is not real, just a copy of another object
+	kObjectTriggeringTAG = (1 << 12),    // object has triggerred TAG upon which it rests
+	kObjectOnScreen      = (1 << 13),    // object is on display list
+	kObjectSightedByCenter = (1 << 14)   // there is a line of sight to center actor
 };
 
 
@@ -238,18 +238,18 @@ enum objectFlags {
 //
 
 enum effectSpecialTypes {
-	specialDispellHelpfulEnch = 1,   // clears helpful enchantments
-	specialDispellHarmfulEnch,       // clears harmful enchantments
-	specialKill,                     // death spell
-	specialRessurect,                // raise dead spell
-	specialTeleport,                 // Teleportation
-	specialCreateActor,              // Create an actor or wall
-	specialSagaFunc,                 // calls a saga function
-	specialCreateWWisp,              // calls a saga function
-	specialCreateFWisp,              // calls a saga function
-	specialCreateWraith,             // calls a saga function
-	specialCreateFood,               // calls a saga function
-	specialRejoin
+	kSpecialDispellHelpfulEnch = 1,   // clears helpful enchantments
+	kSpecialDispellHarmfulEnch,       // clears harmful enchantments
+	kSpecialKill,                     // death spell
+	kSpecialRessurect,                // raise dead spell
+	kSpecialTeleport,                 // Teleportation
+	kSpecialCreateActor,              // Create an actor or wall
+	kSpecialSagaFunc,                 // calls a saga function
+	kSpecialCreateWWisp,              // calls a saga function
+	kSpecialCreateFWisp,              // calls a saga function
+	kSpecialCreateWraith,             // calls a saga function
+	kSpecialCreateFood,               // calls a saga function
+	kSpecialRejoin
 };
 
 // ------------------------------------------------------------------
@@ -270,27 +270,27 @@ inline uint16 makeEnchantmentID(uint16 type, uint16 damtyp, int16 damamt) {
 
 /* skill*  are now in the spellid enum ;AS;
 inline uint16 makeEnchantmentID(effectAttribTypes atttyp, int16 damamt)
-    {   return (effectAttrib << 13) | (atttyp << 8) + (damamt+128); }
+    {   return (kEffectAttrib << 13) | (atttyp << 8) + (damamt+128); }
 */
 
 inline uint16 makeEnchantmentID(effectResistTypes restyp, bool damamt) {
-	return ((effectResist << 13) | (restyp << 8)) + (damamt + 128);
+	return ((kEffectResist << 13) | (restyp << 8)) + (damamt + 128);
 }
 
 inline uint16 makeEnchantmentID(effectImmuneTypes immtyp, bool damamt) {
-	return ((effectImmune << 13) | (immtyp << 8)) + (damamt + 128);
+	return ((kEffectImmune << 13) | (immtyp << 8)) + (damamt + 128);
 }
 
 inline uint16 makeEnchantmentID(effectOthersTypes othtyp, bool damamt) {
-	return ((effectOthers << 13) | (othtyp << 8)) + (damamt + 128);
+	return ((kEffectOthers << 13) | (othtyp << 8)) + (damamt + 128);
 }
 
 inline uint16 makeEnchantmentID(objectFlags othtyp, bool damamt) {
-	return ((effectNonActor << 13) | (othtyp << 8)) + (damamt + 128);
+	return ((kEffectNonActor << 13) | (othtyp << 8)) + (damamt + 128);
 }
 
 inline uint16 makeEnchantmentID(uint8 damamt) {
-	return ((effectPoison << 13) | (0 << 8)) + damamt;
+	return ((kEffectPoison << 13) | (0 << 8)) + damamt;
 }
 
 inline effectTypes getEnchantmentType(uint16 eID) {
@@ -312,9 +312,9 @@ inline bool isHarmful(uint16 enchID) {
 	int16 typ = getEnchantmentType(enchID);
 	int16 sub = getEnchantmentSubType(enchID);
 	int16 amt = getEnchantmentAmount(enchID);
-	if (typ == effectAttrib)  return amt < 0;
-	if (typ == effectOthers)
-		return (sub >= actorSlowAttack && sub <= actorBlind);
+	if (typ == kEffectAttrib)  return amt < 0;
+	if (typ == kEffectOthers)
+		return (sub >= kActorSlowAttack && sub <= kActorBlind);
 	return false;
 }
 
@@ -323,7 +323,7 @@ inline bool isHarmful(uint16 enchID) {
 
 inline bool isSaveable(uint16 enchID) {
 	int16 typ = getEnchantmentType(enchID);
-	return (typ == effectOthers && isHarmful(enchID));
+	return (typ == kEffectOthers && isHarmful(enchID));
 }
 
 // ------------------------------------------------------------------
@@ -506,11 +506,11 @@ public:
 // is where they'll be
 
 class ProtoLocationEffect: public ProtoEffect {
-	effectLocationTypes _affectBit;
+	kEffectLocationTypes _affectBit;
 	int16               _value;
 
 public:
-	ProtoLocationEffect(effectLocationTypes elt, int16 v) {
+	ProtoLocationEffect(kEffectLocationTypes elt, int16 v) {
 		_affectBit = elt;
 		_value = v;
 	}
diff --git a/engines/saga2/enchant.cpp b/engines/saga2/enchant.cpp
index dd0f0d2477d..0d5884dcf44 100644
--- a/engines/saga2/enchant.cpp
+++ b/engines/saga2/enchant.cpp
@@ -160,22 +160,22 @@ void addEnchantment(Actor *a, uint16 enchantmentID) {
 	int16  eAmount = getEnchantmentAmount(enchantmentID);
 
 	switch (eType) {
-	case effectAttrib:
+	case kEffectAttrib:
 		stats[eSubType] = clamp(0, stats[eSubType] + eAmount, 100);
 		break;
-	case effectResist:
+	case kEffectResist:
 		a->setResist((effectResistTypes) eSubType, eAmount);
 		break;
-	case effectImmune:
+	case kEffectImmune:
 		a->setImmune((effectImmuneTypes) eSubType, eAmount);
 		break;
-	case effectOthers:
+	case kEffectOthers:
 		a->setEffect((effectOthersTypes) eSubType, eAmount);
 		break;
-	case effectSpecial:           // damage shouldn't be an enchantment
+	case kEffectSpecial:           // damage shouldn't be an enchantment
 	// Special code needed
-	case effectDamage:           // damage shouldn't be an enchantment
-	case effectNone:
+	case kEffectDamage:           // damage shouldn't be an enchantment
+	case kEffectNone:
 		break;
 	}
 
@@ -230,12 +230,12 @@ void evalObjectEnchantments(GameObject *obj) {
 	//  If more enchantment types are added, then we'll
 	//  have to do this a bit differently...
 
-	if (FindObjectEnchantment(obj->thisID(), makeEnchantmentID(effectNonActor, objectInvisible, true)))
-		obj->setFlags((uint8) - 1, objectInvisible);
+	if (FindObjectEnchantment(obj->thisID(), makeEnchantmentID(kEffectNonActor, kObjectInvisible, true)))
+		obj->setFlags((uint8) - 1, kObjectInvisible);
 	else
-		obj->setFlags(0, objectInvisible);
-	if (FindObjectEnchantment(obj->thisID(), makeEnchantmentID(effectNonActor, objectLocked, false)))
-		obj->setFlags((uint8) - 1, objectLocked);
+		obj->setFlags(0, kObjectInvisible);
+	if (FindObjectEnchantment(obj->thisID(), makeEnchantmentID(kEffectNonActor, kObjectLocked, false)))
+		obj->setFlags((uint8) - 1, kObjectLocked);
 }
 
 //-------------------------------------------------------------------
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index 8af33329b65..3dda52c1973 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -542,13 +542,13 @@ void CPortrait::getStateString(char buf[], int8 size, uint16 brotherID) {
 
 	buf[0] = '\0';
 
-	if (a->_enchantmentFlags & (1 << actorAsleep)) {
+	if (a->_enchantmentFlags & (1 << kActorAsleep)) {
 		Common::strlcat(buf, asleepStr, size);
-	} else if (a->_enchantmentFlags & (1 << actorParalyzed)) {
+	} else if (a->_enchantmentFlags & (1 << kActorParalyzed)) {
 		Common::strlcat(buf, paralysedStr, size);
-	} else if (a->_enchantmentFlags & (1 << actorBlind)) {
+	} else if (a->_enchantmentFlags & (1 << kActorBlind)) {
 		Common::strlcat(buf, blindStr, size);
-	} else if (a->_enchantmentFlags & (1 << actorFear)) {
+	} else if (a->_enchantmentFlags & (1 << kActorFear)) {
 		Common::strlcat(buf, afraidStr, size);
 	} else if (pa->isAggressive()) {
 		Common::strlcat(buf, angryStr, size);
@@ -566,12 +566,12 @@ void CPortrait::getStateString(char buf[], int8 size, uint16 brotherID) {
 		Common::strlcat(buf, hurtStr, size);
 	}
 
-	if (a->_enchantmentFlags & (1 << actorPoisoned)) {
+	if (a->_enchantmentFlags & (1 << kActorPoisoned)) {
 		if (buf[0] != '\0')	// strlen(buf) > 0
 			Common::strlcat(buf, commaStr, size);
 
 		Common::strlcat(buf, poisonedStr, size);
-	} else if (a->_enchantmentFlags & (1 << actorDiseased)) {
+	} else if (a->_enchantmentFlags & (1 << kActorDiseased)) {
 		if (buf[0] != '\0')	// strlen(buf) > 0
 			Common::strlcat(buf, commaStr, size);
 
@@ -2708,7 +2708,7 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
 		uint8   duration = obj->getHitPoints();             // get hitpoints of enchant
 
 		switch (eType) {
-		case effectAttrib:
+		case kEffectAttrib:
 			switch (eSubType) {
 //			case kSkillIDArchery:
 //			case kSkillIDShieldcraft:
@@ -2730,7 +2730,7 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
 			}
 			break;
 
-		case effectResist:
+		case kEffectResist:
 
 			switch (eSubType) {
 			case kDamageImpact:
@@ -2769,7 +2769,7 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
 			}
 			break;
 
-		case effectImmune:
+		case kEffectImmune:
 			switch (eSubType) {
 			case kDamageImpact:
 				newIconFlags[iconIronskin] = duration;
@@ -2801,47 +2801,47 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
 			}
 			break;
 
-		case effectOthers:
+		case kEffectOthers:
 			switch (eSubType) {
-			case actorPoisoned:
-			case actorDiseased:
+			case kActorPoisoned:
+			case kActorDiseased:
 				newIconFlags[iconPoisoned] = duration;
 				break;
 
-			case actorFear:
+			case kActorFear:
 				newIconFlags[iconAfraid] = duration;
 				break;
-			case actorParalyzed:
+			case kActorParalyzed:
 				newIconFlags[iconParalysed] = duration;
 				break; // iconFrozen ??
-			case actorSlowFall:
+			case kActorSlowFall:
 				newIconFlags[iconCushionAir] = duration;
 				break;
-			case actorImmobile:
+			case kActorImmobile:
 				newIconFlags[iconConstrained] = duration;
 				break;
-			case actorSeeInvis:
+			case kActorSeeInvis:
 				newIconFlags[iconSoulSight] = duration;
 				break;
-			case actorInvisible:
+			case kActorInvisible:
 				newIconFlags[iconInvisible] = duration;
 				break;
-			case actorUndetectable:
+			case kActorUndetectable:
 				newIconFlags[iconNumbscent] = duration;
 				break;
-			case actorDetPoison:
+			case kActorDetPoison:
 				newIconFlags[iconDetectPoison] = duration;
 				break;
-			case actorNoDrain:
+			case kActorNoDrain:
 				newIconFlags[iconNetherWard] = duration;
 				break;
-			case actorWaterBreathe:
+			case kActorWaterBreathe:
 				newIconFlags[iconSeawalk] = duration;
 				break;
-			case actorRepelEvil:
+			case kActorRepelEvil:
 				newIconFlags[iconProtectEvil] = duration;
 				break;
-//			case actorRepelUndead: newIconFlags[iconProtectUndead] = duration; break;
+//			case kActorRepelUndead: newIconFlags[iconProtectUndead] = duration; break;
 //			case actorRepelGhosts: newIconFlags[iconProtectGhosts] = duration; break;
 			}
 		}
@@ -2853,38 +2853,38 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
 
 		if ((cSet & (ProtoObj::isArmor | ProtoObj::isWeapon | ProtoObj::isWearable))
 		        &&  proto->isObjectBeingUsed(obj)) {
-			if (proto->immunity & (1 << resistImpact))            newIconFlags[iconResistImpact] = 255;
-			else if (proto->resistance & (1 << resistImpact)) newIconFlags[iconResistImpact] = 255;
+			if (proto->immunity & (1 << kResistImpact))            newIconFlags[iconResistImpact] = 255;
+			else if (proto->resistance & (1 << kResistImpact)) newIconFlags[iconResistImpact] = 255;
 
-			if (proto->immunity & (1 << resistSlash))         newIconFlags[iconResistSlash] = 255;
-			else if (proto->resistance & (1 << resistSlash))  newIconFlags[iconResistSlash] = 255;
+			if (proto->immunity & (1 << kResistSlash))         newIconFlags[iconResistSlash] = 255;
+			else if (proto->resistance & (1 << kResistSlash))  newIconFlags[iconResistSlash] = 255;
 
-			if (proto->immunity & (1 << resistProjectile))        newIconFlags[iconResistProjectile] = 255;
-			else if (proto->resistance & (1 << resistProjectile)) newIconFlags[iconResistProjectile] = 255;
+			if (proto->immunity & (1 << kResistProjectile))        newIconFlags[iconResistProjectile] = 255;
+			else if (proto->resistance & (1 << kResistProjectile)) newIconFlags[iconResistProjectile] = 255;
 
-			if (proto->immunity & (1 << immuneFire))          newIconFlags[iconImmuneFire] = 255;
-			else if (proto->resistance & (1 << resistFire))   newIconFlags[iconResistFire] = 255;
+			if (proto->immunity & (1 << kImmuneFire))          newIconFlags[iconImmuneFire] = 255;
+			else if (proto->resistance & (1 << kResistFire))   newIconFlags[iconResistFire] = 255;
 
-			if (proto->immunity & (1 << immuneAcid))          newIconFlags[iconImmuneAcid] = 255;
-			else if (proto->resistance & (1 << resistAcid))   newIconFlags[iconResistAcid] = 255;
+			if (proto->immunity & (1 << kImmuneAcid))          newIconFlags[iconImmuneAcid] = 255;
+			else if (proto->resistance & (1 << kResistAcid))   newIconFlags[iconResistAcid] = 255;
 
-			if (proto->immunity & (1 << immuneHeat))          newIconFlags[iconImmuneHeat] = 255;
-			else if (proto->resistance & (1 << resistHeat))   newIconFlags[iconResistHeat] = 255;
+			if (proto->immunity & (1 << kImmuneHeat))          newIconFlags[iconImmuneHeat] = 255;
+			else if (proto->resistance & (1 << kResistHeat))   newIconFlags[iconResistHeat] = 255;
 
-			if (proto->immunity & (1 << immuneCold))          newIconFlags[iconImmuneCold] = 255;
-			else if (proto->resistance & (1 << resistCold))   newIconFlags[iconResistCold] = 255;
+			if (proto->immunity & (1 << kImmuneCold))          newIconFlags[iconImmuneCold] = 255;
+			else if (proto->resistance & (1 << kResistCold))   newIconFlags[iconResistCold] = 255;
 
-			if (proto->immunity & (1 << immuneLightning))     newIconFlags[iconImmuneLightning] = 255;
-			else if (proto->resistance & (1 << resistLightning)) newIconFlags[iconResistLightning] = 255;
+			if (proto->immunity & (1 << kImmuneLightning))     newIconFlags[iconImmuneLightning] = 255;
+			else if (proto->resistance & (1 << kResistLightning)) newIconFlags[iconResistLightning] = 255;
 
-			if (proto->immunity & (1 << immunePoison))        newIconFlags[iconImmunePoison] = 255;
-			else if (proto->resistance & (1 << resistPoison)) newIconFlags[iconResistPoison] = 255;
+			if (proto->immunity & (1 << kImmunePoison))        newIconFlags[iconImmunePoison] = 255;
+			else if (proto->resistance & (1 << kResistPoison)) newIconFlags[iconResistPoison] = 255;
 
-			if (proto->immunity & (1 << immuneMental))        newIconFlags[iconImmunePsionic] = 255;
-			else if (proto->resistance & (1 << resistMental)) newIconFlags[iconResistPsionic] = 255;
+			if (proto->immunity & (1 << kImmuneMental))        newIconFlags[iconImmunePsionic] = 255;
+			else if (proto->resistance & (1 << kResistMental)) newIconFlags[iconResistPsionic] = 255;
 
-			if (proto->immunity & (1 << resistDirMagic))      newIconFlags[iconResistDirectMagic] = 255;
-			else if (proto->resistance & (1 << resistDirMagic))newIconFlags[iconResistDirectMagic] = 255;
+			if (proto->immunity & (1 << kResistDirMagic))      newIconFlags[iconResistDirectMagic] = 255;
+			else if (proto->resistance & (1 << kResistDirMagic))newIconFlags[iconResistDirectMagic] = 255;
 		}
 	}
 
@@ -2893,41 +2893,41 @@ void gEnchantmentDisplay::setValue(PlayerActorID pID) {
 #if 0
 	enum effectOthersTypes {
 		// Movement flags
-		o   actorNoncorporeal   = 1,    // The creature can walk through things
-		x   actorWaterBreathe   = 2,    // death spell
-		x   actorSlowFall       = 3,    // the creature is not harmed by falling (but falls none the less)
-		-   actorLevitate       = 4,    // flying with no height control ?
-		-   actorFlying         = 5,    // the creature flys
+		o   kActorNoncorporeal   = 1,    // The creature can walk through things
+		x   kActorWaterBreathe   = 2,    // death spell
+		x   kActorSlowFall       = 3,    // the creature is not harmed by falling (but falls none the less)
+		-   kActorLevitate       = 4,    // flying with no height control ?
+		-   kActorFlying         = 5,    // the creature flys
 		// speed flags
-		-   actorFastMove       = 6,    //
-		-   actorFastAttack     = 7,    //
-		actorSlowAttack     = 8,    // come... back... here... lit... tle... bun... ny...
+		-   kActorFastMove       = 6,    //
+		-   kActorFastAttack     = 7,    //
+		kActorSlowAttack     = 8,    // come... back... here... lit... tle... bun... ny...
 		x   actorSlowMove       = 9,    // I thought I told you to leave the piano at home
 		// ill effects
-		-   actorAsleep         = 10,   // Zzzzzzzzzzz
-		x   actorParalyzed      = 11,   // the creature can't move an inch
-		x   actorFear           = 12,   // run away! run away
-		x   actorDiseased       = 13,   // cannot heal
-		x   actorPoisoned       = 14,   // death spell
+		-   kActorAsleep         = 10,   // Zzzzzzzzzzz
+		x   kActorParalyzed      = 11,   // the creature can't move an inch
+		x   kActorFear           = 12,   // run away! run away
+		x   kActorDiseased       = 13,   // cannot heal
+		x   kActorPoisoned       = 14,   // death spell
 		// perception & perceivability flags
-		x   actorBlind          = 15,   // can't see
-		x   actorSeeInvis       = 16,   // can see invisible
-		-   actorClairvoyant    = 17,  // unknown effects
-		x   actorInvisible      = 18,   // is invisible
-		x   actorUndetectable   = 19,   // can't be seen, smelled
-		x   actorDetPoison      = 20,   // poison things glow green
+		x   kActorBlind          = 15,   // can't see
+		x   kActorSeeInvis       = 16,   // can see invisible
+		-   kActorClairvoyant    = 17,  // unknown effects
+		x   kActorInvisible      = 18,   // is invisible
+		x   kActorUndetectable   = 19,   // can't be seen, smelled
+		x   kActorDetPoison      = 20,   // poison things glow green
 		// flags preventing changes to other flags
-		actorNoEnchant      = 21,   // no bad enchantments
-		x   actorNoDrain        = 22,   // no mana / food drains
+		kActorNoEnchant      = 21,   // no bad enchantments
+		x   kActorNoDrain        = 22,   // no mana / food drains
 		// flags that make things run away
-		x   actorRepelEvil      = 23,   // death spell
-		x   actorRepelGood      = 24,   // death spell
-		x   actorRepelUndead    = 25,   // death spell
+		x   kActorRepelEvil      = 23,   // death spell
+		x   kActorRepelGood      = 24,   // death spell
+		x   kActorRepelUndead    = 25,   // death spell
 		// dead or moved flags
 //		actorMapping        =15,    //
 //		actorLandWalk       =0 ,    // someone else had this I have no idea what it is
 //		actorFloat          =2 ,    // the creature can travel through malts shakes & sundaes
-		actorWaterWalk,          // can walk on water (same as float ?)
+		kActorWaterWalk,          // can walk on water (same as float ?)
 //		actorPanic          =13,    // creature takes off randomly
 //		actorSpotHidden     =17,    // can see hidden
 //		actorDetTraps       =22,    // traps glow green
diff --git a/engines/saga2/magic.cpp b/engines/saga2/magic.cpp
index f42ff6bc5f3..b0d995906c9 100644
--- a/engines/saga2/magic.cpp
+++ b/engines/saga2/magic.cpp
@@ -153,7 +153,7 @@ bool validTarget(GameObject *enactor, GameObject *target, ActiveItem *tag, Skill
 		if (isActor(target)) {
 			Actor *a = (Actor *) target;
 			Actor *e = (Actor *) enactor;
-			if (a->hasEffect(actorInvisible) && !e->hasEffect(actorSeeInvis))
+			if (a->hasEffect(kActorInvisible) && !e->hasEffect(kActorSeeInvis))
 				return false;
 		}
 		if (target->thisID() == enactor->thisID())
diff --git a/engines/saga2/motion.cpp b/engines/saga2/motion.cpp
index b54ce636e15..e87a19c9fdf 100644
--- a/engines/saga2/motion.cpp
+++ b/engines/saga2/motion.cpp
@@ -449,7 +449,7 @@ MotionTask *MotionTaskList::newTask(GameObject *obj) {
 			((Actor *)obj)->_moveTask = mt;
 	}
 
-	obj->_data.objectFlags |= objectMoving;
+	obj->_data.objectFlags |= kObjectMoving;
 
 	return mt;
 }
@@ -1070,11 +1070,11 @@ void MotionTask::remove(int16 returnVal) {
 	if (g_vm->_mTaskList->_nextMT != g_vm->_mTaskList->_list.end() && *(g_vm->_mTaskList->_nextMT) == this)
 		++g_vm->_mTaskList->_nextMT;
 
-	_object->_data.objectFlags &= ~objectMoving;
+	_object->_data.objectFlags &= ~kObjectMoving;
 	if (objObscured(_object))
-		_object->_data.objectFlags |= objectObscured;
+		_object->_data.objectFlags |= kObjectObscured;
 	else
-		_object->_data.objectFlags &= ~objectObscured;
+		_object->_data.objectFlags &= ~kObjectObscured;
 
 	if (isActor(_object)) {
 		Actor   *a = (Actor *)_object;
@@ -4511,7 +4511,7 @@ void MotionTask::updatePositions() {
 				} else {
 					moveTaskDone = true;
 					a->setInterruptablity(true);
-					if (!a->hasEffect(actorDisappearOnDeath)) {
+					if (!a->hasEffect(kActorDisappearOnDeath)) {
 						a->setAction(kActionDead, 0);
 						a->die();
 					} else {
@@ -4523,7 +4523,7 @@ void MotionTask::updatePositions() {
 			} else if (a->nextAnimationFrame()) {
 				moveTaskDone = true;
 				a->setInterruptablity(true);
-				if (!a->hasEffect(actorDisappearOnDeath)) {
+				if (!a->hasEffect(kActorDisappearOnDeath)) {
 					a->setAction(kActionDead, 0);
 					a->die();
 				} else {
@@ -4550,7 +4550,7 @@ bool MotionTask::freeFall(TilePoint &newPos, StandingTileInfo &sti) {
 
 	tHeight = tileSlopeHeight(newPos, _object, &sti);
 
-	if (_object->_data.objectFlags & objectFloating) return false;
+	if (_object->_data.objectFlags & kObjectFloating) return false;
 
 	_velocity.u = (newPos.u - _object->_data.location.u) * 2 / 3;
 	_velocity.v = (newPos.v - _object->_data.location.v) * 2 / 3;
diff --git a/engines/saga2/objects.cpp b/engines/saga2/objects.cpp
index cdfae622b10..876e7dd21a3 100644
--- a/engines/saga2/objects.cpp
+++ b/engines/saga2/objects.cpp
@@ -1046,9 +1046,9 @@ void GameObject::updateImage(ObjectID oldParentID) {
 
 		if (!isMoving()) {
 			if (objObscured(this)) {
-				_data.objectFlags |= objectObscured;
+				_data.objectFlags |= kObjectObscured;
 			} else {
-				_data.objectFlags &= ~objectObscured;
+				_data.objectFlags &= ~kObjectObscured;
 			}
 		}
 		int u = _data.location.u >> kSectorShift;
@@ -1062,7 +1062,7 @@ void GameObject::updateImage(ObjectID oldParentID) {
 		else
 			warning("GameObject::updateImage: Invalid Sector (%d, %d))", u, v);
 	} else {
-		_data.objectFlags &= ~objectObscured;
+		_data.objectFlags &= ~kObjectObscured;
 
 		if ((isActor(_data.parentID)
 		        &&  isPlayerActor((Actor *)parent))
@@ -1234,7 +1234,7 @@ ObjectID GameObject::makeAlias(const Location &l) {
 	if (newObjID != Nothing) {
 		GameObject  *newObject = objectAddress(newObjID);
 
-		newObject->_data.objectFlags |= objectAlias;
+		newObject->_data.objectFlags |= kObjectAlias;
 	}
 
 	return newObjID;
@@ -1336,11 +1336,11 @@ void GameObject::deleteObject() {
 
 	if (isActor(this))
 		((Actor *)this)->deleteActor();
-	else if (_data.objectFlags & objectImportant) {
+	else if (_data.objectFlags & kObjectImportant) {
 		append(ImportantLimbo);
 		_data.parentID = ImportantLimbo;
 		importantLimboCount++;
-	} else if (!(_data.objectFlags & objectNoRecycle)) {
+	} else if (!(_data.objectFlags & kObjectNoRecycle)) {
 		append(ObjectLimbo);
 		_data.parentID = ObjectLimbo;
 		objectLimboCount++;
@@ -1407,7 +1407,7 @@ void GameObject::deleteObjectRecursive() {
 //	Activate this object
 
 void GameObject::activate() {
-	if (_data.objectFlags & objectActivated)
+	if (_data.objectFlags & kObjectActivated)
 		return;
 
 	debugC(1, kDebugActors, "GameObject::activate %d (%s)", thisID(), objName());
@@ -1415,7 +1415,7 @@ void GameObject::activate() {
 	ObjectID        dObj = thisID();
 	scriptCallFrame scf;
 
-	_data.objectFlags |= objectActivated;
+	_data.objectFlags |= kObjectActivated;
 
 	scf.invokedObject   = dObj;
 	scf.enactor         = dObj;
@@ -1436,7 +1436,7 @@ void GameObject::activate() {
 //	Deactivate this object
 
 void GameObject::deactivate() {
-	if (!(_data.objectFlags & objectActivated))
+	if (!(_data.objectFlags & kObjectActivated))
 		return;
 
 	debugC(1, kDebugActors, "GameObject::deactivate %d (%s)", thisID(), objName());
@@ -1445,7 +1445,7 @@ void GameObject::deactivate() {
 	scriptCallFrame scf;
 
 	//  Clear activated flag
-	_data.objectFlags &= ~objectActivated;
+	_data.objectFlags &= ~kObjectActivated;
 
 	scf.invokedObject   = dObj;
 	scf.enactor         = dObj;
@@ -1531,7 +1531,7 @@ void GameObject::updateState() {
 	//  currently at, then raise us up a bit.
 	if (isMoving()) return;
 
-	if (_data.objectFlags & objectFloating) return;
+	if (_data.objectFlags & kObjectFloating) return;
 
 	if (tHeight > _data.location.z + kMaxStepHeight) {
 		unstickObject(this);
@@ -2254,11 +2254,11 @@ void GameObject::evalEnchantments() {
 	}
 }
 
-#define noMergeFlags    (objectImportant|\
-                         objectGhosted|\
-                         objectInvisible|\
-                         objectFloating|\
-                         objectNoRecycle)
+#define noMergeFlags    (kObjectImportant|\
+                         kObjectGhosted|\
+                         kObjectInvisible|\
+                         kObjectFloating|\
+                         kObjectNoRecycle)
 
 int32 GameObject::canStackOrMerge(GameObject *dropObj, GameObject *target) {
 	int32       cSet = dropObj->proto()->containmentSet();
@@ -4233,12 +4233,12 @@ bool lineOfSight(GameObject *obj1, GameObject *obj2, uint32 terrainMask) {
 #if 0
 	if (isActor(obj1)) {
 		Actor *a1 = (Actor *) obj1;
-		if (!a1->hasEffect(actorSeeInvis)) {
+		if (!a1->hasEffect(kActorSeeInvis)) {
 			if (!isActor(obj2) && obj2->isInvisible())
 				return false;
 			else if (isActor(obj2)) {
 				Actor *a2 = (Actor *) obj2;
-				if (a2->hasEffect(actorInvisible))
+				if (a2->hasEffect(kActorInvisible))
 					return false;
 			}
 		}
diff --git a/engines/saga2/objects.h b/engines/saga2/objects.h
index 11a1cf4cdb1..81a7024fbe8 100644
--- a/engines/saga2/objects.h
+++ b/engines/saga2/objects.h
@@ -298,7 +298,7 @@ public:
 
 	//  Determine if this object is an alias for another object
 	bool isAlias() {
-		return (_data.objectFlags & objectAlias) != 0;
+		return (_data.objectFlags & kObjectAlias) != 0;
 	}
 
 	//  check to see if item can be contained by this object
@@ -494,77 +494,77 @@ public:
 
 	//  Flag test functions
 	bool isOpen() {
-		return (int16)(_data.objectFlags & objectOpen);
+		return (int16)(_data.objectFlags & kObjectOpen);
 	}
 	bool isLocked() {
-		return (int16)(_data.objectFlags & objectLocked);
+		return (int16)(_data.objectFlags & kObjectLocked);
 	}
 	bool isImportant() {
-		return (int16)(_data.objectFlags & objectImportant);
+		return (int16)(_data.objectFlags & kObjectImportant);
 	}
 	bool isGhosted() {
-		return (_data.objectFlags & objectGhosted)
+		return (_data.objectFlags & kObjectGhosted)
 		       || (_prototype->flags & ResourceObjectPrototype::objPropGhosted);
 	}
 	bool isInvisible() {
-		return (_data.objectFlags & objectInvisible)
+		return (_data.objectFlags & kObjectInvisible)
 		       || (_prototype->flags & ResourceObjectPrototype::objPropHidden);
 	}
 	bool isMoving() {
-		return (int16)(_data.objectFlags & objectMoving);
+		return (int16)(_data.objectFlags & kObjectMoving);
 	}
 	bool isActivated() {
-		return (int16)(_data.objectFlags & objectActivated);
+		return (int16)(_data.objectFlags & kObjectActivated);
 	}
 
 	void setScavengable(bool val) {
 		if (val)
-			_data.objectFlags |= objectScavengable;
+			_data.objectFlags |= kObjectScavengable;
 		else
-			_data.objectFlags &= ~objectScavengable;
+			_data.objectFlags &= ~kObjectScavengable;
 	}
 	bool isScavengable() {
-		return (_data.objectFlags & objectScavengable) != 0;
+		return (_data.objectFlags & kObjectScavengable) != 0;
 	}
 
 	void setObscured(bool val) {
 		if (val)
-			_data.objectFlags |= objectObscured;
+			_data.objectFlags |= kObjectObscured;
 		else
-			_data.objectFlags &= ~objectObscured;
+			_data.objectFlags &= ~kObjectObscured;
 	}
 	bool isObscured() {
-		return (_data.objectFlags & objectObscured) != 0;
+		return (_data.objectFlags & kObjectObscured) != 0;
 	}
 
 	void setTriggeringTAG(bool val) {
 		if (val)
-			_data.objectFlags |= objectTriggeringTAG;
+			_data.objectFlags |= kObjectTriggeringTAG;
 		else
-			_data.objectFlags &= ~objectTriggeringTAG;
+			_data.objectFlags &= ~kObjectTriggeringTAG;
 	}
 	bool isTriggeringTAG() {
-		return (_data.objectFlags & objectTriggeringTAG) != 0;
+		return (_data.objectFlags & kObjectTriggeringTAG) != 0;
 	}
 
 	void setOnScreen(bool val) {
 		if (val)
-			_data.objectFlags |= objectOnScreen;
+			_data.objectFlags |= kObjectOnScreen;
 		else
-			_data.objectFlags &= ~objectOnScreen;
+			_data.objectFlags &= ~kObjectOnScreen;
 	}
 	bool isOnScreen() {
-		return (_data.objectFlags & objectOnScreen) != 0;
+		return (_data.objectFlags & kObjectOnScreen) != 0;
 	}
 
 	void setSightedByCenter(bool val) {
 		if (val)
-			_data.objectFlags |= objectSightedByCenter;
+			_data.objectFlags |= kObjectSightedByCenter;
 		else
-			_data.objectFlags &= ~objectSightedByCenter;
+			_data.objectFlags &= ~kObjectSightedByCenter;
 	}
 	bool isSightedByCenter() {
-		return (_data.objectFlags & objectSightedByCenter) != 0;
+		return (_data.objectFlags & kObjectSightedByCenter) != 0;
 	}
 
 	bool isMissile() {
diff --git a/engines/saga2/objproto.cpp b/engines/saga2/objproto.cpp
index 6dbc6225c8f..16b723fe587 100644
--- a/engines/saga2/objproto.cpp
+++ b/engines/saga2/objproto.cpp
@@ -1231,7 +1231,7 @@ bool PhysicalContainerProto::useAction(ObjectID dObj, ObjectID enactor) {
 	bool          result;
 	GameObject    *dObjPtr = GameObject::objectAddress(dObj);
 
-	if (dObjPtr->_data.objectFlags & objectOpen)
+	if (dObjPtr->_data.objectFlags & kObjectOpen)
 		result = close(dObj, enactor);
 	else
 		result = open(dObj, enactor);
@@ -1256,7 +1256,7 @@ bool PhysicalContainerProto::openAction(ObjectID dObj, ObjectID) {
 
 	cn = CreateContainerNode(dObj, false);
 	cn->markForShow();                                      //  Deferred open
-	dObjPtr->_data.objectFlags |= objectOpen;         //  Set open bit;
+	dObjPtr->_data.objectFlags |= kObjectOpen;         //  Set open bit;
 	g_vm->_cnm->setUpdate(dObjPtr->IDParent());
 
 	return true;
@@ -1273,7 +1273,7 @@ bool PhysicalContainerProto::closeAction(ObjectID dObj, ObjectID) {
 	cn->markForDelete();
 
 	//  Clear open bit
-	dObjPtr->_data.objectFlags &= ~objectOpen;
+	dObjPtr->_data.objectFlags &= ~kObjectOpen;
 	g_vm->_cnm->setUpdate(dObjPtr->IDParent());
 
 	return true;
@@ -1296,7 +1296,7 @@ bool PhysicalContainerProto::acceptLockToggleAction(
 	GameObject *dObjPtr = GameObject::objectAddress(dObj);
 
 	//  Toggle locked bit
-	dObjPtr->_data.objectFlags ^= objectLocked;
+	dObjPtr->_data.objectFlags ^= kObjectLocked;
 
 	return true;
 }
@@ -1314,7 +1314,7 @@ bool PhysicalContainerProto::acceptInsertionAction(
 	GameObject  *itemPtr = GameObject::objectAddress(item);
 
 	//  Place the object in the container (if possible)
-	if ((dObjPtr->_data.objectFlags & objectLocked)
+	if ((dObjPtr->_data.objectFlags & kObjectLocked)
 	        ||  !dObjPtr->placeObject(enactor, item, true, num)) {
 		if (isWorld(dObjPtr->IDParent()))
 			dObjPtr->dropInventoryObject(itemPtr, num);
@@ -2757,7 +2757,7 @@ void EnchantmentProto::doBackgroundUpdate(GameObject *obj) {
 		uint16  type = getEnchantmentType(flgs),
 		        subType = getEnchantmentSubType(flgs);
 
-		if (type == effectOthers && subType == actorPoisoned) {
+		if (type == kEffectOthers && subType == kActorPoisoned) {
 			// get the damage amount for this poison
 			int16 damage = getEnchantmentAmount(flgs);
 
@@ -2898,7 +2898,7 @@ bool IntangibleContainerProto::useAction(ObjectID dObj, ObjectID enactor) {
 	bool          result;
 	GameObject    *dObjPtr = GameObject::objectAddress(dObj);
 
-	if (dObjPtr->_data.objectFlags & objectOpen)
+	if (dObjPtr->_data.objectFlags & kObjectOpen)
 		result = close(dObj, enactor);
 	else
 		result = open(dObj, enactor);
diff --git a/engines/saga2/path.cpp b/engines/saga2/path.cpp
index 9a98d9e4ffe..45b49b4f7d6 100644
--- a/engines/saga2/path.cpp
+++ b/engines/saga2/path.cpp
@@ -1472,7 +1472,7 @@ void PathRequest::initialize() {
 		//  obstacles.
 		if (isActor(obj)
 		        && (((Actor *)obj)->isDead()
-		            || ((Actor *)obj)->hasEffect(actorInvisible)))
+		            || ((Actor *)obj)->hasEffect(kActorInvisible)))
 			continue;
 
 		//  Compute the objects volume
diff --git a/engines/saga2/player.cpp b/engines/saga2/player.cpp
index dfdbc7a9e93..4f292bc7063 100644
--- a/engines/saga2/player.cpp
+++ b/engines/saga2/player.cpp
@@ -103,15 +103,15 @@ void PlayerActor::recalcPortraitType() {
 
 	if (a->isDead())
 		pType = kPortraitDead;
-	else if (a->_enchantmentFlags & (1 << actorAsleep))
+	else if (a->_enchantmentFlags & (1 << kActorAsleep))
 		pType = kPortraitAsleep;
 	else if (stats.vitality >= a->_effectiveStats.vitality * 3)
 		pType = kPortraitWounded;
-	else if (a->_enchantmentFlags & ((1 << actorDiseased) | (1 << actorPoisoned)))
+	else if (a->_enchantmentFlags & ((1 << kActorDiseased) | (1 << kActorPoisoned)))
 		pType = kPortraitSick;
 	else if (stats.vitality * 2 > a->_effectiveStats.vitality * 3)
 		pType = kPortraitOuch;
-	else if (a->_enchantmentFlags & ((1 << actorParalyzed) | (1 << actorFear) | (1 << actorBlind)))
+	else if (a->_enchantmentFlags & ((1 << kActorParalyzed) | (1 << kActorFear) | (1 << kActorBlind)))
 		pType = kPortraitConfused;
 	else if (isAggressive())
 		pType = kPortraitAngry;
diff --git a/engines/saga2/sagafunc.cpp b/engines/saga2/sagafunc.cpp
index 705637383f4..a01205f9dc4 100644
--- a/engines/saga2/sagafunc.cpp
+++ b/engines/saga2/sagafunc.cpp
@@ -618,7 +618,7 @@ int16 scriptActorSetOpen( int16 *args )
 {
     (((ObjectData *)thisThread->_thisObject)->obj)->setFlags(
         args[0] ? 0xffff : 0,
-        objectOpen );
+        kObjectOpen );
     return 0;
 }
 
@@ -626,7 +626,7 @@ int16 scriptActorSetLocked( int16 *args )
 {
     (((ObjectData *)thisThread->_thisObject)->obj)->setFlags(
         args[0] ? 0xffff : 0,
-        objectLocked );
+        kObjectLocked );
     return 0;
 }
 */
@@ -635,7 +635,7 @@ int16 scriptActorSetImportant(int16 *args) {
 	OBJLOG(SetImportant);
 	(((ObjectData *)thisThread->_thisObject)->obj)->setFlags(
 	    args[0] ? (int16) 0xffff : (int16) 0,
-	    objectImportant);
+	    kObjectImportant);
 	return 0;
 }
 
@@ -643,7 +643,7 @@ int16 scriptActorSetScavengable(int16 *args) {
 	OBJLOG(SetScavengable);
 	(((ObjectData *)thisThread->_thisObject)->obj)->setFlags(
 	    args[0] ? (int16) 0xffff : (int16) 0,
-	    objectScavengable);
+	    kObjectScavengable);
 	return 0;
 }
 
diff --git a/engines/saga2/sensor.cpp b/engines/saga2/sensor.cpp
index 26566db1aaa..5361549b0a6 100644
--- a/engines/saga2/sensor.cpp
+++ b/engines/saga2/sensor.cpp
@@ -430,15 +430,15 @@ bool ProtaganistSensor::check(SenseInfo &info, uint32 senseFlags) {
 		if (protag->isDead())
 			continue;
 
-		if (senseFlags & (1 << actorBlind))
+		if (senseFlags & (1 << kActorBlind))
 			continue;
 
 		//  This extra test is a HACK to ensure that the center actor
 		//  will be able to sense a protaganist even if the protaganist
 		//  is invisible.
 		if (!objIsActor || getObject() != getCenterActor()) {
-			if (!(senseFlags & actorSeeInvis)
-			        &&  protag->hasEffect(actorInvisible))
+			if (!(senseFlags & kActorSeeInvis)
+			        &&  protag->hasEffect(kActorInvisible))
 				continue;
 		}
 
@@ -487,7 +487,7 @@ bool ObjectSensor::check(SenseInfo &info, uint32 senseFlags) {
 	for (iter.first(&objToTest);
 	        objToTest != nullptr;
 	        iter.next(&objToTest)) {
-		if (senseFlags & (1 << actorBlind))
+		if (senseFlags & (1 << kActorBlind))
 			continue;
 		bool objToTestIsActor = isActor(objToTest);
 
@@ -499,7 +499,7 @@ bool ObjectSensor::check(SenseInfo &info, uint32 senseFlags) {
 		            ||  getObject() != getCenterActor()
 		            ||  !isPlayerActor((Actor *)objToTest))) {
 			Actor *a = (Actor *) objToTest;
-			if (!(senseFlags & actorSeeInvis) && a->hasEffect(actorInvisible))
+			if (!(senseFlags & kActorSeeInvis) && a->hasEffect(kActorInvisible))
 				continue;
 		}
 		//  Skip if object is out of _range
@@ -571,7 +571,7 @@ bool SpecificObjectSensor::check(SenseInfo &info, uint32 senseFlags) {
 	GameObject      *soughtObject = GameObject::objectAddress(_soughtObjID);
 	bool            objIsActor = isActor(getObject());
 
-	if (senseFlags & (1 << actorBlind))
+	if (senseFlags & (1 << kActorBlind))
 		return false;
 
 	//  This extra test is a HACK to ensure that the center actor
@@ -582,7 +582,7 @@ bool SpecificObjectSensor::check(SenseInfo &info, uint32 senseFlags) {
 	            ||  getObject() != getCenterActor()
 	            ||  !isPlayerActor((Actor *)soughtObject))) {
 		Actor *a = (Actor *) soughtObject;
-		if (!(senseFlags & actorSeeInvis) && a->hasEffect(actorInvisible))
+		if (!(senseFlags & kActorSeeInvis) && a->hasEffect(kActorInvisible))
 			return false;
 	}
 
@@ -700,7 +700,7 @@ bool SpecificActorSensor::check(SenseInfo &info, uint32 senseFlags) {
 	assert(isActor(_soughtActor));
 	bool        objIsActor = isActor(getObject());
 
-	if (senseFlags & (1 << actorBlind))
+	if (senseFlags & (1 << kActorBlind))
 		return false;
 
 	//  This extra test is a HACK to ensure that the center actor
@@ -709,7 +709,7 @@ bool SpecificActorSensor::check(SenseInfo &info, uint32 senseFlags) {
 	if (!objIsActor
 	        ||  getObject() != getCenterActor()
 	        ||  !isPlayerActor(_soughtActor)) {
-		if (!(senseFlags & actorSeeInvis) && _soughtActor->hasEffect(actorInvisible))
+		if (!(senseFlags & kActorSeeInvis) && _soughtActor->hasEffect(kActorInvisible))
 			return false;
 	}
 
diff --git a/engines/saga2/sensor.h b/engines/saga2/sensor.h
index 0569dc7cb84..e04d65de628 100644
--- a/engines/saga2/sensor.h
+++ b/engines/saga2/sensor.h
@@ -28,7 +28,7 @@
 
 namespace Saga2 {
 
-const uint32 nonActorSenseFlags = actorSeeInvis;
+const uint32 nonActorSenseFlags = kActorSeeInvis;
 
 //const size_t maxSensorSize = 24;
 const size_t maxSensorSize = 48;
diff --git a/engines/saga2/spellio.cpp b/engines/saga2/spellio.cpp
index 48adf4a50b9..48712e5ff14 100644
--- a/engines/saga2/spellio.cpp
+++ b/engines/saga2/spellio.cpp
@@ -91,9 +91,9 @@ void SpellStuff::addEffect(ResourceSpellEffect *rse) {
 	ProtoEffect *pe = nullptr;
 	assert(rse && rse->spell == _master);
 	switch (rse->effectGroup) {
-	case effectNone     :
+	case kEffectNone     :
 		return;
-	case effectAttrib   :
+	case kEffectAttrib   :
 		pe = new ProtoEnchantment(
 		         makeEnchantmentID(
 		             rse->effectGroup,
@@ -102,10 +102,10 @@ void SpellStuff::addEffect(ResourceSpellEffect *rse) {
 		         rse->enchTimeLo,
 		         rse->enchTimeHi);
 		break;
-	case effectResist   :
-	case effectImmune   :
-	case effectOthers   :
-	case effectNonActor :
+	case kEffectResist   :
+	case kEffectImmune   :
+	case kEffectOthers   :
+	case kEffectNonActor :
 		pe = new ProtoEnchantment(
 		         makeEnchantmentID(
 		             rse->effectGroup,
@@ -114,7 +114,7 @@ void SpellStuff::addEffect(ResourceSpellEffect *rse) {
 		         rse->enchTimeLo,
 		         rse->enchTimeHi);
 		break;
-	case effectDamage   :
+	case kEffectDamage   :
 		pe = new ProtoDamage(
 		         rse->baseDice,
 		         rse->diceSides ? rse->diceSides : 6,
@@ -124,7 +124,7 @@ void SpellStuff::addEffect(ResourceSpellEffect *rse) {
 		         0,
 		         rse->targeting & spellTargCaster);
 		break;
-	case effectDrains   :
+	case kEffectDrains   :
 		pe = new ProtoDrainage(
 		         rse->baseDice,
 		         rse->diceSides ? rse->diceSides : 6,
@@ -134,53 +134,53 @@ void SpellStuff::addEffect(ResourceSpellEffect *rse) {
 		         0,
 		         rse->targeting & spellTargCaster);
 		break;
-	case effectTAG      :
+	case kEffectTAG      :
 		pe = new ProtoTAGEffect(
 		         (effectTAGTypes) rse->effectType,
 		         rse->flagSet,
 		         rse->attribModifier);
 		break;
-	case effectLocation :
+	case kEffectLocation :
 		pe = new ProtoLocationEffect(
-		         (effectLocationTypes) rse->effectType,
+		         (kEffectLocationTypes) rse->effectType,
 		         rse->attribModifier);
 		break;
-	case effectSpecial  : {
+	case kEffectSpecial  : {
 		switch (rse->effectType) {
-		case    specialDispellHelpfulEnch :   // clears helpful enchantments
+		case    kSpecialDispellHelpfulEnch :   // clears helpful enchantments
 			pe = new ProtoSpecialEffect(DispellProtections, rse->attribModifier);
 			break;
-		case    specialDispellHarmfulEnch :   // clears harmful enchantments
+		case    kSpecialDispellHarmfulEnch :   // clears harmful enchantments
 			pe = new ProtoSpecialEffect(DispellCurses,      rse->attribModifier);
 			break;
-		case    specialKill               :   // death spell
+		case    kSpecialKill               :   // death spell
 			pe = new ProtoSpecialEffect(DeathSpell,         rse->attribModifier);
 			break;
-		case    specialRessurect          :   // raise dead spell
+		case    kSpecialRessurect          :   // raise dead spell
 			pe = new ProtoSpecialEffect(Resurrect,          rse->attribModifier);
 			break;
-		case    specialTeleport           :   // Teleportation
+		case    kSpecialTeleport           :   // Teleportation
 			pe = new ProtoSpecialEffect(TeleportToLocation, rse->attribModifier);
 			break;
-		case    specialCreateActor        :   // Create an actor or wall
+		case    kSpecialCreateActor        :   // Create an actor or wall
 			pe = new ProtoSpecialEffect(CreateWraith,       rse->attribModifier);
 			break;
-		case    specialSagaFunc           :    // calls a saga function
+		case    kSpecialSagaFunc           :    // calls a saga function
 			pe = new ProtoSpecialEffect(SagaSpellCall,      rse->attribModifier);
 			break;
-		case    specialRejoin        :   // Create an actor or wall
+		case    kSpecialRejoin        :   // Create an actor or wall
 			pe = new ProtoSpecialEffect(Rejoin,      rse->attribModifier);
 			break;
-		case    specialCreateWWisp  :  // calls a saga function
+		case    kSpecialCreateWWisp  :  // calls a saga function
 			pe = new ProtoSpecialEffect(CreateWWisp,      rse->attribModifier);
 			break;
-		case    specialCreateFWisp  :   // calls a saga function
+		case    kSpecialCreateFWisp  :   // calls a saga function
 			pe = new ProtoSpecialEffect(CreateFWisp,      rse->attribModifier);
 			break;
-		case    specialCreateWraith :   // calls a saga function
+		case    kSpecialCreateWraith :   // calls a saga function
 			pe = new ProtoSpecialEffect(CreateWraith,      rse->attribModifier);
 			break;
-		case    specialCreateFood   :   // calls a saga function
+		case    kSpecialCreateFood   :   // calls a saga function
 			pe = new ProtoSpecialEffect(CreateFood,      rse->attribModifier);
 			break;
 		}
diff --git a/engines/saga2/terrain.cpp b/engines/saga2/terrain.cpp
index bace9617f3b..f7c94d7cfac 100644
--- a/engines/saga2/terrain.cpp
+++ b/engines/saga2/terrain.cpp
@@ -45,7 +45,7 @@ static MetaTilePtr  prevMeta = nullptr;
 void drown(GameObject *obj) {
 	if (isActor(obj)) {
 		Actor *a = (Actor *) obj;
-		if (!a->hasEffect(actorWaterBreathe)) {
+		if (!a->hasEffect(kActorWaterBreathe)) {
 			if (g_vm->_rnd->getRandomNumber(drowningDamageOddsYes + drowningDamageOddsNo - 1) > drowningDamageOddsNo - 1) {
 				a->acceptDamage(a->thisID(), drowningDamagePerFrame);
 			}
@@ -57,7 +57,7 @@ void drown(GameObject *obj) {
 void lavaDamage(GameObject *obj) {
 	if (isActor(obj)) {
 		Actor *a = (Actor *) obj;
-		if (a->resists(resistHeat))
+		if (a->resists(kResistHeat))
 			return;
 	}
 	if (g_vm->_rnd->getRandomNumber(heatDamageOddsYes + heatDamageOddsNo - 1) > heatDamageOddsNo - 1) {
@@ -68,7 +68,7 @@ void lavaDamage(GameObject *obj) {
 void coldDamage(GameObject *obj) {
 	if (isActor(obj)) {
 		Actor *a = (Actor *) obj;
-		if (a->resists(resistCold))
+		if (a->resists(kResistCold))
 			return;
 	}
 	if (g_vm->_rnd->getRandomNumber(coldDamageOddsYes + coldDamageOddsNo - 1) > coldDamageOddsNo - 1) {
@@ -91,7 +91,7 @@ void terrainDamageBash(GameObject *obj) {
 void fallingDamage(GameObject *obj, int16 speed) {
 	if (isActor(obj)) {
 		Actor *a = (Actor *) obj;
-		if (!a->hasEffect(actorSlowFall)) {
+		if (!a->hasEffect(kActorSlowFall)) {
 			a->acceptDamage(a->thisID(), (MAX(0, speed - 16)*fallingDamageMult) / fallingDamageDiv);
 		}
 	}
@@ -792,7 +792,7 @@ int16 checkBlocked(
 
 
 	//  check to make sure the actor recognizes terrain
-	if (!isActor(obj) || !((Actor *) obj)->hasEffect(actorNoncorporeal)) {
+	if (!isActor(obj) || !((Actor *) obj)->hasEffect(kActorNoncorporeal)) {
 		TilePoint       testLoc = loc;
 
 		testLoc.z = MAX<int16>(loc.z, 8);
diff --git a/engines/saga2/weapons.cpp b/engines/saga2/weapons.cpp
index d641f0f1b1b..2eadf7fbbac 100644
--- a/engines/saga2/weapons.cpp
+++ b/engines/saga2/weapons.cpp
@@ -67,44 +67,44 @@ ProtoEffect *createNewProtoEffect(Common::SeekableReadStream *stream) {
 		diceSides = 6;
 
 	switch (effectGroup) {
-	case effectNone:
+	case kEffectNone:
 		return nullptr;
 
-	case effectAttrib:
+	case kEffectAttrib:
 		pe = new ProtoEnchantment(makeEnchantmentID(effectGroup, effectType, baseDamage), reserved0, reserved1);
 		break;
 
-	case effectResist:
-	case effectImmune:
-	case effectOthers:
-	case effectNonActor:
+	case kEffectResist:
+	case kEffectImmune:
+	case kEffectOthers:
+	case kEffectNonActor:
 		pe = new ProtoEnchantment(makeEnchantmentID(effectGroup, effectType, skillDamage), reserved0, reserved1);
 		break;
 
-	case effectDamage:
+	case kEffectDamage:
 		pe = new ProtoDamage(baseDice, diceSides, skillDice, baseDamage,
 					(effectDamageTypes)effectType, 0, targeting & spellTargCaster, skillDamage);
 		break;
 
-	case effectDrains:
+	case kEffectDrains:
 		pe = new ProtoDrainage(baseDice, diceSides, skillDice, baseDamage,
 					(effectDrainsTypes)effectType, 0, targeting & spellTargCaster);
 		break;
 
-	case effectPoison:
+	case kEffectPoison:
 		pe = new ProtoEnchantment(makeEnchantmentID(baseDamage),      // poison
 					reserved0, reserved1);
 		break;
 
-	case effectTAG:
+	case kEffectTAG:
 		pe = new ProtoTAGEffect((effectTAGTypes)effectType, skillDamage, baseDamage);
 		break;
 
-	case effectLocation:
-		pe = new ProtoLocationEffect((effectLocationTypes)effectType, baseDamage);
+	case kEffectLocation:
+		pe = new ProtoLocationEffect((kEffectLocationTypes)effectType, baseDamage);
 		break;
 
-	case effectSpecial:
+	case kEffectSpecial:
 		pe = new ProtoSpecialEffect(SagaSpellCall, baseDamage);
 		break;
 	}
@@ -211,7 +211,7 @@ void WeaponStuff::addEffect(Common::SeekableReadStream *stream) {
 	/*int16 item = */stream->readSint16LE();		// spell ID
 	int16 effectGroup = stream->readSint16LE();	// effect group
 
-	if (effectGroup == effectStrike) {
+	if (effectGroup == kEffectStrike) {
 		effectDamageTypes effectType = (effectDamageTypes)stream->readSint16LE();	// effect ID
 		/*int16 targeting = */stream->readSint16LE();	// targeting
 		int16 baseDice = stream->readSint16LE();	// base dice


Commit: 9937c3dcdb4541b002d5a074239072964aecd0d6
    https://github.com/scummvm/scummvm/commit/9937c3dcdb4541b002d5a074239072964aecd0d6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T14:40:38+02:00

Commit Message:
SAGA2: Rename enums in enchant.h

Changed paths:
    engines/saga2/enchant.h


diff --git a/engines/saga2/enchant.h b/engines/saga2/enchant.h
index ed7571f5fc9..a6583679bc2 100644
--- a/engines/saga2/enchant.h
+++ b/engines/saga2/enchant.h
@@ -32,58 +32,58 @@ namespace Saga2 {
 enum actorEnchantments {
 
 	//  Object-enchantments
-	enchNone = 0,
-	enchInvisible,
+	kEnchNone = 0,
+	kEnchInvisible,
 
-	enchWarded,
+	kEnchWarded,
 
 	//  Actor skill boosters
-	enchAttackFast,
-	enchEnhanceBrawn,
-	enchEnhanceAgility,
-	enchEnhanceStealth,
-	enchEnhanceArmor,
-	enchEnhanceHitChance,
+	kEnchAttackFast,
+	kEnchEnhanceBrawn,
+	kEnchEnhanceAgility,
+	kEnchEnhanceStealth,
+	kEnchEnhanceArmor,
+	kEnchEnhanceHitChance,
 
 	//  Actor Immunities
-	enchImmunePhysical,
-	enchImmuneProjectile,
-	enchImmuneHandToHand,
-	enchImmuneMagicMissile,
-	enchImmuneFire,
-	enchImmuneFireMagic,
-	enchImmuneLava,
-	enchImmuneCold,
-	enchImmuneMental,
-	enchImmuneDirectMagic,
-	enchImmuneLifeDrain,
+	kEnchImmunePhysical,
+	kEnchImmuneProjectile,
+	kEnchImmuneHandToHand,
+	kEnchImmuneMagicMissile,
+	kEnchImmuneFire,
+	kEnchImmuneFireMagic,
+	kEnchImmuneLava,
+	kEnchImmuneCold,
+	kEnchImmuneMental,
+	kEnchImmuneDirectMagic,
+	kEnchImmuneLifeDrain,
 
 	//  Actor Movement enchantents
-	enchLandWalking,
-	enchDesolidified,
-	enchFloating,
-	enchFallSlowly,
-	enchLevitating,
-	enchWaterWalking,
-	enchFlying,
+	kEnchLandWalking,
+	kEnchDesolidified,
+	kEnchFloating,
+	kEnchFallSlowly,
+	kEnchLevitating,
+	kEnchWaterWalking,
+	kEnchFlying,
 
 	//  Curses
-	enchBlind,
-	enchPanic,
-	enchParalyzed,
-	enchMoveFast,
-	enchMoveSlow,
-	enchAttackSlow,
-	enchAsleep,
-	enchReduceHitCchance,
+	kEnchBlind,
+	kEnchPanic,
+	kEnchParalyzed,
+	kEnchMoveFast,
+	kEnchMoveSlow,
+	kEnchAttackSlow,
+	kEnchAsleep,
+	kEnchReduceHitCchance,
 
 	//  Changes display algorithms
-	enchSoulSight,
-	enchClairvoyant,
-	enchDetectPoison,
+	kEnchSoulSight,
+	kEnchClairvoyant,
+	kEnchDetectPoison,
 
 	//  Changes NPC behavior
-	enchHasNoSmell
+	kEnchHasNoSmell
 };
 
 //-----------------------------------------------------------------------
@@ -108,10 +108,8 @@ public:
 // Global Enchantments
 
 enum worldEnchantments {
-
-	weTimeStop = 0,
-
-	weCount
+	kWETimeStop = 0,
+	kWECount
 };
 
 } // end of namespace Saga2


Commit: 78431e8cf358ec6c2f6ab7136debd8e10fc6af24
    https://github.com/scummvm/scummvm/commit/78431e8cf358ec6c2f6ab7136debd8e10fc6af24
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-27T14:44:21+02:00

Commit Message:
SAGA2: Rename enums in gamerate.h

Changed paths:
    engines/saga2/gamerate.h
    engines/saga2/main.cpp


diff --git a/engines/saga2/gamerate.h b/engines/saga2/gamerate.h
index bc07374990f..28bd74c786a 100644
--- a/engines/saga2/gamerate.h
+++ b/engines/saga2/gamerate.h
@@ -29,7 +29,7 @@
 namespace Saga2 {
 
 enum {
-	grFramesPerSecond = 0
+	kGRFramesPerSecond = 0
 };
 
 class frameCounter {
@@ -57,28 +57,28 @@ public:
 		_instantFrameCount = frameTime ? _ticksPerSecond / frameTime : 100;
 	}
 
-	virtual float frameStat(int statID = grFramesPerSecond) {
+	virtual float frameStat(int statID = kGRFramesPerSecond) {
 		return _instantFrameCount;
 	}
 };
 
 
 enum {
-	grFramesPerKilosecond   = 1,
-	grFPKS1SecAvgNewest     = 2,
-	grFPKS1SecAvgNew        = 3,
-	grFPKS1SecAvg           = 4,
-	grFPKS1SecAvgOld        = 5,
-	grFPKS1SecAvgOldest     = 6,
-	grFPKS5SecAvg           = 7,
-	grFPKSAvg1SecAvg        = 8,
-	grFPKS1SecVarNewest     = 9,
-	grFPKS1SecVarNew        = 10,
-	grFPKS1SecVar           = 11,
-	grFPKS1SecVarOld        = 12,
-	grFPKS1SecVarOldest     = 13,
-	grFPKS5SecVar           = 14,
-	grFPKSVar1SecAvg        = 15
+	kGRFramesPerKilosecond   = 1,
+	kGRFPKS1SecAvgNewest     = 2,
+	kGRFPKS1SecAvgNew        = 3,
+	kGRFPKS1SecAvg           = 4,
+	kGRFPKS1SecAvgOld        = 5,
+	kGRFPKS1SecAvgOldest     = 6,
+	kGRFPKS5SecAvg           = 7,
+	kGRFPKSAvg1SecAvg        = 8,
+	kGRFPKS1SecVarNewest     = 9,
+	kGRFPKS1SecVarNew        = 10,
+	kGRFPKS1SecVar           = 11,
+	kGRFPKS1SecVarOld        = 12,
+	kGRFPKS1SecVarOldest     = 13,
+	kGRFPKS5SecVar           = 14,
+	kGRFPKSVar1SecAvg        = 15
 };
 
 class frameSmoother: public frameCounter {
@@ -164,38 +164,38 @@ public:
 		}
 	}
 
-	virtual float frameStat(int statID = grFramesPerSecond) {
+	virtual float frameStat(int statID = kGRFramesPerSecond) {
 		int oldestOffset = (_frames % _historySize) / _desiredFPS;
 		switch (statID) {
-		case grFramesPerKilosecond  :
+		case kGRFramesPerKilosecond  :
 			return 1000 * _instantFrameCount;
-		case grFPKS1SecAvgNewest    :
+		case kGRFPKS1SecAvgNewest    :
 			return _avg1Sec[4 + oldestOffset];
-		case grFPKS1SecAvgNew       :
+		case kGRFPKS1SecAvgNew       :
 			return _avg1Sec[3 + oldestOffset];
-		case grFPKS1SecAvg          :
+		case kGRFPKS1SecAvg          :
 			return _avg1Sec[2 + oldestOffset];
-		case grFPKS1SecAvgOld       :
+		case kGRFPKS1SecAvgOld       :
 			return _avg1Sec[1 + oldestOffset];
-		case grFPKS1SecAvgOldest    :
+		case kGRFPKS1SecAvgOldest    :
 			return _avg1Sec[0 + oldestOffset];
-		case grFPKS5SecAvg          :
+		case kGRFPKS5SecAvg          :
 			return _avg5Sec;
-		case grFPKSAvg1SecAvg       :
+		case kGRFPKSAvg1SecAvg       :
 			return _secAvg;
-		case grFPKS1SecVarNewest    :
+		case kGRFPKS1SecVarNewest    :
 			return _dif1Sec[4 + oldestOffset];
-		case grFPKS1SecVarNew       :
+		case kGRFPKS1SecVarNew       :
 			return _dif1Sec[3 + oldestOffset];
-		case grFPKS1SecVar          :
+		case kGRFPKS1SecVar          :
 			return _dif1Sec[2 + oldestOffset];
-		case grFPKS1SecVarOld       :
+		case kGRFPKS1SecVarOld       :
 			return _dif1Sec[1 + oldestOffset];
-		case grFPKS1SecVarOldest    :
+		case kGRFPKS1SecVarOldest    :
 			return _dif1Sec[0 + oldestOffset];
-		case grFPKS5SecVar          :
+		case kGRFPKS5SecVar          :
 			return _dif5Sec;
-		case grFPKSVar1SecAvg       :
+		case kGRFPKSVar1SecAvg       :
 			return _secDif;
 		default:
 			return frameCounter::frameStat(statID);
diff --git a/engines/saga2/main.cpp b/engines/saga2/main.cpp
index e42927ac786..3ee8b84fd02 100644
--- a/engines/saga2/main.cpp
+++ b/engines/saga2/main.cpp
@@ -807,11 +807,11 @@ void WriteStatusF2(int16, const char *, ...) {}
 int32 currentGamePerformance() {
 	int32 framePer = 100;
 	int32 lval = int(g_vm->_lrate->frameStat());
-	int32 fval = int(g_vm->_lrate->frameStat(grFramesPerSecond));
+	int32 fval = int(g_vm->_lrate->frameStat(kGRFramesPerSecond));
 	if (fval >= frameRate && lval > fval) {
 		framePer += (50 * ((lval - fval) / fval));
 	} else {
-		framePer = (100 * g_vm->_frate->frameStat(grFramesPerSecond)) / frameRate;
+		framePer = (100 * g_vm->_frate->frameStat(kGRFramesPerSecond)) / frameRate;
 	}
 	framePer = clamp(10, framePer, 240);
 	return framePer;




More information about the Scummvm-git-logs mailing list