From 3583c949f253330dbf4c53a66b74e764de9ea156 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 17 Sep 2011 17:17:22 +0200 Subject: CGE: Move some more globals to CGEEngine --- engines/cge/walk.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'engines/cge/walk.h') diff --git a/engines/cge/walk.h b/engines/cge/walk.h index 2224ae8745..99dc362eec 100644 --- a/engines/cge/walk.h +++ b/engines/cge/walk.h @@ -34,8 +34,6 @@ namespace CGE { -#define kMapXCnt 40 -#define kMapZCnt 20 #define kMapArrSize (kMapZCnt * kMapXCnt) #define kMapTop 80 #define kMapHig 80 @@ -47,15 +45,12 @@ enum Dir { kDirNone = -1, kDirNorth, kDirEast, kDirSouth, kDirWest }; class Cluster { public: - static uint8 _map[kMapZCnt][kMapXCnt]; - static CGEEngine *_vm; + CGEEngine *_vm; Common::Point _pt; - - static void init(CGEEngine *vm); public: uint8 &cell(); - Cluster(int16 a, int16 b) { _pt = Common::Point(a, b); } - Cluster() { _pt = Common::Point(-1, -1); } + Cluster(CGEEngine *vm, int16 a, int16 b); + Cluster(CGEEngine *vm); bool chkBar() const; bool isValid() const; }; @@ -69,10 +64,11 @@ public: int _level; int _findLevel; Common::Point _target; - Cluster _trace[kMaxFindLevel]; + Common::Array _trace; Dir _dir; Walk(CGEEngine *vm, BitmapPtr *shpl); + ~Walk(); void tick(); void findWay(Cluster c); void findWay(Sprite *spr); @@ -86,8 +82,6 @@ public: bool find1Way(Cluster c); }; -extern Walk *_hero; - } // End of namespace CGE #endif -- cgit v1.2.3