aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.h
diff options
context:
space:
mode:
authorNicola Mettifogo2008-02-02 10:18:31 +0000
committerNicola Mettifogo2008-02-02 10:18:31 +0000
commit5306701eab63b4b308225951d8f286ecf93ab1c0 (patch)
tree17c46015c9581fbd93d1c6cd075a2da4469d315c /engines/parallaction/graphics.h
parent015ad5e4696243a96be383fce5c04350a71cb91f (diff)
downloadscummvm-rg350-5306701eab63b4b308225951d8f286ecf93ab1c0.tar.gz
scummvm-rg350-5306701eab63b4b308225951d8f286ecf93ab1c0.tar.bz2
scummvm-rg350-5306701eab63b4b308225951d8f286ecf93ab1c0.zip
Allowed BackgroundInfo to display bitmaps smaller than the screen and other small tweaks to re-enable splash screens in BRA.
svn-id: r30732
Diffstat (limited to 'engines/parallaction/graphics.h')
-rw-r--r--engines/parallaction/graphics.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 8aae823a1a..c2b46a1fba 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -328,9 +328,15 @@ typedef Common::List<GfxObj*> GfxObjList;
#define LAYER_FOREGROUND 3
+/*
+ BackgroundInfo keeps information about the background bitmap that can be seen in the game.
+ These bitmaps can be of any size, smaller or larger than the visible screen, the latter
+ being the most common options.
+*/
struct BackgroundInfo {
- uint width;
- uint height;
+ int x, y; // used to display bitmaps smaller than the screen
+ int width;
+ int height;
Graphics::Surface bg;
MaskBuffer mask;
@@ -341,7 +347,7 @@ struct BackgroundInfo {
int layers[4];
PaletteFxRange ranges[6];
- BackgroundInfo() : width(0), height(0) {
+ BackgroundInfo() : x(0), y(0), width(0), height(0) {
layers[0] = layers[1] = layers[2] = layers[3] = 0;
memset(ranges, 0, sizeof(ranges));
}
@@ -362,6 +368,10 @@ struct BackgroundInfo {
bg.free();
mask.free();
path.free();
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
}
};
@@ -412,7 +422,6 @@ public:
// background surface
BackgroundInfo _backgroundInfo;
void setBackground(uint type, const char* name, const char* mask, const char* path);
- void clearBackground();
void patchBackground(Graphics::Surface &surf, int16 x, int16 y, bool mask = false);
void grabBackground(const Common::Rect& r, Graphics::Surface &dst);
void fillBackground(const Common::Rect& r, byte color);
@@ -432,6 +441,8 @@ public:
Gfx(Parallaction* vm);
virtual ~Gfx();
+
+ void clearScreen();
void updateScreen();
public:
@@ -493,7 +504,7 @@ protected:
// low level text and patches
void setFont(Font* font);
void drawText(Graphics::Surface* surf, uint16 x, uint16 y, const char *text, byte color);
- bool drawWrappedText(Graphics::Surface* surf, char *text, byte color, int16 wrapwidth);
+ void drawWrappedText(Graphics::Surface* surf, char *text, byte color, int16 wrapwidth);
void blt(const Common::Rect& r, byte *data, Graphics::Surface *surf, uint16 z, byte transparentColor);
};