22 #ifndef CHEWY_RESOURCE_H 23 #define CHEWY_RESOURCE_H 25 #include "common/scummsys.h" 26 #include "common/file.h" 27 #include "common/str.h" 28 #include "common/memstream.h" 29 #include "common/rect.h" 34 kResourceUnknown = -1,
78 uint16 compressionFlag;
82 uint8 palette[3 * 256];
88 uint16 compressionFlag;
111 uint32 firstFrameOffset;
123 enum VideoFrameType {
124 kVideoFrameNormal = 0xF1FA,
125 kVideoFrameCustom = 0xFAF1
136 ResourceType getType()
const {
139 uint32 getSize()
const {
140 return _stream.size();
142 uint32 findLargestChunk(uint start, uint end);
143 uint32 getChunkCount()
const;
144 Chunk *getChunk(uint num);
145 virtual uint8 *getChunkData(uint num);
149 void unpackRLE(uint8 *buffer, uint32 compressedSize, uint32 uncompressedSize);
150 void decrypt(uint8 *data, uint32 size);
154 ResourceType _resType;
158 uint8 _spritePalette[3 * 256];
160 uint16 _spriteCorrectionsCount;
161 uint16 *_spriteCorrectionsTable;
163 ChunkList _chunkList;
172 uint32 getSpriteData(uint num, uint8 **buf,
bool initBuffer);
173 uint8 *getSpritePalette() {
return _spritePalette; }
174 uint32 getAllSize() {
return _allSize; }
175 uint16 getSpriteCorrectionsCount() {
return _spriteCorrectionsCount; }
176 uint16 *getSpriteCorrectionsTable() {
return _spriteCorrectionsTable; }
184 TBFChunk *getImage(uint num,
bool fixPalette);
210 bool isItemShown(uint dialog, uint block, uint num);
211 void setItemShown(uint dialog, uint block, uint num,
bool shown);
212 bool hasExitBit(uint dialog, uint block, uint num);
213 bool hasRestartBit(uint dialog, uint block, uint num);
214 bool hasShowBit(uint dialog, uint block, uint num);
215 uint8 getNextBlock(uint dialog, uint block, uint num);
220 uint32 getStreamSize()
const {
221 return _stream.size();
234 void init(int16 room, int16 bgWidth, int16 bgHeight);
236 int16 getX()
const {
return _x; }
237 int16 getY()
const {
return _y; }
238 int16 getLevel()
const {
return _level; }
239 int16 getWidth()
const {
return _w; }
240 int16 getHeight()
const {
return _h; }
241 uint8 *getData() {
return getChunkData(_room); }
244 int16 _x = 0, _y = 0, _level = 0, _w = 0, _h = 0, _room = 0;
Definition: resource.h:98
Definition: resource.h:229
Definition: resource.h:117
Definition: resource.h:179
Definition: memstream.h:394
Definition: resource.h:166
Definition: resource.h:104
Definition: resource.h:66
Definition: resource.h:204
Definition: resource.h:131
Definition: resource.h:87
Definition: resource.h:74
Definition: resource.h:187
Definition: resource.h:195