22 #ifndef HOPKINS_OBJECTS_H 23 #define HOPKINS_OBJECTS_H 25 #include "hopkins/globals.h" 27 #include "common/scummsys.h" 28 #include "common/endian.h" 29 #include "common/str.h" 47 const byte *_spriteData;
73 bool _disabledAnimationFl;
78 int _modeChangeUnused;
111 const byte *_spriteData;
120 const byte *_oldSpriteData;
134 enum SortMode { SORT_NONE = 0, SORT_BOB = 1, SORT_SPRITE = 2, SORT_HIDING = 3 };
151 int _objectWidth, _objectHeight;
152 int _oldBorderSpriteIndex;
153 int _borderSpriteIndex;
155 const byte *_oldSpriteData;
159 int _oldDirectionSpriteIdx;
160 Directions _oldDirection;
161 Directions _lastDirection;
165 int _homeRateCounter;
166 int _sortedDisplayCount;
168 byte *_hidingItemData[6];
170 bool _hidingActiveFl;
172 int _curObjectFileNum;
173 byte *_objectDataBuf;
182 void sprite_alone(
const byte *objectData, byte *sprite,
int objIndex);
183 void removeObjectDataBuf();
185 int getOffsetX(
const byte *spriteData,
int spriteIndex,
bool isSize);
186 int getOffsetY(
const byte *spriteData,
int spriteIndex,
bool isSize);
188 void capture_mem_sprite(
const byte *objectData, byte *sprite,
int objIndex);
189 void setBobInfo(
int idx);
190 void computeHideCounter(
int idx);
191 void initBobVariables(
int idx);
193 void checkHidingItem();
194 void displayHiding(
int idx);
195 void computeSprite(
int idx);
196 void beforeSort(
SortMode sortMode,
int index,
int priority);
197 void displayBobAnim();
199 void showSprite(
int idx);
201 void setSpriteZoom(
int idx,
int zoomFactor);
204 void changeCharacterHead(PlayerCharacter oldCharacter, PlayerCharacter newCharacter);
208 void handleForest(
int screenId,
int minX,
int maxX,
int minY,
int maxY,
int idx);
210 void sceneSpecialIni();
211 void showActionAnimation(
const byte *spriteData,
const Common::String &actionStr,
int speed,
bool flipFl);
220 bool _twoCharactersFl;
226 int _eraseVisibleCounter;
228 int _startSpriteIndex;
229 int _saveLoadX, _saveLoadY;
230 int _mapCarPosX, _mapCarPosY;
231 int _oldCharacterPosX, _oldCharacterPosY;
236 byte *_saveLoadSprite;
237 byte *_saveLoadSprite2;
242 bool _charactersEnabledFl;
243 bool _refreshBobMode10Fl;
250 int getWidth(
const byte *objectData,
int idx);
251 int getHeight(
const byte *objectData,
int idx);
253 void loadLinkFile(
const Common::Path &file,
bool OBSSEUL =
false);
254 void addStaticSprite(
const byte *spriteData,
Common::Point pos,
int idx,
int spriteIndex,
int zoomFactor,
bool flipFl,
int deltaX,
int deltaY);
255 void animateSprite(
int idx);
256 void removeSprite(
int idx);
257 void setSpriteX(
int idx,
int xp);
258 void setSpriteY(
int idx,
int yp);
259 int getSpriteX(
int idx);
260 int getSpriteY(
int idx);
261 void setSpriteIndex(
int idx,
int spriteIndex);
262 void displaySprite();
263 void computeAndSetSpriteSize();
264 void setFlipSprite(
int idx,
bool flip);
266 int getBobAnimDataIdx(
int idx);
267 void initBorder(
int zoneIdx);
268 void nextObjectIcon(
int idx);
269 void takeInventoryObject(
int idx);
270 void handleSpecialGames();
272 void addObject(
int objIndex);
273 void changeObject(
int objIndex);
274 void removeObject(
int objIndex);
276 void resetBob(
int idx);
277 void hideBob(
int idx);
278 void displayBob(
int idx);
279 void setBobOffset(
int idx,
int offset);
280 void setBobAnimDataIdx(
int idx,
int animIdx);
281 void setBobAnimation(
int idx);
282 void stopBobAnimation(
int idx);
283 int getBobPosX(
int idx);
285 void handleCityMap();
287 void disableVerb(
int idx,
int a2);
288 void enableVerb(
int idx,
int a2);
289 void lockAnimX(
int idx,
int x);
290 void handleLeftButton();
291 void handleRightButton();
292 void setOffsetXY(byte *data,
int idx,
int xp,
int yp,
bool isSize);
293 void setVerb(
int id);
295 void doActionBack(
int idx);
296 void doActionRight(
int idx);
297 void doActionFront(
int idx);
298 void doActionLeft(
int idx);
299 void doActionDiagRight(
int idx);
300 void doActionDiagLeft(
int idx);
302 byte *loadObjectFromFile(
int objIndex,
bool mode);
303 void resetHidingItems();
304 void resetHidingUseCount(
int idx);
305 void setHidingUseCount(
int idx);
307 void enableHidingBehavior();
308 void disableHidingBehavior();
309 void disableHidingItem(
int idx);
311 void resetHomeRateCounter() { _homeRateCounter = 0; }
312 void resetOldFrameIndex() { _oldFrameIndex = -1; }
313 void resetOldDirection() { _oldDirection = DIR_NONE; }
314 int getObjectWidth() {
return _objectWidth; }
315 int getObjectHeight() {
return _objectHeight; }
317 void showSpecialActionAnimationWithFlip(
const byte *spriteData,
const Common::String &animationSeq,
int speed,
bool flipFl);
318 void showSpecialActionAnimation(
const byte *spriteData,
const Common::String &animString,
int speed);
319 void checkEventBobAnim(
int idx,
int animIdx,
int animDataIdx,
int a4);
320 void setMultiBobAnim(
int idx1,
int idx2,
int anim1Idx,
int anim2Idx);
321 void loadObjectIniFile();
322 void quickDisplayBobSprite(
int idx);
323 void initVbob(
const byte *src,
int idx,
int xp,
int yp,
int frameIndex);
324 void disableVbob(
int idx);
325 void setAndPlayAnim(
int idx,
int animIdx,
int destPosi,
bool animAction);
Definition: objects.h:105
Definition: objects.h:110
Definition: objects.h:147
Definition: objects.h:139
Definition: objects.h:123
SortMode
Definition: objects.h:134