Files
tp/include/dolphin/gd.h
T

27 lines
439 B
C
Raw Normal View History

2024-01-19 16:22:19 -08:00
#ifndef GD_H
#define GD_H
#include "dolphin/gd/GDBase.h"
#include "dolphin/gd/GDGeometry.h"
2024-01-24 04:00:46 -08:00
#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
2024-01-19 16:22:19 -08:00
#endif /* GD_H */