diff options
author | Eugene Sandulenko | 2004-08-01 13:34:20 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-08-01 13:34:20 +0000 |
commit | ea694ffd68a5071fda937b3d23d6796c3abb3ba3 (patch) | |
tree | ef9034f15029695f4c7673106742dce365878c0b | |
parent | f97621d6e4d620212c5b7071ae8841d0e361709b (diff) | |
download | scummvm-rg350-ea694ffd68a5071fda937b3d23d6796c3abb3ba3.tar.gz scummvm-rg350-ea694ffd68a5071fda937b3d23d6796c3abb3ba3.tar.bz2 scummvm-rg350-ea694ffd68a5071fda937b3d23d6796c3abb3ba3.zip |
Pass SagaEngine object to Anim and ActionMap objects
svn-id: r14422
-rw-r--r-- | saga/actionmap.cpp | 2 | ||||
-rw-r--r-- | saga/actionmap.h | 4 | ||||
-rw-r--r-- | saga/animation.cpp | 2 | ||||
-rw-r--r-- | saga/animation.h | 3 | ||||
-rw-r--r-- | saga/saga.cpp | 4 |
5 files changed, 9 insertions, 6 deletions
diff --git a/saga/actionmap.cpp b/saga/actionmap.cpp index 4ebff49759..e2636459d7 100644 --- a/saga/actionmap.cpp +++ b/saga/actionmap.cpp @@ -40,7 +40,7 @@ int ActionMap::reg(void) { return R_SUCCESS; } -ActionMap::ActionMap(void) { +ActionMap::ActionMap(SagaEngine *vm) : _vm(vm) { debug(0, "ACTIONMAP Module: Initializing..."); _exits_loaded = 0; diff --git a/saga/actionmap.h b/saga/actionmap.h index fd1d8f3fa4..ebb2dbec8d 100644 --- a/saga/actionmap.h +++ b/saga/actionmap.h @@ -41,7 +41,7 @@ struct R_ACTIONMAP_ENTRY { class ActionMap { public: int reg(void); - ActionMap(void); + ActionMap(SagaEngine *vm); ~ActionMap(void); int load(const byte *exmap_res, size_t exmap_res_len); @@ -53,6 +53,8 @@ class ActionMap { void actionInfo(int argc, char *argv[]); private: + SagaEngine *_vm; + bool _initialized; int _exits_loaded; int _n_exits; diff --git a/saga/animation.cpp b/saga/animation.cpp index ba29a8882d..c1e2673850 100644 --- a/saga/animation.cpp +++ b/saga/animation.cpp @@ -42,7 +42,7 @@ int Anim::reg() { return R_SUCCESS; } -Anim::Anim(void) { +Anim::Anim(SagaEngine *vm) : _vm(vm) { int i; _anim_limit = R_MAX_ANIMATIONS; diff --git a/saga/animation.h b/saga/animation.h index 837c2f6a2b..d96ace971c 100644 --- a/saga/animation.h +++ b/saga/animation.h @@ -94,7 +94,7 @@ enum ANIM_FLAGS { class Anim { public: int reg(void); - Anim(void); + Anim(SagaEngine *vm); ~Anim(void); int load(const byte *anim_resdata, size_t anim_resdata_len, uint16 *anim_id_p); int freeId(uint16 anim_id); @@ -112,6 +112,7 @@ private: size_t thisf_len, const byte **nextf_p, size_t *nextf_len); int getFrameOffset(const byte *anim_resource, size_t anim_resource_len, uint16 find_frame, size_t *frame_offset); + SagaEngine *_vm; bool _initialized; uint16 _anim_count; diff --git a/saga/saga.cpp b/saga/saga.cpp index 2f763b69dd..e7a36a57f4 100644 --- a/saga/saga.cpp +++ b/saga/saga.cpp @@ -154,8 +154,8 @@ void SagaEngine::go() { EVENT_Init(); FONT_Init(); SPRITE_Init(); - _anim = new Anim(); - _actionMap = new ActionMap(); + _anim = new Anim(this); + _actionMap = new ActionMap(this); OBJECTMAP_Init(); ISOMAP_Init(); SCRIPT_Init(); |