aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2011-12-26 18:50:43 +0000
committerStrangerke2012-04-06 08:18:24 +0200
commit4edebbe11174e9cd82c9d4495aece84b65f0adcf (patch)
treeb787ac92f94b72ee04aba73a8a0f947105ab380b /engines
parentcc3573bc018f1ef339365ff940072949bffb6996 (diff)
downloadscummvm-rg350-4edebbe11174e9cd82c9d4495aece84b65f0adcf.tar.gz
scummvm-rg350-4edebbe11174e9cd82c9d4495aece84b65f0adcf.tar.bz2
scummvm-rg350-4edebbe11174e9cd82c9d4495aece84b65f0adcf.zip
MORTEVIELLE: Converted more arrays into C style arrays
Diffstat (limited to 'engines')
-rw-r--r--engines/mortevielle/actions.cpp6
-rw-r--r--engines/mortevielle/outtext.cpp51
-rw-r--r--engines/mortevielle/parole.cpp41
-rw-r--r--engines/mortevielle/parole2.cpp5
-rw-r--r--engines/mortevielle/prog.cpp8
-rw-r--r--engines/mortevielle/taffich.cpp2
-rw-r--r--engines/mortevielle/var_mor.cpp28
7 files changed, 43 insertions, 98 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index bdb4827ee8..712a1148f7 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -2,9 +2,7 @@
const char stouinon[] = "[2][ ][OUI][NON]";
/* overlay */
-void taller()
-
-{
+void taller() {
int mx, cx, cy;
if ((s.mlieu == 26) && (msg[4] == depl[6])) {
@@ -314,7 +312,7 @@ L2:
}
/* overlay */ void tfouiller() {
- const array<0, 13, byte> r = {{123, 104, 123, 131, 131, 123, 104, 131, 123, 123, 106, 123, 123, 107}};
+ const byte[14] r = {123, 104, 123, 131, 131, 123, 104, 131, 123, 123, 106, 123, 123, 107};
int cx;
if (caff > 99) {
diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp
index 7c504232aa..4975185c37 100644
--- a/engines/mortevielle/outtext.cpp
+++ b/engines/mortevielle/outtext.cpp
@@ -1,45 +1,38 @@
Common::String delig;
-const array<0, 31, byte> tabdr
-= {{
- 32, 101, 115, 97, 114, 105, 110,
- 117, 116, 111, 108, 13, 100, 99,
- 112, 109, 46, 118, 130, 39, 102,
- 98, 44, 113, 104, 103, 33, 76,
- 85, 106, 30, 31
- }
+const byte tabdr[32] = {
+ 32, 101, 115, 97, 114, 105, 110,
+ 117, 116, 111, 108, 13, 100, 99,
+ 112, 109, 46, 118, 130, 39, 102,
+ 98, 44, 113, 104, 103, 33, 76,
+ 85, 106, 30, 31
};
-const array<0, 31, byte> tab30
-= {{
- 69, 67, 74, 138, 133, 120, 77, 122,
- 121, 68, 65, 63, 73, 80, 83, 82,
- 156, 45, 58, 79, 49, 86, 78, 84,
- 71, 81, 64, 66, 135, 34, 136, 91
- }
+const byte tab30[32] = {
+ 69, 67, 74, 138, 133, 120, 77, 122,
+ 121, 68, 65, 63, 73, 80, 83, 82,
+ 156, 45, 58, 79, 49, 86, 78, 84,
+ 71, 81, 64, 66, 135, 34, 136, 91
};
-const array<0, 31, byte> tab31
-= {{
- 93, 47, 48, 53, 50, 70, 124, 75,
- 72, 147, 140, 150, 151, 57, 56, 51,
- 107, 139, 55, 89, 131, 37, 54, 88,
- 119, 0, 0, 0, 0, 0, 0, 0
- }
+const byte tab31[32]= {
+ 93, 47, 48, 53, 50, 70, 124, 75,
+ 72, 147, 140, 150, 151, 57, 56, 51,
+ 107, 139, 55, 89, 131, 37, 54, 88,
+ 119, 0, 0, 0, 0, 0, 0, 0
};
void deline(int num , phrase &l , int &tl);
static void cinq_huit(char &c, int &ind, byte &pt, boolean &the_end) {
- const array<0, 31, char> rap
- = {{ ',', ':', '@', '!', '?', '-', '‡',
- ' ', '…', 'ƒ', '‚', 'Š', 'ˆ', '/',
- '‹', 'Œ', '¢', '\47', '“', '"', '—',
- '–', '0', '1', '2', '3', '4', '5',
- '6', '7', '8', '9'
- }
+ const unsigned char rap[32] = {
+ ',', ':', '@', '!', '?', '-', '\207',
+ '\240', '\205', '\203', '\202', '\212', '\210', '/',
+ '\213', '\214', '\242', '\047', '\223', '"', '\227',
+ '\226', '0', '1', '2', '3', '4', '5',
+ '6', '7', '8', '9'
};
int oct, ocd;
diff --git a/engines/mortevielle/parole.cpp b/engines/mortevielle/parole.cpp
index 03940f5235..082b53ec7b 100644
--- a/engines/mortevielle/parole.cpp
+++ b/engines/mortevielle/parole.cpp
@@ -68,7 +68,7 @@ void veracf(byte b) {
/* overlay */ void cctable(tablint &t) {
int k;
- array<0, 256, float> tb;
+ float tb[257];
tb[0] = 0;
@@ -383,42 +383,3 @@ void veracf(byte b) {
break;
} /* case c2.code */
}
-
-/*overlay function testprot : boolean;
-var
- regs : registres;
- buffer : array[0..511] of char;
- i,j,k : int;
- st : phrase;
- tay : int;
- test : array[0..2] of boolean;
-const
- chaine : array[0..7] of char
- = (' ','M','A','S','T','E','R',' ');
-
-begin
- test[0]:= false;test[1]:=false;test[2]:=false;k:=0;
- with regs do
- begin
- while (test[k]=false) and (k<2) do
- begin
- k:=k+1;
- ax:=0;intr(19,regs);
- ax:=$0201;cx:=$0001;dx:=$0100+k-1;es:=seg(buffer);bx:=ofs(buffer);
- intr(19,regs);
- test[k]:=true;
- tesok:= true;
- i:=0;
- while (test[k]) and (i<19) do
- begin
- ax:=$0201;cx:=$2700+i;dx:=$0100+k-1;es:=seg(buffer);bx:=ofs(buffer);
- intr(19,regs);if lo(flags) mod 2=1 then test[k]:=false;i:=i+1;
- end;
- for j:=0 to 7 do
- if buffer[j+504]<>chaine[j] then test[k]:=false;
- end;
- end;
- testprot:=(test[1] or test[2]);
-end;
-*/
-
diff --git a/engines/mortevielle/parole2.cpp b/engines/mortevielle/parole2.cpp
index eec9798ada..1b894ff6e6 100644
--- a/engines/mortevielle/parole2.cpp
+++ b/engines/mortevielle/parole2.cpp
@@ -19,8 +19,7 @@ void init_chariot() {
void trait_ph() {
- const array<0, 2, int> deca
- = {{300, 30, 40}};
+ const int deca[3] = {300, 30, 40};
ptr_tcph = pred(int, num_ph);
ledeb = swap(t_cph[ptr_tcph]) + deca[typlec];
@@ -52,7 +51,7 @@ void trait_ph() {
void parole(int rep, int ht, int typ) {
- array<0, 500, int> savph;
+ int savph[501];
int i;
int tempo;
diff --git a/engines/mortevielle/prog.cpp b/engines/mortevielle/prog.cpp
index 62dc99f479..fd909a3164 100644
--- a/engines/mortevielle/prog.cpp
+++ b/engines/mortevielle/prog.cpp
@@ -22,10 +22,10 @@
/* overlay */ void antegame() {
int cx;
registres regs;
- array<0, 511, char> buffer;
+ char buffer[512];
int i, j, k;
- array<0, 2, boolean> test;
- array<0, 7, char> g;
+ boolean test[3];
+ char g[8];
hide_mouse();
@@ -36,7 +36,7 @@
okdes = true;
test[0] = false;
test[1] = false;
- g[0] = '\40';
+ g[0] = '\040';
col = false;
tesok = true;
test[2] = false;
diff --git a/engines/mortevielle/taffich.cpp b/engines/mortevielle/taffich.cpp
index fad09df9f7..058af875d7 100644
--- a/engines/mortevielle/taffich.cpp
+++ b/engines/mortevielle/taffich.cpp
@@ -72,7 +72,7 @@ void taffich() {
long_int lgt, lhandle;
Common::String nom;
int palh, k, j;
- array<0, 15, int> alllum;
+ int alllum[16];
a = caff;
diff --git a/engines/mortevielle/var_mor.cpp b/engines/mortevielle/var_mor.cpp
index fa897f515d..e245781736 100644
--- a/engines/mortevielle/var_mor.cpp
+++ b/engines/mortevielle/var_mor.cpp
@@ -151,8 +151,7 @@ const array<1, 2, varying_string<11> > fic
}
};
-const array<0, 1, byte> addv
-= {{8, 8}};
+const byte addv[2] = {8, 8};
const char recom[] = " Recommence ";
@@ -221,19 +220,14 @@ struct pattern {
struct nhom {
byte n; /* numero entre 0 et 32 */
- array<0, 3, byte> hom;
+ byte hom[4];
};
-typedef array<0, 15, nhom> t_nhom;
-
struct t_pcga {
byte p;
- t_nhom a;
+ nhom a[16];
};
-typedef array<0, 90, t_pcga> pal_cga;
-
-
/*---------------------------------------------------------------------------*/
/*------------------------------ VARIABLES ------------------------------*/
/*---------------------------------------------------------------------------*/
@@ -335,8 +329,8 @@ int x,
ptr_word,
color_txt;
-array<0, 6400, int> t_cph;
-array<0, 4000, byte> tabdon;
+int t_cph[6401];
+byte tabdon[4001];
/* t_dxx : array[0..121] of int;*/
Common::String stpou; /* donne le % d'indices */
byte is;
@@ -351,7 +345,7 @@ array<1, 8, int> invt,
nbrep,
nbrepm,
disc;
-array<0, 4, int> msg;
+int msg[5];
array<1, 7, int> depl;
array<1, 8, varying_string<22> > inv;
array<1, 7, varying_string<23> > dep;
@@ -360,11 +354,11 @@ array<1, 5, varying_string<11> > self_;
array<1, 8, varying_string<5> > dis;
array<1, 7, char> touv;
sav_chaine s, s1;
-array<0, 390, byte> bufcha;
+byte bufcha[391];
matrix<1, 6, 0, 23, byte> lettres;
-array<0, 15, byte> palher;
+byte palher[16];
int t_mot[maxti + 1];
int tay_tchar;
@@ -376,10 +370,10 @@ int l[108];
int tbi[256];
chariot c1, c2, c3;
float addfix;
-pal_cga palsav;
+t_pcga palsav[91];
array<0, 90, tabdb> tabpal;
-pal_cga palcga;
-array<0, 14, pattern> tpt;
+t_pcga palcga[91];
+pattern tpt[15];