Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
Lfo.h
Go to the documentation of this file.
1#ifndef NW4HBM_SND_LFO_H
2#define NW4HBM_SND_LFO_H
3
4#include <revolution/types.h>
5
6namespace nw4hbm {
7 namespace snd {
8 namespace detail {
9
10 typedef struct LfoParam {
11 LfoParam() { Init(); }
12
13 void Init();
14
15 /* 0x00 */ f32 depth;
16 /* 0x04 */ f32 speed;
17 /* 0x08 */ u32 delay;
18 /* 0x0C */ u8 range;
19 /* 0x0D */ u8 padding[3];
21
22 class Lfo {
23 public:
24 Lfo() : mDelayCounter(0), mCounter(0.0f) {}
25
26 LfoParam& GetParam() { return mParam; }
27 void SetParam(const LfoParam& rParam) { mParam = rParam; }
28
29 void Reset();
30 void Update(int msec);
31
32 f32 GetValue() const;
33
34 private:
35 static const int TABLE_SIZE = 32;
36
37 static s8 GetSinIdx(int idx);
38
39 /* 0x00 */ LfoParam mParam;
40 /* 0x10 */ u32 mDelayCounter;
41 /* 0x14 */ f32 mCounter;
42 };
43
44 } // namespace detail
45 } // namespace snd
46} // namespace nw4hbm
47
48#endif
Definition Lfo.h:22
LfoParam & GetParam()
Definition Lfo.h:26
static const int TABLE_SIZE
Definition Lfo.h:35
static s8 GetSinIdx(int idx)
f32 mCounter
Definition Lfo.h:41
LfoParam mParam
Definition Lfo.h:39
Lfo()
Definition Lfo.h:24
u32 mDelayCounter
Definition Lfo.h:40
void SetParam(const LfoParam &rParam)
Definition Lfo.h:27
signed char s8
Definition types.h:7
unsigned long u32
Definition types.h:12
float f32
Definition types.h:25
unsigned char u8
Definition types.h:8
struct nw4hbm::snd::detail::LfoParam LfoParam
Definition HBMAnmController.h:6
f32 speed
Definition Lfo.h:16
u8 range
Definition Lfo.h:18
LfoParam()
Definition Lfo.h:11
u8 padding[3]
Definition Lfo.h:19
f32 depth
Definition Lfo.h:15
u32 delay
Definition Lfo.h:17