32 #include "common/file.h" 38 enum OvlType {kOvlBoundary, kOvlOverlay, kOvlBase};
51 SoundPtr getSound(
const int16 sound, uint16 *size);
54 void readImage(
const int objNum,
Object *objPtr);
56 void readUIFItem(
const int16
id, byte *buf);
57 bool restoreGame(
const int16 slot);
61 const char *getBootFilename()
const;
62 const char *getObjectFilename()
const;
63 const char *getSceneryFilename()
const;
64 const char *getSoundFilename()
const;
65 const char *getStringFilename()
const;
66 const char *getUifFilename()
const;
68 virtual void openDatabaseFiles() = 0;
69 virtual void closeDatabaseFiles() = 0;
70 virtual void instructions()
const = 0;
72 virtual void readBackground(
const int screenIndex) = 0;
73 virtual void readOverlay(
const int screenNum,
ImagePtr image,
OvlType overlayType) = 0;
75 virtual const char *fetchString(
const int index) = 0;
79 static const int kMaxUifs = 32;
80 static const int kMaxSounds = 64;
81 static const int kRepeatMask = 0xC0;
82 static const int kLengthMask = 0x3F;
83 static const int kNumColors = 16;
91 uint32 _boundaryOffset;
92 uint32 _boundaryLength;
93 uint32 _overlayOffset;
94 uint32 _overlayLength;
100 byte _mfctr, _vers, _enc, _bpx;
101 uint16 _x1, _y1, _x2, _y2;
103 byte _palette[3 * kNumColors];
104 byte _vmode, _planes;
105 uint16 _bytesPerLine;
110 UifHdr _UIFHeader[kMaxUifs];
123 UifHdr *getUIFHeader(
const Uif
id);
131 void closeDatabaseFiles()
override;
132 void instructions()
const override;
133 void openDatabaseFiles()
override;
134 void readBackground(
const int screenIndex)
override;
135 void readOverlay(
const int screenNum,
ImagePtr image,
OvlType overlayType)
override;
136 const char *fetchString(
const int index)
override;
144 void closeDatabaseFiles()
override;
145 void openDatabaseFiles()
override;
146 void readBackground(
const int screenIndex)
override;
147 void readOverlay(
const int screenNum,
ImagePtr image,
OvlType overlayType)
override;
148 const char *fetchString(
const int index)
override;
150 char *_fetchStringBuf;
158 void closeDatabaseFiles()
override;
159 void openDatabaseFiles()
override;
160 void readBackground(
const int screenIndex)
override;
161 void readOverlay(
const int screenNum,
ImagePtr image,
OvlType overlayType)
override;
171 void instructions()
const override;
179 void readOverlay(
const int screenNum,
ImagePtr image,
OvlType overlayType)
override;
byte * ImagePtr
Definition: game.h:96
OvlType
Definition: file.h:38