diff options
author | Paul Gilbert | 2016-05-15 18:44:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:11:06 -0400 |
commit | 053ff7ab75e0ee1f18606dd6c7488c5cc0d31ae5 (patch) | |
tree | cead39d2d48e3ed2d6c2b0ad18afabde4518dd47 /engines/titanic/support/files_manager.h | |
parent | 2680caa5bde09e3ecc7a1c8ef6c345e2bc9a134b (diff) | |
download | scummvm-rg350-053ff7ab75e0ee1f18606dd6c7488c5cc0d31ae5.tar.gz scummvm-rg350-053ff7ab75e0ee1f18606dd6c7488c5cc0d31ae5.tar.bz2 scummvm-rg350-053ff7ab75e0ee1f18606dd6c7488c5cc0d31ae5.zip |
TITANIC: Change engine to use titanic.dat
Diffstat (limited to 'engines/titanic/support/files_manager.h')
-rw-r--r-- | engines/titanic/support/files_manager.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/engines/titanic/support/files_manager.h b/engines/titanic/support/files_manager.h index 6be6a13166..ec0c7fc008 100644 --- a/engines/titanic/support/files_manager.h +++ b/engines/titanic/support/files_manager.h @@ -23,7 +23,7 @@ #ifndef TITANIC_FILES_MANAGER_H #define TITANIC_FILES_MANAGER_H -#include "common/winexe_pe.h" +#include "common/hashmap.h" #include "titanic/core/list.h" #include "titanic/support/screen_manager.h" @@ -35,9 +35,18 @@ class CFilesManagerList : public List<ListItem> { }; class CFilesManager { + struct ResourceEntry { + uint _offset; + uint _size; + + ResourceEntry() : _offset(0), _size(0) {} + ResourceEntry(uint offset, uint size) : _offset(offset), _size(size) {} + }; + typedef Common::HashMap<Common::String, ResourceEntry> ResourceHash; private: CGameManager *_gameManager; - Common::PEResources _exeResources; + Common::File _datFile; + ResourceHash _resources; CFilesManagerList _list; CString _string1; CString _string2; @@ -47,6 +56,8 @@ private: int _field1C; int _field3C; const CString _assetsPath; +private: + void loadResourceIndex(); public: CFilesManager(); ~CFilesManager(); @@ -90,8 +101,7 @@ public: /** * Get a resource from the executable */ - Common::SeekableReadStream *getResource(Common::WinResourceID area, - Common::WinResourceID name); + Common::SeekableReadStream *getResource(const CString &str); }; } // End of namespace Titanic |