Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
GetIconBrightnessForAngle.inc.c
Go to the documentation of this file.
1
#include "common.h"
2
3
// determines the 'brightness' of inspect and speech bubble icons as a function of angle,
4
// making them appear more three-dimensional.
5
s32 N(
GetIconBrightnessForAngle
)(
f32
angle) {
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
}
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
GetIconBrightnessForAngle
s32 N GetIconBrightnessForAngle(f32 angle)
Definition
GetIconBrightnessForAngle.inc.c:5
src
common
GetIconBrightnessForAngle.inc.c
Generated by
1.10.0