diff options
-rw-r--r-- | engines/mortevielle/actions.cpp | 200 | ||||
-rw-r--r-- | engines/mortevielle/mor.cpp | 8 | ||||
-rw-r--r-- | engines/mortevielle/mor2.cpp | 18 | ||||
-rw-r--r-- | engines/mortevielle/prog.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/taffich.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/var_mor.h | 26 |
6 files changed, 132 insertions, 124 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp index 1edf1cd9c7..1520edef14 100644 --- a/engines/mortevielle/actions.cpp +++ b/engines/mortevielle/actions.cpp @@ -50,12 +50,12 @@ void fctMove() { int cx; if ((g_s._mlieu == 26) && (g_msg[4] == g_vm->_menu._moveMenu[6])) { - g_s._mlieu = 15; + g_s._mlieu = LANDING; g_caff = g_s._mlieu; afdes(0); repon(2, g_s._mlieu); } - if ((g_s._mlieu == 15) && (g_msg[4] == g_vm->_menu._moveMenu[6])) { + if ((g_s._mlieu == LANDING) && (g_msg[4] == g_vm->_menu._moveMenu[6])) { if (!g_syn) ecr3(g_vm->getEngineString(S_GO_TO)); tfleche(); @@ -67,10 +67,10 @@ void fctMove() { if (g_num == 0) return; if (g_num == 1) { - g_s._mlieu = 0; + g_s._mlieu = OWN_ROOM; tmlieu(0); } else if (g_num == 7) { - g_s._mlieu = 13; + g_s._mlieu = ATTIC; tmlieu(13); } else if (g_num != 6) g_s._mlieu = 26; @@ -90,7 +90,7 @@ void fctMove() { ++cx; } while (g_vm->_menu._moveMenu[cx] != g_msg[4]); - if (g_s._mlieu == 19) { + if (g_s._mlieu == MOUNTAIN) { if (cx == 1) t1deva(); if (cx == 2) @@ -106,43 +106,43 @@ void fctMove() { goto L2; } - if ((g_s._mlieu == 11) && (cx == 1)) + if ((g_s._mlieu == BUREAU) && (cx == 1)) cx = 6; - if (g_s._mlieu == 12) { + if (g_s._mlieu == KITCHEN) { if (cx == 2) cx = 6; if (cx == 5) cx = 16; } - if ((g_s._mlieu == 14) && (cx == 3)) + if ((g_s._mlieu == CELLAR) && (cx == 3)) cx = 6; - if (((g_s._mlieu == 15) || (g_s._mlieu == 26)) && (cx == 4)) + if (((g_s._mlieu == LANDING) || (g_s._mlieu == 26)) && (cx == 4)) cx = 6; - if ((g_s._mlieu > 19) && (g_s._mlieu != 26)) + if ((g_s._mlieu > MOUNTAIN) && (g_s._mlieu != 26)) cx += 10; - if ((g_s._mlieu == 20) && (cx == 13)) + if ((g_s._mlieu == CHAPEL) && (cx == 13)) cx = 16; - if (g_s._mlieu == 21) { + if (g_s._mlieu == MANOR_FRONT) { if (cx == 12) cx = 16; else if (cx > 13) cx = 15; } - if ((g_s._mlieu == 22) && (cx > 14)) + if ((g_s._mlieu == MANOR_BACK) && (cx > 14)) cx = 15; - if ((g_s._mlieu == 24) && (cx != 17)) + if ((g_s._mlieu == WELL) && (cx != 17)) if (cx > 13) cx = 15; if (cx == 1) - g_s._mlieu = 11; + g_s._mlieu = BUREAU; else if (cx == 2) - g_s._mlieu = 12; + g_s._mlieu = KITCHEN; else if (cx == 3) - g_s._mlieu = 14; + g_s._mlieu = CELLAR; else if (cx == 4) - g_s._mlieu = 15; + g_s._mlieu = LANDING; else if (cx == 5) cx = 12; if (cx == 6) @@ -152,9 +152,9 @@ void fctMove() { else if (cx == 12) t1deva(); else if (cx == 13) - g_s._mlieu = 20; + g_s._mlieu = CHAPEL; else if (cx == 14) - g_s._mlieu = 24; + g_s._mlieu = WELL; else if (cx == 15) t1neig(); else if (cx == 16) @@ -191,21 +191,21 @@ void fctTake() { if (g_ipers > 0) g_s._conf += 3; if (g_obpart) { - if (g_s._mlieu == 2) + if (g_s._mlieu == PURPLE_ROOM) g_s._iloic = 0; - if (g_s._mlieu == 13) { + if (g_s._mlieu == ATTIC) { if (g_s._iboul == g_caff) g_s._iboul = 0; if (g_s._ibag == g_caff) g_s._ibag = 0; } - if (g_s._mlieu == 14) + if (g_s._mlieu == CELLAR) g_s._icave = 0; - if (g_s._mlieu == 16) + if (g_s._mlieu == CRYPT) g_s._icryp = 0; - if (g_s._mlieu == 17) + if (g_s._mlieu == SECRET_PASSAGE) g_s._ivier = 0; - if (g_s._mlieu == 24) + if (g_s._mlieu == WELL) g_s._ipuit = 0; unsetSearchMenu(); g_obpart = false; @@ -235,39 +235,39 @@ void fctTake() { } } tcoord(5); - if ((g_num == 0) || ((g_num == 1) && (g_s._mlieu == 16))) { + if ((g_num == 0) || ((g_num == 1) && (g_s._mlieu == CRYPT))) { tcoord(8); if (g_num != 0) { if (g_ipers > 0) g_s._conf += 3; g_crep = 997; - if ((g_s._mlieu == 2) && (g_s._iloic != 0)) + if ((g_s._mlieu == PURPLE_ROOM) && (g_s._iloic != 0)) avpoing(g_s._iloic); - if ((g_s._mlieu == 13) && (g_num == 1) && (g_s._iboul != 0)) { + if ((g_s._mlieu == ATTIC) && (g_num == 1) && (g_s._iboul != 0)) { avpoing(g_s._iboul); if ((g_crep != 997) && (g_crep != 139)) aniof(2, 7); } - if ((g_s._mlieu == 13) && (g_num == 2) && (g_s._ibag != 0)) { + if ((g_s._mlieu == ATTIC) && (g_num == 2) && (g_s._ibag != 0)) { avpoing(g_s._ibag); if ((g_crep != 997) && (g_crep != 139)) aniof(2, 6); } - if ((g_s._mlieu == 14) && (g_s._icave != 0)) { + if ((g_s._mlieu == CELLAR) && (g_s._icave != 0)) { avpoing(g_s._icave); if ((g_crep != 997) && (g_crep != 139)) aniof(2, 2); } - if ((g_s._mlieu == 16) && (g_s._icryp != 0)) + if ((g_s._mlieu == CRYPT) && (g_s._icryp != 0)) avpoing(g_s._icryp); - if ((g_s._mlieu == 17) && (g_s._ivier != 0)) { + if ((g_s._mlieu == SECRET_PASSAGE) && (g_s._ivier != 0)) { avpoing(g_s._ivier); if ((g_crep != 997) && (g_crep != 139)) { g_crep = 182; aniof(2, 1); } } - if ((g_s._mlieu == 24) && (g_s._ipuit != 0)) { + if ((g_s._mlieu == WELL) && (g_s._ipuit != 0)) { avpoing(g_s._ipuit); if ((g_crep != 997) && (g_crep != 139)) aniof(2, 1); @@ -276,13 +276,13 @@ void fctTake() { g_crep = 999; } } else { - if ( ((g_s._mlieu == 0) && (g_num == 3)) || ((g_s._mlieu == 1) && (g_num == 4)) - || ((g_s._mlieu == 2) && (g_num == 1)) || ((g_s._mlieu == 4) && (g_num == 3)) - || ((g_s._mlieu == 5) && (g_num == 6)) || ((g_s._mlieu == 6) && (g_num == 2)) - || ((g_s._mlieu == 7) && (g_num == 6)) || ((g_s._mlieu == 8) && (g_num == 4)) - || ((g_s._mlieu == 9) && (g_num == 4)) || ((g_s._mlieu == 10) && (g_num > 2)) - || ((g_s._mlieu == 11) && (g_num == 7)) || ((g_s._mlieu == 12) && (g_num == 6)) - || ((g_s._mlieu == 13) && (g_num > 4)) || ((g_s._mlieu > 13) && (g_s._mlieu != 23)) ) + if ( ((g_s._mlieu == OWN_ROOM) && (g_num == 3)) || ((g_s._mlieu == GREEN_ROOM) && (g_num == 4)) + || ((g_s._mlieu == PURPLE_ROOM) && (g_num == 1)) || ((g_s._mlieu == DARKBLUE_ROOM) && (g_num == 3)) + || ((g_s._mlieu == BLUE_ROOM) && (g_num == 6)) || ((g_s._mlieu == RED_ROOM) && (g_num == 2)) + || ((g_s._mlieu == BATHROOM) && (g_num == 6)) || ((g_s._mlieu == GREEN_ROOM2) && (g_num == 4)) + || ((g_s._mlieu == 9) && (g_num == 4)) || ((g_s._mlieu == DINING_ROOM) && (g_num > 2)) + || ((g_s._mlieu == BUREAU) && (g_num == 7)) || ((g_s._mlieu == KITCHEN) && (g_num == 6)) + || ((g_s._mlieu == ATTIC) && (g_num > 4)) || ((g_s._mlieu > ATTIC) && (g_s._mlieu != 23)) ) g_crep = 997; else if (g_s._mlieu == 23) { g_crep = 1504; @@ -336,7 +336,7 @@ void fctLift() { if (g_ipers > 0) ++g_s._conf; g_crep = 997; - if ((g_s._mlieu == 2) && (g_s._iloic != 0)) + if ((g_s._mlieu == PURPLE_ROOM) && (g_s._iloic != 0)) treg(g_s._iloic); } return; @@ -344,9 +344,9 @@ void fctLift() { if (g_ipers > 0) ++g_s._conf; cx = g_s._mlieu; - if (g_s._mlieu == 16) + if (g_s._mlieu == CRYPT) cx = 14; - else if (g_s._mlieu == 19) + else if (g_s._mlieu == MOUNTAIN) cx = 15; g_crep = g_tabdon[asoul + (cx << 3) + (g_num - 1)]; if (g_crep == 255) @@ -404,7 +404,7 @@ void fctLook() { tcoord(8); g_crep = 131; if (g_num != 0) { - if (g_s._mlieu == 13) { + if (g_s._mlieu == ATTIC) { if (g_num == 1) { g_crep = 164; if (g_s._ibag != 0) @@ -417,17 +417,17 @@ void fctLook() { treg(g_s._ibag); } } - if (g_s._mlieu == 14) { + if (g_s._mlieu == CELLAR) { g_crep = 164; if (g_s._icave != 0) treg(g_s._icave); } - if (g_s._mlieu == 17) { + if (g_s._mlieu == SECRET_PASSAGE) { g_crep = 174; if (g_s._ivier != 0) treg(g_s._ivier); } - if (g_s._mlieu == 24) { + if (g_s._mlieu == WELL) { g_crep = 131; if (g_s._ipuit != 0) treg(g_s._ipuit); @@ -436,28 +436,28 @@ void fctLook() { return; } cx = g_s._mlieu; - if (g_s._mlieu == 20) + if (g_s._mlieu == CHAPEL) cx = 17; - if ((g_s._mlieu > 21) && (g_s._mlieu < 25)) + if ((g_s._mlieu > MANOR_FRONT) && (g_s._mlieu < DOOR)) cx -= 4; if (g_s._mlieu == 26) cx = 21; g_crep = g_tabdon[arega + (cx * 7) + g_num - 1]; - if ((g_s._mlieu == 13) && (g_num == 8)) + if ((g_s._mlieu == ATTIC) && (g_num == 8)) g_crep = 126; - if (g_s._mlieu == 19) + if (g_s._mlieu == MOUNTAIN) g_crep = 103; if (g_crep == 255) g_crep = 131; - if ((g_s._mlieu == 1) && (g_num == 1)) + if ((g_s._mlieu == GREEN_ROOM) && (g_num == 1)) treg(144); - if ((g_s._mlieu == 5) && (g_num == 3)) + if ((g_s._mlieu == BLUE_ROOM) && (g_num == 3)) treg(147); - if ((g_s._mlieu == 8) && (g_num == 3)) + if ((g_s._mlieu == GREEN_ROOM2) && (g_num == 3)) treg(149); if ((g_s._mlieu == 9) && (g_num == 2)) treg(30); - if ((g_s._mlieu == 10) && (g_num == 3)) + if ((g_s._mlieu == DINING_ROOM) && (g_num == 3)) treg(31); } @@ -527,13 +527,13 @@ void fctSearch() { if (g_num != 0) { if (g_ipers > 0) g_s._conf += 3; - if ((g_s._mlieu != 24) && (g_s._mlieu != 17) && (g_s._mlieu != 13)) { - if (g_s._mlieu == 2) { + if ((g_s._mlieu != WELL) && (g_s._mlieu != SECRET_PASSAGE) && (g_s._mlieu != ATTIC)) { + if (g_s._mlieu == PURPLE_ROOM) { g_crep = 123; if (g_s._iloic != 0) treg(g_s._iloic); } - if (g_s._mlieu == 16) { + if (g_s._mlieu == CRYPT) { g_crep = 123; if (g_s._icryp != 0) treg(g_s._icryp); @@ -545,22 +545,22 @@ void fctSearch() { if (g_ipers > 0) g_s._conf += 3; g_crep = 997; - if (g_s._mlieu < 14) + if (g_s._mlieu < CELLAR) g_crep = r[g_s._mlieu]; - if ((g_s._mlieu == 3) && (g_num == 2)) + if ((g_s._mlieu == TOILETS) && (g_num == 2)) g_crep = 162; - if (g_s._mlieu == 12) { + if (g_s._mlieu == KITCHEN) { if ((g_num == 3) || (g_num == 4)) g_crep = 162; else if (g_num == 5) g_crep = 159; } - if (g_s._mlieu == 19) + if (g_s._mlieu == MOUNTAIN) g_crep = 104; - else if (g_s._mlieu == 16) + else if (g_s._mlieu == CRYPT) g_crep = 155; } } @@ -612,15 +612,15 @@ void fctOpen() { ++cx; } while (!((cx > 6) || (ord(g_touv[cx]) == 0) || (ord(g_touv[cx]) == g_num))); if (ord(g_touv[cx]) != g_num) { - if (!( ((g_num == 3) && ((g_s._mlieu == 0) || (g_s._mlieu == 9) || (g_s._mlieu == 5) || (g_s._mlieu == 7))) - || ((g_num == 4) && ((g_s._mlieu == 1) || (g_s._mlieu == 2) || (g_s._mlieu == 6))) - || ((g_s._mlieu == 4) && (g_num == 5)) - || ((g_num == 6) && ((g_s._mlieu == 7) || (g_s._mlieu == 10) || (g_s._mlieu == 8) || (g_s._mlieu == 13))) - || ((g_s._mlieu == 8) && (g_num == 2)) - || ((g_s._mlieu == 12) && (g_num == 7))) ) { - if ( ((g_s._mlieu > 10) && (g_s._mlieu < 14)) - || ((g_s._mlieu > 6) && (g_s._mlieu < 10)) - || (g_s._mlieu == 0) || (g_s._mlieu == 2) || (g_s._mlieu == 5)) { + if (!( ((g_num == 3) && ((g_s._mlieu == OWN_ROOM) || (g_s._mlieu == 9) || (g_s._mlieu == BLUE_ROOM) || (g_s._mlieu == BATHROOM))) + || ((g_num == 4) && ((g_s._mlieu == GREEN_ROOM) || (g_s._mlieu == PURPLE_ROOM) || (g_s._mlieu == RED_ROOM))) + || ((g_s._mlieu == DARKBLUE_ROOM) && (g_num == 5)) + || ((g_num == 6) && ((g_s._mlieu == BATHROOM) || (g_s._mlieu == DINING_ROOM) || (g_s._mlieu == GREEN_ROOM2) || (g_s._mlieu == ATTIC))) + || ((g_s._mlieu == GREEN_ROOM2) && (g_num == 2)) + || ((g_s._mlieu == KITCHEN) && (g_num == 7))) ) { + if ( ((g_s._mlieu > DINING_ROOM) && (g_s._mlieu < CELLAR)) + || ((g_s._mlieu > RED_ROOM) && (g_s._mlieu < DINING_ROOM)) + || (g_s._mlieu == OWN_ROOM) || (g_s._mlieu == PURPLE_ROOM) || (g_s._mlieu == BLUE_ROOM)) { if (hazard(1, 4) == 3) parole(7, 9, 1); } @@ -628,7 +628,7 @@ void fctOpen() { aniof(1, g_num); } cx = g_s._mlieu; - if (g_s._mlieu == 16) + if (g_s._mlieu == CRYPT) cx = 14; g_crep = g_tabdon[aouvr + (cx * 7) + g_num - 1]; if (g_crep == 254) @@ -714,7 +714,7 @@ void fctPlace() { g_vm->_menu.displayMenu(); if (enterPassageFl) { - g_s._mlieu = 17; + g_s._mlieu = SECRET_PASSAGE; tmlieu(17); } else { tmlieu(g_s._mlieu); @@ -789,7 +789,7 @@ void fctTurn() { tcoord(9); if (g_num != 0) { g_crep = 997; - if ((g_s._mlieu == 13) && (g_s._ibag == 159) && (g_s._iboul == 141)) { + if ((g_s._mlieu == ATTIC) && (g_s._ibag == 159) && (g_s._iboul == 141)) { repon(2, 167); parole(7, 9, 1); int answer = Alert::show(g_vm->getEngineString(S_YES_NO), 1); @@ -798,13 +798,13 @@ void fctTurn() { else g_crep = 168; } - if ((g_s._mlieu == 17) && (g_s._ivier == 143)) { + if ((g_s._mlieu == SECRET_PASSAGE) && (g_s._ivier == 143)) { repon(2, 175); clsf3(); parole(6, -9, 1); int answer = Alert::show(g_vm->getEngineString(S_YES_NO), 1); if (answer == 1) { - g_s._mlieu = 16; + g_s._mlieu = CRYPT; affrep(); } else g_crep = 176; @@ -845,7 +845,7 @@ void fctAttach() { if (!(g_anyone) && !(g_iesc)) { tcoord(8); g_crep = 997; - if ((g_num != 0) && (g_s._mlieu == 24)) { + if ((g_num != 0) && (g_s._mlieu == WELL)) { g_crep = 999; if ((g_s._selectedObjectId == 120) || (g_s._selectedObjectId == 140)) { g_s._ipuit = g_s._selectedObjectId; @@ -903,18 +903,20 @@ void fctClose() { * @remarks Originally called 'tfrapper' */ void fctKnock() { + warning("Knock - mlieu %d", g_s._mlieu); + if (!g_syn) ecr3(g_vm->getEngineString(S_HIT)); - if (g_s._mlieu == 15) { + if (g_s._mlieu == LANDING) { Alert::show(g_vm->getEngineString(S_BEFORE_USE_DEP_MENU), 1); return; } - if (g_s._mlieu < 25) { + if (g_s._mlieu < DOOR) { tfleche(); if (!(g_anyone) && !(g_iesc)) { - if ((g_s._mlieu < 19) && (g_s._mlieu != 15)) + if ((g_s._mlieu < MOUNTAIN) && (g_s._mlieu != LANDING)) g_crep = 133; else g_crep = 997; @@ -1083,11 +1085,11 @@ void fctListen() { * @remarks Originally called 'tmanger' */ void fctEat() { - if ((g_s._mlieu > 15) && (g_s._mlieu < 26)) { + if ((g_s._mlieu > LANDING) && (g_s._mlieu < 26)) { g_crep = 148; } else { tsort(); - g_s._mlieu = 10; + g_s._mlieu = DINING_ROOM; g_caff = 10; debloc(g_s._mlieu); tmlieu(g_s._mlieu); @@ -1124,12 +1126,10 @@ void fctEat() { * @remarks Originally called 'tentrer' */ void fctEnter() { -// int x; - - if ((g_s._mlieu == 21) || (g_s._mlieu == 22)) { + if ((g_s._mlieu == MANOR_FRONT) || (g_s._mlieu == MANOR_BACK)) { t1sama(); tmlieu(g_s._mlieu); - } else if (g_s._mlieu == 15) + } else if (g_s._mlieu == LANDING) aldepl(); else if (g_ment == 0) g_crep = 997; @@ -1150,7 +1150,7 @@ void fctEnter() { tip(z, g_x); ++g_s._conf; - g_s._mlieu = 15; + g_s._mlieu = LANDING; g_msg[3] = MENU_DISCUSS; g_msg[4] = g_vm->_menu._discussMenu[g_x]; g_syn = true; @@ -1187,13 +1187,13 @@ void fctEnter() { void fctSleep() { int z, j, h, m; - if ((g_s._mlieu > 15) && (g_s._mlieu < 26)) { + if ((g_s._mlieu > LANDING) && (g_s._mlieu < 26)) { g_crep = 148; return; } - if (g_s._mlieu != 0) { + if (g_s._mlieu != OWN_ROOM) { tsort(); - g_s._mlieu = 0; + g_s._mlieu = OWN_ROOM; affrep(); afdes(0); debloc(g_s._mlieu); @@ -1254,22 +1254,22 @@ void fctForce() { void fctLeave() { tsort(); g_crep = 0; - if ((g_s._mlieu == 19) || (g_s._mlieu == 21) || (g_s._mlieu == 22) || (g_s._mlieu == 24)) + if ((g_s._mlieu == MOUNTAIN) || (g_s._mlieu == MANOR_FRONT) || (g_s._mlieu == MANOR_BACK) || (g_s._mlieu == WELL)) g_crep = 997; else { int lx = 0; - if ((g_s._mlieu < 16) || (g_s._mlieu == 26)) + if ((g_s._mlieu < CRYPT) || (g_s._mlieu == 26)) lx = 10; - if ((g_s._mlieu == 10) || (g_s._mlieu == 20)) + if ((g_s._mlieu == DINING_ROOM) || (g_s._mlieu == CHAPEL)) lx = 21; - if ((g_s._mlieu < 10) || (g_s._mlieu == 13)) + if ((g_s._mlieu < DINING_ROOM) || (g_s._mlieu == ATTIC)) lx = 15; - if (g_s._mlieu == 16) { + if (g_s._mlieu == CRYPT) { lx = 17; g_crep = 176; } - if (g_s._mlieu == 17) + if (g_s._mlieu == SECRET_PASSAGE) t23coul(lx); if (g_s._mlieu == 23) lx = 24; @@ -1301,9 +1301,9 @@ void fctWait() { t11(g_s._mlieu, quel); if ((g_ipers != 0) && (g_mpers == 0)) { g_crep = 998; - if ((g_s._mlieu == 13) || (g_s._mlieu == 14)) + if ((g_s._mlieu == ATTIC) || (g_s._mlieu == CELLAR)) cavegre(); - if ((g_s._mlieu > 0) && (g_s._mlieu < 10)) + if ((g_s._mlieu > OWN_ROOM) && (g_s._mlieu < DINING_ROOM)) g_anyone = true; g_mpers = g_ipers; if (!g_anyone) diff --git a/engines/mortevielle/mor.cpp b/engines/mortevielle/mor.cpp index 2cb44c7ddf..b951a81be5 100644 --- a/engines/mortevielle/mor.cpp +++ b/engines/mortevielle/mor.cpp @@ -1025,7 +1025,7 @@ void inzon() { g_s._iloic = 136; g_s._icryp = 141; g_s._conf = hazard(4, 10); - g_s._mlieu = 21; + g_s._mlieu = MANOR_FRONT; for (int cx = 2; cx <= 6; ++cx) g_s._sjer[cx] = chr(0); @@ -1320,7 +1320,7 @@ void musique(int so) { ++g_prebru; } else { bool i = false; - if ((g_s._mlieu == 19) || (g_s._mlieu == 21) || (g_s._mlieu == 22)) { + if ((g_s._mlieu == MOUNTAIN) || (g_s._mlieu == MANOR_FRONT) || (g_s._mlieu == MANOR_BACK)) { int haz = hazard(1, 3); if (haz == 2) { haz = hazard(2, 4); @@ -1328,7 +1328,7 @@ void musique(int so) { i = true; } } - if (g_s._mlieu == 20) { + if (g_s._mlieu == CHAPEL) { int haz = hazard(1, 2); if (haz == 1) { parole(8, 1, 1); @@ -1336,7 +1336,7 @@ void musique(int so) { } } - if (g_s._mlieu == 24) { + if (g_s._mlieu == WELL) { int haz = hazard(1, 2); if (haz == 2) { parole(12, 1, 1); diff --git a/engines/mortevielle/mor2.cpp b/engines/mortevielle/mor2.cpp index 0d6069b4d5..70cfc8850e 100644 --- a/engines/mortevielle/mor2.cpp +++ b/engines/mortevielle/mor2.cpp @@ -157,7 +157,7 @@ void tinke() { g_mpers = g_ipers; if ((g_mpers == 0) && (g_ipers > 0)) { - if ((g_s._mlieu == 13) || (g_s._mlieu == 14)) { + if ((g_s._mlieu == ATTIC) || (g_s._mlieu == CELLAR)) { cavegre(); } else if (g_ipers == 10) { g_ipers = 0; @@ -186,7 +186,7 @@ void tinke() { nouvp(g_li, cx); g_brt = false; g_hdb = 0; - if ((g_s._mlieu > 0) && (g_s._mlieu < 10)) + if ((g_s._mlieu > OWN_ROOM) && (g_s._mlieu < DINING_ROOM)) g_anyone = true; } } @@ -370,7 +370,7 @@ void cherjer(int ob, bool &d) { } void st1sama() { - g_s._mlieu = 10; + g_s._mlieu = DINING_ROOM; affrep(); } @@ -505,7 +505,7 @@ void t1sama() { //Entering manor dessine_rouleau(); drawClock(); showMouse(); - g_s._mlieu = 0; + g_s._mlieu = OWN_ROOM; affrep(); t5(10); if (!g_blo) @@ -519,7 +519,7 @@ void t1sama() { //Entering manor } void t1vier() { - g_s._mlieu = 17; + g_s._mlieu = SECRET_PASSAGE; affrep(); } @@ -530,19 +530,19 @@ void t1neig() { tperd(); } else { g_okdes = true; - g_s._mlieu = 19; + g_s._mlieu = MOUNTAIN; affrep(); } } void t1deva() { g_inei = 0; - g_s._mlieu = 21; + g_s._mlieu = MANOR_FRONT; affrep(); } void t1derr() { - g_s._mlieu = 22; + g_s._mlieu = MANOR_BACK; affrep(); } @@ -781,7 +781,7 @@ void avpoing(int &ob) { void rechai(int &ch) { int cx = g_s._mlieu; - if (g_s._mlieu == 16) + if (g_s._mlieu == CRYPT) cx = 14; ch = g_tabdon[achai + (cx * 7) + g_num - 1]; } diff --git a/engines/mortevielle/prog.cpp b/engines/mortevielle/prog.cpp index 85a5f140bb..8479538879 100644 --- a/engines/mortevielle/prog.cpp +++ b/engines/mortevielle/prog.cpp @@ -229,7 +229,7 @@ void tsitu() { if ((((h == 12) || (h == 13) || (h == 19)) && (g_s._mlieu != 10)) || ((h > 0) && (h < 6) && (g_s._mlieu != 0))) ++g_s._conf; - if (((g_s._mlieu < 16) || (g_s._mlieu > 19)) && (g_s._mlieu != 23) + if (((g_s._mlieu < CRYPT) || (g_s._mlieu > MOUNTAIN)) && (g_s._mlieu != 23) && (g_s._mlieu != 0) && (g_s._selectedObjectId != 152) && (!g_vm->_loseGame)) { if ((g_s._conf > 99) && (h > 8) && (h < 16)) { g_crep = 1501; diff --git a/engines/mortevielle/taffich.cpp b/engines/mortevielle/taffich.cpp index 6e9a66ce30..096a076001 100644 --- a/engines/mortevielle/taffich.cpp +++ b/engines/mortevielle/taffich.cpp @@ -249,7 +249,7 @@ void taffich() { charani(filename, lgt, handle); } showMouse(); - if ((a < 27) && ((g_maff < 27) || (g_s._mlieu == 15)) && (g_msg[4] != OPCODE_ENTER)) { + if ((a < 27) && ((g_maff < 27) || (g_s._mlieu == LANDING)) && (g_msg[4] != OPCODE_ENTER)) { if ((a == 13) || (a == 14)) person(); else if (!g_blo) diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h index a9652cee5d..a1b22d4299 100644 --- a/engines/mortevielle/var_mor.h +++ b/engines/mortevielle/var_mor.h @@ -33,15 +33,6 @@ namespace Mortevielle { -/* Constantes, Types et Variables pour le - - M A N O I R DE M O R T E V I E L L E - - ( version Nov 1988 - + - musique & paroles Oct 88 ) - */ - /*---------------------------------------------------------------------------*/ /*------------------- MEMORY MAP ------------------------*/ /*---------------------------------------------------------------------------*/ @@ -152,6 +143,23 @@ extern const byte g_rang[16]; /*-------------------------------- TYPES --------------------------------*/ /*---------------------------------------------------------------------------*/ +/* +9 "A glance at the forbidden$", +18 "It's already open$", +23 "Strange horoscope$", +26 "A photograph$", +27 "The coat of arms$", +*/ + +enum places { + OWN_ROOM = 0, GREEN_ROOM = 1, PURPLE_ROOM = 2, TOILETS = 3, DARKBLUE_ROOM = 4, + BLUE_ROOM = 5, RED_ROOM = 6, BATHROOM = 7, GREEN_ROOM2 = 8, + DINING_ROOM = 10, BUREAU = 11, KITCHEN = 12, ATTIC = 13, CELLAR = 14, + LANDING = 15, CRYPT = 16, SECRET_PASSAGE = 17, MOUNTAIN = 19, + CHAPEL = 20, MANOR_FRONT = 21, MANOR_BACK = 22, WELL = 24, + DOOR = 25 +}; + struct sav_chaine { int _conf; byte _pourc[11]; |