From daae033e0156f19b3bdbb46aa7b0785c40f1e094 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 12 Jul 2011 21:16:23 +1000 Subject: CGE: Converted SprExt::_Seq to use dynamically allocated data --- engines/cge/events.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'engines/cge/events.cpp') diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index 433f7c6db9..9c1741189f 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -142,11 +142,6 @@ void Keyboard::newKeyboard(Common::Event &event) { /*----------------- MOUSE interface -----------------*/ Mouse::Mouse(CGEEngine *vm) : Sprite(vm, NULL), _busy(NULL), _hold(NULL), _hx(0), _vm(vm) { - static Seq ms[] = { - { 0, 0, 0, 0, 1 }, - { 1, 1, 0, 0, 1 } - }; - _hold = NULL; _hx = 0; _hy = 0; @@ -155,7 +150,14 @@ Mouse::Mouse(CGEEngine *vm) : Sprite(vm, NULL), _busy(NULL), _hold(NULL), _hx(0) _busy = NULL; _active = false; _flags._kill = false; - setSeq(ms); + + const Seq ms[] = { + { 0, 0, 0, 0, 1 }, + { 1, 1, 0, 0, 1 } + }; + Seq *seq = (Seq *)malloc(2 * sizeof(Seq)); + Common::copy(ms, ms + 2, seq); + setSeq(seq); BMP_PTR *MC = new BMP_PTR[3]; MC[0] = new Bitmap("MOUSE", true); -- cgit v1.2.3