diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/made/screen.cpp | 9 | ||||
-rw-r--r-- | engines/made/screen.h | 4 | ||||
-rw-r--r-- | engines/made/screenfx.cpp | 7 | ||||
-rw-r--r-- | engines/made/screenfx.h | 3 |
4 files changed, 20 insertions, 3 deletions
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index dfcda3f95b..cae395f33d 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -32,6 +32,10 @@ namespace Made { Screen::Screen(MadeEngine *vm) : _vm(vm) { + _screenPalette = new byte[256 * 4]; + _palette = new byte[768]; + _newPalette = new byte[768]; + _backgroundScreen = new Graphics::Surface(); _backgroundScreen->create(320, 200, 1); @@ -90,6 +94,11 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { } Screen::~Screen() { + + delete[] _screenPalette; + delete[] _palette; + delete[] _newPalette; + delete _backgroundScreen; delete _workScreen; if (_vm->getGameID() != GID_RTZ) diff --git a/engines/made/screen.h b/engines/made/screen.h index 0e3b8a44f2..47fe779625 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -203,8 +203,8 @@ protected: bool _screenLock; bool _paletteLock; - byte _screenPalette[256 * 4]; - byte _palette[768], _newPalette[768]; + byte *_screenPalette; + byte *_palette, *_newPalette; int _paletteColorCount, _oldPaletteColorCount; bool _paletteInitialized, _needPalette; int16 _textColor; diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index 82864f1daf..02a74374ab 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -51,8 +51,15 @@ ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) { vfxY1 = 0; vfxWidth = 0; vfxHeight = 0; + + _fxPalette = new byte[768]; + } +ScreenEffects::~ScreenEffects() { + delete[] _fxPalette; +} + void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { // TODO: Put effect functions into an array diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h index ef1dc6ef7c..50716c3333 100644 --- a/engines/made/screenfx.h +++ b/engines/made/screenfx.h @@ -40,11 +40,12 @@ namespace Made { class ScreenEffects { public: ScreenEffects(Screen *screen); + ~ScreenEffects(); void run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void flash(int count, byte *palette, int colorCount); private: Screen *_screen; - byte _fxPalette[768]; + byte *_fxPalette; static const byte vfxOffsTable[64]; static const byte vfxOffsIndexTable[8]; const byte *vfxOffsTablePtr; |