Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_vibration.h
Go to the documentation of this file.
1#ifndef D_D_VIBRATION_H
2#define D_D_VIBRATION_H
3
7struct vib_pattern {
8 /* 0x0 */ u16 rounds;
9 /* 0x2 */ u16 length;
10 /* 0x4 */ u32 bits;
11};
12
26
28};
29
42
44};
45
46class dVibTest_c : public JORReflexible {
47public:
49
51 virtual void genMessage(JORMContext*);
52 virtual ~dVibTest_c() {}
53
54 /* 0x04 */ s8 field_0x4;
55 /* 0x06 */ u16 m_pattern;
56 /* 0x08 */ u16 m_pattern2;
57 /* 0x0A */ u16 field_0xa;
58 /* 0x0C */ s16 m_randombit;
59 /* 0x0E */ s16 m_length;
60 /* 0x10 */ int field_0x10;
61 /* 0x14 */ int m_vibswitch;
62 /* 0x18 */ u16 m_displayDbg;
63};
64
66public:
67 enum {
71 };
72
73 int Run();
74 bool StartShock(int i_vibmode, int i_flags, cXyz i_pos);
75 bool StartQuake(const u8* i_pattern, int i_rounds, int i_flags, cXyz i_pos);
76 bool StartQuake(int i_vibmode, int i_flags, cXyz i_pos);
77 int StopQuake(int i_flags);
78 void Kill();
79 bool CheckQuake();
80 void setDefault();
81 void Init();
82 void Pause();
83 void Remove();
84
85 static const vib_pattern MS_patt[VIBMODE_S_MAX];
86 static const vib_pattern CS_patt[VIBMODE_S_MAX];
87 static const vib_pattern MQ_patt[VIBMODE_Q_MAX];
88 static const vib_pattern CQ_patt[VIBMODE_Q_MAX];
89
90private:
91#if DEBUG
92 /* 0x00 */ dVibTest_c mVibTest;
93#endif
94
95 class {
96 public:
97 class {
98 public:
99 /* 0x00 */ u32 field_0x0;
100 /* 0x04 */ int mVibMode;
101 /* 0x08 */ u32 mPattern;
102 /* 0x0C */ s32 mLength;
103 /* 0x10 */ s32 mRounds;
104 /* 0x14 */ s32 mFlags;
105 /* 0x18 */ cXyz mPos;
106 /* 0x24 */ s32 mFrame;
108 } /* 0x00 */ mCamera;
109 class {
110 public:
111 class {
112 public:
113 /* 0x00 */ u32 field_0x0;
114 /* 0x04 */ int mVibMode;
115 /* 0x08 */ u32 mPattern;
116 /* 0x0C */ s32 mLength;
117 /* 0x10 */ s32 mRounds;
118 /* 0x14 */ s32 mFrame;
119 /* 0x18 */ s32 mStopFrame;
121 } /* 0x50 */ mMotor;
122 /* 0x88 */ s32 mFrame;
123 /* 0x8C */ s32 mMode;
124}; // Size: 0x90
125
126#endif /* D_D_VIBRATION_H */
Definition JORMContext.h:120
Definition JORReflexible.h:43
Definition d_vibration.h:46
s8 field_0x4
Definition d_vibration.h:54
virtual void listenPropertyEvent(const JORPropertyEvent *)
int field_0x10
Definition d_vibration.h:60
int m_vibswitch
Definition d_vibration.h:61
s16 m_randombit
Definition d_vibration.h:58
u16 field_0xa
Definition d_vibration.h:57
u16 m_pattern2
Definition d_vibration.h:56
virtual void genMessage(JORMContext *)
u16 m_displayDbg
Definition d_vibration.h:62
s16 m_length
Definition d_vibration.h:59
virtual ~dVibTest_c()
Definition d_vibration.h:52
u16 m_pattern
Definition d_vibration.h:55
Definition d_vibration.h:65
bool StartQuake(const u8 *i_pattern, int i_rounds, int i_flags, cXyz i_pos)
Definition d_vibration.cpp:323
static const vib_pattern CS_patt[VIBMODE_S_MAX]
Definition d_vibration.h:21
u32 mPattern
Definition d_vibration.h:101
class dVibration_c::@127 mCamera
static const vib_pattern MQ_patt[VIBMODE_Q_MAX]
Definition d_vibration.h:36
class dVibration_c::@127::@129 mShock
s32 mMode
Definition d_vibration.h:123
bool CheckQuake()
Definition d_vibration.cpp:381
void Kill()
Definition d_vibration.cpp:375
dVibTest_c mVibTest
Definition d_vibration.h:92
int StopQuake(int i_flags)
Definition d_vibration.cpp:355
static const vib_pattern MS_patt[VIBMODE_S_MAX]
Definition d_vibration.h:6
int mVibMode
Definition d_vibration.h:100
void Init()
Definition d_vibration.cpp:416
void setDefault()
Definition d_vibration.cpp:385
@ MODE_WAIT
Definition d_vibration.h:69
@ MODE_RUN
Definition d_vibration.h:70
@ MODE_PAUSE
Definition d_vibration.h:68
s32 mRounds
Definition d_vibration.h:103
s32 mLength
Definition d_vibration.h:102
static const vib_pattern CQ_patt[VIBMODE_Q_MAX]
Definition d_vibration.h:50
s32 mFlags
Definition d_vibration.h:104
bool StartShock(int i_vibmode, int i_flags, cXyz i_pos)
Definition d_vibration.cpp:272
s32 mStopFrame
Definition d_vibration.h:119
u32 field_0x0
Definition d_vibration.h:99
s32 mFrame
Definition d_vibration.h:106
class dVibration_c::@128 mMotor
void Remove()
Definition d_vibration.cpp:444
class dVibration_c::@127::@129 mQuake
cXyz mPos
Definition d_vibration.h:105
int Run()
Definition d_vibration.cpp:54
void Pause()
Definition d_vibration.cpp:421
VIBMODE_QUAKE
Definition d_vibration.h:30
@ VIBMODE_Q_POWER4
Definition d_vibration.h:36
@ VIBMODE_Q_POWER8
Definition d_vibration.h:40
@ VIBMODE_Q_POWER2
Definition d_vibration.h:34
@ VIBMODE_Q_POWER1
Definition d_vibration.h:33
@ VIBMODE_Q_POWER3
Definition d_vibration.h:35
@ VIBMODE_Q_POWER6
Definition d_vibration.h:38
@ VIBMODE_Q_POWER5
Definition d_vibration.h:37
@ VIBMODE_Q_CUSTOM
Definition d_vibration.h:32
@ VIBMODE_Q_MAX
Definition d_vibration.h:43
@ VIBMODE_Q_HORSE
Definition d_vibration.h:41
@ VIBMODE_Q_POWER7
Definition d_vibration.h:39
@ VIBMODE_Q_NONE
Definition d_vibration.h:31
VIBMODE_SHOCK
Definition d_vibration.h:13
@ VIBMODE_S_POWER4
Definition d_vibration.h:19
@ VIBMODE_S_POWER6
Definition d_vibration.h:21
@ VIBMODE_S_POWER1
Definition d_vibration.h:16
@ VIBMODE_S_POWER2
Definition d_vibration.h:17
@ VIBMODE_S_DOKUTT
Definition d_vibration.h:24
@ VIBMODE_S_POWER3
Definition d_vibration.h:18
@ VIBMODE_S_MAX
Definition d_vibration.h:27
@ VIBMODE_S_FOR2D
Definition d_vibration.h:25
@ VIBMODE_S_CUSTOM
Definition d_vibration.h:15
@ VIBMODE_S_POWER5
Definition d_vibration.h:20
@ VIBMODE_S_NONE
Definition d_vibration.h:14
@ VIBMODE_S_POWER8
Definition d_vibration.h:23
@ VIBMODE_S_POWER7
Definition d_vibration.h:22
signed char s8
Definition types.h:7
unsigned long u32
Definition types.h:12
signed short int s16
Definition types.h:9
unsigned short int u16
Definition types.h:10
signed long s32
Definition types.h:11
unsigned char u8
Definition types.h:8
Definition JORReflexible.h:10
Definition c_xyz.h:7
Definition d_vibration.h:7
u32 bits
Definition d_vibration.h:10
u16 rounds
Definition d_vibration.h:8
u16 length
Definition d_vibration.h:9