Pass SagaEngine object to Anim and ActionMap objects

svn-id: r14422
This commit is contained in:
Eugene Sandulenko 2004-08-01 13:34:20 +00:00
parent f97621d6e4
commit ea694ffd68
5 changed files with 9 additions and 6 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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();