mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 05:28:43 -04:00
Merge remote-tracking branch 'Upstream/master'
This commit is contained in:
@@ -922,7 +922,13 @@ inline void GXColor1u32(u32 c) {
|
||||
GFX_FIFO(u32) = c;
|
||||
}
|
||||
|
||||
inline void GXTexCoord2f32(f32 s, f32 t) {
|
||||
GFX_FIFO(f32) = s;
|
||||
GFX_FIFO(f32) = t;
|
||||
}
|
||||
|
||||
inline void GXEnd() {}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+38
-1
@@ -205,6 +205,43 @@ void LCDisable(void);
|
||||
void OSReportInit__Fv(void); // needed for inline asm
|
||||
|
||||
u8* OSGetStackPointer(void);
|
||||
|
||||
inline s16 __OSf32tos16(register f32 inF) {
|
||||
register s16 out;
|
||||
u32 tmp;
|
||||
register u32* tmpPtr = &tmp;
|
||||
// clang-format off
|
||||
asm {
|
||||
psq_st inF, 0(tmpPtr), 0x1, 5
|
||||
lha out, 0(tmpPtr)
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
inline void OSf32tos16(f32* f, s16* out) {
|
||||
*out = __OSf32tos16(*f);
|
||||
}
|
||||
|
||||
inline u8 __OSf32tou8(register f32 inF) {
|
||||
register u8 out;
|
||||
u32 tmp;
|
||||
register u32* tmpPtr = &tmp;
|
||||
// clang-format off
|
||||
asm {
|
||||
psq_st inF, 0(tmpPtr), 0x1, 2
|
||||
lbz out, 0(tmpPtr)
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
inline void OSf32tou8(f32* f, u8* out) {
|
||||
*out = __OSf32tou8(*f);
|
||||
}
|
||||
|
||||
}; // extern "C"
|
||||
|
||||
void OSSwitchFiberEx(u32, u32, u32, u32, u32, u32);
|
||||
@@ -304,4 +341,4 @@ inline void* OSPhysicalToCached(u32 offset) {
|
||||
return (void*)(offset + 0x80000000);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user