Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
GetIconBrightnessForAngle.inc.c File Reference

Go to the source code of this file.

Functions

s32 N GetIconBrightnessForAngle (f32 angle)
 

Function Documentation

◆ GetIconBrightnessForAngle()

s32 N GetIconBrightnessForAngle ( f32 angle)

Definition at line 5 of file GetIconBrightnessForAngle.inc.c.

5 {
6 s32 angleDiff;
7
8 if (angle >= 270.0f) {
9 angleDiff = 360.0f - angle;
10 } else if (angle >= 180.0f) {
11 angleDiff = angle - 180.0f;
12 } else if (angle >= 90.0f) {
13 angleDiff = 180.0f - angle;
14 } else {
15 angleDiff = angle;
16 }
17 return 0xFF - angleDiff - angleDiff;
18}

Referenced by interact_inspect_update(), and interact_speech_update().