Skip to content

Commit

Permalink
HOPKINS: Regroup some IF statements in linesManager
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Feb 19, 2013
1 parent 471b8af commit 7db7f8f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions engines/hopkins/lines.cpp
Expand Up @@ -1729,29 +1729,23 @@ int LinesManager::PARC_PERS(int fromX, int fromY, int destX, int destY, int a5,
if (v22 == 1) {
if (v100 >= -1000 && v100 <= -510)
newDirection = DIR_UP_RIGHT;
if (v100 >= -510 && v100 <= 0)
newDirection = DIR_RIGHT;
if (v100 >= 0 && v100 <= 510)
if (v100 >= -510 && v100 <= 510)
newDirection = DIR_RIGHT;
if (v100 >= 510 && v100 <= 1000)
newDirection = DIR_DOWN_RIGHT;
}
if (v96 == 1) {
if (v102 >= 510 && v102 <= 1000)
newDirection = DIR_DOWN_RIGHT;
if (v102 >= 0 && v102 <= 510)
newDirection = DIR_DOWN;
if (v102 >= -510 && v102 <= 0)
if (v102 >= -510 && v102 <= 510)
newDirection = DIR_DOWN;
if (v102 >= -1000 && v102 <= -510)
newDirection = DIR_DOWN_LEFT;
}
if (v22 == -1) {
if (v100 >= 510 && v100 <= 1000)
newDirection = DIR_DOWN_LEFT;
if (v100 >= 0 && v100 <= 510)
newDirection = DIR_LEFT;
if (v100 >= -510 && v100 <= 0)
if (v100 >= -510 && v100 <= 510)
newDirection = DIR_LEFT;
if (v100 >= -1000 && v100 <= -510)
newDirection = DIR_UP_LEFT;
Expand Down

0 comments on commit 7db7f8f

Please sign in to comment.