diff options
author | Strangerke | 2011-07-20 14:27:36 +0200 |
---|---|---|
committer | Strangerke | 2011-07-20 14:27:36 +0200 |
commit | 9576e415e2779011ecfca77a2f9642c011a928a2 (patch) | |
tree | 3a9980647cd70cc417aa1680ce0ef2fbdb59bf44 | |
parent | 420516b45e1822c249775c68f9c61b62aba5de0b (diff) | |
download | scummvm-rg350-9576e415e2779011ecfca77a2f9642c011a928a2.tar.gz scummvm-rg350-9576e415e2779011ecfca77a2f9642c011a928a2.tar.bz2 scummvm-rg350-9576e415e2779011ecfca77a2f9642c011a928a2.zip |
CGE: Clean up Square class
-rw-r--r-- | engines/cge/cge_main.cpp | 16 | ||||
-rw-r--r-- | engines/cge/cge_main.h | 8 |
2 files changed, 10 insertions, 14 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 4b1b0b695e..3ebec73030 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -449,17 +449,7 @@ void CGEEngine::loadMapping() { } } -class SQUARE : public Sprite { -public: - SQUARE(CGEEngine *vm); - virtual void touch(uint16 mask, int x, int y); -private: - CGEEngine *_vm; -}; - - -SQUARE::SQUARE(CGEEngine *vm) - : Sprite(vm, NULL), _vm(vm) { +Square::Square(CGEEngine *vm) : Sprite(vm, NULL), _vm(vm) { _flags._kill = true; _flags._bDel = false; @@ -470,7 +460,7 @@ SQUARE::SQUARE(CGEEngine *vm) } -void SQUARE::touch(uint16 mask, int x, int y) { +void Square::touch(uint16 mask, int x, int y) { Sprite::touch(mask, x, y); if (mask & L_UP) { XZ(_x + x, _y + y).cell() = 0; @@ -482,7 +472,7 @@ void SQUARE::touch(uint16 mask, int x, int y) { void CGEEngine::setMapBrick(int x, int z) { debugC(1, kCGEDebugEngine, "CGEEngine::setMapBrick(%d, %d)", x, z); - SQUARE *s = new SQUARE(this); + Square *s = new Square(this); if (s) { static char n[] = "00:00"; s->gotoxy(x * MAP_XGRID, MAP_TOP + z * MAP_ZGRID); diff --git a/engines/cge/cge_main.h b/engines/cge/cge_main.h index 40e6d88668..103c718759 100644 --- a/engines/cge/cge_main.h +++ b/engines/cge/cge_main.h @@ -103,7 +103,6 @@ namespace CGE { #define HEROFUN0 (40 * 12) #define HEROFUN1 ( 2 * 12) #define PAIN (_vm->_flag[0]) -//#define FINIS (_vm->_flag[3]) class System : public Sprite { @@ -121,6 +120,13 @@ private: CGEEngine *_vm; }; +class Square : public Sprite { +public: + Square(CGEEngine *vm); + virtual void touch(uint16 mask, int x, int y); +private: + CGEEngine *_vm; +}; extern Vga *_vga; extern Heart *_heart; |