diff options
-rw-r--r-- | engines/mortevielle/mor2.cpp | 1 | ||||
-rw-r--r-- | engines/mortevielle/mouse.cpp | 1 | ||||
-rw-r--r-- | engines/mortevielle/var_mor.cpp | 199 | ||||
-rw-r--r-- | engines/mortevielle/var_mor.h | 149 |
4 files changed, 260 insertions, 90 deletions
diff --git a/engines/mortevielle/mor2.cpp b/engines/mortevielle/mor2.cpp index d41f480246..b6c3ee93fe 100644 --- a/engines/mortevielle/mor2.cpp +++ b/engines/mortevielle/mor2.cpp @@ -26,6 +26,7 @@ */ #include "mortevielle/mor2.h" +#include "mortevielle/var_mor.h" namespace Mortevielle { diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp index 8b4fcaa84a..0a00cc3c76 100644 --- a/engines/mortevielle/mouse.cpp +++ b/engines/mortevielle/mouse.cpp @@ -26,6 +26,7 @@ */ #include "mortevielle/mouse.h" +#include "mortevielle/var_mor.h" namespace Mortevielle { diff --git a/engines/mortevielle/var_mor.cpp b/engines/mortevielle/var_mor.cpp index 34c1607cbc..89ebda43e1 100644 --- a/engines/mortevielle/var_mor.cpp +++ b/engines/mortevielle/var_mor.cpp @@ -31,6 +31,205 @@ namespace Mortevielle { /*---------------------------------------------------------------------------*/ +/*------------------------------ CONSTANTS ------------------------------*/ +/*---------------------------------------------------------------------------*/ + +const byte tabdbc[18] = {7, 23, 7, 14, 13, 9, 14, 9, 5, 12, 6, 12, 13, 4, 0, 4, 5, 9}; +const byte tabdph[16] = {0, 10, 2, 0, 2, 10, 3, 0, 3, 7, 5, 0, 6, 7, 7, 10}; +const byte typcon[26] = {0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3}; +const byte intcon[26] = {1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}; +const byte tnocon[364] = { + 0, 0, 0, 0, 0, 0, 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1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + + +const byte don[9][5] = { + { 0, 0, 0, 0, 0}, + { 0, 7, 37, 22, 8}, + {0, 19, 33, 23, 7}, + {0, 31, 89, 10, 21}, + {0, 43, 25, 11, 5}, + {0, 55, 37, 5, 8}, + {0, 64, 13, 11, 2}, + {0, 62, 22, 13, 4}, + {0, 62, 25, 13, 5} +}; + +const char *fic[3] = { + "", + " Sauvegarde", + " Chargement" +}; + +const byte addv[2] = {8, 8}; + +const char recom[] = " Recommence "; + +const char f3[] = "F3: Encore"; +const char f8[] = "F8: Suite"; + +const byte rang[16] = {15, 14, 11, 7, 13, 12, 10, 6, 9, 5, 3, 1, 2, 4, 8, 0}; + +/*---------------------------------------------------------------------------*/ +/*------------------------------ VARIABLES ------------------------------*/ +/*---------------------------------------------------------------------------*/ + +bool blo, + bh1, + bf1, + bh2, + bh4, + bf4, + bh5, + bh6, + bh8, + bt3, + bt7, + bh9, + + sonoff, + main1, + choisi, + test0, + f2_all, + imen, + cache, + iesc, + perdu, + col, + syn, + fouil, + zuul, + tesok, + obpart, + okdes, + solu, + arret, + anyone, + brt, + rect, + rech_cfiec, + active_menu; + + +int x, + y, + t, + vj, + li, + vh, + vm, + jh, + mh, + cs, + gd, /* Gd = graph device */ + hdb, + hfb, + heu, + jou, + key, + min, + num, + max, + res, + ment, + haut, + caff, + maff, + crep, + ades, + iouv, + inei, + ctrm, + dobj, + msg3, + msg4, + mlec, + newgd, + c_zzz, + mchai, + menup, + ipers, + ledeb, + lefin, + mpers, + mnumo, + xprec, + yprec, + perdep, + prebru, + typlec, + num_ph, + xwhere, + ywhere, + numpal, + lderobj, + nb_word, + ptr_oct, + k_tempo, + ptr_tcph, + ptr_word, + color_txt; + +int t_cph[6401]; +byte tabdon[4001]; +/* t_dxx : array[0..121] of int;*/ +Common::String stpou; /* donne le % d'indices */ +byte is; +char mode; +Common::String al_mess, + err_mess, + ind_mess, + al_mess2; + +int invt[8]; +int nbrep[8]; +int nbrepm[8]; +int disc[8]; +int msg[5]; +int depl[7]; +Common::String inv[9]; +Common::String dep[8]; +Common::String act[22]; +Common::String self_[6]; +Common::String dis[9]; +char touv[7]; +sav_chaine s, s1; +byte bufcha[391]; + +byte lettres[7][24]; + +byte palher[16]; + +int t_mot[maxti + 1]; +int tay_tchar; +ind t_rec[maxtd + 1]; +//file<ind> sauv_t; +//untyped_file fibyte; +byte v_lieu[8][25]; +int l[108]; +int tbi[256]; +chariot c1, c2, c3; +float addfix; +t_pcga palsav[91]; +doublet tabpal[91][16]; +t_pcga palcga[91]; +pattern tpt[15]; + +/*---------------------------------------------------------------------------*/ /*-------------------- PROCEDURES AND FONCTIONS -----------------------*/ /*---------------------------------------------------------------------------*/ diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h index f912789b34..59d98fe58e 100644 --- a/engines/mortevielle/var_mor.h +++ b/engines/mortevielle/var_mor.h @@ -43,7 +43,7 @@ namespace Mortevielle { /*---------------------------------------------------------------------------*/ -/*------------------------- CONSTANTES ----------------------------------*/ +/*------------------------- CONSTANTS ----------------------------------*/ /*---------------------------------------------------------------------------*/ const float freq0 = 1.19318e6; @@ -79,12 +79,6 @@ const int maxti = 7975; const int maxtd = 600; const int max_rect = 14; -const int ams = 0; -const int cga = 1; -const int ega = 2; -const int her = 3; -const int tan = 4; - const int c_repon = 0; const int c_st41 = 186; const int c_tparler = 247; @@ -144,57 +138,26 @@ const int slire = 0x403; const int sposer = 0x404; const int sregarder = 0x405; -const byte tabdbc[18] = {7, 23, 7, 14, 13, 9, 14, 9, 5, 12, 6, 12, 13, 4, 0, 4, 5, 9}; -const byte tabdph[16] = {0, 10, 2, 0, 2, 10, 3, 0, 3, 7, 5, 0, 6, 7, 7, 10}; -const byte typcon[26] = {0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3}; -const by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 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - - -const byte don[9][5] = { - { 0, 0, 0, 0, 0}, - { 0, 7, 37, 22, 8}, - {0, 19, 33, 23, 7}, - {0, 31, 89, 10, 21}, - {0, 43, 25, 11, 5}, - {0, 55, 37, 5, 8}, - {0, 64, 13, 11, 2}, - {0, 62, 22, 13, 4}, - {0, 62, 25, 13, 5} -}; +const int max_patt = 20; -const char *fic[3] = { - "", - " Sauvegarde", - " Chargement" -}; +extern const byte tabdbc[18]; +extern const byte tabdph[16]; +extern const byte typcon[26]; +extern const byte intcon[26]; +extern const byte tnocon[364]; -const byte addv[2] = {8, 8}; +extern const byte don[9][5]; -const char recom[] = " Recommence "; +extern const char *fic[3]; -const char f3[] = "F3: Encore"; -const char f8[] = "F8: Suite"; +extern const byte addv[2]; -const int max_patt = 20; +extern const char recom[]; +extern const char f3[]; +extern const char f8[]; -const byte rang[16] = {15, 14, 11, 7, 13, 12, 10, 6, 9, 5, 3, 1, 2, 4, 8, 0}; +extern const byte rang[16]; /*---------------------------------------------------------------------------*/ @@ -255,10 +218,16 @@ struct t_pcga { }; /*---------------------------------------------------------------------------*/ +/*------------------------------ ENUMS ------------------------------*/ +/*---------------------------------------------------------------------------*/ + +enum GraphicModes { ams = 0, cga = 1, ega = 2, her = 3, tan = 4 }; + +/*---------------------------------------------------------------------------*/ /*------------------------------ VARIABLES ------------------------------*/ /*---------------------------------------------------------------------------*/ -bool blo, +extern bool blo, bh1, bf1, bh2, @@ -296,7 +265,7 @@ bool blo, active_menu; -int x, +extern int x, y, t, vj, @@ -355,50 +324,50 @@ int x, ptr_word, color_txt; -int t_cph[6401]; -byte tabdon[4001]; +extern int t_cph[6401]; +extern byte tabdon[4001]; /* t_dxx : array[0..121] of int;*/ -Common::String stpou; /* donne le % d'indices */ -byte is; -char mode; -Common::String al_mess, +extern Common::String stpou; /* donne le % d'indices */ +extern byte is; +extern char mode; +extern Common::String al_mess, err_mess, ind_mess, al_mess2; -int invt[8]; -int nbrep[8]; -int nbrepm[8]; -int disc[8]; -int msg[5]; -int depl[7]; -Common::String inv[9]; -Common::String dep[8]; -Common::String act[22]; -Common::String self_[6]; -Common::String dis[9]; -char touv[7]; -sav_chaine s, s1; -byte bufcha[391]; - -byte lettres[7][24]; - -byte palher[16]; - -int t_mot[maxti + 1]; -int tay_tchar; -ind t_rec[maxtd + 1]; +extern int invt[8]; +extern int nbrep[8]; +extern int nbrepm[8]; +extern int disc[8]; +extern int msg[5]; +extern int depl[7]; +extern Common::String inv[9]; +extern Common::String dep[8]; +extern Common::String act[22]; +extern Common::String self_[6]; +extern Common::String dis[9]; +extern char touv[7]; +extern sav_chaine s, s1; +extern byte bufcha[391]; + +extern byte lettres[7][24]; + +extern byte palher[16]; + +extern int t_mot[maxti + 1]; +extern int tay_tchar; +extern ind t_rec[maxtd + 1]; //file<ind> sauv_t; //untyped_file fibyte; -byte v_lieu[8][25]; -int l[108]; -int tbi[256]; -chariot c1, c2, c3; -float addfix; -t_pcga palsav[91]; -doublet tabpal[91][16]; -t_pcga palcga[91]; -pattern tpt[15]; +extern byte v_lieu[8][25]; +extern int l[108]; +extern int tbi[256]; +extern chariot c1, c2, c3; +extern float addfix; +extern t_pcga palsav[91]; +extern doublet tabpal[91][16]; +extern t_pcga palcga[91]; +extern pattern tpt[15]; /*---------------------------------------------------------------------------*/ /*------------------- PROCEDURES AND FONCTIONS ------------------------*/ |