aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-12-30 22:40:45 +1100
committerStrangerke2012-04-06 08:18:50 +0200
commit1a0e3b571af1f21c6a03b0e789c3fea7dc8a93d6 (patch)
treeb0fb2441b1b66953b1a9334d795e3edaf36f6ac0
parentb4934ea1bf3cdb6703749b33dddf758d8a399e0b (diff)
downloadscummvm-rg350-1a0e3b571af1f21c6a03b0e789c3fea7dc8a93d6.tar.gz
scummvm-rg350-1a0e3b571af1f21c6a03b0e789c3fea7dc8a93d6.tar.bz2
scummvm-rg350-1a0e3b571af1f21c6a03b0e789c3fea7dc8a93d6.zip
MORTEVIELLE: Compilation fixes based on adding appropriate #include files
-rw-r--r--engines/mortevielle/actions.cpp3
-rw-r--r--engines/mortevielle/alert.cpp10
-rw-r--r--engines/mortevielle/keyboard.cpp1
-rw-r--r--engines/mortevielle/menu.cpp7
-rw-r--r--engines/mortevielle/mor.cpp7
-rw-r--r--engines/mortevielle/parole.h2
-rw-r--r--engines/mortevielle/parole2.cpp1
-rw-r--r--engines/mortevielle/prog.cpp1
-rw-r--r--engines/mortevielle/sprint.cpp3
-rw-r--r--engines/mortevielle/var_mor.h4
10 files changed, 27 insertions, 12 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index ddfd432237..146542a5f7 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -25,6 +25,7 @@
* Copyright (c) 1988-1989 Lankhor
*/
+#include "common/scummsys.h"
#include "mortevielle/actions.h"
#include "mortevielle/alert.h"
#include "mortevielle/mor.h"
@@ -349,7 +350,7 @@ L2:
}
/* overlay */ void tfouiller() {
- const byte[14] r = {123, 104, 123, 131, 131, 123, 104, 131, 123, 123, 106, 123, 123, 107};
+ const byte r[14] = {123, 104, 123, 131, 131, 123, 104, 131, 123, 123, 106, 123, 123, 107};
int cx;
if (caff > 99) {
diff --git a/engines/mortevielle/alert.cpp b/engines/mortevielle/alert.cpp
index 45c1b355a2..1c7ae91995 100644
--- a/engines/mortevielle/alert.cpp
+++ b/engines/mortevielle/alert.cpp
@@ -101,23 +101,23 @@ static void fait_boite(int lidep, int nli, int tx) {
-static void fait_choix(Common::String c, int &coldep, int &nbcase, Common::String[] &s, int &esp) {
+static void fait_choix(Common::String c, int &coldep, int &nbcase, Common::String *&str, int &esp) {
int i, l, x;
char ch;
i = 1;
x = coldep;
for (l = 1; l <= nbcase; l ++) {
- s[l] = "";
+ str[l] = "";
do {
i = i + 1;
ch = c[i];
- s[l] = s[l] + ch;
+ str[l] = str[l] + ch;
} while (!(c[i + 1] == ']'));
i = i + 2;
- while (length(s[l]) < 3) s[l] = s[l] + ' ';
+ while (length(str[l]) < 3) str[l] = str[l] + ' ';
putxy(x, 98);
- writeg(string(' ') + s[l] + ' ', 0);
+ writeg(string(' ') + str[l] + ' ', 0);
x = x + esp + 40;
}
}
diff --git a/engines/mortevielle/keyboard.cpp b/engines/mortevielle/keyboard.cpp
index ddb78cbf74..44af5223a1 100644
--- a/engines/mortevielle/keyboard.cpp
+++ b/engines/mortevielle/keyboard.cpp
@@ -26,6 +26,7 @@
*/
#include "mortevielle/keyboard.h"
+#include "mortevielle/var_mor.h"
namespace Mortevielle {
diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp
index e00d8b9fe3..69fc651e70 100644
--- a/engines/mortevielle/menu.cpp
+++ b/engines/mortevielle/menu.cpp
@@ -25,8 +25,11 @@
* Copyright (c) 1988-1989 Lankhor
*/
-#include "mortevielle/menu.h"
+#include "common/scummsys.h"
#include "common/str.h"
+#include "common/textconsole.h"
+#include "mortevielle/menu.h"
+#include "mortevielle/var_mor.h"
namespace Mortevielle {
@@ -43,7 +46,7 @@ namespace Mortevielle {
s = nom;
if (! tesok) {
clrscr;
- exit(0);
+ mortevielle_exit(0);
}
while (length(s) < 30) s = s + ' ';
switch (h) {
diff --git a/engines/mortevielle/mor.cpp b/engines/mortevielle/mor.cpp
index 75add66e6a..195c626e95 100644
--- a/engines/mortevielle/mor.cpp
+++ b/engines/mortevielle/mor.cpp
@@ -25,11 +25,12 @@
* Copyright (c) 1988-1989 Lankhor
*/
+#include "common/str.h"
+#include "common/textconsole.h"
#include "mortevielle/alert.h"
#include "mortevielle/mor.h"
#include "mortevielle/outtext.h"
#include "mortevielle/var_mor.h"
-#include "common/str.h"
namespace Mortevielle {
@@ -40,7 +41,7 @@ const char m1[] = "quelqu'un entre, parait ‚tonn‚ mais ne dit rien";
void testfi() {
if (ioresult != 0) {
caff = do_alert(err_mess, 1);
- exit(0);
+ mortevielle_exit(0);
}
}
@@ -300,7 +301,7 @@ void stop() {
hirs();
gd = ams;
hirs();
- exit(0);
+ mortevielle_exit(0);
}
void paint_rect(int x, int y, int dx, int dy) {
diff --git a/engines/mortevielle/parole.h b/engines/mortevielle/parole.h
index daea40cbf0..a1467dcad8 100644
--- a/engines/mortevielle/parole.h
+++ b/engines/mortevielle/parole.h
@@ -28,6 +28,8 @@
#ifndef MORTEVIELLE_PAROLE_H
#define MORTEVIELLE_PAROLE_H
+#include "common/scummsys.h"
+
namespace Mortevielle {
extern void spfrac(int wor);
diff --git a/engines/mortevielle/parole2.cpp b/engines/mortevielle/parole2.cpp
index ead95762eb..b5079f957d 100644
--- a/engines/mortevielle/parole2.cpp
+++ b/engines/mortevielle/parole2.cpp
@@ -26,6 +26,7 @@
*/
#include "mortevielle/parole2.h"
+#include "mortevielle/var_mor.h"
namespace Mortevielle {
diff --git a/engines/mortevielle/prog.cpp b/engines/mortevielle/prog.cpp
index 42977c47b5..f7f1e0e818 100644
--- a/engines/mortevielle/prog.cpp
+++ b/engines/mortevielle/prog.cpp
@@ -27,6 +27,7 @@
#include "mortevielle/mor2.h"
#include "mortevielle/prog.h"
+#include "mortevielle/var_mor.h"
namespace Mortevielle {
diff --git a/engines/mortevielle/sprint.cpp b/engines/mortevielle/sprint.cpp
index 6209b08f7d..9df1a1894c 100644
--- a/engines/mortevielle/sprint.cpp
+++ b/engines/mortevielle/sprint.cpp
@@ -25,9 +25,10 @@
* Copyright (c) 1988-1989 Lankhor
*/
+#include "common/str.h"
#include "mortevielle/mouse.h"
#include "mortevielle/sprint.h"
-#include "common/str.h"
+#include "mortevielle/var_mor.h"
namespace Mortevielle {
diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h
index 6b4ae2f70a..fa25962909 100644
--- a/engines/mortevielle/var_mor.h
+++ b/engines/mortevielle/var_mor.h
@@ -47,6 +47,10 @@ namespace Mortevielle {
#define pred(type, v) (v - 1)
#define succ(type, v) (v + 1)
+#define ord(v) ((int) v)
+
+// TODO: Replace with a cleaner shutdown mechanism
+#define mortevielle_exit(ret) error("Exit the game")
/*---------------------------------------------------------------------------*/
/*------------------------- CONSTANTS ----------------------------------*/