Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JASOscillator.h
Go to the documentation of this file.
1#ifndef JASOSCILLATOR_H
2#define JASOSCILLATOR_H
3
4#include "dolphin/types.h"
5
11 struct Point {
12 /* 0x0 */ s16 _0;
13 /* 0x2 */ s16 _2;
14 /* 0x4 */ s16 _4;
15 };
16
17 struct EffectParams {
19 mVolume = 1.0f;
20 mPitch = 1.0f;
21 mPan = 0.5f;
22 mFxMix = 0.0f;
23 mDolby = 0.0f;
24 _14 = 1.0f;
25 _18 = 1.0f;
26 }
27
28 /* 0x00 */ f32 mVolume;
29 /* 0x04 */ f32 mPitch;
30 /* 0x08 */ f32 mPan;
31 /* 0x0C */ f32 mFxMix;
32 /* 0x10 */ f32 mDolby;
33 /* 0x14 */ f32 _14;
34 /* 0x18 */ f32 _18;
35 };
36
37 struct Data {
38 /* 0x00 */ u32 mTarget;
39 /* 0x04 */ f32 _04;
40 /* 0x08 */ const Point* mTable;
41 /* 0x0C */ const Point* _0C;
42 /* 0x10 */ f32 mScale;
43 /* 0x14 */ f32 _14;
44 };
45
46 enum Target {
48 /* 1 */ TARGET_PITCH,
49 /* 2 */ TARGET_PAN,
50 /* 3 */ TARGET_FXMIX,
51 /* 4 */ TARGET_DOLBY,
52 /* 5 */ TARGET_5,
53 /* 6 */ TARGET_6,
54 };
55
57
58 void initStart(const Data*);
60 f32 getValue() const;
61 void release();
62 void update();
64
66 void stop() { _1C = 0; }
67 bool isValid() { return mData != NULL; }
68 bool isStop() { return _1C == 0; }
69 bool isRelease() { return _1C == 3 || _1C == 4; }
70 u32 getTarget() { return mData->mTarget; }
71
72 /* 0x00 */ const Data* mData;
73 /* 0x04 */ f32 _04;
74 /* 0x08 */ f32 _08;
75 /* 0x0C */ f32 _0C;
76 /* 0x10 */ f32 _10;
77 /* 0x14 */ u16 _14;
78 /* 0x16 */ u16 mDirectRelease;
79 /* 0x18 */ u8 _18;
80 /* 0x1A */ u16 _1A;
81 /* 0x1C */ int _1C;
82
83 static const f32 sCurveTableLinear[17];
84 static const f32 sCurveTableSampleCell[17];
85 static const f32 sCurveTableSqRoot[17];
86 static const f32 sCurveTableSquare[17];
87};
88
89#endif /* JASOSCILLATOR_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JASOscillator.h:37
const Point * _0C
Definition JASOscillator.h:41
u32 mTarget
Definition JASOscillator.h:38
const Point * mTable
Definition JASOscillator.h:40
f32 mScale
Definition JASOscillator.h:42
f32 _14
Definition JASOscillator.h:43
f32 _04
Definition JASOscillator.h:39
Definition JASOscillator.h:17
f32 mPitch
Definition JASOscillator.h:29
f32 _14
Definition JASOscillator.h:33
f32 mPan
Definition JASOscillator.h:30
EffectParams()
Definition JASOscillator.h:18
f32 _18
Definition JASOscillator.h:34
f32 mVolume
Definition JASOscillator.h:28
f32 mFxMix
Definition JASOscillator.h:31
f32 mDolby
Definition JASOscillator.h:32
Definition JASOscillator.h:11
s16 _4
Definition JASOscillator.h:14
s16 _2
Definition JASOscillator.h:13
s16 _0
Definition JASOscillator.h:12
Definition JASOscillator.h:10
void initStart(const Data *)
Definition JASOscillator.cpp:43
f32 getValue() const
Definition JASOscillator.cpp:81
static const f32 sCurveTableSampleCell[17]
Definition JASOscillator.h:177
u16 mDirectRelease
Definition JASOscillator.h:78
static const f32 sCurveTableLinear[17]
Definition JASOscillator.h:171
f32 _04
Definition JASOscillator.h:73
u8 _18
Definition JASOscillator.h:79
u32 getTarget()
Definition JASOscillator.h:70
void updateCurrentValue(f32 param_0)
Definition JASOscillator.cpp:209
Target
Definition JASOscillator.h:46
@ TARGET_PITCH
Definition JASOscillator.h:48
@ TARGET_6
Definition JASOscillator.h:53
@ TARGET_DOLBY
Definition JASOscillator.h:51
@ TARGET_FXMIX
Definition JASOscillator.h:50
@ TARGET_PAN
Definition JASOscillator.h:49
@ TARGET_5
Definition JASOscillator.h:52
@ TARGET_VOLUME
Definition JASOscillator.h:47
bool isStop()
Definition JASOscillator.h:68
int _1C
Definition JASOscillator.h:81
static const f32 sCurveTableSqRoot[17]
Definition JASOscillator.h:186
bool isRelease()
Definition JASOscillator.h:69
void stop()
Definition JASOscillator.h:66
void incCounter(f32 param_0)
Definition JASOscillator.cpp:67
const Data * mData
Definition JASOscillator.h:72
bool isValid()
Definition JASOscillator.h:67
f32 _10
Definition JASOscillator.h:76
void release()
Definition JASOscillator.cpp:86
JASOscillator()
Definition JASOscillator.cpp:27
u16 _1A
Definition JASOscillator.h:80
static const f32 sCurveTableSquare[17]
Definition JASOscillator.h:194
u16 _14
Definition JASOscillator.h:77
void setDirectRelease(u16 param_0)
Definition JASOscillator.h:65
void update()
Definition JASOscillator.cpp:116
f32 _08
Definition JASOscillator.h:74
f32 _0C
Definition JASOscillator.h:75
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8