aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorPaul Gilbert2012-02-12 22:03:50 +1100
committerStrangerke2012-04-06 08:21:10 +0200
commita29bd180f730ba79e380d9c04a140ab8303c5d77 (patch)
tree55e1b4fc76e3898d1dc596bd0214f3a7514dc403 /engines/mortevielle
parent459ef933395e9f7108c6047c7d07b2a22351a315 (diff)
downloadscummvm-rg350-a29bd180f730ba79e380d9c04a140ab8303c5d77.tar.gz
scummvm-rg350-a29bd180f730ba79e380d9c04a140ab8303c5d77.tar.bz2
scummvm-rg350-a29bd180f730ba79e380d9c04a140ab8303c5d77.zip
MORTEVIELLE: Replaced all box() calls with ScreenSurface::fillBox
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/alert.cpp6
-rw-r--r--engines/mortevielle/graphics.cpp10
-rw-r--r--engines/mortevielle/graphics.h2
-rw-r--r--engines/mortevielle/menu.cpp8
-rw-r--r--engines/mortevielle/mor.cpp14
-rw-r--r--engines/mortevielle/ques.cpp2
-rw-r--r--engines/mortevielle/sprint.cpp6
-rw-r--r--engines/mortevielle/var_mor.cpp11
-rw-r--r--engines/mortevielle/var_mor.h4
9 files changed, 23 insertions, 40 deletions
diff --git a/engines/mortevielle/alert.cpp b/engines/mortevielle/alert.cpp
index 73befd9196..8f2ff4ffd3 100644
--- a/engines/mortevielle/alert.cpp
+++ b/engines/mortevielle/alert.cpp
@@ -100,9 +100,9 @@ static void fait_boite(int lidep, int nli, int tx) {
y = pred(int, lidep) << 3;
xx = x + tx;
yy = y + (nli << 3);
- box(15, gd, x, y, xx, yy, 255);
- box(0, gd, x, y + 2, xx, y + 4, 255);
- box(0, gd, x, yy - 4, xx, yy - 2, 255);
+ g_vm->_screenSurface.fillBox(15, Common::Rect(x, y, xx, yy));
+ g_vm->_screenSurface.fillBox(0, Common::Rect(x, y + 2, xx, y + 4));
+ g_vm->_screenSurface.fillBox(0, Common::Rect(x, yy - 4, xx, yy - 2));
}
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index ad421988d4..3ac08cfea1 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -1006,16 +1006,12 @@ void ScreenSurface::drawBox(int x, int y, int dx, int dy, int col) {
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* simulate the original 640x400 surface, all Y values have to be doubled
*/
-void ScreenSurface::fillBox(int colour, const Common::Rect &bounds, int patt) {
+void ScreenSurface::fillBox(int colour, const Common::Rect &bounds) {
Graphics::Surface destSurface = lockArea(Common::Rect(bounds.left, bounds.top * 2,
bounds.right, bounds.bottom * 2));
// Fill the area
destSurface.fillRect(Common::Rect(0, 0, destSurface.w, destSurface.h), colour);
-
- // TODO: Figure out what effect patterns of other than '0xff' have
- if (patt != 0xff)
- warning("TODO: Figure out operation of ScreenSurface::box when pattern is %xh", patt);
}
/**
@@ -1065,7 +1061,7 @@ void ScreenSurface::writeg(const Common::String &l, int c) {
case 1:
case 3 : {
cecr = 0;
- box(15, gd, pt.x, pt.y, x, pt.y + 7, 255);
+ g_vm->_screenSurface.fillBox(15, Common::Rect(pt.x, pt.y, x, pt.y + 7));
}
break;
case 4 : {
@@ -1079,7 +1075,7 @@ void ScreenSurface::writeg(const Common::String &l, int c) {
case 0:
case 2 : {
cecr = 15;
- box(0, gd, pt.x, pt.y, x, pt.y + 7, 255);
+ g_vm->_screenSurface.fillBox(0, Common::Rect(pt.x, pt.y, x, pt.y + 7));
}
break;
}
diff --git a/engines/mortevielle/graphics.h b/engines/mortevielle/graphics.h
index b196fce7f9..38f2ac3068 100644
--- a/engines/mortevielle/graphics.h
+++ b/engines/mortevielle/graphics.h
@@ -87,7 +87,7 @@ public:
void copyFrom(Graphics::Surface &src, int x, int y);
void writeCharacter(const Common::Point &pt, unsigned char ch, int palIndex);
void drawBox(int x, int y, int dx, int dy, int col);
- void fillBox(int colour, const Common::Rect &bounds, int patt);
+ void fillBox(int colour, const Common::Rect &bounds);
void clearScreen();
void putxy(int x, int y) { _textPos = Common::Point(x, y); }
void writeg(const Common::String &l, int c);
diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp
index 07626b3894..71b0ccf407 100644
--- a/engines/mortevielle/menu.cpp
+++ b/engines/mortevielle/menu.cpp
@@ -146,7 +146,7 @@ void menu_aff() {
clrscr;
halt;
end;*/
- box(7, gd, 0, 0, 639, 10, 255);
+ g_vm->_screenSurface.fillBox(7, Common::Rect(0, 0, 639, 10));
col = 28 * res;
if (gd == cga) color = 1;
else color = 9;
@@ -278,9 +278,9 @@ void menu_down(int ii) {
if (res == 1) cx = 10;
else cx = 6;
xcc = xco + (don[ii][3] * cx) + 6;
- box(15, gd, xco, 12, xcc, 10 + (don[ii][2] << 1), 255);
- box(0, gd, xcc, 12, xcc + 4, 10 + (don[ii][2] << 1), 255);
- box(0, gd, xco, 8 + (don[ii][2] << 1), xcc + 4, 12 + (don[ii][2] << 1), 255);
+ g_vm->_screenSurface.fillBox(15, Common::Rect(xco, 12, xcc, 10 + (don[ii][2] << 1)));
+ g_vm->_screenSurface.fillBox(0, Common::Rect(xcc, 12, xcc + 4, 10 + (don[ii][2] << 1)));
+ g_vm->_screenSurface.fillBox(0, Common::Rect(xco, 8 + (don[ii][2] << 1), xcc + 4, 12 + (don[ii][2] << 1)));
g_vm->_screenSurface.putxy(xco, 16);
cx = 0;
do {
diff --git a/engines/mortevielle/mor.cpp b/engines/mortevielle/mor.cpp
index dbecbc9e7d..ea9012e49e 100644
--- a/engines/mortevielle/mor.cpp
+++ b/engines/mortevielle/mor.cpp
@@ -149,7 +149,7 @@ void clsf1() {
/* debug('clsf1'); */
hide_mouse();
- box(0, gd, 0, 11, 514, 175, 255);
+ g_vm->_screenSurface.fillBox(0, Common::Rect(0, 11, 514, 175));
/* if Gd=ams then port[$3DD]:=15;
case Gd of
ams,
@@ -198,11 +198,11 @@ void clsf2() {
/* debug('clsf2'); */
hide_mouse();
if (f2_all) {
- box(0, gd, 1, 176, 633, 199, 255);
+ g_vm->_screenSurface.fillBox(0, Common::Rect(1, 176, 633, 199));
g_vm->_screenSurface.drawBox(0, 175, 634, 24, 15);
f2_all = false;
} else {
- box(0, gd, 1, 176, 633, 190, 255);
+ g_vm->_screenSurface.fillBox(0, Common::Rect(1, 176, 633, 190));
g_vm->_screenSurface.drawBox(0, 175, 634, 15, 15);
}
show_mouse();
@@ -247,7 +247,7 @@ void clsf3() {
/* debug('clsf3'); */
hide_mouse();
- box(0, gd, 1, 192, 633, 199, 255);
+ g_vm->_screenSurface.fillBox(0, Common::Rect(1, 192, 633, 199));
g_vm->_screenSurface.drawBox(0, 191, 634, 8, 15);
show_mouse();
}
@@ -285,7 +285,7 @@ void clsf10() {
co = 600;
cod = 544;
}
- box(15, gd, cod, 93, co, 98, 255);
+ g_vm->_screenSurface.fillBox(15, Common::Rect(cod, 93, co, 98));
if (s.conf < 33)
st = g_vm->getString(S_COOL);
else if (s.conf < 66)
@@ -300,7 +300,7 @@ void clsf10() {
g_vm->_screenSurface.writeg(st, 4);
if (res == 1) co = 620;
else co = 584;
- box(15, gd, 560, 24, co, 86, 255);
+ g_vm->_screenSurface.fillBox(15, Common::Rect(560, 24, co, 86));
/* rempli(69,12,32,5,255);*/
show_mouse();
}
@@ -319,7 +319,7 @@ void paint_rect(int x, int y, int dx, int dy) {
/* debug('paint_rect'); */
if (gd == cga) co = 3;
else co = 11;
- box(co, gd, x, y, x + dx, y + dy, 255);
+ g_vm->_screenSurface.fillBox(co, Common::Rect(x, y, x + dx, y + dy));
}
int hazard(int min, int max) {
diff --git a/engines/mortevielle/ques.cpp b/engines/mortevielle/ques.cpp
index 924b378e14..5453500fcd 100644
--- a/engines/mortevielle/ques.cpp
+++ b/engines/mortevielle/ques.cpp
@@ -63,7 +63,7 @@ namespace Mortevielle {
deline(ta[i], st, tay);
if (res == 1) y = 29;
else y = 23;
- box(15, gd, 0, 14, 630, y, 255);
+ g_vm->_screenSurface.fillBox(15, Common::Rect(0, 14, 630, y));
afftex(st, 20, 15, 100, 2, 0);
if (i != 10) {
prem = ta[i] + 1;
diff --git a/engines/mortevielle/sprint.cpp b/engines/mortevielle/sprint.cpp
index 6a52b2cdb2..e6d00358d5 100644
--- a/engines/mortevielle/sprint.cpp
+++ b/engines/mortevielle/sprint.cpp
@@ -35,11 +35,13 @@
namespace Mortevielle {
void fill_box(int x, int y, int dx) {
- box(15, gd, pred(int, x) << 3, pred(int, y) << 3, pred(int, x + dx) << 3, y << 3, 255);
+ g_vm->_screenSurface.fillBox(15, Common::Rect(pred(int, x) << 3, pred(int, y) << 3,
+ pred(int, x + dx) << 3, y << 3));
}
void clear_box(int x, int y, int dx) {
- box(0, gd, pred(int, x) << 3, pred(int, y) << 3, pred(int, x + dx) << 3, y << 3, 255);
+ g_vm->_screenSurface.fillBox(0, Common::Rect(pred(int, x) << 3, pred(int, y) << 3,
+ pred(int, x + dx) << 3, y << 3));
}
} // End of namespace Mortevielle
diff --git a/engines/mortevielle/var_mor.cpp b/engines/mortevielle/var_mor.cpp
index 9b735bdeda..1fc18e70d0 100644
--- a/engines/mortevielle/var_mor.cpp
+++ b/engines/mortevielle/var_mor.cpp
@@ -306,17 +306,6 @@ void s_char(int Gd, int y, int dy) {
debugC(1, kMortevielleCore, "s_char called");
}
-// (* external 'c:\mc\boite.com'; *)
-void box(int c, int Gd, int xo, int yo, int xi, int yi, int patt) {
- debugC(1, kMortevielleCore, "TODO: box deprecated in favour of GfxSurface::fillBox");
- g_vm->_screenSurface.fillBox(c, Common::Rect(xo, yo, xi, yi), patt);
-}
-
-// (* external 'c:\mc\decomp.com'; *)
-void decomp(int seg, int dep) {
- debugC(1, kMortevielleCore, "TODO: decomp deprecated in faovur of GfxSurface::decode");
-}
-
// (* external 'c:\mc\reusint.com'; *)
void musyc(tablint &tb, int nbseg, int att) {
warning("TODO: musyc");
diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h
index e0b0480d53..5f13a254dd 100644
--- a/engines/mortevielle/var_mor.h
+++ b/engines/mortevielle/var_mor.h
@@ -433,10 +433,6 @@ extern int get_random_number(int minval, int maxval);
extern void s_char(int Gd, int y, int dy);
// (* external 'c:\mc\sauvecr.com'; *)
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\decomp.com'; *)
-extern void decomp(int seg, int dep);
} // End of namespace Mortevielle