Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
EnvGenerator.h
Go to the documentation of this file.
1#ifndef NW4HBM_SND_ENV_GENERATOR_H
2#define NW4HBM_SND_ENV_GENERATOR_H
3
4#include "../ut/LinkList.h"
5
6namespace nw4hbm {
7 namespace snd {
8 namespace detail {
10 public:
17
19
20 void Init();
21 void Reset();
22 f32 GetValue() const;
23 void Update(int msec);
24
25 Status GetStatus() const { return mStatus; }
27
28 void SetAttack(int attack);
29 void SetDecay(int decay);
30 void SetSustain(int sustain);
31 void SetRelease(int release);
32
33 private:
34 static const int DECIBEL_SQUARE_TABLE_SIZE = 128;
35
36 static const vf32 VOLUME_INIT;
37 static const int ATTACK_INIT = 127;
38 static const int DECAY_INIT = 127;
39 static const int SUSTAIN_INIT = 127;
40 static const int RELEASE_INIT = 127;
41
42 private:
43 f32 CalcRelease(int release);
44 int CalcDecibelSquare(int scale);
45
46 /* 0x00 */ Status mStatus;
47 /* 0x04 */ f32 mValue;
48 /* 0x08 */ f32 mDecay;
49 /* 0x0C */ f32 mRelease;
50 /* 0x10 */ f32 mAttack;
51 /* 0x14 */ u8 mSustain;
52 /* 0x16 */ u16 padding;
53
55 };
56 } // namespace detail
57 } // namespace snd
58} // namespace nw4hbm
59
60#endif
Definition EnvGenerator.h:9
static const int RELEASE_INIT
Definition EnvGenerator.h:40
f32 mAttack
Definition EnvGenerator.h:50
static const int DECAY_INIT
Definition EnvGenerator.h:38
f32 mDecay
Definition EnvGenerator.h:48
static const vf32 VOLUME_INIT
Definition EnvGenerator.h:36
u16 padding
Definition EnvGenerator.h:52
f32 mRelease
Definition EnvGenerator.h:49
static const int SUSTAIN_INIT
Definition EnvGenerator.h:39
f32 mValue
Definition EnvGenerator.h:47
u8 mSustain
Definition EnvGenerator.h:51
void SetStatus(Status status)
Definition EnvGenerator.h:26
static const s16 DecibelSquareTable[DECIBEL_SQUARE_TABLE_SIZE]
Definition EnvGenerator.h:54
Status
Definition EnvGenerator.h:11
@ STATUS_SUSTAIN
Definition EnvGenerator.h:14
@ STATUS_ATTACK
Definition EnvGenerator.h:12
@ STATUS_RELEASE
Definition EnvGenerator.h:15
@ STATUS_DECAY
Definition EnvGenerator.h:13
Status mStatus
Definition EnvGenerator.h:46
Status GetStatus() const
Definition EnvGenerator.h:25
static const int ATTACK_INIT
Definition EnvGenerator.h:37
static const int DECIBEL_SQUARE_TABLE_SIZE
Definition EnvGenerator.h:34
static void attack(b_oh_class *i_this)
Definition d_a_b_oh.cpp:189
static u32 status
Definition fstload.c:9
signed short int s16
Definition types.h:9
float f32
Definition types.h:25
unsigned short int u16
Definition types.h:10
volatile f32 vf32
Definition types.h:28
unsigned char u8
Definition types.h:8
Definition HBMAnmController.h:6