MCPcopy Create free account
hub / github.com/doldecomp/mkdd / control

Method control

libs/JSystem/JUtility/JUTFader.cpp:17–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17void JUTFader::control()
18{
19 if (0 <= mEStatus && mEStatus-- == 0)
20 mStatus = _28;
21
22 if (mStatus == Status_In)
23 return;
24
25 switch (mStatus)
26 {
27 case Status_Out:
28 mColor.a = 0xFF;
29 break;
30 case Status_FadingIn:
31 mColor.a = 0xFF - ((++mTicksRun * 0xFF) / mTicksTarget);
32 if (mTicksRun >= mTicksTarget)
33 {
34 mColor.a = 0;
35 mStatus = Status_In;
36 }
37 break;
38 case Status_FadingOut:
39 mColor.a = ((++mTicksRun * 0xFF) / mTicksTarget);
40 if (mTicksRun >= mTicksTarget)
41 {
42 mColor.a = 0xFF;
43 mStatus = Status_Out;
44 }
45 break;
46 }
47 draw();
48}
49
50void JUTFader::draw()
51{

Callers 1

endGXMethod · 0.80

Calls 1

drawFunction · 0.50

Tested by

no test coverage detected