Merge branch 'main' of https://github.com/abnormalhare/mp4-dtk
This commit is contained in:
commit
b4c1754a60
8 changed files with 479 additions and 430 deletions
|
|
@ -13,6 +13,7 @@ extern "C" {
|
|||
|
||||
#define OS_FASTCAST_U8 2
|
||||
#define OS_FASTCAST_U16 3
|
||||
#define OS_FASTCAST_S8 4
|
||||
#define OS_FASTCAST_S16 5
|
||||
// clang-format off
|
||||
static inline void OSInitFastCast(void) {
|
||||
|
|
@ -75,11 +76,52 @@ static inline u8 __OSf32tou8(register f32 inF)
|
|||
|
||||
static inline void OSf32tou8(f32 *f, u8 *out) { *out = __OSf32tou8(*f); }
|
||||
|
||||
static inline u16 __OSf32tou16(register f32 inF)
|
||||
{
|
||||
u32 tmp;
|
||||
register u32 *tmpPtr = &tmp;
|
||||
register u16 out;
|
||||
// clang-format off
|
||||
asm {
|
||||
psq_st inF, 0(tmpPtr), 0x1, OS_FASTCAST_U16
|
||||
lbz out, 0(tmpPtr)
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
static inline void OSf32tou16(f32 *f, u16 *out) { *out = __OSf32tou16(*f); }
|
||||
|
||||
static inline float __OSs16tof32(register const s16* arg) {
|
||||
register float ret;
|
||||
|
||||
asm {
|
||||
psq_l ret, 0(arg), 1, OS_FASTCAST_S16
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void OSs16tof32(const s16* in, float* out) { *out = __OSs16tof32(in); }
|
||||
|
||||
static inline float __OSu8tof32(register const u8* arg) {
|
||||
register float ret;
|
||||
|
||||
asm {
|
||||
psq_l ret, 0(arg), 1, OS_FASTCAST_U8
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void OSu8tof32(const u8* in, float* out) { *out = __OSu8tof32(in); }
|
||||
|
||||
static inline float __OSu16tof32(register const u16* arg) {
|
||||
register float ret;
|
||||
|
||||
asm {
|
||||
psq_l ret, 0(arg), 1, 3
|
||||
psq_l ret, 0(arg), 1, OS_FASTCAST_U16
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@ void BoardSpacePosGet(s32, s32, Vec*);
|
|||
void fn_8007A360(s32);
|
||||
void fn_8007F894(void);
|
||||
s16 fn_80083F84(void);
|
||||
void fn_800884F4(s32);
|
||||
void BoardStatusShowSetAll(s32);
|
||||
void fn_800A4C88(void);
|
||||
void fn_800A6B10(void);
|
||||
void fn_8008853C(s32);
|
||||
void BoardStatusItemSet(s32);
|
||||
void BoardTutorialItemSet(s32);
|
||||
void fn_80082AAC(s32);
|
||||
void BoardTutorialDirInputSet(s32, s32, s32);
|
||||
|
|
|
|||
|
|
@ -9,34 +9,10 @@
|
|||
|
||||
extern Process *boardObjMan;
|
||||
|
||||
typedef struct bit_copy {
|
||||
struct {
|
||||
u8 hide : 1;
|
||||
u8 field08_bit1 : 1;
|
||||
u8 field08_bit2 : 1;
|
||||
u8 field08_bit3 : 3;
|
||||
};
|
||||
s8 unk_01;
|
||||
s8 unk_02;
|
||||
s8 unk_03;
|
||||
u16 unk_04;
|
||||
u16 unk_06;
|
||||
s16 unk_08;
|
||||
s16 unk_0A;
|
||||
s16 unk_0C;
|
||||
s16 unk_0E;
|
||||
} bitcopy; // sizeof 0x10
|
||||
void BoardEventLandBlue(s32, s16);
|
||||
void BoardEventLandRed(s32, s16);
|
||||
s8 BoardCoinChgCreate(Vec*, s8);
|
||||
s32 BoardCoinChgExist(s32);
|
||||
void BoardCoinChgHide(s32);
|
||||
|
||||
void BoardEventLandBlue(s32);
|
||||
void BoardEventLandRed(s32);
|
||||
s8 fn_8007FE70(Point3d*, s8);
|
||||
s32 fn_80080058(s32);
|
||||
void fn_800800C4(s32);
|
||||
void fn_80080124(bitcopy*, Vec*);
|
||||
void fn_80080360(omObjData*);
|
||||
void fn_800804F8(omObjData*, bitcopy*);
|
||||
void fn_800806B0(omObjData*, bitcopy*);
|
||||
void fn_8008094C(omObjData*, bitcopy*);
|
||||
void fn_80080AF4(omObjData*, bitcopy*);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue