Skip to content

Commit

Permalink
HOPKINS: Some refactoring in the pathfinding code
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jan 12, 2013
1 parent e28c459 commit 1fd81ee
Show file tree
Hide file tree
Showing 8 changed files with 306 additions and 344 deletions.
4 changes: 2 additions & 2 deletions engines/hopkins/globals.cpp
Expand Up @@ -160,7 +160,7 @@ Globals::Globals() {
_actionDirection = 0;
_actionDirection = 0;
SegmentEnCours = 0;
STOP_BUG = 0;
pathFindingDepth = 0;

Credit_bx = -1;
Credit_bx1 = -1;
Expand Down Expand Up @@ -216,7 +216,7 @@ Globals::Globals() {
old_x2_67 = 0;
old_y2_68 = 0;
old_zone_68 = 0;
old_z_69 = 0;
_oldZoneNum = 0;
old_x_69 = 0;
old_y_70 = 0;
compteur_71 = 0;
Expand Down
4 changes: 2 additions & 2 deletions engines/hopkins/globals.h
Expand Up @@ -402,7 +402,7 @@ class Globals {
int SegmentEnCours;
int couleur_40;

int STOP_BUG;
int pathFindingDepth;

int force_to_data_0;
int oldzone_46;
Expand All @@ -414,7 +414,7 @@ class Globals {
int compteur_71;
int zozo_73;
int old_y2_68;
int old_z_69;
int _oldZoneNum;
int j_104;

int Credit_bx;
Expand Down
10 changes: 5 additions & 5 deletions engines/hopkins/hopkins.cpp
Expand Up @@ -2610,11 +2610,11 @@ void HopkinsEngine::BTOCEAN() {
_fontManager.hideText(9);
if (_eventsManager._mouseCursorId == 16) {
_eventsManager.getMouseX();
if (_objectsManager.NUMZONE > 0) {
if (_objectsManager._zoneNum > 0) {
int oldPosX = _eventsManager.getMouseX();
int oldPosY = _eventsManager.getMouseY();
bool displAnim = false;
if (_objectsManager.NUMZONE == 1) {
if (_objectsManager._zoneNum == 1) {
if (_globals._oceanDirection == 3)
_objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 0, 0, 6, 0);
else if (_globals._oceanDirection == 1)
Expand Down Expand Up @@ -2646,7 +2646,7 @@ void HopkinsEngine::BTOCEAN() {
displAnim = true;
}
LABEL_22:
if (_objectsManager.NUMZONE == 2) {
if (_objectsManager._zoneNum == 2) {
if (_globals._oceanDirection == 7)
_objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, 0);
else if (_globals._oceanDirection == 1)
Expand Down Expand Up @@ -2678,7 +2678,7 @@ void HopkinsEngine::BTOCEAN() {
displAnim = true;
}
LABEL_41:
if (_objectsManager.NUMZONE == 3) {
if (_objectsManager._zoneNum == 3) {
if (_globals._oceanDirection == 3) {
int oldX = _objectsManager.getSpriteX(0);
do {
Expand Down Expand Up @@ -2734,7 +2734,7 @@ void HopkinsEngine::BTOCEAN() {
_globals._oceanDirection = 1;
_globals._exitId = 3;
}
if (_objectsManager.NUMZONE == 4) {
if (_objectsManager._zoneNum == 4) {
if (_globals._oceanDirection == 3) {
int oldX = _objectsManager.getSpriteX(0);
do {
Expand Down

0 comments on commit 1fd81ee

Please sign in to comment.