DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
fader.cpp
1#include "fader.hpp"
2
3int Fader::In() {
4 if (this->value < 0x80) {
5 this->value += 4;
6
7 if (this->value > 0x80) {
8 this->value = 0x80;
9 }
10
11 return 0;
12 }
13
14 return 1;
15}
16
18 if (this->value > 0) {
19 this->value -= 4;
20 return 0;
21 }
22
23 return 1;
24}
25
26int Fader::Get(int maximum) {
27 float level = (float) this->value / 128.0f;
28 level *= (float) maximum;
29 return (int) level;
30}
int Get(int maximum)
Definition fader.cpp:26
int In()
Definition fader.cpp:3
int value
Definition fader.hpp:10
int Out()
Definition fader.cpp:17