aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/events.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-12 21:16:23 +1000
committerPaul Gilbert2011-07-12 21:16:23 +1000
commitdaae033e0156f19b3bdbb46aa7b0785c40f1e094 (patch)
tree294295b23dacec42fffd87b13e50f49d8699ac9a /engines/cge/events.cpp
parenta524adcaee89678ba99b294fcbc5efdf9e137c04 (diff)
downloadscummvm-rg350-daae033e0156f19b3bdbb46aa7b0785c40f1e094.tar.gz
scummvm-rg350-daae033e0156f19b3bdbb46aa7b0785c40f1e094.tar.bz2
scummvm-rg350-daae033e0156f19b3bdbb46aa7b0785c40f1e094.zip
CGE: Converted SprExt::_Seq to use dynamically allocated data
Diffstat (limited to 'engines/cge/events.cpp')
-rw-r--r--engines/cge/events.cpp14
1 files changed, 8 insertions, 6 deletions
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);