aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorStrangerke2013-11-10 23:16:08 +0100
committerStrangerke2013-11-10 23:16:08 +0100
commitfceec74e4b2158aebbb1909458d828f3038a41d2 (patch)
tree59a4b68889d441e26c29c115d9a43d44c2006fd1 /engines/tsage
parent784796779893f5fa280f634139aceff7324514df (diff)
downloadscummvm-rg350-fceec74e4b2158aebbb1909458d828f3038a41d2.tar.gz
scummvm-rg350-fceec74e4b2158aebbb1909458d828f3038a41d2.tar.bz2
scummvm-rg350-fceec74e4b2158aebbb1909458d828f3038a41d2.zip
TSAGE: R2R - Some renaming, remove a dead variable
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp14
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.h6
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp12
3 files changed, 15 insertions, 17 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 75aeb9e34e..8f01a34cc4 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 50e506de11..133cdee6b2 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 0f553a6dd8..d7ee79906a 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)) {