Merge branch 'main' of https://github.com/abnormalhare/marioparty4
This commit is contained in:
commit
55a6a80ed1
15 changed files with 1947 additions and 130 deletions
42
include/REL/m421Dll.h
Normal file
42
include/REL/m421Dll.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#ifndef M421DLL_H
|
||||
#define M421DLL_H
|
||||
|
||||
#include "game/object.h"
|
||||
|
||||
typedef struct UnkM421DllStruct {
|
||||
float unk_00;
|
||||
float unk_04;
|
||||
float unk_08;
|
||||
float unk_0C;
|
||||
} UnkM421DllStruct;
|
||||
|
||||
typedef struct M421DllCameraStruct {
|
||||
s32 unk_00;
|
||||
s32 unk_04;
|
||||
s32 unk_08;
|
||||
u32 unk_0C;
|
||||
float unk_10;
|
||||
float unk_14;
|
||||
float unk_18;
|
||||
Vec unk_1C;
|
||||
Vec unk_28;
|
||||
float unk_34;
|
||||
s32 unk_38;
|
||||
s32 unk_3C;
|
||||
float unk_40;
|
||||
UnkM421DllStruct unk_44;
|
||||
char unk54[0x30];
|
||||
float unk_84;
|
||||
char unk88[0x4];
|
||||
float unk_8C;
|
||||
float unk_90;
|
||||
s32 unk_94;
|
||||
char unk98[0xC];
|
||||
} M421DllCameraStruct; /* size = 0xA4 */ // same as M443DllCameraStruct and M460
|
||||
|
||||
void fn_1_4648(Process *process);
|
||||
void fn_1_48B0(void);
|
||||
void fn_1_B15C(Process *process, omObjData *object);
|
||||
void fn_1_B1BC(void);
|
||||
|
||||
#endif
|
||||
|
|
@ -32,7 +32,7 @@ typedef struct M460DllCameraStruct {
|
|||
float unk_90;
|
||||
s32 unk_94;
|
||||
char unk98[0xC];
|
||||
} M460DllCameraStruct; /* size = 0xA4 */ // same as M443DllCameraStruct // TODO does this have to be here?
|
||||
} M460DllCameraStruct; /* size = 0xA4 */ // same as M443DllCameraStruct
|
||||
|
||||
void fn_1_3E68(u32 arg0);
|
||||
M460DllCameraStruct *fn_1_3E90(s32 arg0);
|
||||
|
|
|
|||
40
include/Runtime.PPCEABI.H/__va_arg.h
Normal file
40
include/Runtime.PPCEABI.H/__va_arg.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef __VA_ARG_H
|
||||
#define __VA_ARG_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
typedef struct __va_list_struct {
|
||||
char gpr;
|
||||
char fpr;
|
||||
char reserved[2];
|
||||
char* input_arg_area;
|
||||
char* reg_save_area;
|
||||
} _va_list_struct;
|
||||
|
||||
typedef _va_list_struct __va_list[1];
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" void* __va_arg(_va_list_struct*, int);
|
||||
#else
|
||||
void* __va_arg(_va_list_struct*, int);
|
||||
#endif
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#define __builtin_va_info(...)
|
||||
#define _var_arg_typeof(...)
|
||||
#endif
|
||||
|
||||
// from defined-string in mwcceppc.exe:
|
||||
// __builtin_va_info: initialize the __va_list_struct
|
||||
// _var_arg_typeof: convert type to integer for __va_arg
|
||||
#define __va_start(list, fmt) __builtin_va_info(&list)
|
||||
#define __va_arg(list, type) (*((type*)__va_arg(list, _var_arg_typeof(type))))
|
||||
#define va_start __va_start
|
||||
#define va_arg __va_arg
|
||||
#define va_end __va_end
|
||||
#define va_list __va_list
|
||||
#define __va_end(list) ((void)0)
|
||||
|
||||
#define __va_copy(a, b) (*(a) = *(b))
|
||||
|
||||
#endif /* __VA_ARG_H */
|
||||
90
include/dol2asm.h
Normal file
90
include/dol2asm.h
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
#ifndef DOL2ASM
|
||||
#define DOL2ASM
|
||||
|
||||
// this helps remove useless error from the linter when using vscode.
|
||||
#ifdef __MWERKS__
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define SECTION_INIT extern "C" __declspec(section ".init")
|
||||
#define SECTION_RODATA __declspec(section ".rodata")
|
||||
#define SECTION_DATA __declspec(section ".data")
|
||||
#define SECTION_SDATA __declspec(section ".sdata")
|
||||
#define SECTION_SDATA2 __declspec(section ".sdata2")
|
||||
#define SECTION_BSS __declspec(section ".data")
|
||||
#define SECTION_SBSS __declspec(section ".sdata")
|
||||
#define SECTION_SBSS2 __declspec(section ".sdata2")
|
||||
#define SECTION_CTORS extern "C" __declspec(section ".ctors")
|
||||
#define SECTION_DTORS extern "C" __declspec(section ".dtors")
|
||||
#define SECTION_EXTAB extern "C" __declspec(section "extab_")
|
||||
#define SECTION_EXTABINDEX extern "C" __declspec(section "extabindex_")
|
||||
#define SECTION_DEAD extern "C" __declspec(section ".dead")
|
||||
#define SECTION_CTORS10 __declspec(section ".ctors$10")
|
||||
#define SECTION_CTORS15 __declspec(section ".ctors$15")
|
||||
#define SECTION_DTORS10 __declspec(section ".dtors$10")
|
||||
#define SECTION_DTORS15 __declspec(section ".dtors$15")
|
||||
#define COMPILER_STRIP_GATE(NAME, VALUE) SECTION_DEAD void* const cg_##NAME = (void*)(VALUE)
|
||||
#define REGISTER_CTORS(ADDR, FUNCTION) SECTION_CTORS void* const _ctors_##ADDR = (void*)(FUNCTION);
|
||||
#else
|
||||
#define SECTION_INIT __declspec(section ".init")
|
||||
#define SECTION_RODATA __declspec(section ".rodata")
|
||||
#define SECTION_DATA __declspec(section ".data")
|
||||
#define SECTION_SDATA __declspec(section ".sdata")
|
||||
#define SECTION_SDATA2 __declspec(section ".sdata2")
|
||||
#define SECTION_BSS __declspec(section ".data")
|
||||
#define SECTION_SBSS __declspec(section ".sdata")
|
||||
#define SECTION_SBSS2 __declspec(section ".sdata2")
|
||||
#define SECTION_CTORS __declspec(section ".ctors")
|
||||
#define SECTION_DTORS __declspec(section ".dtors")
|
||||
#define SECTION_EXTAB __declspec(section "extab_")
|
||||
#define SECTION_EXTABINDEX __declspec(section "extabindex_")
|
||||
#define SECTION_DEAD __declspec(section ".dead")
|
||||
#define SECTION_CTORS10 __declspec(section ".ctors$10")
|
||||
#define SECTION_CTORS15 __declspec(section ".ctors$15")
|
||||
#define SECTION_DTORS10 __declspec(section ".dtors$10")
|
||||
#define SECTION_DTORS15 __declspec(section ".dtors$15")
|
||||
#define COMPILER_STRIP_GATE(NAME, VALUE) SECTION_DEAD void* const cg_##NAME = (void*)(VALUE)
|
||||
#define REGISTER_CTORS(ADDR, FUNCTION) SECTION_CTORS void* const _ctors_##ADDR = (void*)(FUNCTION);
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define SECTION_INIT
|
||||
#define SECTION_RODATA
|
||||
#define SECTION_DATA
|
||||
#define SECTION_SDATA
|
||||
#define SECTION_SDATA2
|
||||
#define SECTION_BSS
|
||||
#define SECTION_SBSS
|
||||
#define SECTION_SBSS2
|
||||
#define SECTION_CTORS
|
||||
#define SECTION_DTORS
|
||||
#define SECTION_EXTAB
|
||||
#define SECTION_EXTABINDEX
|
||||
#define SECTION_DEAD
|
||||
#define SECTION_CTORS10
|
||||
#define SECTION_CTORS15
|
||||
#define SECTION_DTORS10
|
||||
#define SECTION_DTORS15
|
||||
#define COMPILER_STRIP_GATE(...)
|
||||
#define REGISTER_CTORS(...)
|
||||
|
||||
// vscode doesn't like asm and nofralloc very much
|
||||
#define asm
|
||||
#define nofralloc
|
||||
#endif
|
||||
|
||||
// floating-point constants
|
||||
// TODO: move to different header
|
||||
#define _HUGE_ENUF 1e+300
|
||||
#define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))
|
||||
#define HUGE_VAL ((double)INFINITY)
|
||||
#define HUGE_VALL ((long double)INFINITY)
|
||||
|
||||
#define DOUBLE_INF HUGE_VAL
|
||||
|
||||
#pragma section ".dead"
|
||||
#pragma section ".ctors$10"
|
||||
#pragma section ".ctors$15"
|
||||
#pragma section ".dtors$10"
|
||||
#pragma section ".dtors$15"
|
||||
|
||||
#endif /* DOL2ASM */
|
||||
|
|
@ -57,8 +57,14 @@ u32 OSUncachedToCached(void *ucaddr);
|
|||
|
||||
#define OSDiffTick(tick1, tick0) ((s32)(tick1) - (s32)(tick0))
|
||||
|
||||
#define OSRoundUp32B(v) (((u32)(v + 31) & ~31))
|
||||
#define OSRoundDown32B(x) (((u32)(x)) & ~31)
|
||||
#define OSRoundUp32B(x) (((u32)(x) + 0x1F) & ~(0x1F))
|
||||
#define OSRoundDown32B(x) (((u32)(x)) & ~(0x1F))
|
||||
|
||||
#define OSRoundUp(x, align) (((x) + (align)-1) & (-(align)))
|
||||
#define OSRoundUpPtr(x, align) ((void*)((((u32)(x)) + (align)-1) & (~((align)-1))))
|
||||
|
||||
#define OSRoundDown(x, align) ((x) & (-(align)))
|
||||
#define OSRoundDownPtr(x, align) ((void*)(((u32)(x)) & (~((align)-1))))
|
||||
|
||||
void OSInit();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue