22 #ifndef STARK_RESOURCES_ANIM_H 23 #define STARK_RESOURCES_ANIM_H 25 #include "common/path.h" 26 #include "common/rect.h" 27 #include "common/str.h" 29 #include "engines/stark/resources/object.h" 32 class SeekableReadStream;
60 static const Type::ResourceType TYPE = Type::kAnim;
70 kActionUsagePassive = 1,
71 kActionUsageActive = 2
75 kUIUsageInventory = 1,
76 kUIUsageUseCursorPassive = 4,
77 kUIUsageUseCursorActive = 5
81 kActorActivityIdle = 1,
82 kActorActivityWalk = 2,
83 kActorActivityTalk = 3,
84 kActorActivityRun = 6,
85 kActorActivityIdleAction = 10
101 virtual void selectFrame(uint32 frameIndex);
104 virtual Visual *getVisual() = 0;
107 virtual void applyToItem(
Item *item);
110 virtual void removeFromItem(
Item *item);
113 bool isInUse()
const;
116 uint32 getActivity()
const;
119 virtual int getPointHotspotIndex(
const Common::Point &point)
const;
132 virtual bool isAtTime(uint32 time)
const;
135 virtual uint32 getMovementSpeed()
const;
138 virtual uint32 getIdleActionFrequency()
const;
148 virtual void shouldResetItem(
bool resetItem);
154 virtual void resetItem();
161 virtual bool isDone()
const;
164 void printData()
override;
167 uint32 _currentFrame;
182 void onAllLoaded()
override;
186 void selectFrame(uint32 frameIndex)
override;
187 Visual *getVisual()
override;
188 int getPointHotspotIndex(
const Common::Point &point)
const override;
192 void printData()
override;
196 uint32 _currentDirection;
199 Image *_currentFrameImage;
209 void onPostRead()
override;
212 Visual *getVisual()
override;
213 uint32 getMovementSpeed()
const override;
216 void printData()
override;
221 uint32 _movementSpeed;
237 void onAllLoaded()
override;
238 void onGameLoop()
override;
239 void onEnginePause(
bool pause)
override;
243 Visual *getVisual()
override;
245 void shouldResetItem(
bool resetItem)
override;
246 void resetItem()
override;
247 bool isAtTime(uint32 time)
const override;
248 bool isDone()
const override {
return _done || !isInUse(); }
254 void printData()
override;
258 void updateSmackerPosition();
268 PointArray _positions;
271 int32 _frameRateOverride;
277 bool _shouldResetItem;
290 void onPostRead()
override;
291 void onAllLoaded()
override;
292 void onGameLoop()
override;
293 void onPreDestroy()
override;
296 void applyToItem(
Item *item)
override;
297 void removeFromItem(
Item *item)
override;
298 Visual *getVisual()
override;
300 bool isAtTime(uint32 time)
const override;
301 bool isDone()
const override {
return _done || !isInUse(); }
302 uint32 getMovementSpeed()
const override;
303 uint32 getIdleActionFrequency()
const override;
304 void shouldResetItem(
bool resetItem)
override;
305 void resetItem()
override;
308 uint32 getRemainingTime()
const;
311 uint32 getCurrentTime()
const;
314 void printData()
override;
320 uint32 _movementSpeed;
321 uint32 _idleActionFrequency;
331 bool _shouldResetItem;
337 #endif // STARK_RESOURCES_ANIM_H
virtual Common::Point getHotspotPosition(uint index) const
Definition: anim.h:122
uint32 getCurrentFrame()
Definition: anim.h:98
bool isDone() const override
Definition: anim.h:301
Definition: algorithm.h:29
Definition: skeleton_anim.h:36
bool isDone() const override
Definition: anim.h:248
Definition: movie_decoder.h:32
Definition: stateprovider.h:51