[Scummvm-cvs-logs] SF.net SVN: scummvm: [33072] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Tue Jul 15 12:59:58 CEST 2008
Revision: 33072
http://scummvm.svn.sourceforge.net/scummvm/?rev=33072&view=rev
Author: peres001
Date: 2008-07-15 03:59:58 -0700 (Tue, 15 Jul 2008)
Log Message:
-----------
Made frame unpacking buffer dynamic (this frees some BSS space).
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/gfxbase.cpp
scummvm/trunk/engines/parallaction/graphics.cpp
scummvm/trunk/engines/parallaction/graphics.h
Modified: scummvm/trunk/engines/parallaction/gfxbase.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gfxbase.cpp 2008-07-15 10:50:31 UTC (rev 33071)
+++ scummvm/trunk/engines/parallaction/gfxbase.cpp 2008-07-15 10:59:58 UTC (rev 33072)
@@ -267,9 +267,6 @@
}
-// 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) {
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2008-07-15 10:50:31 UTC (rev 33071)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2008-07-15 10:59:58 UTC (rev 33072)
@@ -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 @@
_halfbrite = false;
_hbCircleRadius = 0;
+ _unpackedBitmap = new byte[MAXIMUM_UNPACKED_BITMAP_SIZE];
+ assert(_unpackedBitmap);
+
registerVar("background_mode", 1);
_varBackgroundMode = 1;
@@ -769,6 +777,8 @@
freeBackground();
freeLabels();
+ delete []_unpackedBitmap;
+
return;
}
Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h 2008-07-15 10:50:31 UTC (rev 33071)
+++ scummvm/trunk/engines/parallaction/graphics.h 2008-07-15 10:59:58 UTC (rev 33072)
@@ -547,6 +547,8 @@
uint _screenX; // scrolling position
uint _screenY;
+ byte *_unpackedBitmap;
+
protected:
Parallaction* _vm;
bool _halfbrite;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list