2023-11-12 20:47:38 +01:00
|
|
|
#ifndef __PATCHES_H__
|
|
|
|
#define __PATCHES_H__
|
|
|
|
|
2024-01-13 07:39:08 +01:00
|
|
|
// TODO fix renaming symbols in patch recompilation
|
2024-03-21 07:46:08 +01:00
|
|
|
#define osCreateMesgQueue osCreateMesgQueue_recomp
|
2024-01-13 07:39:08 +01:00
|
|
|
#define osRecvMesg osRecvMesg_recomp
|
|
|
|
#define osSendMesg osSendMesg_recomp
|
2024-03-11 05:13:32 +01:00
|
|
|
#define sinf __sinf_recomp
|
|
|
|
#define cosf __cosf_recomp
|
2024-03-12 23:01:58 +01:00
|
|
|
#define gRandFloat sRandFloat
|
2023-11-12 20:47:38 +01:00
|
|
|
#include "global.h"
|
2023-12-01 16:56:20 +01:00
|
|
|
#include "rt64_extended_gbi.h"
|
2023-11-12 20:47:38 +01:00
|
|
|
|
2024-03-02 19:33:09 +01:00
|
|
|
#define gEXMatrixGroupInterpolateOnlyTiles(cmd, push, proj) \
|
|
|
|
gEXMatrixGroup(cmd, G_EX_ID_IGNORE, G_EX_INTERPOLATE_SIMPLE, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR)
|
|
|
|
|
|
|
|
|
2023-11-24 23:10:21 +01:00
|
|
|
int recomp_printf(const char* fmt, ...);
|
2024-03-03 08:36:14 +01:00
|
|
|
float recomp_powf(float, float);
|
2023-11-24 23:10:21 +01:00
|
|
|
|
2024-02-24 22:14:48 +01:00
|
|
|
static inline void* actor_relocate(Actor* actor, void* addr) {
|
|
|
|
return (void*)((uintptr_t)addr -
|
|
|
|
(intptr_t)((uintptr_t)actor->overlayEntry->vramStart - (uintptr_t)actor->overlayEntry->loadedRamAddr));
|
|
|
|
}
|
|
|
|
|
2024-03-05 08:55:05 +01:00
|
|
|
typedef enum {
|
|
|
|
/* 0 */ PICTO_BOX_STATE_OFF, // Not using the pictograph
|
|
|
|
/* 1 */ PICTO_BOX_STATE_LENS, // Looking through the lens of the pictograph
|
|
|
|
/* 2 */ PICTO_BOX_STATE_SETUP_PHOTO, // Looking at the photo currently taken
|
|
|
|
/* 3 */ PICTO_BOX_STATE_PHOTO
|
|
|
|
} PictoBoxState;
|
|
|
|
|
|
|
|
|
|
|
|
#define INCBIN(identifier, filename) \
|
|
|
|
asm(".pushsection .rodata\n" \
|
|
|
|
"\t.local " #identifier "\n" \
|
|
|
|
"\t.type " #identifier ", @object\n" \
|
|
|
|
"\t.balign 8\n" \
|
|
|
|
#identifier ":\n" \
|
|
|
|
"\t.incbin \"" filename "\"\n\n" \
|
|
|
|
\
|
|
|
|
"\t.balign 8\n" \
|
|
|
|
"\t.popsection\n"); \
|
|
|
|
extern u8 identifier[]
|
|
|
|
|
|
|
|
void draw_dpad(PlayState* play);
|
|
|
|
void draw_dpad_icons(PlayState* play);
|
|
|
|
|
2024-03-12 23:01:58 +01:00
|
|
|
void View_ApplyInterpolate(View* view, s32 mask, bool reset_interpolation_state);
|
|
|
|
|
2024-03-27 23:47:15 +01:00
|
|
|
void set_camera_skipped(bool skipped);
|
|
|
|
void clear_camera_skipped();
|
|
|
|
bool camera_was_skipped();
|
|
|
|
|
|
|
|
void recomp_crash(const char* err);
|
|
|
|
|
2023-11-12 20:47:38 +01:00
|
|
|
#endif
|