22 #ifndef STARK_RESOURCES_ITEM_H 23 #define STARK_RESOURCES_ITEM_H 25 #include "engines/stark/resources/object.h" 26 #include "engines/stark/resourcereference.h" 28 #include "common/rect.h" 29 #include "common/str.h" 31 #include "math/vector3d.h" 64 static const Type::ResourceType TYPE = Type::kItem;
67 kItemGlobalTemplate = 1,
69 kItemLevelTemplate = 3,
71 kItemAnimatedProp = 6,
72 kItemBackgroundElement = 7,
85 void onGameLoop()
override;
90 bool isEnabled()
const;
93 virtual void setEnabled(
bool enabled);
96 int32 getCharacterIndex()
const;
105 void setMovement(
Movement *movement);
116 void setMovementSuspendedScript(
Script *script);
119 virtual void setAnimHierarchy(
AnimHierarchy *animHierarchy) = 0;
125 void printData()
override;
128 int32 _characterIndex;
131 Script *_movementSuspendedScript;
146 void onAllLoaded()
override;
151 void setEnabled(
bool enabled)
override;
153 void setAnimHierarchy(
AnimHierarchy *animHierarchy)
override;
169 bool canPerformAction(uint32 action, uint32 hotspotIndex);
172 bool doAction(uint32 action, uint32 hotspotIndex);
175 void setAnimActivity(int32 activity);
178 int32 getAnimActivity()
const;
181 Anim *getAnim()
const;
184 Anim *getActionAnim()
const;
187 void playActionAnim(
Anim *anim);
190 void resetActionAnim();
194 void printData()
override;
205 int32 _currentAnimActivity;
220 void onAllLoaded()
override;
221 void onEnterLocation()
override;
226 void setAnimHierarchy(
AnimHierarchy *animHierarchy)
override;
232 virtual TextureSet *findTextureSet(uint32 textureType) = 0;
241 void setBonesMesh(int32 index);
244 void setTexture(int32 index, uint32 textureType);
247 void setInstanciatedItem(
Item *instance);
251 int32 _textureNormalIndex;
252 int32 _textureFaceIndex;
253 int32 _animHierarchyIndex;
255 Item *_instanciatedItem;
271 TextureSet *findTextureSet(uint32 textureType)
override;
287 void setEnabled(
bool enabled)
override;
290 Visual *getActionVisual(
bool active)
const;
293 Visual *getCursorVisual()
const;
311 void onAllLoaded()
override;
315 TextureSet *findTextureSet(uint32 textureType)
override;
322 void printData()
override;
342 void placeOnBookmark(
Bookmark *target);
345 void placeDefaultPosition();
348 Math::Vector3d getPosition3D()
const;
350 void setPosition3D(
const Math::Vector3d &position);
353 int32 getFloorFaceIndex()
const;
355 void setFloorFaceIndex(int32 faceIndex);
358 Math::Vector3d getDirectionVector()
const;
361 void setDirection(
const Math::Angle &direction);
364 float getSortKey()
const;
371 void overrideSortKey(
float sortKey);
374 int32 _floorFaceIndex;
375 Math::Vector3d _position3D;
378 bool _sortKeyOverride;
379 float _sortKeyOverridenValue;
403 void printData()
override;
420 void onAllLoaded()
override;
421 void onEnterLocation()
override;
422 void onExitLocation()
override;
429 void setTexture(int32 index, uint32 textureType);
432 void setBonesMesh(int32 index);
438 TextureSet *findTextureSet(uint32 textureType);
447 void resetAnimationBlending();
450 Anim *getIdleActionAnim()
const;
455 void printData()
override;
458 int32 _textureNormalIndex;
459 int32 _textureFaceIndex;
488 void printData()
override;
497 #endif // STARK_RESOURCES_ITEM_H
Definition: animhandler.h:36
Definition: animhierarchy.h:51
Definition: resourcereference.h:39
Definition: textureset.h:47
Definition: movement.h:38
Definition: bonesmesh.h:43
Movement
Definition: walking.h:85
Definition: bookmark.h:44
Definition: renderentry.h:67
Definition: stateprovider.h:51