Skip to content

Commit

Permalink
MORTEVIELLE: Added support for using the static string list added to …
Browse files Browse the repository at this point in the history
…mort.dat
  • Loading branch information
dreammaster authored and Strangerke committed Apr 6, 2012
1 parent af89338 commit ba3aeda
Show file tree
Hide file tree
Showing 10 changed files with 181 additions and 91 deletions.
77 changes: 46 additions & 31 deletions engines/mortevielle/actions.cpp
Expand Up @@ -42,9 +42,6 @@

namespace Mortevielle {

/* NIVEAU 4 */
const char stouinon[] = "[2][ ][OUI][NON]"; //Translation: [2] [ ] [YES] [NO]

/* overlay */
void taller() {
//int mx, cx, cy;
Expand All @@ -57,7 +54,8 @@ void taller() {
repon(2, s.mlieu);
}
if ((s.mlieu == 15) && (msg[4] == depl[6])) {
if (! syn) ecr3("aller"); //Translation: Go to
if (!syn)
ecr3(g_vm->getString(S_GO_TO));
tfleche();
if (iesc) okdes = false;
if ((anyone) || (iesc)) return;
Expand Down Expand Up @@ -170,7 +168,8 @@ void taller() {
}
return;
}
if (! syn) ecr3("prendre"); //Translation: Take
if (!syn)
ecr3(g_vm->getString(S_TAKE));
tfleche();
if ((anyone) || (iesc)) return;
if (caff == 3) {
Expand Down Expand Up @@ -257,7 +256,8 @@ void taller() {
{
int cx;

if (! syn) ecr3("soulever"); //Translation: Lift
if (!syn)
ecr3(g_vm->getString(S_LIFT));
tfleche();
if ((anyone) || (iesc)) return;
tcoord(3);
Expand All @@ -283,11 +283,13 @@ void taller() {

if (caff > 99) st4(caff);
else {
if (! syn) ecr3("lire"); //Translation: Read
if (!syn)
ecr3(g_vm->getString(S_READ));
tfleche();
if (!(anyone) && !(iesc)) {
tcoord(4);
if (num != 0) crep = 107;
if (num != 0)
crep = 107;
}
}
}
Expand All @@ -304,7 +306,8 @@ void taller() {
crep = 103;
return;
}
if (! syn) ecr3("regarder"); //Translation: Look
if (!syn)
ecr3(g_vm->getString(S_LOOK));
tfleche();
if ((anyone) || (iesc)) return;
tcoord(5);
Expand Down Expand Up @@ -365,7 +368,8 @@ void taller() {
st7(caff);
return;
}
if (! syn) ecr3("fouiller"); //Translation: Search
if (!syn)
ecr3(g_vm->getString(S_SEARCH));
tfleche();
if (anyone || iesc) return;
if (s.mlieu == 23) {
Expand Down Expand Up @@ -432,7 +436,8 @@ void taller() {
/* overlay */ void touvrir() {
int cx, haz;

if (! syn) ecr3("ouvrir"); //Translation: Open
if (!syn)
ecr3(g_vm->getString(S_OPEN));
if (caff == 26) {
if (ment != 0) {
msg[4] = entrer;
Expand Down Expand Up @@ -493,7 +498,8 @@ void taller() {
crep = 186;
return;
}
if (! syn) ecr3("mettre"); //Translation: Put
if (!syn)
ecr3(g_vm->getString(S_PUT));
tfleche();
if (iesc) crep = 998;
if ((anyone) || (iesc)) return;
Expand Down Expand Up @@ -523,7 +529,7 @@ void taller() {
repon(2, 165);
maivid();
parole(6, -9, 1);
quel = do_alert(stouinon, 1);
quel = do_alert(g_vm->getString(S_YES_NO), 1);
if (quel == 1) {
deline(582, st, tay);
i = do_alert(delig, 1);
Expand Down Expand Up @@ -592,7 +598,8 @@ void taller() {
crep = 149;
return;
}
if (! syn) ecr3("tourner"); //Translation: Turn
if (!syn)
ecr3(g_vm->getString(S_TURN));
tfleche();
if ((anyone) || (iesc)) return;
tcoord(9);
Expand All @@ -601,7 +608,7 @@ void taller() {
if ((s.mlieu == 13) && (s.ibag == 159) && (s.iboul == 141)) {
repon(2, 167);
parole(7, 9, 1);
quel = do_alert(stouinon, 1);
quel = do_alert(g_vm->getString(S_YES_NO), 1);
if (quel == 1)
g_vm->_endGame = true;
else crep = 168;
Expand All @@ -610,7 +617,7 @@ void taller() {
repon(2, 175);
clsf3();
parole(6, -9, 1);
quel = do_alert(stouinon, 1);
quel = do_alert(g_vm->getString(S_YES_NO), 1);
if (quel == 1) {
s.mlieu = 16;
affrep();
Expand All @@ -620,7 +627,8 @@ void taller() {
}

/* overlay */ void tcacher() {
if (! syn) ecr3("se cacher"); //Translation: Hide self
if (!syn)
ecr3(g_vm->getString(S_HIDE_SELF));
tfleche();
if (!(anyone) && !(iesc)) {
tcoord(10);
Expand All @@ -635,7 +643,8 @@ void taller() {
/* overlay */ void tattacher() {
if (s.derobj == 0) crep = 186;
else {
if (! syn) ecr3("attacher"); //Translation: Tie
if (!syn)
ecr3(g_vm->getString(S_TIE));
tfleche();
if (!(anyone) && !(iesc)) {
tcoord(8);
Expand All @@ -655,7 +664,8 @@ void taller() {
/* overlay */ void tfermer() {
int cx, chai;

if (! syn) ecr3("fermer"); //Translation: Close
if (!syn)
ecr3(g_vm->getString(S_CLOSE));
if (caff < 26) {
tfleche();
if (iesc) crep = 998;
Expand Down Expand Up @@ -684,9 +694,10 @@ void taller() {
/* overlay */ void tfrapper() {
int l, p, haz;

if (! syn) ecr3("frapper"); //Translation: Hit
if (!syn)
ecr3(g_vm->getString(S_HIT));
if (s.mlieu == 15) {
l = do_alert("[1][ | Avant, utilisez le menu DEP...][ok]", 1); //Translation: [1] [ | Before, use the DEP menu...] [Ok]
l = do_alert(g_vm->getString(S_BEFORE_USE_DEP_MENU), 1);
return;
}
if (s.mlieu < 25) {
Expand Down Expand Up @@ -716,7 +727,8 @@ void taller() {
/* overlay */ void tposer() {
int cx, chai;

if (! syn) ecr3("poser");
if (!syn)
ecr3(g_vm->getString(S_POSE));
if (s.derobj == 0) crep = 186;
else {
if (caff > 99) {
Expand Down Expand Up @@ -884,7 +896,6 @@ void taller() {
}

/* overlay */ void tdormir() {
const char m1[] = "D‚sirez-vous vous r‚veiller?"; //Translation: Do you want to wake up?
int z, j, h, m, quel;

if ((s.mlieu > 15) && (s.mlieu < 26)) {
Expand All @@ -902,7 +913,7 @@ void taller() {
clsf3();
clsf2();
ecrf2();
ecr2(m1);
ecr2(g_vm->getString(S_WANT_TO_WAKE_UP));
calch(j, h, m);
do {
if (h < 8) {
Expand All @@ -916,15 +927,16 @@ void taller() {
h = h + 1;
if (h > 23) h = 0;
tinke();
quel = do_alert(stouinon, 1);
quel = do_alert(g_vm->getString(S_YES_NO), 1);
anyone = false;
} while (!(quel == 1));
crep = 998;
num = 0;
}

/* overlay */ void tdefoncer() {
if (! syn) ecr3("d‚foncer"); //Translation: Smash
if (!syn)
ecr3(g_vm->getString(S_SMASH));
if (caff < 25) tfleche();
if ((! anyone) && (! iesc))
if (s.mlieu != 26) crep = 997;
Expand Down Expand Up @@ -977,14 +989,15 @@ void taller() {
return;
}
repon(2, 102);
quel = do_alert(stouinon, 1);
quel = do_alert(g_vm->getString(S_YES_NO), 1);
} while (!(quel == 2));
crep = 998;
if (! anyone) tinke();
}

/* overlay */ void tsonder() {
if (! syn) ecr3("sonder"); //Translation: Probe
if (!syn)
ecr3(g_vm->getString(S_PROBE2));
if (caff < 27) {
tfleche();
if (!(anyone) && (! iesc)) crep = 145;
Expand Down Expand Up @@ -1170,7 +1183,8 @@ void taller() {
/* overlay */ void tsentir() {
crep = 119;
if (caff < 26) {
if (! syn) ecr3("sentir"); //Translation: Smell
if (!syn)
ecr3(g_vm->getString(S_SMELL));
tfleche();
if (!(anyone) && !(iesc))
if (caff == 16) crep = 153;
Expand All @@ -1181,7 +1195,8 @@ void taller() {
/* overlay */ void tgratter() {
crep = 155;
if (caff < 27) {
if (! syn) ecr3("gratter"); //Translation: Scratch
if (!syn)
ecr3(g_vm->getString(S_SCRATCH));
tfleche();
}
num = 0;
Expand Down Expand Up @@ -1242,7 +1257,7 @@ void MortevielleEngine::loseGame() {
heu = 10;
jou = 0;
repon(2, 180);
quel = do_alert(stouinon, 1);
quel = do_alert(g_vm->getString(S_YES_NO), 1);
_quitGame = (quel != 1);
}

Expand Down
3 changes: 3 additions & 0 deletions engines/mortevielle/detection.cpp
Expand Up @@ -29,6 +29,9 @@

namespace Mortevielle {
uint32 MortevielleEngine::getGameFlags() const { return _gameDescription->flags; }

Common::Language MortevielleEngine::getLanguage() const { return _gameDescription->language; }

}

static const PlainGameDescriptor MortevielleGame[] = {
Expand Down
20 changes: 20 additions & 0 deletions engines/mortevielle/detection_tables.h
Expand Up @@ -23,6 +23,7 @@
namespace Mortevielle {

static const ADGameDescription MortevielleGameDescriptions[] = {
// French
{
"mortevielle",
"",
Expand All @@ -36,6 +37,8 @@ static const ADGameDescription MortevielleGameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO0()
},

// German
{
"mortevielle",
"",
Expand All @@ -49,6 +52,23 @@ static const ADGameDescription MortevielleGameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO0()
},

// English. Note that this is technically the French version, but English strings in mort.dat
// will automatically replace all the French strings
{
"mortevielle",
"",
{
{"menufr.mor", 0, "e413f36b9e14eef16130adc347a9391f", 144},
{"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
AD_LISTEND
},
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO0()
},

AD_TABLE_END_MARKER
};

Expand Down
16 changes: 8 additions & 8 deletions engines/mortevielle/menu.cpp
Expand Up @@ -214,18 +214,18 @@ void invers(int ix) {
s = dis[lo(msg4)];
break;
case 6 :
s = fic[lo(msg4)];
s = g_vm->getString(S_SAVE_LOAD + lo(msg4));
break;
case 7 :
s = fic[1];
s = g_vm->getString(S_SAVE_LOAD + 1);
s += ' ';
s += (char)(48 + lo(msg4));
break;
case 8 :
if (lo(msg4) == 1) {
s = recom;
s = g_vm->getString(S_RESTART);
} else {
s = fic[2];
s = g_vm->getString(S_SAVE_LOAD + 2);
s += ' ';
s += (char)(47 + lo(msg4));
}
Expand Down Expand Up @@ -302,20 +302,20 @@ void menu_down(int ii) {
if (dis[cx][0] != '*') writeg(dis[cx], 4);
break;
case 6 :
writeg(fic[cx], 4);
writeg(g_vm->getString(S_SAVE_LOAD + cx), 4);
break;
case 7 : {
Common::String s = fic[1];
Common::String s = g_vm->getString(S_SAVE_LOAD + 1);
s += ' ';
s += (char)(48 + cx);
writeg(s, 4);
break;
}
case 8 :
if (cx == 1)
writeg(recom, 4);
writeg(g_vm->getString(S_RESTART), 4);
else {
Common::String s = fic[2];
Common::String s = g_vm->getString(S_SAVE_LOAD + 2);
s += ' ';
s += (char)(47 + cx);
writeg(s, 4);
Expand Down

0 comments on commit ba3aeda

Please sign in to comment.