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
5#include "JSystem/JHostIO/JORReflexible.h"
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:
48 dVibTest_c();
49
50 void Init();
51 void setDefault();
52
53 virtual void listenPropertyEvent(const JORPropertyEvent*);
54 virtual void genMessage(JORMContext*);
55 virtual ~dVibTest_c();
56
57 /* 0x04 */ s8 id;
58 /* 0x06 */ u16 m_pattern;
59 /* 0x08 */ u16 m_pattern2;
60 /* 0x0A */ u16 field_0xa;
61 /* 0x0C */ s16 m_randombit;
62 /* 0x0E */ s16 m_length;
63 /* 0x10 */ int field_0x10;
64 /* 0x14 */ s32 m_vibswitch;
65 /* 0x18 */ u16 m_displayDbg;
66};
67
69public:
70 enum {
74 };
75
76 int Run();
77 bool StartShock(int i_vibmode, int i_flags, cXyz i_pos);
78 bool StartQuake(const u8* i_pattern, int i_rounds, int i_flags, cXyz i_pos);
79 bool StartQuake(int i_vibmode, int i_flags, cXyz i_pos);
80 int StopQuake(int i_flags);
81 void Kill();
82 bool CheckQuake();
83 void setDefault();
84 void Init();
85 void Pause();
86 void Remove();
87
88 #if DEBUG
89 int testShake();
90 #endif
91
92 static const vib_pattern MS_patt[VIBMODE_S_MAX];
93 static const vib_pattern CS_patt[VIBMODE_S_MAX];
94 static const vib_pattern MQ_patt[VIBMODE_Q_MAX];
95 static const vib_pattern CQ_patt[VIBMODE_Q_MAX];
96
97private:
98#if DEBUG
99 /* 0x00 */ dVibTest_c mVibTest;
100#endif
101
102 class {
103 public:
104 class {
105 public:
106 /* 0x00 */ u32 field_0x0;
107 /* 0x04 */ int mVibMode;
108 /* 0x08 */ u32 mPattern;
109 /* 0x0C */ s32 mLength;
110 /* 0x10 */ s32 mRounds;
111 /* 0x14 */ s32 mFlags;
112 /* 0x18 */ cXyz mPos;
113 /* 0x24 */ s32 mFrame;
115 } /* 0x00 */ mCamera;
116 class {
117 public:
118 class {
119 public:
120 /* 0x00 */ u32 field_0x0;
121 /* 0x04 */ int mVibMode;
122 /* 0x08 */ u32 mPattern;
123 /* 0x0C */ s32 mLength;
124 /* 0x10 */ s32 mRounds;
125 /* 0x14 */ s32 mFrame;
126 /* 0x18 */ s32 mStopFrame;
128 } /* 0x50 */ mMotor;
129 /* 0x88 */ s32 mFrame;
130 /* 0x8C */ s32 mMode;
131}; // Size: 0x90
132
133extern const char* shock_names[VIBMODE_S_MAX];
134extern const char* quake_names[VIBMODE_Q_MAX];
135
136#endif /* D_D_VIBRATION_H */
Definition d_vibration.h:46
dVibTest_c()
Definition d_vibration.cpp:644
s8 id
Definition d_vibration.h:57
virtual void listenPropertyEvent(const JORPropertyEvent *)
Definition d_vibration.cpp:737
s32 m_vibswitch
Definition d_vibration.h:64
int field_0x10
Definition d_vibration.h:63
virtual void genMessage(JORMContext *)
Definition d_vibration.cpp:657
virtual ~dVibTest_c()
Definition d_vibration.cpp:649
s16 m_randombit
Definition d_vibration.h:61
u16 field_0xa
Definition d_vibration.h:60
u16 m_pattern2
Definition d_vibration.h:59
u16 m_displayDbg
Definition d_vibration.h:65
void Init()
Definition d_vibration.cpp:653
s16 m_length
Definition d_vibration.h:62
void setDefault()
Definition d_vibration.cpp:634
u16 m_pattern
Definition d_vibration.h:58
Definition d_vibration.h:68
bool StartQuake(const u8 *i_pattern, int i_rounds, int i_flags, cXyz i_pos)
Definition d_vibration.cpp:407
static const vib_pattern CS_patt[VIBMODE_S_MAX]
Definition d_vibration.h:21
u32 mPattern
Definition d_vibration.h:108
class dVibration_c::@101::@103 mQuake
class dVibration_c::@101::@103 mShock
static const vib_pattern MQ_patt[VIBMODE_Q_MAX]
Definition d_vibration.h:36
s32 mMode
Definition d_vibration.h:130
bool CheckQuake()
Definition d_vibration.cpp:576
void Kill()
Definition d_vibration.cpp:570
dVibTest_c mVibTest
Definition d_vibration.h:99
int StopQuake(int i_flags)
Definition d_vibration.cpp:445
static const vib_pattern MS_patt[VIBMODE_S_MAX]
Definition d_vibration.h:6
int mVibMode
Definition d_vibration.h:107
void Init()
Definition d_vibration.cpp:599
@ MODE_WAIT
Definition d_vibration.h:72
@ MODE_RUN
Definition d_vibration.h:73
@ MODE_PAUSE
Definition d_vibration.h:71
void setDefault()
Definition d_vibration.cpp:580
s32 mRounds
Definition d_vibration.h:110
s32 mLength
Definition d_vibration.h:109
static const vib_pattern CQ_patt[VIBMODE_Q_MAX]
Definition d_vibration.h:50
s32 mFlags
Definition d_vibration.h:111
bool StartShock(int i_vibmode, int i_flags, cXyz i_pos)
Definition d_vibration.cpp:344
s32 mStopFrame
Definition d_vibration.h:126
int testShake()
Definition d_vibration.cpp:472
u32 field_0x0
Definition d_vibration.h:106
s32 mFrame
Definition d_vibration.h:113
void Remove()
Definition d_vibration.cpp:629
cXyz mPos
Definition d_vibration.h:112
int Run()
Definition d_vibration.cpp:58
class dVibration_c::@101 mCamera
void Pause()
Definition d_vibration.cpp:608
class dVibration_c::@102 mMotor
const char * shock_names[VIBMODE_S_MAX]
Definition d_vib_pattern.cpp:63
const char * quake_names[VIBMODE_Q_MAX]
Definition d_vib_pattern.cpp:77
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
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