22 #ifndef NEVERHOOD_RESOURCE_H 23 #define NEVERHOOD_RESOURCE_H 25 #include "common/str.h" 26 #include "neverhood/neverhood.h" 27 #include "neverhood/graphics.h" 28 #include "neverhood/staticdata.h" 29 #include "neverhood/resourceman.h" 36 kResTypeAnimation = 4,
45 kResNhcTypeSubFont = 11,
46 kResNhcTypeMessages = 12,
47 kResNhcTypeSubtitles = 13
56 bool load(uint32 fileHash,
bool doLoadPosition =
false);
58 const NDimensions& getDimensions() {
return _dimensions; }
59 NPoint& getPosition() {
return _position; }
60 bool isRle()
const {
return _rle; }
61 const byte *getPixels()
const {
return _pixels; }
75 bool load(uint32 fileHash);
77 void copyPalette(byte *destPalette);
78 const byte *palette() {
return _palette; }
91 uint32 spriteDataOffs;
98 void draw(uint frameIndex,
Graphics::Surface *destSurface,
bool flipX,
bool flipY);
99 bool load(uint32 fileHash);
102 uint getFrameCount()
const {
return _frames.size(); }
103 const AnimFrameInfo& getFrameInfo(int16 index)
const {
return _frames[index]; }
104 int16 getFrameIndex(uint32 frameHash);
105 void setReplEnabled(
bool value) { _replEnabled = value; }
106 void setRepl(byte oldColor, byte newColor);
111 int16 _width, _height;
112 const byte *_currSpriteData;
114 const byte *_paletteData;
115 const byte *_spriteData;
125 void load(uint32 fileHash);
129 int getCursorNum()
const {
return _cursorNum; }
130 void setCursorNum(
int cursorNum) { _cursorNum = cursorNum; }
135 uint32 _currFileHash;
142 void load(uint32 fileHash);
144 const char *getString(uint index,
const char *&textEnd);
145 uint getCount()
const {
return _count;}
149 const byte *_textData;
166 void load(uint32 fileHash);
168 NPoint getPoint(uint32 nameHash);
172 MessageList *getMessageListAtPos(int16 klaymenX, int16 klaymenY, int16 mouseX, int16 mouseY);
188 uint32 messageListHash;
189 uint16 messageListItemIndex;
207 uint32 calcHash(
const char *value);
Definition: background.h:30
Definition: resourceman.h:64
Definition: neverhood.h:60
Definition: resource.h:51
Definition: resource.h:175
Definition: resource.h:71
Definition: resource.h:94
Definition: graphics.h:42
Definition: graphics.h:67
Definition: resource.h:85
Definition: resource.h:162
Definition: graphics.h:38
Definition: resource.h:186
Definition: resource.h:138
Definition: resource.h:122
Definition: resource.h:181
Definition: graphics.h:32