aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/actions.cpp
diff options
context:
space:
mode:
authorStrangerke2012-03-08 08:24:54 +0100
committerStrangerke2012-04-06 08:22:57 +0200
commit36a65ad3c9c858f72ba62d16d58b6996228b27fa (patch)
tree4fb75881271198c1559e82114ca06cbfc120f8fd /engines/mortevielle/actions.cpp
parent09c157b3b33122b645f93c81f8b524caabbd62d5 (diff)
downloadscummvm-rg350-36a65ad3c9c858f72ba62d16d58b6996228b27fa.tar.gz
scummvm-rg350-36a65ad3c9c858f72ba62d16d58b6996228b27fa.tar.bz2
scummvm-rg350-36a65ad3c9c858f72ba62d16d58b6996228b27fa.zip
MORTEVIELLE: Move (and rename) some more globals to MortevielleEngine
Diffstat (limited to 'engines/mortevielle/actions.cpp')
-rw-r--r--engines/mortevielle/actions.cpp66
1 files changed, 32 insertions, 34 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index d4a53780e1..cd08177bcc 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -57,9 +57,9 @@ void fctMove() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_GO_TO));
tfleche();
- if (g_iesc)
+ if (g_vm->_keyPressedEsc)
g_okdes = false;
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(1);
if (g_num == 0)
@@ -224,7 +224,7 @@ void fctTake() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_TAKE));
tfleche();
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
if (g_caff == 3) {
tcoord(2);
@@ -322,12 +322,10 @@ void fctInventoryTake() {
* @remarks Originally called 'tsoulever'
*/
void fctLift() {
-// int cx;
-
if (!g_syn)
ecr3(g_vm->getEngineString(S_LIFT));
tfleche();
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(3);
if (g_num == 0) {
@@ -364,7 +362,7 @@ void fctRead() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_READ));
tfleche();
- if (!(g_anyone) && !(g_iesc)) {
+ if (!(g_anyone) && !(g_vm->_keyPressedEsc)) {
tcoord(4);
if (g_num != 0)
g_crep = 107;
@@ -397,7 +395,7 @@ void fctLook() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_LOOK));
tfleche();
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(5);
if (g_num == 0) {
@@ -488,7 +486,7 @@ void fctSearch() {
ecr3(g_vm->getEngineString(S_SEARCH));
tfleche();
- if (g_anyone || g_iesc)
+ if (g_anyone || g_vm->_keyPressedEsc)
return;
if (g_s._currPlace == 23) {
@@ -599,7 +597,7 @@ void fctOpen() {
}
tfleche();
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(7);
@@ -652,10 +650,10 @@ void fctPlace() {
ecr3(g_vm->getEngineString(S_PUT));
tfleche();
- if (g_iesc)
+ if (g_vm->_keyPressedEsc)
g_crep = 998;
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(8);
@@ -784,7 +782,7 @@ void fctTurn() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_TURN));
tfleche();
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(9);
if (g_num != 0) {
@@ -820,12 +818,12 @@ void fctSelfHide() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_HIDE_SELF));
tfleche();
- if (!(g_anyone) && !(g_iesc)) {
+ if (!(g_anyone) && !(g_vm->_keyPressedEsc)) {
tcoord(10);
if (g_num == 0)
- g_cache = false;
+ g_vm->_hiddenHero = false;
else {
- g_cache = true;
+ g_vm->_hiddenHero = true;
g_crep = 999;
}
}
@@ -842,7 +840,7 @@ void fctAttach() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_TIE));
tfleche();
- if (!(g_anyone) && !(g_iesc)) {
+ if (!(g_anyone) && !(g_vm->_keyPressedEsc)) {
tcoord(8);
g_crep = 997;
if ((g_num != 0) && (g_s._currPlace == WELL)) {
@@ -868,9 +866,9 @@ void fctClose() {
if (g_caff < 26) {
tfleche();
- if (g_iesc)
+ if (g_vm->_keyPressedEsc)
g_crep = 998;
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(7);
if (g_num != 0) {
@@ -915,7 +913,7 @@ void fctKnock() {
if (g_s._currPlace < DOOR) {
tfleche();
- if (!(g_anyone) && !(g_iesc)) {
+ if (!(g_anyone) && !(g_vm->_keyPressedEsc)) {
if ((g_s._currPlace < MOUNTAIN) && (g_s._currPlace != LANDING))
g_crep = 133;
else
@@ -966,7 +964,7 @@ void fctSelfPut() {
return;
}
tfleche();
- if ((g_anyone) || (g_iesc))
+ if ((g_anyone) || (g_vm->_keyPressedEsc))
return;
tcoord(7);
g_crep = 124;
@@ -1138,7 +1136,7 @@ void fctEnter() {
g_s._teauto[8] = '*';
} else {
int z = 0;
- if (!g_vm->g_blo)
+ if (!g_vm->_blo)
z = t11(g_ment);
if (z != 0) {
if ((g_ment == 3) || (g_ment == 7))
@@ -1155,12 +1153,12 @@ void fctEnter() {
g_msg[4] = g_vm->_menu._discussMenu[g_x];
g_syn = true;
if (g_ment == 9) {
- g_col = true;
+ g_vm->_col = true;
g_caff = 70;
afdes(0);
repon(2, g_caff);
} else
- g_col = false;
+ g_vm->_col = false;
debloc(g_ment);
g_ment = 0;
}
@@ -1237,7 +1235,7 @@ void fctForce() {
if (g_caff < 25)
tfleche();
- if ((!g_anyone) && (!g_iesc)) {
+ if ((!g_anyone) && (!g_vm->_keyPressedEsc)) {
if (g_s._currPlace != 26)
g_crep = 997;
else {
@@ -1297,7 +1295,7 @@ void fctWait() {
do {
++g_jh;
tinke();
- if (!g_vm->g_blo)
+ if (!g_vm->_blo)
quel = t11(g_s._currPlace);
if ((g_ipers != 0) && (g_mpers == 0)) {
g_crep = 998;
@@ -1327,7 +1325,7 @@ void fctSound() {
ecr3(g_vm->getEngineString(S_PROBE2));
if (g_caff < 27) {
tfleche();
- if (!(g_anyone) && (!g_iesc))
+ if (!(g_anyone) && (!g_vm->_keyPressedEsc))
g_crep = 145;
g_num = 0;
}
@@ -1345,7 +1343,7 @@ void fctDiscuss() {
bool f;
endSearch();
- if (g_col)
+ if (g_vm->_col)
suj = 128;
else {
cx = 0;
@@ -1463,8 +1461,8 @@ void fctDiscuss() {
g_vm->setMouseClick(false);
if (choi != 46) {
int ix = choi - 1;
- if (g_col) {
- g_col = false;
+ if (g_vm->_col) {
+ g_vm->_col = false;
g_s._currPlace = 15;
if (g_iouv > 0)
max = 8;
@@ -1507,15 +1505,15 @@ void fctDiscuss() {
showMouse();
}
} while ((choi != 46) && (suj != 138));
- if (g_col) {
+ if (g_vm->_col) {
g_s._faithScore += (3 * (g_s._faithScore / 10));
hideMouse();
hirs();
premtet();
sparl(0, 138);
showMouse();
- g_col = false;
- g_s._currPlace = 15;
+ g_vm->_col = false;
+ g_s._currPlace = LANDING;
}
g_ctrm = 0;
hideMouse();
@@ -1541,7 +1539,7 @@ void fctSmell() {
if (!g_syn)
ecr3(g_vm->getEngineString(S_SMELL));
tfleche();
- if (!(g_anyone) && !(g_iesc))
+ if (!(g_anyone) && !(g_vm->_keyPressedEsc))
if (g_caff == 16)
g_crep = 153;
} else if (g_caff == 123)