Skip to content

Commit

Permalink
ACCESS: Fix the formatting of a bunch of else statements
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent 4c2ab8b commit c1e8044
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
36 changes: 12 additions & 24 deletions engines/access/amazon/amazon_logic.cpp
Expand Up @@ -1040,8 +1040,7 @@ void Guard::chkVLine() {
if (_position.x > _vm->_player->_rawPlayer.x) {
_topLeft = _vm->_player->_rawPlayer;
_bottomRight = _position;
}
else {
} else {
_topLeft = _position;
_bottomRight = _vm->_player->_rawPlayer;
}
Expand Down Expand Up @@ -1071,8 +1070,7 @@ void Guard::chkVLine() {

_topLeft.x = midX;
_topLeft.y = midY;
}
else {
} else {
if ((midX == _bottomRight.x) && (midY == _bottomRight.y))
return;

Expand All @@ -1086,8 +1084,7 @@ void Guard::chkHLine() {
if (_position.y > _vm->_player->_rawPlayer.y) {
_topLeft = _vm->_player->_rawPlayer;
_bottomRight = _position;
}
else {
} else {
_topLeft = _position;
_bottomRight = _vm->_player->_rawPlayer;
}
Expand Down Expand Up @@ -1117,8 +1114,7 @@ void Guard::chkHLine() {

_topLeft.x = midX;
_topLeft.y = midY;
}
else {
} else {
if ((midX == _bottomRight.x) && (midY == _bottomRight.y))
return;

Expand Down Expand Up @@ -2032,15 +2028,13 @@ int Ant::antHandleStab(int indx, const int *&buf) {
_pitPos.y = 127;
retval = 0;
buf = Amazon::PITWALK;
}
else {
} else {
_pitPos.x += buf[(retval / 2) + 1];
_pitPos.y += buf[(retval / 2) + 2];
_pitCel = retval;
}
}
}
else {
} else {
_stabFl = true;
_pitCel = 0;
retval = 0;
Expand Down Expand Up @@ -2095,8 +2089,7 @@ void Ant::doAnt() {
_vm->_flags[235] = 1;
_antCel = 0;
buf = Amazon::ANTEAT;
}
else {
} else {
buf = Amazon::ANTWALK;
if (_vm->_inventory->_inv[76]._value == 1)
_antDirection = UP;
Expand All @@ -2115,19 +2108,16 @@ void Ant::doAnt() {
_antPos = Common::Point(buf[(idx / 2) + 1], buf[(idx / 2) + 2]);
_antCel = idx;
}
}
else {
} else {
idx += 6;
if (buf[(idx / 2)] != -1) {
_antPos = Common::Point(buf[(idx / 2) + 1], buf[(idx / 2) + 2]);
_antCel = idx;
}
else if (!_antDieFl) {
} else if (!_antDieFl) {
idx = 0;
_antPos = Common::Point(buf[(idx / 2) + 1], buf[(idx / 2) + 2]);
_antCel = idx;
}
else {
} else {
idx -= 6;
if (_vm->_flags[200] == 0)
_vm->_flags[200] = 1;
Expand All @@ -2148,8 +2138,7 @@ void Ant::doAnt() {
idx = _pitCel;
if (_stabFl == 1) {
idx = antHandleStab(idx, buf);
}
else {
} else {
buf = Amazon::PITWALK;
if (_vm->_timers[13]._flag == 0) {
_vm->_timers[13]._flag = 1;
Expand All @@ -2160,8 +2149,7 @@ void Ant::doAnt() {
idx = antHandleLeft(idx, buf);
else if (pt.x > _pitPos.x)
idx = antHandleRight(idx, buf);
}
else {
} else {
buf = Amazon::PITWALK;
if (_vm->_player->_playerDirection == UP)
idx = antHandleStab(idx, buf);
Expand Down
3 changes: 1 addition & 2 deletions engines/access/player.cpp
Expand Up @@ -528,8 +528,7 @@ void Player::walkDownRight() {
_rawTempL = (byte)tempL;
_rawXTemp = _rawPlayer.x + _vm->_screen->_scaleTable1[walkOffset] +
(tempL >= 0x100 ? 1 : 0);
}
else {
} else {
_rawXTemp = _rawPlayer.x + _vm->_screen->_scaleTable1[_scrollConst];
}

Expand Down

0 comments on commit c1e8044

Please sign in to comment.