[Scummvm-cvs-logs] scummvm master -> 35c17d50663eeeecec5d14744149ac6004135a93
Strangerke
Strangerke at scummvm.org
Sat Jan 31 18:02:21 CET 2015
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0fcd78391b MADS: Add a safeguard in doFrame
35c17d5066 MADS: Janitorial - fix some else statements with braces on separate lines or extra tabs
Commit: 0fcd78391b584cee9ca6435d9ee5e88c339aa0cc
https://github.com/scummvm/scummvm/commit/0fcd78391b584cee9ca6435d9ee5e88c339aa0cc
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-01-31T12:53:35+01:00
Commit Message:
MADS: Add a safeguard in doFrame
Changed paths:
engines/mads/menu_views.cpp
diff --git a/engines/mads/menu_views.cpp b/engines/mads/menu_views.cpp
index b492d98..8f1fd2d 100644
--- a/engines/mads/menu_views.cpp
+++ b/engines/mads/menu_views.cpp
@@ -550,7 +550,7 @@ void AnimationView::doFrame() {
scene._cyclingActive = _nextCyclingActive;
}
- if (++_scrollFrameCtr >= _currentAnimation->_header._scrollTicks) {
+ if (_currentAnimation && (++_scrollFrameCtr >= _currentAnimation->_header._scrollTicks)) {
_scrollFrameCtr = 0;
scroll();
}
Commit: 35c17d50663eeeecec5d14744149ac6004135a93
https://github.com/scummvm/scummvm/commit/35c17d50663eeeecec5d14744149ac6004135a93
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-01-31T13:01:23+01:00
Commit Message:
MADS: Janitorial - fix some else statements with braces on separate lines or extra tabs
Changed paths:
engines/mads/action.cpp
engines/mads/nebular/dialogs_nebular.cpp
engines/mads/nebular/game_nebular.cpp
engines/mads/nebular/nebular_scenes8.cpp
engines/mads/palette.cpp
engines/mads/sequence.cpp
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index 199ae39..628f035 100644
--- a/engines/mads/action.cpp
+++ b/engines/mads/action.cpp
@@ -567,9 +567,8 @@ void MADSAction::leftClick() {
switch (userInterface._category) {
case CAT_COMMAND:
if (_selectedRow >= 0) {
- if (_verbType == VERB_ONLY) {
+ if (_verbType == VERB_ONLY)
_selectedAction = -1;
- }
else {
_recentCommand = _selectedRow;
_recentCommandSource = _commandSource;
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index b3d3e06..05c2e4b 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -387,8 +387,7 @@ TextDialog(vm, FONT_INTERFACE, Common::Point(-1, -1), 32) {
addLine("ANSWER INCORRECT!", true);
wordWrap("\n");
addLine("(But we'll give you another chance!)");
- }
- else {
+ } else {
addLine("REX NEBULAR version 8.43", true);
wordWrap("\n");
addLine("(Copy Protection, for your convenience)");
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 8c0c004..965ef7f 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -454,7 +454,7 @@ void GameNebular::doObjectAction() {
dialogs.show(464);
} else if (action.isAction(VERB_REFLECT)) {
dialogs.show(466);
- } else if (action.isAction(VERB_GAZE_INTO, NOUN_REARVIEW_MIRROR)) {
+ } else if (action.isAction(VERB_GAZE_INTO, NOUN_REARVIEW_MIRROR)) {
dialogs.show(467);
} else if (action.isAction(VERB_EAT, NOUN_CHICKEN_BOMB)) {
dialogs.show(469);
diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp
index 62a1a26..7e8366c 100644
--- a/engines/mads/nebular/nebular_scenes8.cpp
+++ b/engines/mads/nebular/nebular_scenes8.cpp
@@ -1129,8 +1129,7 @@ void Scene804::actions() {
} else {
_messWithThrottle = true;
}
- }
- else if (_action.isAction(VERB_APPLY, NOUN_POLYCEMENT, NOUN_CRACK) ||
+ } else if (_action.isAction(VERB_APPLY, NOUN_POLYCEMENT, NOUN_CRACK) ||
_action.isAction(VERB_PUT, NOUN_POLYCEMENT, NOUN_CRACK)) {
if (!_globals[kWindowFixed]) {
_resetFrame = 2;
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp
index 95de307..250eb75 100644
--- a/engines/mads/palette.cpp
+++ b/engines/mads/palette.cpp
@@ -503,16 +503,12 @@ void Fader::fadeIn(byte palette[PALETTE_SIZE], byte destPalette[PALETTE_SIZE],
for (int colorCtr = 0; colorCtr < 3; ++colorCtr) {
if (_colorFlags[colorCtr]) {
int shiftSign = _colorValues[colorCtr];
- if (shiftSign >= 0) {
+ if (shiftSign >= 0)
intensity = map[index]._intensity << shiftSign;
- }
- else {
+ else
intensity = map[index]._intensity >> abs(shiftSign);
- }
- }
- else {
+ } else
intensity = _colorValues[colorCtr];
- }
int diff = _rgb64Map[destPalette[palCtr * 3 + colorCtr]] - intensity;
palIndex[palCtr][colorCtr] = (byte)ABS(diff);
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 05f00af..c94f3e3 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -526,8 +526,7 @@ void SequenceList::setMotion(int seqIndex, int flags, int deltaX, int deltaY) {
if (deltaY > 0) {
se._posSign.y = 1;
- }
- else if (deltaY < 0) {
+ } else if (deltaY < 0) {
se._posSign.y = -1;
} else {
se._posSign.y = 0;
More information about the Scummvm-git-logs
mailing list