MORTEVIELLE: Reimplemented the loading of cfiec.mor more cleanly

This includes changing the absolute memory address loading to an array buffer, and changing calls to the zzuul method to use the reimplemented version.
This commit is contained in:
Paul Gilbert 2012-01-02 12:20:34 +11:00 committed by Strangerke
parent 2277f8f122
commit 45f75c901c
5 changed files with 13 additions and 20 deletions

View File

@ -27,6 +27,7 @@
#include "mortevielle/keyboard.h"
#include "mortevielle/var_mor.h"
#include "mortevielle/asm.h"
namespace Mortevielle {
@ -70,7 +71,7 @@ int testou() {
break;
case '\26' :
if ((c_zzz == 1) && (c_zzz == 2)) {
zzuul(adcfiec + 161, 0, 1644);
zzuul(&adcfiec[161 * 16], ((822 * 128) - (161 * 16)) / 64);
c_zzz = succ(int, c_zzz);
testou_result = 61;
return testou_result;

View File

@ -27,6 +27,7 @@
#include "mortevielle/mort.h"
#include "mortevielle/var_mor.h" /* les variables */ //Translation: Variables
#include "mortevielle/asm.h"
#include "mortevielle/keyboard.h" /* la gestion du clavier */ //Translation: Keyboard manager
#include "mortevielle/mouse.h" /* la souris */ //Translation: Mouse
#include "mortevielle/level15.h" /* les fonctions de base */ //Translation: Lowlevel functions
@ -78,7 +79,7 @@ int mortevielle_main(int argc, const char *argv[]) {
charpal();
charge_cfiph();
charge_cfiec();
zzuul(adcfiec + 161, 0, 1644);
zzuul(&adcfiec[161 * 16], ((822 * 128) - (161 * 16)) / 64);
c_zzz = 1;
init_nbrepm();
init_mouse();
@ -123,7 +124,8 @@ int mortevielle_main(int argc, const char *argv[]) {
adzon();
takesav(0);
if (rech_cfiec) charge_cfiec();
for (crep = 1; crep <= c_zzz; crep ++) zzuul(adcfiec + 161, 0, 1644);
for (crep = 1; crep <= c_zzz; crep ++)
zzuul(&adcfiec[161 * 16], ((822 * 128) - (161 * 16)) / 64);
charge_bruit5();
init_menu();

View File

@ -359,9 +359,7 @@ void ani50() {
if (!f.open("cfiec.mor"))
error("Missing file - cfiec.mor");
/*$i-*/
f.read(&mem[adcfiec + 0], 511);
f.read(&mem[adcfiec + 4088 + 0], 311);
f.read(&adcfiec[0], 822 * 128);
f.close();
rech_cfiec = false;

View File

@ -231,6 +231,8 @@ doublet tabpal[91][17];
t_pcga palcga[91];
pattern tpt[15];
byte adcfiec[(4088 * 16) + (311 * 0x80)];
/*---------------------------------------------------------------------------*/
/*-------------------- PROCEDURES AND FONCTIONS -----------------------*/
/*---------------------------------------------------------------------------*/
@ -385,11 +387,6 @@ 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");

View File

@ -32,9 +32,6 @@
namespace Mortevielle {
// Constants, types and variables used by Mortville Manor.
// version Nov.'88, Music and speech Oct.'88
/* Constantes, Types et Variables pour le
M A N O I R DE M O R T E V I E L L E
@ -69,7 +66,6 @@ const int segdon = 0x6c00;
const int adani = 0x7314;
const int adword = 0x4000;
const int adtroct = 0x406b;
const int adcfiec = 0x4300;
const int adbruit = 0x5cb0;/*2C00;*/
const int adbruit1 = 0x6924;/*3874;*/
const int adbruit2 = 0x6b30;/*3A80;*/
@ -103,7 +99,7 @@ const int c_dialpre = 456;
const int c_action = 476;
const int c_saction = 497;
const int c_dis = 502;
const int c_fin = 510; /* => n'existe pas ; si !! */ // Translation: "=> doesn't exist ; yes !!"
const int c_fin = 510; /* => n'existe pas ; si !! */
const int arega = 0;
const int asoul = 154;
@ -174,7 +170,6 @@ extern const char f8[];
extern const byte rang[16];
/*---------------------------------------------------------------------------*/
/*-------------------------------- TYPES --------------------------------*/
/*---------------------------------------------------------------------------*/
@ -348,7 +343,7 @@ extern int x,
extern int t_cph[6401];
extern byte tabdon[4001];
/* t_dxx : array[0..121] of int;*/
extern Common::String stpou; /* donne le % d'indices */ // Translation: "provides the % of hints"
extern Common::String stpou; /* donne le % d'indices */
extern byte is;
extern char mode;
extern Common::String al_mess,
@ -390,6 +385,8 @@ extern doublet tabpal[91][17];
extern t_pcga palcga[91];
extern pattern tpt[15];
extern byte adcfiec[822 * 128];
/*---------------------------------------------------------------------------*/
/*------------------- PROCEDURES AND FONCTIONS ------------------------*/
/*---------------------------------------------------------------------------*/
@ -437,8 +434,6 @@ extern void s_char(int Gd, int y, int dy);
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'; *)