aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNicola Mettifogo2008-07-15 10:59:58 +0000
committerNicola Mettifogo2008-07-15 10:59:58 +0000
commit551f6d71c3821fac0f9245ed667c8547e05d6778 (patch)
tree16e3b68fafbb108257d14501dde5cfe9ca9a1cc1 /engines
parent619b45e4d38f8d7a74e77271522361bb7db68567 (diff)
downloadscummvm-rg350-551f6d71c3821fac0f9245ed667c8547e05d6778.tar.gz
scummvm-rg350-551f6d71c3821fac0f9245ed667c8547e05d6778.tar.bz2
scummvm-rg350-551f6d71c3821fac0f9245ed667c8547e05d6778.zip
Made frame unpacking buffer dynamic (this frees some BSS space).
svn-id: r33072
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/gfxbase.cpp3
-rw-r--r--engines/parallaction/graphics.cpp10
-rw-r--r--engines/parallaction/graphics.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index 9e7eb12ed8..e8250ac8fd 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -267,9 +267,6 @@ void Gfx::drawWrappedText(Font *font, Graphics::Surface* surf, char *text, byte
}
-// this is the maximum size of an unpacked frame in BRA
-byte _unpackedBitmap[640*401];
-
#if 0
void Gfx::unpackBlt(const Common::Rect& r, byte *data, uint size, Graphics::Surface *surf, uint16 z, byte transparentColor) {
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 32d0e303eb..9b9ea8605a 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -33,6 +33,11 @@
namespace Parallaction {
+// this is the size of the receiving buffer for unpacked frames,
+// since BRA uses some insanely big animations.
+#define MAXIMUM_UNPACKED_BITMAP_SIZE 640*401
+
+
void Gfx::registerVar(const Common::String &name, int32 initialValue) {
if (_vars.contains(name)) {
warning("Variable '%s' already registered, ignoring initial value.\n", name.c_str());
@@ -752,6 +757,9 @@ Gfx::Gfx(Parallaction* vm) :
_halfbrite = false;
_hbCircleRadius = 0;
+ _unpackedBitmap = new byte[MAXIMUM_UNPACKED_BITMAP_SIZE];
+ assert(_unpackedBitmap);
+
registerVar("background_mode", 1);
_varBackgroundMode = 1;
@@ -769,6 +777,8 @@ Gfx::~Gfx() {
freeBackground();
freeLabels();
+ delete []_unpackedBitmap;
+
return;
}
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 09f4b2f244..a7242ba6f4 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -547,6 +547,8 @@ public:
uint _screenX; // scrolling position
uint _screenY;
+ byte *_unpackedBitmap;
+
protected:
Parallaction* _vm;
bool _halfbrite;