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
6
namespace
homebutton
{
7
8
enum
{
9
/* 0 */
ANIM_TYPE_FORWARD
= 0,
10
/* 1 */
ANIM_TYPE_BACKWARD
,
11
/* 2 */
ANIM_TYPE_LOOP
,
12
/* 3 */
ANIM_TYPE_ALTERNATE
13
};
14
15
enum
{
16
/* 0 */
ANIM_STATE_STOP
= 0,
17
/* 1 */
ANIM_STATE_PLAY
,
18
/* 2 */
ANIM_STATE_STOP_REQ
,
19
};
20
21
class
FrameController
{
22
public
:
23
FrameController
() {}
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
58
void
restart
() {
mState
=
ANIM_STATE_PLAY
; }
59
void
stop
() {
mState
=
ANIM_STATE_STOP
; }
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
homebutton::FrameController
Definition
HBMFrameController.h:21
homebutton::FrameController::getMaxFrame
f32 getMaxFrame() const
Definition
HBMFrameController.h:32
homebutton::FrameController::initFrame
void initFrame()
Definition
HBMFrameController.cpp:18
homebutton::FrameController::calc
virtual void calc()
Definition
HBMFrameController.cpp:22
homebutton::FrameController::setDelta
void setDelta(f32 value)
Definition
HBMFrameController.h:42
homebutton::FrameController::start
void start()
Definition
HBMFrameController.h:53
homebutton::FrameController::mFrame
f32 mFrame
Definition
HBMFrameController.h:65
homebutton::FrameController::setState
void setState(int value)
Definition
HBMFrameController.h:45
homebutton::FrameController::mDelta
f32 mDelta
Definition
HBMFrameController.h:66
homebutton::FrameController::getMinFrame
f32 getMinFrame() const
Definition
HBMFrameController.h:37
homebutton::FrameController::mState
int mState
Definition
HBMFrameController.h:67
homebutton::FrameController::getDelta
f32 getDelta() const
Definition
HBMFrameController.h:43
homebutton::FrameController::setCurrentFrame
void setCurrentFrame(f32 value)
Definition
HBMFrameController.h:39
homebutton::FrameController::setMaxFrame
void setMaxFrame(f32 value)
Definition
HBMFrameController.h:31
homebutton::FrameController::stop
void stop()
Definition
HBMFrameController.h:59
homebutton::FrameController::mMaxFrame
f32 mMaxFrame
Definition
HBMFrameController.h:63
homebutton::FrameController::~FrameController
virtual ~FrameController()
Definition
HBMFrameController.h:25
homebutton::FrameController::mAnmType
int mAnmType
Definition
HBMFrameController.h:68
homebutton::FrameController::FrameController
FrameController()
Definition
HBMFrameController.h:23
homebutton::FrameController::mMinFrame
f32 mMinFrame
Definition
HBMFrameController.h:64
homebutton::FrameController::getAnimType
int getAnimType() const
Definition
HBMFrameController.h:49
homebutton::FrameController::getState
int getState() const
Definition
HBMFrameController.h:46
homebutton::FrameController::setAnimType
void setAnimType(int value)
Definition
HBMFrameController.h:48
homebutton::FrameController::getCurrentFrame
f32 getCurrentFrame() const
Definition
HBMFrameController.h:40
homebutton::FrameController::getLastFrame
f32 getLastFrame() const
Definition
HBMFrameController.h:34
homebutton::FrameController::isPlaying
bool isPlaying() const
Definition
HBMFrameController.h:51
homebutton::FrameController::restart
void restart()
Definition
HBMFrameController.h:58
homebutton::FrameController::setMinFrame
void setMinFrame(f32 value)
Definition
HBMFrameController.h:36
homebutton::FrameController::mbAlternateBack
bool mbAlternateBack
Definition
HBMFrameController.h:71
init
static initFunc init[]
Definition
d_menu_collect.cpp:39
f32
float f32
Definition
types.h:25
types.h
homebutton
Definition
HBMAnmController.cpp:6
homebutton::ANIM_STATE_PLAY
@ ANIM_STATE_PLAY
Definition
HBMFrameController.h:17
homebutton::ANIM_STATE_STOP
@ ANIM_STATE_STOP
Definition
HBMFrameController.h:16
homebutton::ANIM_STATE_STOP_REQ
@ ANIM_STATE_STOP_REQ
Definition
HBMFrameController.h:18
homebutton::ANIM_TYPE_FORWARD
@ ANIM_TYPE_FORWARD
Definition
HBMFrameController.h:9
homebutton::ANIM_TYPE_BACKWARD
@ ANIM_TYPE_BACKWARD
Definition
HBMFrameController.h:10
homebutton::ANIM_TYPE_LOOP
@ ANIM_TYPE_LOOP
Definition
HBMFrameController.h:11
homebutton::ANIM_TYPE_ALTERNATE
@ ANIM_TYPE_ALTERNATE
Definition
HBMFrameController.h:12
src
revolution
homebuttonLib
HBMFrameController.h
Generated by
1.12.0