Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
HBMFrameController.h
Go to the documentation of this file.
1#ifndef HOMEBUTTON_FRAME_CONTROLLER_H
2#define HOMEBUTTON_FRAME_CONTROLLER_H
3
4#include <revolution/types.h>
5
6namespace homebutton {
7
8 enum {
9 /* 0 */ ANIM_TYPE_FORWARD = 0,
13 };
14
15 enum {
16 /* 0 */ ANIM_STATE_STOP = 0,
19 };
20
22 public:
24
25 /* 0x08 */ virtual ~FrameController() {}
26 /* 0x0C */ virtual void calc();
27
28 void init(int type, f32 maxFrame, f32 minFrame, f32 delta);
29 void initFrame();
30
31 void setMaxFrame(f32 value) { mMaxFrame = value; }
32 f32 getMaxFrame() const { return mMaxFrame; }
33
34 f32 getLastFrame() const { return mMaxFrame - 1.0f; }
35
36 void setMinFrame(f32 value) { mMinFrame = value; }
37 f32 getMinFrame() const { return mMinFrame; }
38
39 void setCurrentFrame(f32 value) { mFrame = value; }
40 f32 getCurrentFrame() const { return mFrame; }
41
42 void setDelta(f32 value) { mDelta = value; }
43 f32 getDelta() const { return mDelta; }
44
45 void setState(int value) { mState = value; }
46 int getState() const { return mState; }
47
48 void setAnimType(int value) { mAnmType = value; }
49 int getAnimType() const { return mAnmType; }
50
51 bool isPlaying() const { return mState == ANIM_STATE_PLAY; }
52
53 void start() {
54 initFrame();
55 restart();
56 }
57
60
61 protected:
62 /* 0x00 (vtable) */
63 /* 0x04 */ f32 mMaxFrame;
64 /* 0x08 */ f32 mMinFrame;
65 /* 0x0C */ f32 mFrame;
66 /* 0x10 */ f32 mDelta;
67 /* 0x14 */ int mState;
68 /* 0x18 */ int mAnmType;
69
70 private:
71 /* 0x1C */ bool mbAlternateBack;
72 };
73
74} // namespace homebutton
75
76#endif
Definition HBMFrameController.h:21
f32 getMaxFrame() const
Definition HBMFrameController.h:32
void initFrame()
Definition HBMFrameController.cpp:18
virtual void calc()
Definition HBMFrameController.cpp:22
void setDelta(f32 value)
Definition HBMFrameController.h:42
void start()
Definition HBMFrameController.h:53
f32 mFrame
Definition HBMFrameController.h:65
void setState(int value)
Definition HBMFrameController.h:45
f32 mDelta
Definition HBMFrameController.h:66
f32 getMinFrame() const
Definition HBMFrameController.h:37
int mState
Definition HBMFrameController.h:67
f32 getDelta() const
Definition HBMFrameController.h:43
void setCurrentFrame(f32 value)
Definition HBMFrameController.h:39
void setMaxFrame(f32 value)
Definition HBMFrameController.h:31
void stop()
Definition HBMFrameController.h:59
f32 mMaxFrame
Definition HBMFrameController.h:63
virtual ~FrameController()
Definition HBMFrameController.h:25
int mAnmType
Definition HBMFrameController.h:68
FrameController()
Definition HBMFrameController.h:23
f32 mMinFrame
Definition HBMFrameController.h:64
int getAnimType() const
Definition HBMFrameController.h:49
int getState() const
Definition HBMFrameController.h:46
void setAnimType(int value)
Definition HBMFrameController.h:48
f32 getCurrentFrame() const
Definition HBMFrameController.h:40
f32 getLastFrame() const
Definition HBMFrameController.h:34
bool isPlaying() const
Definition HBMFrameController.h:51
void restart()
Definition HBMFrameController.h:58
void setMinFrame(f32 value)
Definition HBMFrameController.h:36
bool mbAlternateBack
Definition HBMFrameController.h:71
static initFunc init[]
Definition d_menu_collect.cpp:39
float f32
Definition types.h:25
Definition HBMAnmController.cpp:6
@ ANIM_STATE_PLAY
Definition HBMFrameController.h:17
@ ANIM_STATE_STOP
Definition HBMFrameController.h:16
@ ANIM_STATE_STOP_REQ
Definition HBMFrameController.h:18
@ ANIM_TYPE_FORWARD
Definition HBMFrameController.h:9
@ ANIM_TYPE_BACKWARD
Definition HBMFrameController.h:10
@ ANIM_TYPE_LOOP
Definition HBMFrameController.h:11
@ ANIM_TYPE_ALTERNATE
Definition HBMFrameController.h:12