diff options
author | Paul Gilbert | 2013-12-07 20:44:28 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-12-07 20:44:28 -0500 |
commit | a6ceaf29854a47785c7a36831bea41411e1bb0cf (patch) | |
tree | edc14c94e5c660fb11bee5dd0b0ba9b746079382 /engines/voyeur/files.h | |
parent | b40c34a8836dc12bc541579afad06dfb1e097a95 (diff) | |
download | scummvm-rg350-a6ceaf29854a47785c7a36831bea41411e1bb0cf.tar.gz scummvm-rg350-a6ceaf29854a47785c7a36831bea41411e1bb0cf.tar.bz2 scummvm-rg350-a6ceaf29854a47785c7a36831bea41411e1bb0cf.zip |
VOYEUR: Refactoring of BoltFile now that have more than one bolt file
Diffstat (limited to 'engines/voyeur/files.h')
-rw-r--r-- | engines/voyeur/files.h | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h index 43836f5fa0..0871a5eeae 100644 --- a/engines/voyeur/files.h +++ b/engines/voyeur/files.h @@ -44,8 +44,6 @@ class VInitCyclResource; #define DECOMPRESS_SIZE 0x7000 -typedef void (BoltFile::*BoltMethodPtr)(); - class ResolveEntry { public: uint32 _id; @@ -98,22 +96,13 @@ public: class BoltFile { private: - static const BoltMethodPtr _fnInitType[25]; -private: - BoltFilesState &_state; Common::Array<BoltGroup> _groups; Common::File _file; +protected: + BoltFilesState &_state; - // initType method table + virtual void initResource(int resType) = 0; void initDefault(); - void sInitPic(); - void vInitCMap(); - void vInitCycl(); - void initViewPort(); - void initViewPortList(); - void initFontInfo(); - void initFont(); - void initSoundMap(); private: void resolveAll(); byte *getBoltMember(uint32 id); @@ -124,7 +113,7 @@ private: void initGro() {} // TODO void termGro() {} // TODO public: - BoltFile(BoltFilesState &state); + BoltFile(const Common::String &filename, BoltFilesState &state); ~BoltFile(); bool getBoltGroup(uint32 id); @@ -140,6 +129,30 @@ public: CMapResource *getCMapResource(uint32 id); }; +class BVoyBoltFile: public BoltFile { +private: + // initType method table + void sInitPic(); + void vInitCMap(); + void vInitCycl(); + void initViewPort(); + void initViewPortList(); + void initFontInfo(); + void initFont(); + void initSoundMap(); +protected: + virtual void initResource(int resType); +public: + BVoyBoltFile(BoltFilesState &state); +}; + +class StampBoltFile: public BoltFile { +protected: + virtual void initResource(int resType); +public: + StampBoltFile(BoltFilesState &state); +}; + class BoltGroup { private: Common::SeekableReadStream *_file; |