Skip to content

Commit

Permalink
MORTEVIELLE: Properly remove protection checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Apr 6, 2012
1 parent db48f98 commit b781caf
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 47 deletions.
2 changes: 0 additions & 2 deletions engines/mortevielle/actions.cpp
Expand Up @@ -698,7 +698,6 @@ void fctPlace() {
Common::String alertTxt = deline(582);
Alert::show(alertTxt, 1);

g_tesok = false;
bool enterPassageFl = KnowledgeCheck::show();
hideMouse();
hirs();
Expand Down Expand Up @@ -732,7 +731,6 @@ void fctPlace() {
} else {
aniof(2, 1);
g_crep = 166;
g_tesok = true;
}
return;
}
Expand Down
14 changes: 2 additions & 12 deletions engines/mortevielle/dialogs.cpp
Expand Up @@ -298,11 +298,9 @@ bool KnowledgeCheck::show() {
Common::String choiceArray[15];

int currChoice, prevChoice;
int indx = 0;
int correctCount = 0;
bool protectionCheck = false;

for (indx = 0; indx < 10; ++indx) {
for (int indx = 0; indx < 10; ++indx) {
hideMouse();
hirs();
showMouse();
Expand Down Expand Up @@ -358,7 +356,6 @@ bool KnowledgeCheck::show() {
warning("Expected answer: %d", correctAnswerArr[indx]);
do {
g_vm->setMouseClick(false);
g_tesok = false;
bool flag;
moveMouse(flag, key);
CHECK_QUIT0;
Expand Down Expand Up @@ -395,14 +392,7 @@ bool KnowledgeCheck::show() {
}
}

if (correctCount == 10) {
warning("Skipping protection check: testprot()");
protectionCheck = true;
// tesok is set to true in testprot()
g_tesok = true;
}

return (correctCount == 10) && protectionCheck;
return (correctCount == 10);
}

/*------------------------------------------------------------------------*/
Expand Down
4 changes: 0 additions & 4 deletions engines/mortevielle/menu.cpp
Expand Up @@ -48,10 +48,6 @@ void Menu::menut(int no, Common::String name) {
byte l = lo(no);
Common::String s = name;

if (!g_tesok)
g_vm->quitGame();


while (s.size() < 20)
s += ' ';

Expand Down
20 changes: 0 additions & 20 deletions engines/mortevielle/mor.cpp
Expand Up @@ -301,10 +301,6 @@ void conv(int x, int &y) {
}

/* NIVEAU 12 */
void okpas() {
g_tesok = true;
}

void modobj(int m) {
Common::String strp = Common::String(' ');

Expand All @@ -315,22 +311,6 @@ void modobj(int m) {
g_vm->_menu.disableMenuItem(g_vm->_menu._inventoryMenu[8]);
}

void modobj2(int m, bool t1, bool t2) {
Common::String strp = Common::String(' ');

if (t1 || t2)
okpas();
else
g_tesok = false;;

if (m != 500)
strp = deline(m - 501 + kInventoryStringIndex);

g_vm->_menu.menut(g_vm->_menu._inventoryMenu[8], strp);
g_vm->_menu.disableMenuItem(g_vm->_menu._inventoryMenu[8]);
}


void repon(int f, int m) {
Common::String str_;
Common::String str1;
Expand Down
2 changes: 0 additions & 2 deletions engines/mortevielle/mor.h
Expand Up @@ -58,9 +58,7 @@ extern int hazard(int min, int max);
extern void calch(int &j, int &h, int &m);
extern void conv(int x, int &y);
/* NIVEAU 12 */
extern void okpas();
extern void modobj(int m);
extern void modobj2(int m, bool t1, bool t2);
extern void repon(int f, int m);
extern void t5(int cx);
extern void affper(int per);
Expand Down
1 change: 0 additions & 1 deletion engines/mortevielle/mortevielle.cpp
Expand Up @@ -145,7 +145,6 @@ Common::ErrorCode MortevielleEngine::initialise() {
g_currGraphicalDevice = MODE_EGA;
g_newGraphicalDevice = g_currGraphicalDevice;
g_zuul = false;
g_tesok = false;
charpal();
charge_cfiph();
charge_cfiec();
Expand Down
5 changes: 1 addition & 4 deletions engines/mortevielle/prog.cpp
Expand Up @@ -83,7 +83,6 @@ void MortevielleEngine::gameLoaded() {
test[1] = false;
g[0] = '\040';
g_col = false;
g_tesok = true;
test[2] = false;
g[7] = g[0];
g[2] = 'A';
Expand Down Expand Up @@ -136,9 +135,7 @@ void MortevielleEngine::gameLoaded() {
tmlieu(g_s._mlieu);
modinv();
if (g_s._derobj != 0)
modobj2(g_s._derobj + 400, test[1], test[2]);
else
g_tesok = test[1] || test[2];
modobj(g_s._derobj + 400);
showMouse();
}

Expand Down
1 change: 0 additions & 1 deletion engines/mortevielle/var_mor.cpp
Expand Up @@ -103,7 +103,6 @@ bool g_blo,
g_syn,
g_fouil,
g_zuul,
g_tesok,
g_obpart,
g_okdes,
g_arret,
Expand Down
1 change: 0 additions & 1 deletion engines/mortevielle/var_mor.h
Expand Up @@ -240,7 +240,6 @@ extern bool g_blo,
g_syn,
g_fouil,
g_zuul,
g_tesok,
g_obpart,
g_okdes,
g_anyone,
Expand Down

0 comments on commit b781caf

Please sign in to comment.