From d55401c2e10276827372f8df29418937cc2daf22 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 2 Jul 2011 16:46:31 +1000 Subject: CGE: Changed MOUSE class from using static fields to an instantiated class --- engines/cge/events.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'engines/cge/events.h') diff --git a/engines/cge/events.h b/engines/cge/events.h index 518c8c8bd1..462571f5ad 100644 --- a/engines/cge/events.h +++ b/engines/cge/events.h @@ -46,18 +46,19 @@ namespace CGE { class Keyboard { public: - static void (* OldKeyboard)(...); - static void NewKeyboard(...); - static uint16 _code[0x60]; - static uint16 _current; - static Sprite *_client; - static uint8 _key[0x60]; - static uint16 last() { + static const uint16 _code[0x60]; + + void NewKeyboard(...); + uint16 _current; + Sprite *_client; + uint8 _key[0x60]; + uint16 last() { uint16 cur = _current; _current = 0; return cur; } - static Sprite *setClient(Sprite *spr); + Sprite *setClient(Sprite *spr); + Keyboard(); ~Keyboard(); }; @@ -111,6 +112,9 @@ private: CGEEngine *_vm; }; +/*----------------- Access variables -----------------*/ +// TODO: Move this into either the CGEEngine class or a suitable 'globals' + } // End of namespace CGE #endif -- cgit v1.2.3