mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
CGE: Mouse MC sprite array into the Mouse class
This commit is contained in:
parent
817a52ed56
commit
9d40a1ba9d
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user