NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_Lfo.h
1#ifndef NW4R_SND_LFO_H
2#define NW4R_SND_LFO_H
3
4/*******************************************************************************
5 * headers
6 */
7
8#include <types.h>
9
10/*******************************************************************************
11 * classes and functions
12 */
13
14namespace nw4r { namespace snd { namespace detail
15{
16 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x28dc2
17 struct LfoParam
18 {
19 // methods
20 public:
21 // cdtors
22 LfoParam() { Init(); }
23
24 // methods
25 void Init();
26
27 // members
28 public:
29 f32 depth; // size 0x04, offset 0x00
30 f32 speed; // size 0x04, offset 0x04
31 ulong delay; // size 0x04, offset 0x08
32 u8 range; // size 0x01, offset 0x0c
33 u8 padding[3];
34 }; // size 0x10
35
36 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x28ea0
37 class Lfo
38 {
39 // methods
40 public:
41 // cdtors
42 Lfo() :
43 mDelayCounter (0),
44 mCounter (0.0f)
45 {
46 }
47
48 // methods
49 void Update(int msec);
50 void Reset();
51
52 LfoParam &GetParam() { return mParam; }
53
54 void SetParam(LfoParam const &param) { mParam = param; }
55
56 f32 GetValue() const;
57
58 private:
59 static s8 GetSinIdx(int i);
60
61 // static members
62 private:
63 static int const PERIOD;
64 static int const TABLE_SIZE = 32;
65
66 // members
67 private:
68 LfoParam mParam; // size 0x10, offset 0x00
69 ulong mDelayCounter; // size 0x04, offset 0x10
70 f32 mCounter; // size 0x04, offset 0x14
71 }; // size 0x18
72}}} // namespace nw4r::snd::detail
73
74#endif // NW4R_SND_LFO_H