blob: a35a19b8ac089f102074bfa8f83a2bd5378e1acf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef GD_H
#define GD_H
#include "dolphin/gd/GDBase.h"
#include "dolphin/gd/GDGeometry.h"
#ifdef __cplusplus
extern "C" {
#endif
static inline u16 __GDLightID2Index(GXLightID id) {
u16 lightIdx = (31 - __cntlzw(id));
if (lightIdx > 7)
lightIdx = 0;
return lightIdx;
}
static inline u16 __GDLightID2Offset(GXLightID id) {
return __GDLightID2Index(id) * 0x10;
}
#ifdef __cplusplus
};
#endif
#endif /* GD_H */
|