MORTEVIELLE: Rename some more functions and globals
This commit is contained in:
parent
5739256412
commit
1ee4429601
7 changed files with 156 additions and 108 deletions
|
@ -164,7 +164,7 @@ void fctMove() {
|
||||||
g_crep = 997;
|
g_crep = 997;
|
||||||
else if (g_s._wellObjectId == 120)
|
else if (g_s._wellObjectId == 120)
|
||||||
g_crep = 181;
|
g_crep = 181;
|
||||||
else if (g_s._conf > 80) {
|
else if (g_s._faithScore > 80) {
|
||||||
g_crep = 1505;
|
g_crep = 1505;
|
||||||
tperd();
|
tperd();
|
||||||
} else {
|
} else {
|
||||||
|
@ -189,7 +189,7 @@ void fctTake() {
|
||||||
avpoing(cx);
|
avpoing(cx);
|
||||||
if (g_crep != 139) {
|
if (g_crep != 139) {
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
g_s._conf += 3;
|
g_s._faithScore += 3;
|
||||||
if (g_obpart) {
|
if (g_obpart) {
|
||||||
if (g_s._currPlace == PURPLE_ROOM)
|
if (g_s._currPlace == PURPLE_ROOM)
|
||||||
g_s._purpleRoomObjectId = 0;
|
g_s._purpleRoomObjectId = 0;
|
||||||
|
@ -215,7 +215,7 @@ void fctTake() {
|
||||||
tsuiv();
|
tsuiv();
|
||||||
++g_dobj;
|
++g_dobj;
|
||||||
if (g_dobj > 6) {
|
if (g_dobj > 6) {
|
||||||
g_s._conf += 2;
|
g_s._faithScore += 2;
|
||||||
g_dobj = 0;
|
g_dobj = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ void fctTake() {
|
||||||
tcoord(8);
|
tcoord(8);
|
||||||
if (g_num != 0) {
|
if (g_num != 0) {
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
g_s._conf += 3;
|
g_s._faithScore += 3;
|
||||||
g_crep = 997;
|
g_crep = 997;
|
||||||
if ((g_s._currPlace == PURPLE_ROOM) && (g_s._purpleRoomObjectId != 0))
|
if ((g_s._currPlace == PURPLE_ROOM) && (g_s._purpleRoomObjectId != 0))
|
||||||
avpoing(g_s._purpleRoomObjectId);
|
avpoing(g_s._purpleRoomObjectId);
|
||||||
|
@ -335,7 +335,7 @@ void fctLift() {
|
||||||
tcoord(8);
|
tcoord(8);
|
||||||
if (g_num != 0) {
|
if (g_num != 0) {
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
++g_s._conf;
|
++g_s._faithScore;
|
||||||
g_crep = 997;
|
g_crep = 997;
|
||||||
if ((g_s._currPlace == PURPLE_ROOM) && (g_s._purpleRoomObjectId != 0))
|
if ((g_s._currPlace == PURPLE_ROOM) && (g_s._purpleRoomObjectId != 0))
|
||||||
treg(g_s._purpleRoomObjectId);
|
treg(g_s._purpleRoomObjectId);
|
||||||
|
@ -343,7 +343,7 @@ void fctLift() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
++g_s._conf;
|
++g_s._faithScore;
|
||||||
int tmpPlace = g_s._currPlace;
|
int tmpPlace = g_s._currPlace;
|
||||||
if (g_s._currPlace == CRYPT)
|
if (g_s._currPlace == CRYPT)
|
||||||
tmpPlace = 14;
|
tmpPlace = 14;
|
||||||
|
@ -510,7 +510,7 @@ void fctSearch() {
|
||||||
g_crep = 187;
|
g_crep = 187;
|
||||||
else {
|
else {
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
g_s._conf += 3;
|
g_s._faithScore += 3;
|
||||||
|
|
||||||
rechai(g_mchai);
|
rechai(g_mchai);
|
||||||
if (g_mchai != 0) {
|
if (g_mchai != 0) {
|
||||||
|
@ -527,7 +527,7 @@ void fctSearch() {
|
||||||
g_crep = 997;
|
g_crep = 997;
|
||||||
if (g_num != 0) {
|
if (g_num != 0) {
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
g_s._conf += 3;
|
g_s._faithScore += 3;
|
||||||
if ((g_s._currPlace != WELL) && (g_s._currPlace != SECRET_PASSAGE) && (g_s._currPlace != ATTIC)) {
|
if ((g_s._currPlace != WELL) && (g_s._currPlace != SECRET_PASSAGE) && (g_s._currPlace != ATTIC)) {
|
||||||
if (g_s._currPlace == PURPLE_ROOM) {
|
if (g_s._currPlace == PURPLE_ROOM) {
|
||||||
g_crep = 123;
|
g_crep = 123;
|
||||||
|
@ -544,7 +544,7 @@ void fctSearch() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
g_s._conf += 3;
|
g_s._faithScore += 3;
|
||||||
g_crep = 997;
|
g_crep = 997;
|
||||||
if (g_s._currPlace < CELLAR)
|
if (g_s._currPlace < CELLAR)
|
||||||
g_crep = r[g_s._currPlace];
|
g_crep = r[g_s._currPlace];
|
||||||
|
@ -606,7 +606,7 @@ void fctOpen() {
|
||||||
tcoord(7);
|
tcoord(7);
|
||||||
if (g_num != 0) {
|
if (g_num != 0) {
|
||||||
if (g_ipers > 0)
|
if (g_ipers > 0)
|
||||||
g_s._conf += 2;
|
g_s._faithScore += 2;
|
||||||
++g_iouv;
|
++g_iouv;
|
||||||
int tmpPlace = 0;
|
int tmpPlace = 0;
|
||||||
do {
|
do {
|
||||||
|
@ -930,7 +930,7 @@ void fctKnock() {
|
||||||
int rand = (getRandomNumber(0, 8)) - 4;
|
int rand = (getRandomNumber(0, 8)) - 4;
|
||||||
parole(11, rand, 1);
|
parole(11, rand, 1);
|
||||||
int p;
|
int p;
|
||||||
ecfren(p, rand, g_s._conf, g_ment);
|
ecfren(p, rand, g_s._faithScore, g_ment);
|
||||||
int l = g_ment;
|
int l = g_ment;
|
||||||
if (l != 0) {
|
if (l != 0) {
|
||||||
if (p != -500) {
|
if (p != -500) {
|
||||||
|
@ -1052,9 +1052,9 @@ void fctListen() {
|
||||||
g_crep = 101;
|
g_crep = 101;
|
||||||
else {
|
else {
|
||||||
if (g_ipers != 0)
|
if (g_ipers != 0)
|
||||||
++g_s._conf;
|
++g_s._faithScore;
|
||||||
int p, rand;
|
int p, rand;
|
||||||
ecfren(p, rand, g_s._conf, g_ment);
|
ecfren(p, rand, g_s._faithScore, g_ment);
|
||||||
int l = g_ment;
|
int l = g_ment;
|
||||||
if (l != 0) {
|
if (l != 0) {
|
||||||
if (p != -500) {
|
if (p != -500) {
|
||||||
|
@ -1098,7 +1098,7 @@ void fctEat() {
|
||||||
int j, h, m;
|
int j, h, m;
|
||||||
calch(j, h, m);
|
calch(j, h, m);
|
||||||
if ((h == 12) || (h == 13) || (h == 19)) {
|
if ((h == 12) || (h == 13) || (h == 19)) {
|
||||||
g_s._conf -= (g_s._conf / 7);
|
g_s._faithScore -= (g_s._faithScore / 7);
|
||||||
if (h == 12) {
|
if (h == 12) {
|
||||||
if (m == 0)
|
if (m == 0)
|
||||||
h = 4;
|
h = 4;
|
||||||
|
@ -1150,7 +1150,7 @@ void fctEnter() {
|
||||||
aniof(1, 1);
|
aniof(1, 1);
|
||||||
|
|
||||||
tip(z, g_x);
|
tip(z, g_x);
|
||||||
++g_s._conf;
|
++g_s._faithScore;
|
||||||
g_s._currPlace = LANDING;
|
g_s._currPlace = LANDING;
|
||||||
g_msg[3] = MENU_DISCUSS;
|
g_msg[3] = MENU_DISCUSS;
|
||||||
g_msg[4] = g_vm->_menu._discussMenu[g_x];
|
g_msg[4] = g_vm->_menu._discussMenu[g_x];
|
||||||
|
@ -1209,7 +1209,7 @@ void fctSleep() {
|
||||||
int answer;
|
int answer;
|
||||||
do {
|
do {
|
||||||
if (h < 8) {
|
if (h < 8) {
|
||||||
g_s._conf -= (g_s._conf / 20);
|
g_s._faithScore -= (g_s._faithScore / 20);
|
||||||
z = (7 - h) * 2;
|
z = (7 - h) * 2;
|
||||||
if (m == 30)
|
if (m == 30)
|
||||||
--z;
|
--z;
|
||||||
|
@ -1243,7 +1243,7 @@ void fctForce() {
|
||||||
g_crep = 997;
|
g_crep = 997;
|
||||||
else {
|
else {
|
||||||
g_crep = 143;
|
g_crep = 143;
|
||||||
g_s._conf += 2;
|
g_s._faithScore += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1475,14 +1475,14 @@ void fctDiscuss() {
|
||||||
suj = 129;
|
suj = 129;
|
||||||
else {
|
else {
|
||||||
suj = 138;
|
suj = 138;
|
||||||
g_s._conf += (3 * (g_s._conf / 10));
|
g_s._faithScore += (3 * (g_s._faithScore / 10));
|
||||||
}
|
}
|
||||||
} else if (g_nbrep[g_caff - 69] < g_nbrepm[g_caff - 69]) {
|
} else if (g_nbrep[g_caff - 69] < g_nbrepm[g_caff - 69]) {
|
||||||
suj = g_tabdon[arep + (ix << 3) + (g_caff - 70)];
|
suj = g_tabdon[arep + (ix << 3) + (g_caff - 70)];
|
||||||
g_s._conf += g_tabdon[arcf + ix];
|
g_s._faithScore += g_tabdon[arcf + ix];
|
||||||
++g_nbrep[g_caff - 69];
|
++g_nbrep[g_caff - 69];
|
||||||
} else {
|
} else {
|
||||||
g_s._conf += 3;
|
g_s._faithScore += 3;
|
||||||
suj = 139;
|
suj = 139;
|
||||||
}
|
}
|
||||||
hideMouse();
|
hideMouse();
|
||||||
|
@ -1509,7 +1509,7 @@ void fctDiscuss() {
|
||||||
}
|
}
|
||||||
} while ((choi != 46) && (suj != 138));
|
} while ((choi != 46) && (suj != 138));
|
||||||
if (g_col) {
|
if (g_col) {
|
||||||
g_s._conf += (3 * (g_s._conf / 10));
|
g_s._faithScore += (3 * (g_s._faithScore / 10));
|
||||||
hideMouse();
|
hideMouse();
|
||||||
hirs();
|
hirs();
|
||||||
premtet();
|
premtet();
|
||||||
|
|
|
@ -236,11 +236,11 @@ void clsf10() {
|
||||||
cod = 544;
|
cod = 544;
|
||||||
}
|
}
|
||||||
g_vm->_screenSurface.fillRect(15, Common::Rect(cod, 93, co, 98));
|
g_vm->_screenSurface.fillRect(15, Common::Rect(cod, 93, co, 98));
|
||||||
if (g_s._conf < 33)
|
if (g_s._faithScore < 33)
|
||||||
st = g_vm->getEngineString(S_COOL);
|
st = g_vm->getEngineString(S_COOL);
|
||||||
else if (g_s._conf < 66)
|
else if (g_s._faithScore < 66)
|
||||||
st = g_vm->getEngineString(S_LOURDE);
|
st = g_vm->getEngineString(S_LOURDE);
|
||||||
else if (g_s._conf > 65)
|
else if (g_s._faithScore > 65)
|
||||||
st = g_vm->getEngineString(S_MALSAINE);
|
st = g_vm->getEngineString(S_MALSAINE);
|
||||||
|
|
||||||
co = 580 - (g_vm->_screenSurface.getStringWidth(st) / 2);
|
co = 580 - (g_vm->_screenSurface.getStringWidth(st) / 2);
|
||||||
|
@ -746,10 +746,12 @@ void cpl20(int &p, int &h) {
|
||||||
p = -5;
|
p = -5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq1(int l) {
|
/**
|
||||||
int per;
|
* Engine function - Check who is in the Green Room
|
||||||
|
* @remarks Originally called 'quelq1'
|
||||||
per = getRandomNumber(1, 2);
|
*/
|
||||||
|
void setPresenceGreenRoom(int l) {
|
||||||
|
int per = getRandomNumber(1, 2);
|
||||||
if (l == 1) {
|
if (l == 1) {
|
||||||
if (per == 1)
|
if (per == 1)
|
||||||
g_bh1 = true;
|
g_bh1 = true;
|
||||||
|
@ -765,7 +767,11 @@ void quelq1(int l) {
|
||||||
g_ipers = 10;
|
g_ipers = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq2() {
|
/**
|
||||||
|
* Engine function - Check who is in the Purple Room
|
||||||
|
* @remarks Originally called 'quelq2'
|
||||||
|
*/
|
||||||
|
void setPresencePurpleRoom() {
|
||||||
if (g_li == 2)
|
if (g_li == 2)
|
||||||
g_bh2 = true;
|
g_bh2 = true;
|
||||||
else
|
else
|
||||||
|
@ -774,12 +780,20 @@ void quelq2() {
|
||||||
g_ipers = 10;
|
g_ipers = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq5() {
|
/**
|
||||||
|
* Engine function - Check who is in the Blue Room
|
||||||
|
* @remarks Originally called 'quelq5'
|
||||||
|
*/
|
||||||
|
void setPresenceBlueRoom() {
|
||||||
g_bh5 = true;
|
g_bh5 = true;
|
||||||
g_ipers = 10;
|
g_ipers = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq6(int l) {
|
/**
|
||||||
|
* Engine function - Check who is in the Red Room
|
||||||
|
* @remarks Originally called 'quelq6'
|
||||||
|
*/
|
||||||
|
void setPresenceRedRoom(int l) {
|
||||||
if (l == 6)
|
if (l == 6)
|
||||||
g_bh6 = true;
|
g_bh6 = true;
|
||||||
else if (l == 8)
|
else if (l == 8)
|
||||||
|
@ -788,9 +802,15 @@ void quelq6(int l) {
|
||||||
g_ipers = 10;
|
g_ipers = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq10(int h, int &per) {
|
/**
|
||||||
|
* Engine function - Check who is in the Dining Room
|
||||||
|
* @remarks Originally called 'quelq10'
|
||||||
|
*/
|
||||||
|
int setPresenceDiningRoom(int h) {
|
||||||
|
int retVal = 0;
|
||||||
|
|
||||||
if ((h >= 0) && (h < 8))
|
if ((h >= 0) && (h < 8))
|
||||||
per = chlm();
|
retVal = chlm();
|
||||||
else {
|
else {
|
||||||
int min = 0, max = 0;
|
int min = 0, max = 0;
|
||||||
if ((h > 7) && (h < 10)) {
|
if ((h > 7) && (h < 10)) {
|
||||||
|
@ -806,14 +826,22 @@ void quelq10(int h, int &per) {
|
||||||
min = 1;
|
min = 1;
|
||||||
max = 5;
|
max = 5;
|
||||||
}
|
}
|
||||||
choix(min, max, per);
|
choix(min, max, retVal);
|
||||||
}
|
}
|
||||||
affper(per);
|
affper(retVal);
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq11(int h, int &per) {
|
/**
|
||||||
|
* Engine function - Check who is in the Bureau
|
||||||
|
* @remarks Originally called 'quelq11'
|
||||||
|
*/
|
||||||
|
int setPresenceBureau(int h) {
|
||||||
|
int retVal = 0;
|
||||||
|
|
||||||
if ((h >= 0) && (h < 8))
|
if ((h >= 0) && (h < 8))
|
||||||
per = chlm();
|
retVal = chlm();
|
||||||
else {
|
else {
|
||||||
int min = 0, max = 0;
|
int min = 0, max = 0;
|
||||||
if (((h > 7) && (h < 10)) || ((h > 20) && (h < 24))) {
|
if (((h > 7) && (h < 10)) || ((h > 20) && (h < 24))) {
|
||||||
|
@ -826,41 +854,59 @@ void quelq11(int h, int &per) {
|
||||||
min = 1;
|
min = 1;
|
||||||
max = 2;
|
max = 2;
|
||||||
}
|
}
|
||||||
choix(min, max, per);
|
choix(min, max, retVal);
|
||||||
}
|
}
|
||||||
affper(per);
|
affper(retVal);
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq12(int &per) {
|
/**
|
||||||
per = chlm();
|
* Engine function - Check who is in the Kitchen
|
||||||
affper(per);
|
* @remarks Originally called 'quelq12'
|
||||||
|
*/
|
||||||
|
int setPresenceKitchen() {
|
||||||
|
int retVal = chlm();
|
||||||
|
affper(retVal);
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq15(int &per) {
|
/**
|
||||||
int cx;
|
* Engine function - Check who is in the Landing
|
||||||
bool test;
|
* @remarks Originally called 'quelq15'
|
||||||
|
*/
|
||||||
per = 0;
|
int setPresenceLanding() {
|
||||||
|
bool test = false;
|
||||||
|
int rand = 0;
|
||||||
do {
|
do {
|
||||||
cx = getRandomNumber(1, 8);
|
rand = getRandomNumber(1, 8);
|
||||||
test = (((cx == 1) && (g_bh2 || g_bh9)) ||
|
test = (((rand == 1) && (g_bh2 || g_bh9)) ||
|
||||||
((cx == 2) && g_bh8) ||
|
((rand == 2) && g_bh8) ||
|
||||||
((cx == 3) && g_bh4) ||
|
((rand == 3) && g_bh4) ||
|
||||||
((cx == 4) && g_bf4) ||
|
((rand == 4) && g_bf4) ||
|
||||||
((cx == 5) && g_bh6) ||
|
((rand == 5) && g_bh6) ||
|
||||||
((cx == 6) && g_bh1) ||
|
((rand == 6) && g_bh1) ||
|
||||||
((cx == 7) && g_bf1) ||
|
((rand == 7) && g_bf1) ||
|
||||||
((cx == 8) && g_bh5));
|
((rand == 8) && g_bh5));
|
||||||
} while (test);
|
} while (test);
|
||||||
|
|
||||||
conv(cx, per);
|
int retVal = 0;
|
||||||
affper(per);
|
conv(rand, retVal);
|
||||||
|
affper(retVal);
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quelq20(int h, int &per) {
|
/**
|
||||||
|
* Engine function - Check who is in the chapel
|
||||||
|
* @remarks Originally called 'quelq20'
|
||||||
|
*/
|
||||||
|
int setPresenceChapel(int h) {
|
||||||
|
int retVal = 0;
|
||||||
|
|
||||||
if (((h >= 0) && (h < 10)) || ((h > 18) && (h < 24)))
|
if (((h >= 0) && (h < 10)) || ((h > 18) && (h < 24)))
|
||||||
per = chlm();
|
retVal = chlm();
|
||||||
else {
|
else {
|
||||||
int min = 0, max = 0;
|
int min = 0, max = 0;
|
||||||
if ((h > 9) && (h < 12)) {
|
if ((h > 9) && (h < 12)) {
|
||||||
|
@ -873,9 +919,11 @@ void quelq20(int h, int &per) {
|
||||||
min = 2;
|
min = 2;
|
||||||
max = 4;
|
max = 4;
|
||||||
}
|
}
|
||||||
choix(min, max, per);
|
choix(min, max, retVal);
|
||||||
}
|
}
|
||||||
affper(per);
|
affper(retVal);
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1022,7 +1070,7 @@ void inzon() {
|
||||||
g_s._secretPassageObjectId = 0;
|
g_s._secretPassageObjectId = 0;
|
||||||
g_s._purpleRoomObjectId = 136;
|
g_s._purpleRoomObjectId = 136;
|
||||||
g_s._cryptObjectId = 141;
|
g_s._cryptObjectId = 141;
|
||||||
g_s._conf = getRandomNumber(4, 10);
|
g_s._faithScore = getRandomNumber(4, 10);
|
||||||
g_s._currPlace = MANOR_FRONT;
|
g_s._currPlace = MANOR_FRONT;
|
||||||
|
|
||||||
for (int cx = 2; cx <= 6; ++cx)
|
for (int cx = 2; cx <= 6; ++cx)
|
||||||
|
@ -1072,7 +1120,7 @@ void pl1(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq1(g_li);
|
setPresenceGreenRoom(g_li);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1085,7 +1133,7 @@ void pl2(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq2();
|
setPresencePurpleRoom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1098,7 +1146,7 @@ void pl5(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq5();
|
setPresenceBlueRoom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1111,7 +1159,7 @@ void pl6(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq6(g_li);
|
setPresenceRedRoom(g_li);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1124,7 +1172,7 @@ void pl9(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq2();
|
setPresencePurpleRoom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1136,7 +1184,7 @@ void pl10(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq10(h, p);
|
p = setPresenceDiningRoom(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pl11(int cf) {
|
void pl11(int cf) {
|
||||||
|
@ -1147,7 +1195,7 @@ void pl11(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq11(h, p);
|
p = setPresenceBureau(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pl12(int cf) {
|
void pl12(int cf) {
|
||||||
|
@ -1158,7 +1206,7 @@ void pl12(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq12(p);
|
p = setPresenceKitchen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void pl13(int cf) {
|
void pl13(int cf) {
|
||||||
|
@ -1169,7 +1217,7 @@ void pl13(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq12(p);
|
p = setPresenceKitchen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void pl15(int cf) {
|
void pl15(int cf) {
|
||||||
|
@ -1180,7 +1228,7 @@ void pl15(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq15(p);
|
p = setPresenceLanding();
|
||||||
}
|
}
|
||||||
|
|
||||||
void pl20(int cf) {
|
void pl20(int cf) {
|
||||||
|
@ -1191,13 +1239,13 @@ void pl20(int cf) {
|
||||||
if (rand > p)
|
if (rand > p)
|
||||||
person();
|
person();
|
||||||
else
|
else
|
||||||
quelq20(h, p);
|
p = setPresenceChapel(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void t11(int l11, int &a) {
|
void t11(int l11, int &a) {
|
||||||
int p, rand;
|
int p, rand;
|
||||||
|
|
||||||
ecfren(p, rand, g_s._conf, l11);
|
ecfren(p, rand, g_s._faithScore, l11);
|
||||||
g_li = l11;
|
g_li = l11;
|
||||||
if ((l11 > 0) && (l11 < 10)) {
|
if ((l11 > 0) && (l11 < 10)) {
|
||||||
if (p != -500) {
|
if (p != -500) {
|
||||||
|
@ -1229,22 +1277,22 @@ void t11(int l11, int &a) {
|
||||||
cpl15(p);
|
cpl15(p);
|
||||||
if (l11 == 20)
|
if (l11 == 20)
|
||||||
cpl20(p, h);
|
cpl20(p, h);
|
||||||
p += g_s._conf;
|
p += g_s._faithScore;
|
||||||
rand = getRandomNumber(1, 100);
|
rand = getRandomNumber(1, 100);
|
||||||
if (rand > p) {
|
if (rand > p) {
|
||||||
person();
|
person();
|
||||||
a = 0;
|
a = 0;
|
||||||
} else {
|
} else {
|
||||||
if (l11 == 10)
|
if (l11 == 10)
|
||||||
quelq10(h, p);
|
p = setPresenceDiningRoom(h);
|
||||||
if (l11 == 11)
|
if (l11 == 11)
|
||||||
quelq11(h, p);
|
p = setPresenceBureau(h);
|
||||||
if ((l11 == 12) || (l11 == 13) || (l11 == 14))
|
if ((l11 == 12) || (l11 == 13) || (l11 == 14))
|
||||||
quelq12(p);
|
p = setPresenceKitchen();
|
||||||
if ((l11 == 15) || (l11 == 26))
|
if ((l11 == 15) || (l11 == 26))
|
||||||
quelq15(p);
|
p = setPresenceLanding();
|
||||||
if (l11 == 20)
|
if (l11 == 20)
|
||||||
quelq20(h, p);
|
p = setPresenceChapel(h);
|
||||||
a = p;
|
a = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1252,9 +1300,9 @@ void t11(int l11, int &a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void cavegre() {
|
void cavegre() {
|
||||||
g_s._conf += 2;
|
g_s._faithScore += 2;
|
||||||
if (g_s._conf > 69)
|
if (g_s._faithScore > 69)
|
||||||
g_s._conf += (g_s._conf / 10);
|
g_s._faithScore += (g_s._faithScore / 10);
|
||||||
clsf3();
|
clsf3();
|
||||||
ecrf2();
|
ecrf2();
|
||||||
ecr3(g_vm->getEngineString(S_SOMEONE_ENTERS));
|
ecr3(g_vm->getEngineString(S_SOMEONE_ENTERS));
|
||||||
|
|
|
@ -80,15 +80,15 @@ extern void cpl12(int &p);
|
||||||
extern void cpl13(int &p);
|
extern void cpl13(int &p);
|
||||||
extern void cpl15(int &p);
|
extern void cpl15(int &p);
|
||||||
extern void cpl20(int &p, int &h);
|
extern void cpl20(int &p, int &h);
|
||||||
extern void quelq1(int l);
|
extern void setPresenceGreenRoom(int l);
|
||||||
extern void quelq2();
|
extern void setPresencePurpleRoom();
|
||||||
extern void quelq5();
|
extern void setPresenceBlueRoom();
|
||||||
extern void quelq6(int l);
|
extern void setPresenceRedRoom(int l);
|
||||||
extern void quelq10(int h, int &per);
|
extern int setPresenceDiningRoom(int h);
|
||||||
extern void quelq11(int h, int &per);
|
extern int setPresenceBureau(int h);
|
||||||
extern void quelq12(int &per);
|
extern int setPresenceKitchen();
|
||||||
extern void quelq15(int &per);
|
extern int setPresenceLanding();
|
||||||
extern void quelq20(int h, int &per);
|
extern int setPresenceChapel(int h);
|
||||||
extern void frap();
|
extern void frap();
|
||||||
extern void nouvp(int l, int &p);
|
extern void nouvp(int l, int &p);
|
||||||
extern void tip(int ip, int &cx);
|
extern void tip(int ip, int &cx);
|
||||||
|
|
|
@ -101,7 +101,7 @@ void tinke() {
|
||||||
g_t = ti2;
|
g_t = ti2;
|
||||||
else
|
else
|
||||||
g_t = ti1;
|
g_t = ti1;
|
||||||
cf = g_s._conf;
|
cf = g_s._faithScore;
|
||||||
if ((cf > 33) && (cf < 66))
|
if ((cf > 33) && (cf < 66))
|
||||||
g_t -= (g_t / 3);
|
g_t -= (g_t / 3);
|
||||||
|
|
||||||
|
@ -313,10 +313,10 @@ void tperd() {
|
||||||
void tsort() {
|
void tsort() {
|
||||||
|
|
||||||
if ((g_iouv > 0) && (g_s._currPlace != 0)) {
|
if ((g_iouv > 0) && (g_s._currPlace != 0)) {
|
||||||
if (g_s._conf < 50)
|
if (g_s._faithScore < 50)
|
||||||
g_s._conf += 2;
|
g_s._faithScore += 2;
|
||||||
else
|
else
|
||||||
g_s._conf += (g_s._conf / 10);
|
g_s._faithScore += (g_s._faithScore / 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int cx = 1; cx <= 7; ++cx)
|
for (int cx = 1; cx <= 7; ++cx)
|
||||||
|
@ -573,11 +573,11 @@ L1:
|
||||||
parole(4, 4, 1);
|
parole(4, 4, 1);
|
||||||
|
|
||||||
if (g_iouv == 0)
|
if (g_iouv == 0)
|
||||||
g_s._conf += 2;
|
g_s._faithScore += 2;
|
||||||
else if (g_s._conf < 50)
|
else if (g_s._faithScore < 50)
|
||||||
g_s._conf += 4;
|
g_s._faithScore += 4;
|
||||||
else
|
else
|
||||||
g_s._conf += 3 * (g_s._conf / 10);
|
g_s._faithScore += 3 * (g_s._faithScore / 10);
|
||||||
tsort();
|
tsort();
|
||||||
tmlieu(15);
|
tmlieu(15);
|
||||||
int cx;
|
int cx;
|
||||||
|
@ -625,7 +625,7 @@ void tsuiv() {
|
||||||
g_caff = tbcl;
|
g_caff = tbcl;
|
||||||
g_crep = g_caff + 400;
|
g_crep = g_caff + 400;
|
||||||
if (g_ipers != 0)
|
if (g_ipers != 0)
|
||||||
g_s._conf += 2;
|
g_s._faithScore += 2;
|
||||||
} else {
|
} else {
|
||||||
affrep();
|
affrep();
|
||||||
endSearch();
|
endSearch();
|
||||||
|
|
|
@ -228,14 +228,14 @@ void tsitu() {
|
||||||
calch(j, h, m);
|
calch(j, h, m);
|
||||||
if ((((h == 12) || (h == 13) || (h == 19)) && (g_s._currPlace != 10)) ||
|
if ((((h == 12) || (h == 13) || (h == 19)) && (g_s._currPlace != 10)) ||
|
||||||
((h > 0) && (h < 6) && (g_s._currPlace != 0)))
|
((h > 0) && (h < 6) && (g_s._currPlace != 0)))
|
||||||
++g_s._conf;
|
++g_s._faithScore;
|
||||||
if (((g_s._currPlace < CRYPT) || (g_s._currPlace > MOUNTAIN)) && (g_s._currPlace != 23)
|
if (((g_s._currPlace < CRYPT) || (g_s._currPlace > MOUNTAIN)) && (g_s._currPlace != 23)
|
||||||
&& (g_s._currPlace != 0) && (g_s._selectedObjectId != 152) && (!g_vm->_loseGame)) {
|
&& (g_s._currPlace != 0) && (g_s._selectedObjectId != 152) && (!g_vm->_loseGame)) {
|
||||||
if ((g_s._conf > 99) && (h > 8) && (h < 16)) {
|
if ((g_s._faithScore > 99) && (h > 8) && (h < 16)) {
|
||||||
g_crep = 1501;
|
g_crep = 1501;
|
||||||
tperd();
|
tperd();
|
||||||
}
|
}
|
||||||
if ((g_s._conf > 99) && (h > 0) && (h < 9)) {
|
if ((g_s._faithScore > 99) && (h > 0) && (h < 9)) {
|
||||||
g_crep = 1508;
|
g_crep = 1508;
|
||||||
tperd();
|
tperd();
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ Common::String SavegameManager::generateSaveName(int slotNumber) {
|
||||||
* Handle saving or loading savegame data
|
* Handle saving or loading savegame data
|
||||||
*/
|
*/
|
||||||
void SavegameManager::sync_save(Common::Serializer &sz) {
|
void SavegameManager::sync_save(Common::Serializer &sz) {
|
||||||
sz.syncAsSint16LE(g_s1._conf);
|
sz.syncAsSint16LE(g_s1._faithScore);
|
||||||
sz.syncBytes((byte *)&g_s1._pourc[0], 11);
|
sz.syncBytes((byte *)&g_s1._pourc[0], 11);
|
||||||
sz.syncBytes((byte *)&g_s1._teauto[0], 43);
|
sz.syncBytes((byte *)&g_s1._teauto[0], 43);
|
||||||
sz.syncBytes((byte *)&g_s1._sjer[0], 31);
|
sz.syncBytes((byte *)&g_s1._sjer[0], 31);
|
||||||
|
|
|
@ -161,7 +161,7 @@ enum places {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sav_chaine {
|
struct sav_chaine {
|
||||||
int _conf;
|
int _faithScore;
|
||||||
byte _pourc[11];
|
byte _pourc[11];
|
||||||
byte _teauto[43];
|
byte _teauto[43];
|
||||||
byte _sjer[31];
|
byte _sjer[31];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue