Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JAUSoundAnimator.h
Go to the documentation of this file.
1#ifndef JAUSOUNDANIMATOR_H
2#define JAUSOUNDANIMATOR_H
3
5
7
13public:
14 bool playsOnlyForward() const { return (mFlags & 1) != 0; }
15 bool playsOnlyReverse() const { return (mFlags & 2) != 0; }
16 bool stopsWhenAnimationChanges() const { return (mFlags & 4) != 0; }
17 bool playsOnlyOnce() const { return (mFlags & 8) != 0; }
18 bool stopsWhenNoteOff() const { return (mFlags & 0x10) != 0; }
19 bool stopsWhenSpeedIsZero() const { return (mFlags & 0x20) != 0; }
20 bool setsLifeTime() const { return (mFlags & 0x40) != 0; }
21 bool playsAtIntervals() const { return (mFlags & 0x80) != 0; }
22
23 bool isNoting(f32 param_0) const {
24 if (field_0x04 == field_0x08) {
25 return true;
26 }
27 if (field_0x04 > field_0x08) {
29 return true;
30 }
31 } else {
33 return true;
34 }
35 }
36 return false;
37 }
38
39 bool isNotingOn(f32 param_0, bool param_1) const {
40 if (setsLifeTime()) {
41 return isNoting(param_0);
42 }
43 if (param_1) {
44 return param_0 <= field_0x04;
45 } else {
46 return param_0 >= field_0x04;
47 }
48 }
49
50 bool isNotingOff(f32 param_0, bool param_1) const {
51 if (setsLifeTime()) {
52 return !isNoting(param_0);
53 }
54 if (field_0x04 == field_0x08) {
55 return false;
56 }
57 if (param_1) {
58 return param_0 <= field_0x08;
59 } else {
60 return param_0 >= field_0x08;
61 }
62 }
63
64 /* 0x00 */ JAISoundID mSoundId;
65 /* 0x04 */ f32 field_0x04;
66 /* 0x08 */ f32 field_0x08;
67 /* 0x0C */ f32 field_0x0c;
68 /* 0x10 */ u32 mFlags;
69 /* 0x14 */ u8 field_0x14;
70 /* 0x15 */ u8 field_0x15;
71 /* 0x16 */ u8 field_0x16;
72 /* 0x17 */ u8 field_0x17;
73 /* 0x18 */ u8 field_0x18;
74 /* 0x19 */ u8 field_0x19;
75 /* 0x1A */ s8 field_0x1a;
76 /* 0x1B */ u8 unk_0x1b[5];
77}; /* size 0x20 */
78
84public:
87 virtual u16 getNumSounds(const JAUSoundAnimation*) = 0;
88};
89
95public:
96 /* 802A6F70 */ int getStartSoundIndex(f32) const;
97 /* 802A7044 */ int getEndSoundIndex(f32) const;
98
99 u16 getNumSounds() const {
100 if (mControl != NULL) {
101 return mControl->getNumSounds(this);
102 } else {
103 return mNumSounds;
104 }
105 }
106
108 if (mControl != NULL) {
109 return mControl->getSound(this, i_index);
110 } else {
111 return &mSounds + i_index;
112 }
113 }
114
115 /* 0x0 */ u16 mNumSounds;
117 /* 0x8 */ JAUSoundAnimationSound mSounds; // actually an array
118};
119
120#endif /* JAUSOUNDANIMATOR_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JAUSoundAnimator.h:83
virtual JAUSoundAnimationSound * getSound(const JAUSoundAnimation *, int)=0
virtual u16 getNumSounds(const JAUSoundAnimation *)=0
virtual ~JAUSoundAnimationControl()=0
Definition JAUSoundAnimator.h:12
bool playsOnlyForward() const
Definition JAUSoundAnimator.h:14
bool playsOnlyOnce() const
Definition JAUSoundAnimator.h:17
f32 field_0x08
Definition JAUSoundAnimator.h:66
u8 field_0x17
Definition JAUSoundAnimator.h:72
u8 field_0x14
Definition JAUSoundAnimator.h:69
bool setsLifeTime() const
Definition JAUSoundAnimator.h:20
bool isNotingOff(f32 param_0, bool param_1) const
Definition JAUSoundAnimator.h:50
u8 unk_0x1b[5]
Definition JAUSoundAnimator.h:76
u8 field_0x16
Definition JAUSoundAnimator.h:71
bool stopsWhenAnimationChanges() const
Definition JAUSoundAnimator.h:16
bool stopsWhenSpeedIsZero() const
Definition JAUSoundAnimator.h:19
s8 field_0x1a
Definition JAUSoundAnimator.h:75
bool playsAtIntervals() const
Definition JAUSoundAnimator.h:21
bool isNotingOn(f32 param_0, bool param_1) const
Definition JAUSoundAnimator.h:39
u8 field_0x15
Definition JAUSoundAnimator.h:70
u32 mFlags
Definition JAUSoundAnimator.h:68
bool isNoting(f32 param_0) const
Definition JAUSoundAnimator.h:23
u8 field_0x19
Definition JAUSoundAnimator.h:74
f32 field_0x04
Definition JAUSoundAnimator.h:65
bool stopsWhenNoteOff() const
Definition JAUSoundAnimator.h:18
f32 field_0x0c
Definition JAUSoundAnimator.h:67
u8 field_0x18
Definition JAUSoundAnimator.h:73
JAISoundID mSoundId
Definition JAUSoundAnimator.h:64
bool playsOnlyReverse() const
Definition JAUSoundAnimator.h:15
Definition JAUSoundAnimator.h:94
int getStartSoundIndex(f32) const
Definition JAUSoundAnimator.cpp:9
u16 mNumSounds
Definition JAUSoundAnimator.h:115
JAUSoundAnimationSound mSounds
Definition JAUSoundAnimator.h:117
JAUSoundAnimationControl * mControl
Definition JAUSoundAnimator.h:116
int getEndSoundIndex(f32) const
Definition JAUSoundAnimator.cpp:20
const JAUSoundAnimationSound * getSound(int i_index) const
Definition JAUSoundAnimator.h:107
u16 getNumSounds() const
Definition JAUSoundAnimator.h:99
Definition d_a_obj_sekizoa.cpp:447
signed char s8
Definition types.h:4
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8