diff options
author | Nicola Mettifogo | 2007-03-04 13:27:29 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-03-04 13:27:29 +0000 |
commit | b440bc1a0357503c6edec22ea1182613040de41c (patch) | |
tree | 5babcda3e4ae74037bd69e2b51f987a0840b2786 /engines/parallaction/disk.h | |
parent | 826b16ef714a228c8908b0f312cf342ee1216dfd (diff) | |
download | scummvm-rg350-b440bc1a0357503c6edec22ea1182613040de41c.tar.gz scummvm-rg350-b440bc1a0357503c6edec22ea1182613040de41c.tar.bz2 scummvm-rg350-b440bc1a0357503c6edec22ea1182613040de41c.zip |
wrapped loader routines into a new class named Disk. The new class is also responsible for handling Archives in place of the Parallaction engine.
svn-id: r25972
Diffstat (limited to 'engines/parallaction/disk.h')
-rw-r--r-- | engines/parallaction/disk.h | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 7b00ccd87d..3ab56dfcc4 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -37,6 +37,9 @@ namespace Parallaction { #define DIRECTORY_OFFSET_IN_FILE 0x4000 +class Parallaction; +class Graphics; + class Archive : public Common::SeekableReadStream { protected: @@ -72,17 +75,41 @@ public: uint32 read(void *dataPtr, uint32 dataSize); }; -void loadLocation(const char *name, char* script); -void loadScript(const char* name, char *script); -void loadTalk(const char *name, Cnv *cnv); -void loadObjects(const char *name, Cnv *cnv); -void loadPointer(StaticCnv* cnv); -void loadHead(const char* name, StaticCnv* cnv); -void loadFont(const char* name, Cnv* cnv); -void loadStatic(const char* name, StaticCnv* cnv); -void loadFrames(const char* name, Cnv* cnv); -void loadSlide(const char *filename); -void loadScenery(const char* background, const char* mask); +class Disk { + +private: + uint16 decompressChunk(byte *src, byte *dst, uint16 size); + void unpackBackgroundScanline(byte *src, byte *screen, byte *mask, byte *path); + void loadExternalCnv(const char *filename, Cnv *cnv); + void loadCnv(const char *filename, Cnv *cnv); + void loadExternalStaticCnv(const char *filename, StaticCnv *cnv); + void loadBackground(const char *filename); + void loadMaskAndPath(const char *name); + +protected: + Archive _archive; + + Parallaction *_vm; + Graphics *_gfx; + +public: + Disk(Parallaction *vm); + virtual ~Disk(); + + void selectArchive(const char *name); + + void loadLocation(const char *name, char* script); + void loadScript(const char* name, char *script); + void loadTalk(const char *name, Cnv *cnv); + void loadObjects(const char *name, Cnv *cnv); + void loadPointer(StaticCnv* cnv); + void loadHead(const char* name, StaticCnv* cnv); + void loadFont(const char* name, Cnv* cnv); + void loadStatic(const char* name, StaticCnv* cnv); + void loadFrames(const char* name, Cnv* cnv); + void loadSlide(const char *filename); + void loadScenery(const char* background, const char* mask); +}; } // namespace Parallaction |