From 38deee5a88ceedeb0979a9b53e7b4e35a7a03f0f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 17 Sep 2011 11:09:32 +0200 Subject: CGE: some more cleanup --- engines/cge/cge.h | 1 + engines/cge/cge_main.cpp | 8 ++------ engines/cge/cge_main.h | 2 -- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/engines/cge/cge.h b/engines/cge/cge.h index 8c9a468e54..6110a07797 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -184,6 +184,7 @@ public: Fx *_fx; Sound *_sound; ResourceManager *_resman; + Sprite *_pocket[kPocketNX]; Common::RandomSource _randomSource; MusicPlayer *_midiPlayer; diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index cc04eeb382..de3511813a 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -50,10 +50,6 @@ namespace CGE { -uint16 _stklen = (kStackSize * 2); - -Sprite *_pocket[kPocketNX]; - const char *savegameStr = "SCUMMVM_CGE"; //-------------------------------------------------------------------------- @@ -951,7 +947,7 @@ void Sprite::touch(uint16 mask, int x, int y) { } if ((mask & kMouseRightUp) && _vm->_snail->idle()) { - Sprite *ps = (_vm->_pocLight->_seqPtr) ? _pocket[_vm->_pocPtr] : NULL; + Sprite *ps = (_vm->_pocLight->_seqPtr) ? _vm->_pocket[_vm->_pocPtr] : NULL; if (ps) { if (_flags._kept || _hero->distance(this) < kDistMax) { if (works(ps)) { @@ -994,7 +990,7 @@ void Sprite::touch(uint16 mask, int x, int y) { if ((mask & kMouseLeftUp) && _vm->_snail->idle()) { if (_flags._kept) { for (int n = 0; n < kPocketNX; n++) { - if (_pocket[n] == this) { + if (_vm->_pocket[n] == this) { _vm->selectPocket(n); break; } diff --git a/engines/cge/cge_main.h b/engines/cge/cge_main.h index d8ac10fe6d..bdb3121d63 100644 --- a/engines/cge/cge_main.h +++ b/engines/cge/cge_main.h @@ -109,8 +109,6 @@ private: CGEEngine *_vm; }; -extern Sprite *_pocket[]; - } // End of namespace CGE #endif -- cgit v1.2.3