From 84394461f76af61d014da4e70a5ebc3dd676b4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo?= Date: Sun, 21 Dec 2025 00:02:05 -0300 Subject: [PATCH] Add tag for Clanker. (#17) * Add tag for Clanker. * Add transform ID to header. --- patches/clanker_patches.c | 16 ++++++++++++++++ patches/transform_ids.h | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 patches/clanker_patches.c diff --git a/patches/clanker_patches.c b/patches/clanker_patches.c new file mode 100644 index 0000000..07ca81f --- /dev/null +++ b/patches/clanker_patches.c @@ -0,0 +1,16 @@ +#include "patches.h" +#include "transform_ids.h" + +extern void CC_func_80388760(Gfx **gfx, Mtx **mtx, Vtx **vtx); + +// @recomp: Patched to assign an ID to Clanker. +RECOMP_PATCH void __overlay_cc_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) { + // @recomp Set the current transform ID to Clanker. + u32 prev_transform_id = cur_drawn_model_transform_id; + cur_drawn_model_transform_id = CLANKER_TRANSFORM_ID_START; + + CC_func_80388760(gfx, mtx, vtx); + + // @recomp Reset the current transform ID. + cur_drawn_model_transform_id = prev_transform_id; +} \ No newline at end of file diff --git a/patches/transform_ids.h b/patches/transform_ids.h index 1eeef21..2177be7 100644 --- a/patches/transform_ids.h +++ b/patches/transform_ids.h @@ -51,6 +51,9 @@ // Snow: 0x00F41000 - 0x00F410FF #define SNOW_TRANSFORM_ID_START 0x00F41000 +// Snow: 0x00F42000 - 0x00F420FF +#define CLANKER_TRANSFORM_ID_START 0x00F42000 + // Normal Particles: 0x01000000 - 0x01FFFFFF #define NORMAL_PARTICLE_TRANSFORM_ID_START 0x01000000 #define NORMAL_PARTICLE_ID_MAX 0x01000000