aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/graphics.h
diff options
context:
space:
mode:
authorPaul Gilbert2010-06-03 09:34:32 +0000
committerPaul Gilbert2010-06-03 09:34:32 +0000
commit86dcc28342021933f04ff3542932fc8823ff2360 (patch)
tree88b43c3e0a4938078ad782609b5141cd96bd47c2 /engines/m4/graphics.h
parent90649938d2d70115967c45cdd1cbb8dab1635794 (diff)
downloadscummvm-rg350-86dcc28342021933f04ff3542932fc8823ff2360.tar.gz
scummvm-rg350-86dcc28342021933f04ff3542932fc8823ff2360.tar.bz2
scummvm-rg350-86dcc28342021933f04ff3542932fc8823ff2360.zip
Moved the MADS interface view into mads_scene.cpp and did a major cleanup of scene loading code
svn-id: r49405
Diffstat (limited to 'engines/m4/graphics.h')
-rw-r--r--engines/m4/graphics.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h
index c140140f97..97fdfc0d6c 100644
--- a/engines/m4/graphics.h
+++ b/engines/m4/graphics.h
@@ -35,6 +35,12 @@
namespace M4 {
+#define MADS_SURFACE_WIDTH 320
+#define MADS_SURFACE_HEIGHT 156
+#define MADS_SCREEN_HEIGHT 200
+#define MADS_Y_OFFSET ((MADS_SCREEN_HEIGHT - MADS_SURFACE_HEIGHT) / 2)
+
+
struct BGR8 {
uint8 b, g, r;
};
@@ -89,19 +95,23 @@ class M4Surface : protected Graphics::Surface {
private:
byte _color;
bool _isScreen;
+ RGBList *_rgbList;
void rexLoadBackground(Common::SeekableReadStream *source, RGBList **palData = NULL);
void madsLoadBackground(int roomNumber, RGBList **palData = NULL);
void m4LoadBackground(Common::SeekableReadStream *source);
public:
M4Surface(bool isScreen = false) {
- create(g_system->getWidth(), g_system->getHeight(), 1);
+ create(g_system->getWidth(), isScreen ? g_system->getHeight() : MADS_SURFACE_HEIGHT, 1);
_isScreen = isScreen;
+ _rgbList = NULL;
}
M4Surface(int width_, int height_) {
create(width_, height_, 1);
_isScreen = false;
+ _rgbList = NULL;
}
+ virtual ~M4Surface();
// loads a .COD file into the M4Surface
// TODO: maybe move this to the rail system? check where it makes sense
@@ -112,7 +122,7 @@ public:
// loads the specified background
void loadBackground(int sceneNumber, RGBList **palData = NULL);
void loadBackgroundRiddle(const char *sceneName);
- void madsloadInterface(int index, RGBList **palData);
+ void madsloadInterface(int index, RGBList **palData = NULL);
void setColor(byte value) { _color = value; }
void setColour(byte value) { _color = value; }