d_insect first pass (#219)

* dInsect_c::dInsect_c

* dInsect_c::Insect_GetDemoMain attempt

* dInsect_c::CalcZBuffer attempt

* remove asm

* convert clib inlines to template functions
This commit is contained in:
Pheenoh
2022-12-26 10:55:53 -07:00
committed by GitHub
parent 8516f01f79
commit 8b0ee4d50b
11 changed files with 148 additions and 86 deletions
+8 -3
View File
@@ -36,13 +36,18 @@ s16 cLib_targetAngleX(const cXyz*, const cXyz*);
void cLib_offsetPos(cXyz* pDest, cXyz const* pSrc, s16 angle, cXyz const* vec);
s32 cLib_distanceAngleS(s16 x, s16 y);
inline void cLib_offBit(u8& value, u8 bit) {
template <typename T>
inline void cLib_offBit(T& value, u8 bit) {
value &= ~bit;
}
inline void cLib_onBit(u8& value, u8 bit) {
template <typename T>
inline void cLib_onBit(T& value, u8 bit) {
value |= bit;
}
inline u8 cLib_checkBit(u8& value, u8 bit) {
template <typename T>
inline T cLib_checkBit(T& value, u8 bit) {
return value & bit;
}