aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/level15.cpp14
-rw-r--r--engines/mortevielle/mor.cpp2
-rw-r--r--engines/mortevielle/mouse.cpp10
-rw-r--r--engines/mortevielle/ovd1.cpp6
-rw-r--r--engines/mortevielle/parole.cpp14
-rw-r--r--engines/mortevielle/taffich.cpp10
-rw-r--r--engines/mortevielle/var_mor.cpp2
-rw-r--r--engines/mortevielle/var_mor.h2
8 files changed, 30 insertions, 30 deletions
diff --git a/engines/mortevielle/level15.cpp b/engines/mortevielle/level15.cpp
index a2d5432b50..5195e7c2a4 100644
--- a/engines/mortevielle/level15.cpp
+++ b/engines/mortevielle/level15.cpp
@@ -66,7 +66,7 @@ void outbloc(int n, pattern p, t_nhom pal) {
ad = ad + 4;
for (i = 1; i <= p.tax; i ++)
for (j = 1; j <= p.tay; j ++)
- mem[0x6000 + ad + pred(int, j)*p.tax + pred(int, i)] = pal[n].hom[p.des[i][j]];
+ mem[0x6000 * 16 + ad + pred(int, j)*p.tax + pred(int, i)] = pal[n].hom[p.des[i][j]];
}
}
@@ -81,8 +81,8 @@ void writepal(int n) {
case ega:
case ams :
for (i = 1; i <= 16; i ++) {
- mem[0x7000 + 2 * i] = tabpal[n][i].x;
- mem[0x7000 + succ(int, 2 * i)] = tabpal[n][i].y;
+ mem[0x7000 * 16 + 2 * i] = tabpal[n][i].x;
+ mem[0x7000 * 16 + succ(int, 2 * i)] = tabpal[n][i].y;
}
break;
case cga : {
@@ -99,8 +99,8 @@ void writepal(int n) {
void pictout(int seg, int dep, int x, int y) {
decomp(seg, dep);
if (gd == her) {
- mem[0x7000 + 2] = 0;
- mem[0x7000 + 32] = 15;
+ mem[0x7000 * 16 + 2] = 0;
+ mem[0x7000 * 16 + 32] = 15;
}
if ((caff != 51) && (memw[0x7000 + 0x4138] > 0x100)) memw[0x7000 + 0x4138] = 0x100;
afff(gd, seg, dep, x, y);
@@ -174,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 * 16 + 0], 1);
/*i:=0;
repeat
read(g,a);
@@ -188,7 +188,7 @@ int animof(int ouf, int num) {
int nani, aux;
int animof_result;
- nani = mem[adani + 1];
+ nani = mem[adani * 16 + 1];
aux = num;
if (ouf != 1) aux = aux + nani;
animof_result = (nani << 2) + 2 + swap(memw[adani + (aux << 1)]);
diff --git a/engines/mortevielle/mor.cpp b/engines/mortevielle/mor.cpp
index bfb8655df5..4af3967eae 100644
--- a/engines/mortevielle/mor.cpp
+++ b/engines/mortevielle/mor.cpp
@@ -109,7 +109,7 @@ void dessine_rouleau() {
/* debug('dessine_rouleau'); */
writepal(89);
if (gd == her) {
- mem[0x7000 + 14] = 15;
+ mem[0x7000 * 16 + 14] = 15;
}
hide_mouse();
pictout(0x73a2, 0, 0, 0);
diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp
index d78b458816..1ae04417bf 100644
--- a/engines/mortevielle/mouse.cpp
+++ b/engines/mortevielle/mouse.cpp
@@ -139,10 +139,10 @@ void hide_mouse() {
k = 0;
j = p_o_s;
do {
- ps = mem[0xa000 + j];
- mem[0xa000 + j] = lo(s_s[i][k]);
- ps = mem[0xa000 + j + 1];
- mem[0xa000 + j + 1] = hi(s_s[i][k]);
+ ps = mem[0xa000 * 16 + j];
+ mem[0xa000 * 16 + j] = lo(s_s[i][k]);
+ ps = mem[0xa000 * 16 + j + 1];
+ mem[0xa000 * 16 + j + 1] = hi(s_s[i][k]);
j = j + 80;
k = succ(int, k);
} while (!(k >= 8));
@@ -227,7 +227,7 @@ void show_mouse() {
k = 0;
j = p_o_s;
do {
- s_s[l][k] = mem[0xa000 + j] + (mem[0xa000 + succ(int, j)] << 8);
+ s_s[l][k] = mem[0xa000 * 16 + j] + (mem[0xa000 + succ(int, j)] << 8);
j = j + 80;
k = succ(int, k);
} while (!(k >= 8));
diff --git a/engines/mortevielle/ovd1.cpp b/engines/mortevielle/ovd1.cpp
index 3aa942c7e2..89dde415df 100644
--- a/engines/mortevielle/ovd1.cpp
+++ b/engines/mortevielle/ovd1.cpp
@@ -327,8 +327,8 @@ void ani50() {
if (!fic.open("mort.img"))
error("Missing file - mort.img");
- fic.read(&mem[0x3800 + 0], 500);
- fic.read(&mem[0x47a0 + 0], 123);
+ fic.read(&mem[0x3800 * 16 + 0], 500);
+ fic.read(&mem[0x47a0 * 16 + 0], 123);
fic.close();
demus(0x3800, 0x5000, 623);
@@ -353,7 +353,7 @@ void ani50() {
if (!f.open("bruit5"))
error("Missing file - bruit5");
- f.read(&mem[adbruit5 + 0], 149);
+ f.read(&mem[adbruit5 * 16 + 0], 149);
/*blockread(f,mem[$5CB0:0],100);
blockread(f,mem[$3D1F:0],49);*/
f.close();
diff --git a/engines/mortevielle/parole.cpp b/engines/mortevielle/parole.cpp
index fa71a1e500..7f8476da80 100644
--- a/engines/mortevielle/parole.cpp
+++ b/engines/mortevielle/parole.cpp
@@ -87,7 +87,7 @@ void charg_car() {
void entroct(byte o) {
- mem[adtroct + ptr_oct] = o;
+ mem[adtroct * 16 + ptr_oct] = o;
ptr_oct = ptr_oct + 1;
}
@@ -125,9 +125,9 @@ void veracf(byte b) {
if (!f.open("sonmus.mor"))
error("Missing file - sonmus.mor");
- f.read(&mem[0x7414 + 0], 273);
- /*blockread(f,mem[adson+0],300);
- blockread(f,mem[adson+2400+0],245);*/
+ f.read(&mem[0x7414 * 16 + 0], 273);
+ /*blockread(f,mem[adson * 16+0],300);
+ blockread(f,mem[adson * 16+2400+0],245);*/
demus(0x7414, adson, 273);
f.close();
}
@@ -151,9 +151,9 @@ void veracf(byte b) {
if (!f.open("bruits")) //Translation: "noise"
error("Missing file - bruits");
- f.read(&mem[adbruit + 0], 250);
- for (i = 0; i <= 19013; i ++) mem[adbruit + 32000 + i] = mem[adbruit5 + i];
- f.read(&mem[adbruit1 + offsetb1], 149);
+ f.read(&mem[adbruit * 16 + 0], 250);
+ for (i = 0; i <= 19013; i ++) mem[adbruit * 16 + 32000 + i] = mem[adbruit5 + i];
+ f.read(&mem[adbruit1 * 16 + offsetb1], 149);
f.close();
}
diff --git a/engines/mortevielle/taffich.cpp b/engines/mortevielle/taffich.cpp
index 1a126d02b1..449e003394 100644
--- a/engines/mortevielle/taffich.cpp
+++ b/engines/mortevielle/taffich.cpp
@@ -56,14 +56,14 @@ void chardes(Common::String nom, float passe, int long_) {
l = long_ + p;
i = 0;
while (l > 0) {
- f.read(&mem[0x6000 + i], 1);
+ f.read(&mem[0x6000 * 16 + i], 1);
testfi();
l = l - 128;
i = i + 128;
}
f.close();
- for (i = p; i <= long_ + p; i ++) mem[0x7000 + i - p] = mem[0x6000 + i];
+ for (i = p; i <= long_ + p; i ++) mem[0x7000 * 16 + i - p] = mem[0x6000 + i];
/*$i+*/
}
@@ -89,14 +89,14 @@ void charani(Common::String nom, float passe, int long_) {
l = long_ + p;
i = 0;
while (l > 0) {
- f.read(&mem[0x6000 + i], 1);
+ f.read(&mem[0x6000 * 16 + i], 1);
testfi();
l = l - 128;
i = i + 128;
}
f.close();
- for (i = p; i <= long_ + p; i ++) mem[0x7314 + i - p] = mem[0x6000 + i];
+ for (i = p; i <= long_ + p; i ++) mem[0x7314 * 16 + i - p] = mem[0x6000 + i];
}
void taffich() {
@@ -188,7 +188,7 @@ void taffich() {
for (i = 0; i <= 15; i ++) {
k = 0;
for (j = 0; j <= 15; j ++) if (alllum[j] > alllum[k]) k = j;
- mem[0x7000 + 2 + (k << 1)] = rang[i];
+ mem[0x7000 * 16 + 2 + (k << 1)] = rang[i];
alllum[k] = -1;
}
}
diff --git a/engines/mortevielle/var_mor.cpp b/engines/mortevielle/var_mor.cpp
index e07a7359ac..589a0bbac5 100644
--- a/engines/mortevielle/var_mor.cpp
+++ b/engines/mortevielle/var_mor.cpp
@@ -350,7 +350,7 @@ Common::String copy(const Common::String &s, int idx, size_t size) {
/*---------------------------------------------------------------------------*/
int port[0xfff];
-byte mem[0xffff];
+byte mem[65536 * 16];
int memw[0xffff];
int wherey;
diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h
index f9c29e20f6..fbd324b548 100644
--- a/engines/mortevielle/var_mor.h
+++ b/engines/mortevielle/var_mor.h
@@ -405,7 +405,7 @@ void affput(const Common::Point &pt, int palIndex, int ch);
// TODO: Replace the following with proper implementations, or refactor out the code using them
extern int port[0xfff];
-extern byte mem[0xffff];
+extern byte mem[65536 * 16];
extern int memw[0xffff];
#define hires {}