diff options
author | Andrew Kurushin | 2005-01-18 11:55:31 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-01-18 11:55:31 +0000 |
commit | 0b4fd4adbf88b1dac138e9ef55feefc7e2fd79ca (patch) | |
tree | d971b6b369db498d1f29c763039856141e72b63d /saga/scene.h | |
parent | c9d0d4c840aac829d42bc5ec1b5b1e7f30b5a50c (diff) | |
download | scummvm-rg350-0b4fd4adbf88b1dac138e9ef55feefc7e2fd79ca.tar.gz scummvm-rg350-0b4fd4adbf88b1dac138e9ef55feefc7e2fd79ca.tar.bz2 scummvm-rg350-0b4fd4adbf88b1dac138e9ef55feefc7e2fd79ca.zip |
- merged ActionMap and ObjectMap
- remove ActionMap.h & ActionMap.cpp
- ObjectMap names move to Scene::_sceneStrings as in original engine
- fix wrong StringsTable::stringsCount calculation
svn-id: r16592
Diffstat (limited to 'saga/scene.h')
-rw-r--r-- | saga/scene.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/saga/scene.h b/saga/scene.h index cef6d76901..c76037ae60 100644 --- a/saga/scene.h +++ b/saga/scene.h @@ -76,7 +76,7 @@ enum SCENE_PROC_PARAMS { enum SAGA_RESOURCE_TYPES { SAGA_BG_IMAGE = 2, SAGA_BG_MASK = 3, - SAGA_OBJECT_NAME_LIST = 5, + SAGA_SCENE_NAME_LIST = 5, SAGA_OBJECT_MAP = 6, SAGA_ACTION_MAP = 7, SAGA_ISO_TILESET = 8, @@ -123,29 +123,22 @@ struct SceneEntry { int facing; }; -class SceneEntryList { -private: - SagaEngine *_vm; - SceneEntry *_entryList; - int _entryListCount; -public: - int getEntryListCount() const { return _entryListCount; } +struct SceneEntryList { + SceneEntry *entryList; + int entryListCount; + const SceneEntry * getEntry(int index) { - if ((index < 0) || (index >= _entryListCount)) { + if ((index < 0) || (index >= entryListCount)) { error("SceneEntryList::getEntry wrong index"); } - return &_entryList[index]; + return &entryList[index]; } - void load(const byte* resourcePointer, size_t resourceLength); - void freeMem() { - free(_entryList); - _entryList = NULL; - _entryListCount = 0; + free(entryList); + memset(this, 0, sizeof(*this)); } - SceneEntryList(SagaEngine *vm): _vm(vm) { - _entryList = NULL; - _entryListCount = 0; + SceneEntryList() { + memset(this, 0, sizeof(*this)); } ~SceneEntryList() { freeMem(); @@ -272,6 +265,7 @@ class Scene { int loadScene(int scene, int load_flag, SCENE_PROC scene_proc, SceneDescription *, int fadeIn, int actorsEntrance); int loadSceneDescriptor(uint32 res_number); int loadSceneResourceList(uint32 res_number); + void loadSceneEntryList(const byte* resourcePointer, size_t resourceLength); int processSceneResources(); private: @@ -298,15 +292,17 @@ class Scene { TEXTLIST *_textList; SCENE_IMAGE _bg; SCENE_IMAGE _bgMask; + + StringsTable _sceneStrings; int _sceneDoors[SCENE_DOORS_MAX]; static int SC_defaultScene(int param, SCENE_INFO *scene_info, void *refCon); int defaultScene(int param, SCENE_INFO *scene_info); public: - ActionMap *_actionMap; + ObjectMap *_actionMap; ObjectMap *_objectMap; - SceneEntryList *_entryList; + SceneEntryList _entryList; private: int IHNMStartProc(); |