add test mod folder

DecalHUD_DrawPolyGT4 is currently inaccurate for some strange reason
This commit is contained in:
Superstarxalien 2023-04-09 17:12:20 -04:00
parent 323106a28e
commit 90f3626e58
4 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1 @@
python ../../../../../tools/mod-builder/main.py

View File

@ -0,0 +1,12 @@
// Include anti-anti-piracy patches for PAL and NTSC-J
1006, exe, 0x80012534, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1111, exe, 0x80012570, 0x0, ../../Patches/JpnModchips/src/jpnModchips.s
1020, exe, 0x80031cc8, 0x0, ../../Patches/EurLibcrypt/src/libcrypt.s
// Compile the code in the empty space in RDATA
common, exe, rdata_free, 0x0, src/hello.c ../../../decompile/General/DecalHUD/DecalHUD_DrawPolyGT4.c ../../Tutorials/NumbersToString/src/main.c
// Compile the ASM injection that will load our code
// ASM injections for loading modded functions are typically done at the "jr ra" or "return" instruction of a function, which is 8 bytes away from the start of the function that follows it
// Hooked at the end of BOTS_UpdateGlobals, which will make the code run every frame at all times, excluding the loading screen
common, exe, BOTS_SetRotation, -0x8, src/hook.s

View File

@ -0,0 +1,22 @@
#include <common.h>
void DECOMP_DecalHUD_DrawPolyGT4(struct Icon* icon, short posX, short posY, struct PrimMem* primMem, u_long* ot, u_int color0, u_int color1, u_int color2, u_int color3, char transparency, int scale);
int Hello_Main2()
{
if (!(sdata->gGT->gameMode1 & LOADING))
{
DecalHUD_DrawPolyGT4
(
sdata->gGT->ptrIcons[1],
-10, 6,
&sdata->gGT->backBuffer->primMem,
sdata->gGT->tileView_UI.ptrOT,
data.ptrColor[COCO_MAGENTA][0],
data.ptrColor[GRAY][1],
data.ptrColor[GRAY][2],
data.ptrColor[GRAY][3],
3, 0x1000
);
}
}

View File

@ -0,0 +1,2 @@
.set noreorder
j Hello_Main2