aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mortevielle/actions.cpp8
-rw-r--r--engines/mortevielle/alert.cpp4
-rw-r--r--engines/mortevielle/disk.cpp15
-rw-r--r--engines/mortevielle/droite.cpp4
-rw-r--r--engines/mortevielle/level15.cpp9
-rw-r--r--engines/mortevielle/mor.cpp4
-rw-r--r--engines/mortevielle/mor2.cpp4
-rw-r--r--engines/mortevielle/mort.cpp2
-rw-r--r--engines/mortevielle/mouse.cpp10
-rw-r--r--engines/mortevielle/mouse.h2
-rw-r--r--engines/mortevielle/outtext.cpp16
-rw-r--r--engines/mortevielle/ovd1.cpp96
-rw-r--r--engines/mortevielle/parole.cpp2
-rw-r--r--engines/mortevielle/parole.h1
-rw-r--r--engines/mortevielle/prog.cpp10
-rw-r--r--engines/mortevielle/sprint.cpp5
-rw-r--r--engines/mortevielle/sprint.h1
-rw-r--r--engines/mortevielle/var_mor.cpp50
-rw-r--r--engines/mortevielle/var_mor.h32
19 files changed, 180 insertions, 95 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index 8e4a5fe229..5b420fba22 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -29,12 +29,14 @@
#include "mortevielle/actions.h"
#include "mortevielle/alert.h"
#include "mortevielle/level15.h"
+#include "mortevielle/menu.h"
#include "mortevielle/mor.h"
#include "mortevielle/mor2.h"
#include "mortevielle/mouse.h"
#include "mortevielle/outtext.h"
#include "mortevielle/ques.h"
#include "mortevielle/parole2.h"
+#include "mortevielle/taffich.h"
#include "mortevielle/var_mor.h"
namespace Mortevielle {
@@ -827,7 +829,7 @@ L2:
}
/* overlay */ void tentrer() {
- int x, z;
+ int x, z = 0;
if ((s.mlieu == 21) || (s.mlieu == 22)) {
t1sama();
@@ -931,7 +933,7 @@ L2:
}
/* overlay */ void tsortir() {
- int lx;
+ int lx = 0;
tsort();
crep = 0;
@@ -1055,7 +1057,7 @@ L2:
x = x * (3 - res);
if (x > 319) cx = 41;
else cx = 1;
- cy = succ(int, (uint)y >> 3); /* 0-199 => 1-25 */
+ cy = succ(int, ((uint)y >> 3)); /* 0-199 => 1-25 */
if ((cy > 23) || ((cx == 41) && ((cy >= 20) && (cy <= 22)))) {
if (choi != 0) {
lig = ((choi - 1) % 23) << 3;
diff --git a/engines/mortevielle/alert.cpp b/engines/mortevielle/alert.cpp
index 4ba287dcde..5f35e6ef65 100644
--- a/engines/mortevielle/alert.cpp
+++ b/engines/mortevielle/alert.cpp
@@ -106,7 +106,7 @@ static void fait_boite(int lidep, int nli, int tx) {
-static void fait_choix(Common::String c, int &coldep, int &nbcase, Common::String[3] &str, int &esp) {
+static void fait_choix(Common::String c, int &coldep, int &nbcase, Common::String *str, int &esp) {
int i, l, x;
char ch;
@@ -176,7 +176,7 @@ int do_alert(Common::String str_, int n) {
if (nbcase == 1) esp = nbcol - 40;
else esp = (uint)(nbcol - nbcase * 40) >> 1;
coldep = 320 - ((uint)nbcol >> 1) + ((uint)esp >> 1);
- fait_choix(cas, coldep, nbcase, s, esp);
+ fait_choix(cas, coldep, nbcase, &s[0], esp);
limit[1][1] = ((uint)(coldep) >> 1) * res;
limit[1][2] = limit[1][1] + 40;
if (nbcase == 1) {
diff --git a/engines/mortevielle/disk.cpp b/engines/mortevielle/disk.cpp
index 0c19bddf6e..e2b1b9ab2b 100644
--- a/engines/mortevielle/disk.cpp
+++ b/engines/mortevielle/disk.cpp
@@ -30,9 +30,12 @@
#include "common/savefile.h"
#include "common/serializer.h"
#include "mortevielle/alert.h"
-#include "mortevielle/ovd1.h"
#include "mortevielle/disk.h"
+#include "mortevielle/mor.h"
+#include "mortevielle/mor2.h"
#include "mortevielle/mouse.h"
+#include "mortevielle/ovd1.h"
+#include "mortevielle/prog.h"
#include "mortevielle/var_mor.h"
namespace Mortevielle {
@@ -41,9 +44,9 @@ namespace Mortevielle {
* Ensure disk 1 data is available
*/
void dem1() {
+/* Deprecated in ScummVM
int k;
-/* Deprecated in ScummVM
// -- demande de disk 1 --
assign(f, "mort.005");
//*$i-*
@@ -83,13 +86,13 @@ void takesav(int n) {
dem1();
// -- Load the file 'sauve#n.mor'
- Common::String saveName = Common::String::format("sav%d.mor", n);
- Common::InSaveFile *f = g_system->getSaveManager().openForLoading(st);
+ Common::String saveName = Common::String::format("sav%d.mor", n);
+ Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(saveName);
Common::Serializer sz(f, NULL);
sync_save(sz);
- if (f.err()) {
+ if (f->err()) {
i = do_alert(err_mess, 1);
mortevielle_exit(0);
}
@@ -125,7 +128,7 @@ void sv_game(int n) {
if (s1.mlieu == 26) s1.mlieu = 15;
Common::String saveName = Common::String::format("sav%d.mor", n);
- f = g_system->getSaveFileManager().openForSaving(saveName);
+ f = g_system->getSavefileManager()->openForSaving(saveName);
Common::Serializer sz(NULL, f);
sync_save(sz);
diff --git a/engines/mortevielle/droite.cpp b/engines/mortevielle/droite.cpp
index 9def04add5..54d788b6eb 100644
--- a/engines/mortevielle/droite.cpp
+++ b/engines/mortevielle/droite.cpp
@@ -47,7 +47,7 @@ void droite(int x, int y, int xx, int yy, int coul) {
if (y > yy) step = -1;
else step = 1;
do {
- putpix(gd, trunc(a * i + b), i, coul);
+ putpix(gd, abs((int)(a * i + b)), i, coul);
i = i + step;
} while (!(i == yy));
/*writeln(le_file,'X == ',a:3:3,' * Y + ',b:3:3);*/
@@ -58,7 +58,7 @@ void droite(int x, int y, int xx, int yy, int coul) {
if (x > xx) step = -1;
else step = 1;
do {
- putpix(gd, i, trunc(a * i + b), coul);
+ putpix(gd, i, abs((int)(a * i + b)), coul);
i = i + step;
} while (!(i == xx));
/*writeln(le_file,'Y == ',a:3:3,' * X + ',b:3:3);*/
diff --git a/engines/mortevielle/level15.cpp b/engines/mortevielle/level15.cpp
index 882bea57c5..a2d5432b50 100644
--- a/engines/mortevielle/level15.cpp
+++ b/engines/mortevielle/level15.cpp
@@ -86,7 +86,8 @@ void writepal(int n) {
}
break;
case cga : {
- pal = palcga[n].a;
+ warning("TODO: If this code is needed, resolve the incompatible types");
+// pal = palcga[n].a;
if (n < 89) palette(palcga[n].p);
for (i = 0; i <= 15; i ++) outbloc(i, tpt[pal[i].n], pal);
}
@@ -152,8 +153,8 @@ end;
void adzon() {
Common::File f;
// Common::File g;
- byte a;
- int i;
+// byte a;
+// int i;
if (!f.open("don.mor"))
error("Missing file - don.mor");
@@ -173,7 +174,7 @@ void adzon() {
if (!f.open("dec.mor"))
error("Missing files - dec.moir");
- f.read(mem[0x73a2 + 0], 1);
+ f.read(&mem[0x73a2 + 0], 1);
/*i:=0;
repeat
read(g,a);
diff --git a/engines/mortevielle/mor.cpp b/engines/mortevielle/mor.cpp
index 39a45d4665..6518f20f8c 100644
--- a/engines/mortevielle/mor.cpp
+++ b/engines/mortevielle/mor.cpp
@@ -329,7 +329,7 @@ int hazard(int min, int max) {
/* debug('hazard'); */
int hazard_result;
ha2 = Random();
- ha1 = trunc(ha2 * (max - min));
+ ha1 = abs((int)(ha2 * (max - min)));
hazard_result = min + ha1;
return hazard_result;
}
@@ -404,7 +404,7 @@ void repon(int f, int m) {
Common::String str_;
Common::String str1;
char st[1410];
- text1 fic;
+// text1 fic;
int i, xco, dx, caspe, tay;
/* debug('repon fenetre nø'+chr(f+48));*/
diff --git a/engines/mortevielle/mor2.cpp b/engines/mortevielle/mor2.cpp
index 649d770fcf..42f679a0c6 100644
--- a/engines/mortevielle/mor2.cpp
+++ b/engines/mortevielle/mor2.cpp
@@ -53,7 +53,7 @@ void tinke() {
const char d4 = ']';
const char d5 = '1';
const char d6[] = "OK";
- int cx, cy, haz, nh, cf, j, h, m, cd;
+ int cx, haz, nh, cf, j, h, m;
Common::String stpo;
bool am;
@@ -380,7 +380,7 @@ void sparl(float adr, float rep) {
int key, ad, tay, repint;
char st[1410];
- repint = trunc(rep);
+ repint = abs((int)rep);
hide_mouse();
deline(repint + c_paroles, st, tay);
afftex(st, 230, 4, 65, 24, 5);
diff --git a/engines/mortevielle/mort.cpp b/engines/mortevielle/mort.cpp
index 68eb2178f2..f3b0ac73ab 100644
--- a/engines/mortevielle/mort.cpp
+++ b/engines/mortevielle/mort.cpp
@@ -69,7 +69,7 @@ void divers(int np, bool b) {
int main(int argc, const char *argv[]) {
/*init_debug;*/
/* ecri_seg;*/
- pio_initialize(argc, argv);
+ //pio_initialize(argc, argv);
gd = cga;
newgd = gd;
zuul = false;
diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp
index 708865ee1a..926a7bfceb 100644
--- a/engines/mortevielle/mouse.cpp
+++ b/engines/mortevielle/mouse.cpp
@@ -46,7 +46,7 @@ int s_s[12][6];
void init_mouse() {
- int i, j;
+// int i, j;
registres reg;
mouse_shwn = 0;
@@ -88,7 +88,7 @@ begin
end; */
void hide_mouse() {
- int i, j, k, ps, ds;
+ int i, j, k, ps;;
bool imp;
mouse_shwn = pred(int, mouse_shwn);
@@ -176,10 +176,8 @@ void hide_mouse() {
}
void show_mouse() {
- int i, j, k, l,
- ps, ds;
+ int i, j, k, l;
bool imp;
- char c;
mouse_shwn = mouse_shwn + 1;
if (mouse_shwn != 1) return;
@@ -383,7 +381,7 @@ void mov_mouse(bool &funct, char &key) {
case '\33' : {
p_key = keypressed();
- if ((p_key >= ';') && (p_key <= 'D')) {
+ if ((in2 >= ';') && (in2 <= 'D')) {
funct = true;
key = in2;
return;
diff --git a/engines/mortevielle/mouse.h b/engines/mortevielle/mouse.h
index 0923c71866..a981d521ac 100644
--- a/engines/mortevielle/mouse.h
+++ b/engines/mortevielle/mouse.h
@@ -30,7 +30,7 @@
namespace Mortevielle {
-extern bool clic;
+extern bool clic, int_m;
extern int m_show,
x_s,
diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp
index 08fb9db053..6048efb02a 100644
--- a/engines/mortevielle/outtext.cpp
+++ b/engines/mortevielle/outtext.cpp
@@ -62,7 +62,8 @@ const byte tab31[32]= {
void deline(int num , char *l , int &tl);
typedef unsigned char uchar;
-static void cinq_huit(char &c, int &ind, byte &pt, bool &the_end) {
+static void cinq_huit(char &c, int &idx, byte &pt, bool &the_end) {
+/*
const uchar rap[32] = {
(uchar)',', (uchar)':', (uchar)'@', (uchar)'!', (uchar)'?', (uchar)'-', (uchar)'\207',
(uchar)'\240', (uchar)'\205', (uchar)'\203', (uchar)'\202', (uchar)'\212', (uchar)'\210', (uchar)'/',
@@ -70,16 +71,17 @@ static void cinq_huit(char &c, int &ind, byte &pt, bool &the_end) {
(uchar)'\226', (uchar)'0', (uchar)'1', (uchar)'2', (uchar)'3', (uchar)'4', (uchar)'5',
(uchar)'6', (uchar)'7', (uchar)'8', (uchar)'9'
};
+*/
int oct, ocd;
/* 5-8 */
- oct = t_mot[ind];
+ oct = t_mot[idx];
oct = (uint)(oct << (16 - pt)) >> (16 - pt);
if (pt < 6) {
- ind = ind + 1;
+ idx = idx + 1;
oct = oct << (5 - pt);
pt = pt + 11;
- oct = oct | ((uint)t_mot[ind] >> pt);
+ oct = oct | ((uint)t_mot[idx] >> pt);
} else {
pt = pt - 5;
oct = (uint)oct >> pt;
@@ -93,13 +95,13 @@ static void cinq_huit(char &c, int &ind, byte &pt, bool &the_end) {
break;
case 30:
case 31 : {
- ocd = t_mot[ind];
+ ocd = t_mot[idx];
ocd = (uint)(ocd << (16 - pt)) >> (16 - pt);
if (pt < 6) {
- ind = ind + 1;
+ idx = idx + 1;
ocd = ocd << (5 - pt);
pt = pt + 11;
- ocd = ocd | ((uint)t_mot[ind] >> pt);
+ ocd = ocd | ((uint)t_mot[idx] >> pt);
} else {
pt = pt - 5;
ocd = (uint)ocd >> pt;
diff --git a/engines/mortevielle/ovd1.cpp b/engines/mortevielle/ovd1.cpp
index d34a6eea16..b30acea8b9 100644
--- a/engines/mortevielle/ovd1.cpp
+++ b/engines/mortevielle/ovd1.cpp
@@ -27,11 +27,15 @@
#include "common/file.h"
#include "mortevielle/alert.h"
+#include "mortevielle/keyboard.h"
#include "mortevielle/level15.h"
+#include "mortevielle/menu.h"
#include "mortevielle/mor.h"
+#include "mortevielle/mouse.h"
#include "mortevielle/outtext.h"
#include "mortevielle/ovd1.h"
-#include "mortevielle/traffich.h"
+#include "mortevielle/parole.h"
+#include "mortevielle/taffich.h"
#include "mortevielle/var_mor.h"
namespace Mortevielle {
@@ -79,8 +83,6 @@ void ani50() {
end;*/
/* overlay */ void aff50(bool c) {
- int k;
-
caff = 50;
maff = 0;
taffich();
@@ -91,7 +93,7 @@ void ani50() {
}
/* overlay */ void init_menu() {
- int i, j, tai;
+ int i, tai;
char st[1410];
Common::File f;
@@ -139,33 +141,33 @@ void ani50() {
/* overlay */ void charpal() {
- file<tabdb> f;
- file<tfxx> ft;
+ Common::File f; // tabdb records
+ Common::File ft; // tfxx
int i, j, k;
- file<byte> fb;
+ Common::File fb; // byte values
byte b;
- assign(ft, "fxx.mor");
- /*$i-*/
- reset(ft);
- if (ioresult != 0) {
- caff = do_alert(err_mess, 1);
- mortevielle_exit(0);
- }
- ft >> l;
- close(ft);
- assign(f, "plxx.mor");
- reset(f);
- for (i = 0; i <= 90; i ++) f >> tabpal[i];
- close(f);
- assign(fb, "cxx.mor");
- reset(fb);
+ if (!ft.open("fxx.mor"))
+ error("Missing file - fxx.mor");
+ for (int i = 1; i < 108; ++i)
+ l[i] = ft.readSint16LE();
+ ft.close();
+
+ if (!f.open("plxx.mor"))
+ error("Missing file - plxx.mor");
+ for (i = 0; i <= 90; i ++)
+ tabpal[i] = f.readSint16LE();
+ f.close();
+
+ if (!fb.open("cxx.mor"))
+ error("Missing file - cxx.mor");
+
for (j = 0; j <= 90; j ++) {
- fb >> palcga[j].p;
+ palcga[j].p = fb.readByte();
for (i = 0; i <= 15; i ++) {
nhom &with = palcga[j].a[i];
- fb >> b;
+ b = fb.readByte();
with.n = (uint)b >> 4;
with.hom[0] = ((uint)b >> 2) & 3;
with.hom[1] = b & 3;
@@ -173,13 +175,13 @@ void ani50() {
}
palcga[10].a[9] = palcga[10].a[5];
for (j = 0; j <= 14; j ++) {
- fb >> tpt[j].tax;
- fb >> tpt[j].tay;
+ tpt[j].tax = fb.readByte();
+ tpt[j].tay = fb.readByte();
for (i = 1; i <= 20; i ++)
for (k = 1; k <= 20; k ++)
- fb >> tpt[j].des[i][k];
+ tpt[j].des[i][k] = fb.readByte();
}
- close(fb);
+ fb.close();
}
/* overlay */ void chartex() {
@@ -243,9 +245,9 @@ void ani50() {
gotoxy(1, 21);
clreol;
gotoxy(1, 23);
- output << "CARTE GRAPHIQUE CGA EGA HERCULE/AT&T400 TANDY AMSTRAD1512";
+ output("CARTE GRAPHIQUE CGA EGA HERCULE/AT&T400 TANDY AMSTRAD1512");
gotoxy(12, 24);
- output << "Ctrl C E H T A";
+ output("Ctrl C E H T A");
do {
input >> kbd >> ch;
} while ((ch != '\1') && (ch != '\3') && (ch != '\5') && (ch != '\24') && (ch != '\10'));
@@ -267,12 +269,12 @@ void ani50() {
gotoxy(1, 23);
clreol;
gotoxy(26, 23);
- output << "Jeu au Clavier / … la Souris";
+ output("Jeu au Clavier / … la Souris");
textcolor(4);
gotoxy(33, 23);
- output << 'C';
+ output("C");
gotoxy(48, 23);
- output << 'S';
+ output("S");
do {
input >> kbd >> ch;
} while ((ch != 'C') && (ch != 'S'));
@@ -280,14 +282,16 @@ void ani50() {
}
/* overlay */ void init_lieu() {
- file<tab_mlieu> f_lieu;
+ Common::File f_lieu; // tab_mlieu
/* debug('o3 init_lieu'); */
- assign(f_lieu, "MXX.mor");
- /*$i-*/
- reset(f_lieu);
- f_lieu >> v_lieu;
- close(f_lieu);
+ if (!f_lieu.open("MXX.mor"))
+ error("Missing file - MXX.mor");
+
+ for (int i = 1; i < 8; ++i)
+ f_lieu.read(&v_lieu[i][1], 24);
+
+ f.close();
}
@@ -306,8 +310,8 @@ void ani50() {
if (!f.open("mort.img"))
error("Missing file - mort.img");
- fic.read(mem[0x3800 + 0], 500);
- fic.read(mem[0x47a0 + 0], 123);
+ fic.read(&mem[0x3800 + 0], 500);
+ fic.read(&mem[0x47a0 + 0], 123);
f.close();
demus(0x3800, 0x5000, 623);
@@ -332,7 +336,7 @@ void ani50() {
if (!f.open("bruit5"))
error("Missing file - bruit5");
- f.read(mem[adbruit5 + 0], 149);
+ f.read(&mem[adbruit5 + 0], 149);
/*blockread(f,mem[$5CB0:0],100);
blockread(f,mem[$3D1F:0],49);*/
f.close();
@@ -345,8 +349,8 @@ void ani50() {
error("Missing file - cfiec.mor");
/*$i-*/
- f.read(mem[adcfiec + 0], 511);
- f.read(mem[adcfiec + 4088 + 0], 311);
+ f.read(&mem[adcfiec + 0], 511);
+ f.read(&mem[adcfiec + 4088 + 0], 311);
f.close();
rech_cfiec = false;
@@ -360,7 +364,7 @@ void ani50() {
error("Missing file - cfiph.mor");
f.read(t_cph, 50);
- close(f);
+ f.close();
}
@@ -379,7 +383,7 @@ void ani50() {
textcolor(7);
cpr = "COPYRIGHT 1989 : LANKHOR";
if ((gd == ega) || (gd == ams) || (gd == cga))
- output << cpr;
+ output(cpr);
else {
putxy(104 + 72 * res, 190);
writeg(cpr, 0);
diff --git a/engines/mortevielle/parole.cpp b/engines/mortevielle/parole.cpp
index 6c8f598fd4..4a3734f363 100644
--- a/engines/mortevielle/parole.cpp
+++ b/engines/mortevielle/parole.cpp
@@ -35,6 +35,8 @@ void spfrac(int wor) {
if (((c3.code > 4) && (c3.val != 20) && ((c3.rep != 3) && (c3.rep != 6) && (c3.rep != 9)) ||
((c3.code < 5) && ((c3.rep != 19) && (c3.rep != 22) && (c3.rep != 4) && (c3.rep != 9))))) {
c3.rep = c3.rep + 1;
+ }
+
c3.freq = ((uint)wor >> 6) & 7;
c3.acc = ((uint)wor >> 9) & 7;
}
diff --git a/engines/mortevielle/parole.h b/engines/mortevielle/parole.h
index a1467dcad8..4168187a24 100644
--- a/engines/mortevielle/parole.h
+++ b/engines/mortevielle/parole.h
@@ -29,6 +29,7 @@
#define MORTEVIELLE_PAROLE_H
#include "common/scummsys.h"
+#include "mortevielle/var_mor.h"
namespace Mortevielle {
diff --git a/engines/mortevielle/prog.cpp b/engines/mortevielle/prog.cpp
index 3366e56db7..e493e760e8 100644
--- a/engines/mortevielle/prog.cpp
+++ b/engines/mortevielle/prog.cpp
@@ -31,7 +31,7 @@
#include "mortevielle/mor.h"
#include "mortevielle/mor2.h"
#include "mortevielle/prog.h"
-#include "mortevielle/traffich.h"
+#include "mortevielle/taffich.h"
#include "mortevielle/var_mor.h"
#include "mortevielle/mouse.h"
@@ -116,8 +116,8 @@ namespace Mortevielle {
regs.ax = 0x201;
regs.cx = 0x1;
regs.dx = 0x100 + k - 1;
- regs.es = seg(buffer);
- regs.bx = ofs(buffer);
+ //regs.es = seg(buffer);
+ //regs.bx = ofs(buffer);
intr(19, regs);
test[k] = ! imen;
i = 0;
@@ -126,8 +126,8 @@ namespace Mortevielle {
syn = false;
regs.cx = 0x2700 + i;
regs.dx = 0x100 + k - 1;
- regs.es = seg(buffer);
- regs.bx = ofs(buffer);
+ //regs.es = seg(buffer);
+ //regs.bx = ofs(buffer);
intr(19, regs);
if (lo(regs.flags) % 2 == 1) test[k] = false;
i = i + 1;
diff --git a/engines/mortevielle/sprint.cpp b/engines/mortevielle/sprint.cpp
index 374ac24b3e..0523651ad9 100644
--- a/engines/mortevielle/sprint.cpp
+++ b/engines/mortevielle/sprint.cpp
@@ -88,9 +88,4 @@ void writeg(Common::String l, int c)
show_mouse();
}
-void box(int c, int Gd, int xo, int yo, int xi, int yi, int patt) {
- warning("TODO: box method not yet implemented");
-}
-
-
} // End of namespace Mortevielle
diff --git a/engines/mortevielle/sprint.h b/engines/mortevielle/sprint.h
index 60614bfda5..8484214fa3 100644
--- a/engines/mortevielle/sprint.h
+++ b/engines/mortevielle/sprint.h
@@ -35,7 +35,6 @@ namespace Mortevielle {
extern void fill_box(int x, int y, int dx);
extern void clear_box(int x, int y, int dx);
extern void writeg(Common::String l, int c);
-extern void box(int c, int Gd, int xo, int yo, int xi, int yi, int patt);
} // End of namespace Mortevielle
#endif
diff --git a/engines/mortevielle/var_mor.cpp b/engines/mortevielle/var_mor.cpp
index 8ab06e8c79..f92202c364 100644
--- a/engines/mortevielle/var_mor.cpp
+++ b/engines/mortevielle/var_mor.cpp
@@ -334,5 +334,55 @@ Common::String copy(const Common::String &s, int idx, size_t size) {
/*---------------------------------------------------------------------------*/
int port[0xfff];
+byte mem[0xffff];
+int memw[0xffff];
+int wherey;
+
+void gotoxy(int x, int y) {
+}
+void textcolor(int c) {
+}
+void output(const Common::String &s) {
+}
+void intr(int intNum, registres &regs) {
+}
+
+void palette(int v1) {
+ warning("TODO: s_sauv");
+}
+
+// (* external 'c:\mc\charecr.com'; *)
+void s_char(int Gd, int y, int dy) {
+ warning("TODO: s_char");
+}
+
+// (* external 'c:\mc\sauvecr.com'; *)
+void s_sauv(int Gd, int y, int dy) {
+ warning("TODO: s_sauv");
+}
+
+// (* external 'c:\mc\boite.com'; *)
+void box(int c, int Gd, int xo, int yo, int xi, int yi, int patt) {
+ warning("TODO: box method not yet implemented");
+}
+
+// (* external 'c:\mc\zuul.com'; *)
+void zzuul(int ad, int seg, int tai) {
+ warning("TODO: zzuul");
+}
+
+// (* external 'c:\mc\decomp.com'; *)
+void decomp(int seg, int dep) {
+ warning("TODO: decomp");
+}
+
+// (* external 'c:\mc\affich.com'; *)
+void afff(int Gd, int seg, int dep, int x, int y) {
+ warning("TODO: afff");
+}
+// (* external 'c:\mc\reusint.com'; *)
+void musyc(tablint &tb, int nbseg, int att) {
+ warning("TODO: musyc");
+}
} // End of namespace Mortevielle
diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h
index fe0c3c5b67..4cb40caaaa 100644
--- a/engines/mortevielle/var_mor.h
+++ b/engines/mortevielle/var_mor.h
@@ -231,6 +231,10 @@ struct t_pcga {
nhom a[16];
};
+typedef int tablint[256];
+typedef doublet tabdb[17];
+typedef int tfxx[108];
+
/*---------------------------------------------------------------------------*/
/*------------------------------ ENUMS ------------------------------*/
/*---------------------------------------------------------------------------*/
@@ -400,13 +404,37 @@ void affput(int Chx, int Gd, int x, int y, int coul, int char_);
// TODO: Replace the following with proper implementations, or refactor out the code using them
extern int port[0xfff];
+extern byte mem[0xffff];
+extern int memw[0xffff];
#define hires {}
-
#define mortevielle_exit(ret) error("Exit the game")
+
// Text screen functions not relevant for ScummVM
#define clrscr {}
-#define gotoxy(x,y) {}
+#define clreol {}
+extern void gotoxy(int x, int y);
+extern void textcolor(int c);
+extern void output(const Common::String &s);
+extern int wherey;
+
+extern void palette(int v1);
+extern void intr(int intNum, registres &regs);
+
+// (* external 'c:\mc\charecr.com'; *)
+extern void s_char(int Gd, int y, int dy);
+// (* external 'c:\mc\sauvecr.com'; *)
+extern void s_sauv(int Gd, int y, int dy);
+// (* external 'c:\mc\boite.com'; *)
+extern void box(int c, int Gd, int xo, int yo, int xi, int yi, int patt);
+// (* external 'c:\mc\zuul.com'; *)
+extern void zzuul(int ad, int seg, int tai);
+// (* external 'c:\mc\decomp.com'; *)
+extern void decomp(int seg, int dep);
+// (* external 'c:\mc\affich.com'; *)
+extern void afff(int Gd, int seg, int dep, int x, int y);
+// (* external 'c:\mc\reusint.com'; *)
+extern void musyc(tablint &tb, int nbseg, int att);
} // End of namespace Mortevielle