aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-10 10:00:57 +1000
committerPaul Gilbert2011-07-10 10:00:57 +1000
commit9d40a1ba9d79fd8623dc0525cf25cfc4756a36d2 (patch)
tree733fb115f15b684bc3fdabfe777ce524c5b4e5c2 /engines/cge
parent817a52ed56abc172b158d794501f2bff0ab70e94 (diff)
downloadscummvm-rg350-9d40a1ba9d79fd8623dc0525cf25cfc4756a36d2.tar.gz
scummvm-rg350-9d40a1ba9d79fd8623dc0525cf25cfc4756a36d2.tar.bz2
scummvm-rg350-9d40a1ba9d79fd8623dc0525cf25cfc4756a36d2.zip
CGE: Mouse MC sprite array into the Mouse class
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/cge.cpp5
-rw-r--r--engines/cge/cge_main.cpp1
-rw-r--r--engines/cge/events.cpp8
-rw-r--r--engines/cge/events.h4
4 files changed, 8 insertions, 10 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 1fba9dfdc2..5ce83f109d 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -69,9 +69,6 @@ void CGEEngine::setup() {
Talk::init();
// Initialise sprite arrays used by game objects
- MC[0] = new Bitmap("MOUSE", true);
- MC[1] = new Bitmap("DUMMY", true);
- MC[2] = NULL;
PR[0] = new Bitmap("PRESS", true);
PR[1] = NULL;
SP[0] = new Bitmap("SPK_L", true);
@@ -158,8 +155,6 @@ CGEEngine::~CGEEngine() {
delete _infoLine;
delete _cavLight;
delete _debugLine;
- delete MC[0];
- delete MC[1];
delete PR[0];
delete SP[0];
delete SP[1];
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index f74eda259e..7edfd9b1d1 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -75,7 +75,6 @@ InfoLine *_infoLine;
Sprite *_cavLight;
InfoLine *_debugLine;
-BMP_PTR MC[3];
BMP_PTR PR[2];
BMP_PTR SP[3];
BMP_PTR LI[5];
diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp
index 116eb34b52..6168dd15a8 100644
--- a/engines/cge/events.cpp
+++ b/engines/cge/events.cpp
@@ -141,7 +141,7 @@ void Keyboard::newKeyboard(Common::Event &event) {
/*----------------- MOUSE interface -----------------*/
-Mouse::Mouse(CGEEngine *vm, Bitmap **shpl) : Sprite(vm, shpl), _busy(NULL), _hold(NULL), _hx(0), _vm(vm) {
+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 }
@@ -157,6 +157,12 @@ Mouse::Mouse(CGEEngine *vm, Bitmap **shpl) : Sprite(vm, shpl), _busy(NULL), _hol
setSeq(ms);
+ BMP_PTR *MC = new BMP_PTR[3];
+ MC[0] = new Bitmap("MOUSE", true);
+ MC[1] = new Bitmap("DUMMY", true);
+ MC[2] = NULL;
+ setShapeList(MC);
+
gotoxy(SCR_WID/2, SCR_HIG/2);
_z = 127;
step(1);
diff --git a/engines/cge/events.h b/engines/cge/events.h
index 75c504f030..671878f69a 100644
--- a/engines/cge/events.h
+++ b/engines/cge/events.h
@@ -89,8 +89,6 @@ struct CGEEvent {
Sprite *_ptr;
};
-extern Bitmap *MC[];
-
class Mouse : public Sprite {
public:
@@ -102,7 +100,7 @@ public:
int _buttons;
Sprite *_busy;
//Sprite *Touched;
- Mouse(CGEEngine *vm, Bitmap **shpl = MC);
+ Mouse(CGEEngine *vm);
~Mouse();
void on();
void off();