[Scummvm-cvs-logs] scummvm master -> fceec74e4b2158aebbb1909458d828f3038a41d2

Strangerke Strangerke at scummvm.org
Sun Nov 10 23:16:53 CET 2013


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

Summary:
fceec74e4b TSAGE: R2R - Some renaming, remove a dead variable


Commit: fceec74e4b2158aebbb1909458d828f3038a41d2
    https://github.com/scummvm/scummvm/commit/fceec74e4b2158aebbb1909458d828f3038a41d2
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-11-10T14:16:08-08:00

Commit Message:
TSAGE: R2R - Some renaming, remove a dead variable

Changed paths:
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/ringworld2/ringworld2_logic.h
    engines/tsage/ringworld2/ringworld2_scenes3.cpp



diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 75aeb9e..8f01a34 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -1775,14 +1775,13 @@ AnimationPlayer::AnimationPlayer(): EventHandler() {
 	_screenBounds = R2_GLOBALS._gfxManagerInstance._bounds;
 	_rect1 = R2_GLOBALS._gfxManagerInstance._bounds;
 	_paletteMode = ANIMPALMODE_REPLACE_PALETTE;
-	_field3A = 1;
+	_field3A = true;
 	_sliceHeight = 1;
-	_field58 = 1;
 	_endAction = NULL;
 
 	_sliceCurrent = nullptr;
 	_sliceNext = nullptr;
-	_field38 = 0;
+	_field38 = false;
 	_objectMode = ANIMOBJMODE_1;
 	_dataNeeded = 0;
 	_playbackTick = 0;
@@ -1813,8 +1812,7 @@ void AnimationPlayer::remove() {
 }
 
 void AnimationPlayer::process(Event &event) {
-	if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE) &&
-			(_field3A)) {
+	if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE) && _field3A) {
 		// Move the current position to the end
 		_position = _subData._duration;
 	}
@@ -1933,7 +1931,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 	}
 
 	++R2_GLOBALS._animationCtr;
-	_field38 = 1;
+	_field38 = true;
 	return true;
 }
 
@@ -2109,7 +2107,7 @@ void AnimationPlayer::close() {
 	_animData1 = NULL;
 	_animData2 = NULL;
 
-	_field38 = 0;
+	_field38 = false;
 	if (g_globals != NULL)
 		R2_GLOBALS._animationCtr = MAX(R2_GLOBALS._animationCtr - 1, 0);
 }
@@ -2158,7 +2156,7 @@ void AnimationPlayer::getSlices() {
 
 AnimationPlayerExt::AnimationPlayerExt(): AnimationPlayer() {
 	_isActive = false;
-	_field3A = 0;
+	_field3A = false;
 }
 
 void AnimationPlayerExt::synchronize(Serializer &s) {
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index 50e506d..133cdee 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -407,11 +407,11 @@ public:
 	AnimationData *_sliceNext;
 	Common::File _resourceFile;
 	Rect _rect1, _screenBounds;
-	int _field38;
-	int _field3A;
+	bool _field38;
+	bool _field3A;
 	AnimationPaletteMode _paletteMode;
 	AnimationObjectMode _objectMode;
-	int _field58, _sliceHeight;
+	int _sliceHeight;
 	byte _palIndexes[256];
 	ScenePalette _palette;
 	AnimationPlayerSubData _subData;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 0f553a6..d7ee799 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -3078,15 +3078,15 @@ void Scene3500::Action1::signal() {
 		}
 
 		// Get the new direction starting on
-		int var8 = (scene->_action1._direction * 2 + scene->_mazeDirection);
-		if (var8 > MAZEDIR_NORTHWEST)
-			var8 = MAZEDIR_NORTH;
-		else if (var8 < MAZEDIR_NORTH)
-			var8 = MAZEDIR_WEST;
+		int direction = (scene->_action1._direction * 2 + scene->_mazeDirection);
+		if (direction > MAZEDIR_NORTHWEST)
+			direction = MAZEDIR_NORTH;
+		else if (direction < MAZEDIR_NORTH)
+			direction = MAZEDIR_WEST;
 
 		// Check whether movement is allowed in that direction. If so, then
 		// movement is started again
-		switch (var8) {
+		switch (direction) {
 		case MAZEDIR_NORTH:
 			if ( ((cellId != 2)  && (cellId != 3)  && (cellId != 6) && (cellId != 1) && (cellId != 23) && (cellId != 24) && (cellId != 4) && (cellId != 11))
 				|| (var6 != 0)) {






More information about the Scummvm-git-logs mailing list