MORTEVIELLE: More addition of needed #include lines and other compilation fixes

This commit is contained in:
Paul Gilbert 2011-12-30 23:42:28 +11:00 committed by Strangerke
parent c7a1bd48bd
commit fd243358d3
14 changed files with 55 additions and 21 deletions

View File

@ -28,10 +28,12 @@
#include "common/scummsys.h"
#include "mortevielle/actions.h"
#include "mortevielle/alert.h"
#include "mortevielle/level15.h"
#include "mortevielle/mor.h"
#include "mortevielle/mor2.h"
#include "mortevielle/mouse.h"
#include "mortevielle/outtext.h"
#include "mortevielle/parole2.h"
#include "mortevielle/var_mor.h"
namespace Mortevielle {

View File

@ -28,6 +28,7 @@
#include "common/str.h"
#include "mortevielle/alert.h"
#include "mortevielle/level15.h"
#include "mortevielle/mouse.h"
namespace Mortevielle {
@ -35,12 +36,12 @@ namespace Mortevielle {
const int nligne = 7;
const matrix<1, 2, 1, 3, int> coord
= {{ {{150, 72, 103}},
{{143, 107, 183}}
}
};
const int coord[3][4] = {
{0, 0, 0, 0},
{0, 150, 72, 103),
{0, 143, 107, 183}
};
static void decod(Common::String s, int &nbc, int &nbl, int &col, Common::String &c, Common::String &cs) {
@ -115,7 +116,7 @@ static void fait_choix(Common::String c, int &coldep, int &nbcase, Common::Strin
str[l] = str[l] + ch;
} while (!(c[i + 1] == ']'));
i = i + 2;
while (length(str[l]) < 3) str[l] = str[l] + ' ';
while (str[l].size() < 3) str[l] = str[l] + ' ';
putxy(x, 98);
writeg(string(' ') + str[l] + ' ', 0);
x = x + esp + 40;

View File

@ -27,6 +27,7 @@
#include "mortevielle/level15.h"
#include "mortevielle/var_mor.h"
#include "mortevielle/mouse.h"
namespace Mortevielle {

View File

@ -28,7 +28,9 @@
#include "common/scummsys.h"
#include "common/str.h"
#include "common/textconsole.h"
#include "mortevielle/level15.h"
#include "mortevielle/menu.h"
#include "mortevielle/mouse.h"
#include "mortevielle/var_mor.h"
namespace Mortevielle {
@ -48,7 +50,7 @@ namespace Mortevielle {
clrscr;
mortevielle_exit(0);
}
while (length(s) < 30) s = s + ' ';
while (s.size() < 30) s = s + ' ';
switch (h) {
case invent :
if (l != 7) inv[l] = string(' ') + s;

View File

@ -28,8 +28,14 @@
#include "common/str.h"
#include "common/textconsole.h"
#include "mortevielle/alert.h"
#include "mortevielle/boite.h"
#include "mortevielle/droite.h
#include "mortevielle/level15.h"
#include "mortevielle/menu.h"
#include "mortevielle/mor.h"
#include "mortevielle/mouse.h"
#include "mortevielle/outtext.h"
#include "mortevielle/parole2.h"
#include "mortevielle/var_mor.h"
namespace Mortevielle {
@ -219,8 +225,8 @@ void ecr2(Common::String str_) {
else tab = 6;
putxy(8, 177);
tlig = 59 + pred(int, res) * 36;
if (length(str_) < tlig) writeg(str_, 5);
else if (length(str_) < (tlig << 1)) {
if (str_.size() < tlig) writeg(str_, 5);
else if (str_.size() < (tlig << 1)) {
putxy(8, 176);
writeg(copy(str_, 1, pred(int, tlig)), 5);
putxy(8, 182);
@ -286,7 +292,7 @@ void clsf10() {
else if (s.conf > 65) st = "Malsaine";
if (res == 1) co = 10;
else co = 6;
co = 574 - ((uint)co * length(st) >> 1);
co = 574 - ((uint)co * st.size() >> 1);
putxy(co, 92);
writeg(st, 4);
if (res == 1) co = 620;
@ -638,10 +644,10 @@ void chlm(int &per) {
}
void pendule() {
const matrix<1, 2, 1, 12, int> cv
= {{{{ 5, 8, 10, 8, 5, 0, -5, -8, -10, -8, -5, 0}},
{{ -5, -3, 0, 3, 5, 6, 5, 3, 0, -3, -5, -6}}
}
const int cv[3][13] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 5, 8, 10, 8, 5, 0, -5, -8, -10, -8, -5, 0 },
{ 0, -5, -3, 0, 3, 5, 6, 5, 3, 0, -3, -5, -6 }
};
const int x = 580;
const int y = 123;
@ -983,8 +989,7 @@ void debloc(int l) {
/* NIVEAU 10 */
void init_nbrepm() {
const array<1, 8, byte> ipm
= {{4, 5, 6, 7, 5, 6, 5, 8}};
const byte ipm[9] = { 0, 4, 5, 6, 7, 5, 6, 5, 8 };
int i;
/* debug('init_nbrepm'); */

View File

@ -26,9 +26,15 @@
*/
#include "mortevielle/mor2.h"
#include "mortevielle/alert.h"
#include "mortevielle/boite.h"
#include "mortevielle/var_mor.h"
#include "mortevielle/menu.h"
#include "mortevielle/mor.h"
#include "mortevielle/mouse.h"
#include "mortevielle/outtext.h"
#include "mortevielle/parole2.h"
#include "mortevielle/taffich.h"
namespace Mortevielle {
@ -211,7 +217,7 @@ void tmlieu(int mli) {
cx = v_lieu[i][mli];
deline(cx + c_tmlieu, st, tail);
nomp = delig;
while (length(nomp) < 30) nomp = nomp + ' ';
while (nomp.size() < 30) nomp = nomp + ' ';
menut(depl[i], nomp);
i = i + 1;
}

View File

@ -42,7 +42,7 @@ int m_show,
p_o_s,
mouse_shwn;
matrix<0, 5, 0, 11, int> s_s;
int s_s[12][6];
void init_mouse() {

View File

@ -32,6 +32,12 @@ namespace Mortevielle {
extern bool clic;
extern int m_show,
x_s,
y_s,
p_o_s,
mouse_shwn;
void init_mouse();
//extern void change_mouse(int t);
//extern void dessine_souris(int xf, int yf);

View File

@ -26,6 +26,7 @@
*/
#include "mortevielle/outtext.h"
#include "mortevielle/level15.h"
#include "mortevielle/var_mor.h"
#include "common/str.h"

View File

@ -25,9 +25,13 @@
* Copyright (c) 1988-1989 Lankhor
*/
#include "mortevielle/actions.h"
#include "mortevielle/menu.h"
#include "mortevielle/mor.h"
#include "mortevielle/mor2.h"
#include "mortevielle/prog.h"
#include "mortevielle/var_mor.h"
#include "mortevielle/mouse.h"
namespace Mortevielle {

View File

@ -25,6 +25,7 @@
* Copyright (c) 1988-1989 Lankhor
*/
#include "mortevielle/mouse.h"
#include "mortevielle/outtext.h"
#include "mortevielle/ques.h"
#include "common/str.h"
@ -89,7 +90,7 @@ namespace Mortevielle {
with.y2 = 34 + j * 8;
with.etat = true;
}
while (length(chaines[j]) < tmax) {
while (chaines[j].size() < tmax) {
chaines[j] = chaines[j] + ' ';
}
}

View File

@ -55,7 +55,7 @@ void writeg(Common::String l, int c)
yo = ywhere;
if (res == 2) i = 6;
else i = 10;
x = xo + i * length(l);
x = xo + i * l.size();
switch (c) {
case 1:
case 3 : {
@ -80,7 +80,7 @@ void writeg(Common::String l, int c)
}
xo = xo + 1;
yo = yo + 1;
for (x = 1; x <= length(l); x ++) {
for (x = 1; x <= l.size(); x ++) {
affcar(gd, xo, yo, cecr, ord(l[x]));
xo = xo + i;
}

View File

@ -26,6 +26,7 @@
*/
#include "common/str.h"
#include "mortevielle/mouse.h"
#include "mortevielle/taffich.h"
#include "mortevielle/var_mor.h"

View File

@ -48,6 +48,10 @@ namespace Mortevielle {
#define pred(type, v) (v - 1)
#define succ(type, v) (v + 1)
#define ord(v) ((int) v)
#define chr(v) ((char) v)
#define lo(v) (v & 0xff)
#define hi(v) ((v >> 8) & 0xff)
#define odd(v) ((v % 2) == 1)
// TODO: Replace the following with proper implementations
#define mortevielle_exit(ret) error("Exit the game")