Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
gd.h
Go to the documentation of this file.
1#ifndef GD_H
2#define GD_H
3
4#include "dolphin/gd/GDBase.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11static inline u16 __GDLightID2Index(GXLightID id) {
12 u16 lightIdx = (31 - __cntlzw(id));
13 if (lightIdx > 7)
14 lightIdx = 0;
15 return lightIdx;
16}
17
18static inline u16 __GDLightID2Offset(GXLightID id) {
19 return __GDLightID2Index(id) * 0x10;
20}
21
22#ifdef __cplusplus
23};
24#endif
25
26#endif /* GD_H */
enum _GXLightID GXLightID
T cLib_calcTimer(T *value)
Definition c_lib.h:74
static u16 __GDLightID2Index(GXLightID id)
Definition gd.h:11
static u16 __GDLightID2Offset(GXLightID id)
Definition gd.h:18
int __cntlzw(unsigned int)
unsigned short u16
Definition types.h:9