port: 64-bit: get rid of host_ structs; further cleanup

This commit is contained in:
fgsfds committed 2024-11-12 13:13:42 +01:00
1 parent 2f221b9a1e
commit 163dbf9495
14 files changed
+395 -746

No files matched your search

+2 -3
View File
@@ -3,14 +3,14 @@
#include <PR/ultratypes.h>
typedef u8* (*preprocessfunc)(u8 *data, u32 size, u32 *outSize);
typedef u8 *(*preprocessfunc)(u8 *data, u32 size, u32 *outSize);
u8* preprocessAnimations(u8 *data, u32 size, u32 *outSize);
u8* preprocessMpConfigs(u8 *data, u32 size, u32 *outSize);
u8* preprocessFont(u8 *data, u32 size, u32 *outSize);
u8* preprocessJpnFont(u8 *data, u32 size, u32 *outSize);
u8* preprocessALBankFile(u8 *data, u32 size, u32 *outSize);
void preprocessALCMidiHdr(u8 *data, u32 size);
u8 *preprocessALCMidiHdr(u8 *data, u32 size, u32 *outSize);
u8* preprocessSequences(u8 *data, u32 size, u32 *outSize);
u8* preprocessTexturesList(u8 *data, u32 size, u32 *outSize);
@@ -20,7 +20,6 @@ void preprocessBgSection3(u8* data, u32 size);
void preprocessBgSection1Header(u8 *data, u32 size);
void preprocessBgSection2Header(u8 *data, u32 size);
void preprocessBgSection3Header(u8 *data, u32 size);
void preprocessBgLights(u8 *data, u32 ofs);
u32 preprocessBgRoom(u8* data, u32 size, u32 room_ofs);
u8 *preprocessLangFile(u8 *data, u32 size, u32 *outSize);
+3 -1
View File
@@ -31,7 +31,7 @@ static inline void* swapPtr(void** x) { return (void*)PD_BEPTR((uintptr_t)x); }
static inline struct coord swapCrd(struct coord crd) { crd.x = swapF32(crd.x); crd.y = swapF32(crd.y); crd.z = swapF32(crd.z); return crd; }
static inline u32 swapUnk(u32 x) { assert(0 && "unknown type"); return x; }
#define PD_SWAP_VAL(x) x = _Generic((x), \
#define PD_SWAPPED_VAL(x) _Generic((x), \
f32: swapF32, \
u32: swapU32, \
s32: swapS32, \
@@ -41,6 +41,8 @@ static inline u32 swapUnk(u32 x) { assert(0 && "unknown type"); return x; }
default: swapUnk \
)(x)
#define PD_SWAP_VAL(x) x = PD_SWAPPED_VAL(x)
#define PD_SWAP_PTR(x) x = swapPtr((void *)(x))
// ptr marker functions
-1
View File
@@ -14,7 +14,6 @@ struct n64_stagesetup {
u32 ptr_padfiledata;
};
struct n64_coord {
f32 x;
f32 y;