From c4df6a577121f3bc0c8c63a4194a55a107def255 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Tue, 25 Nov 2025 01:28:20 +0200 Subject: [PATCH] d_a_grass Matching (#2858) --- config/GZ2J01/rels/d_a_grass/symbols.txt | 18 +++++++++--------- configure.py | 2 +- src/d/actor/d_a_grass.cpp | 7 ++----- tools/converters/matDL_dis.py | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/config/GZ2J01/rels/d_a_grass/symbols.txt b/config/GZ2J01/rels/d_a_grass/symbols.txt index 598ce5af48e..e2f1093038a 100644 --- a/config/GZ2J01/rels/d_a_grass/symbols.txt +++ b/config/GZ2J01/rels/d_a_grass/symbols.txt @@ -177,31 +177,31 @@ l_normal = .data:0x000013E0; // type:object size:0xC scope:global l_color = .data:0x000013EC; // type:object size:0x14 scope:global l_texCoord = .data:0x00001400; // type:object size:0xA0 scope:global l_M_Kusa_9qDL = .data:0x000014A0; // type:object size:0xCB scope:global -l_M_Kusa_9q_cDL = .data:0x00001580; // type:object size:0xCB scope:global -l_M_TenGusaDL = .data:0x00001660; // type:object size:0xD4 scope:global +l_M_Kusa_9q_cDL = .data:0x00001580; // type:object size:0xCB scope:global align:32 +l_M_TenGusaDL = .data:0x00001660; // type:object size:0xD4 scope:global align:32 l_Tengusa_matDL = .data:0x00001740; // type:object size:0xA8 scope:global l_kusa9q_matDL = .data:0x00001800; // type:object size:0xA8 scope:global l_kusa9q_l4_matDL = .data:0x000018C0; // type:object size:0xA8 scope:global @4620 = .data:0x00001968; // type:object size:0xC scope:local l_vtxDescList$4654 = .data:0x00001974; // type:object size:0x28 scope:local l_vtxAttrFmtList$4655 = .data:0x0000199C; // type:object size:0x50 scope:local -l_J_Ohana00_64TEX = .data:0x00001A00; // type:object size:0x800 scope:global +l_J_Ohana00_64TEX = .data:0x00001A00; // type:object size:0x800 scope:global align:32 l_flowerPos = .data:0x00002200; // type:object size:0x2C4 scope:global l_flowerNormal = .data:0x000024C4; // type:object size:0xB4 scope:global l_flowerColor = .data:0x00002578; // type:object size:0x8 scope:global l_flowerTexCoord = .data:0x00002580; // type:object size:0x138 scope:global -l_J_hana00DL = .data:0x000026C0; // type:object size:0x150 scope:global -l_J_hana00_cDL = .data:0x00002820; // type:object size:0xDE scope:global +l_J_hana00DL = .data:0x000026C0; // type:object size:0x150 scope:global align:32 +l_J_hana00_cDL = .data:0x00002820; // type:object size:0xDE scope:global align:32 l_matDL = .data:0x00002900; // type:object size:0x99 scope:global l_matLight4DL = .data:0x000029A0; // type:object size:0x99 scope:global -l_J_Ohana01_64128_0419TEX = .data:0x00002A40; // type:object size:0x1000 scope:global +l_J_Ohana01_64128_0419TEX = .data:0x00002A40; // type:object size:0x1000 scope:global align:32 l_flowerPos2 = .data:0x00003A40; // type:object size:0x4C8 scope:global l_flowerNormal2 = .data:0x00003F08; // type:object size:0x120 scope:global l_flowerColor2 = .data:0x00004028; // type:object size:0x8 scope:global l_flowerTexCoord2 = .data:0x00004030; // type:object size:0x120 scope:global -l_J_hana01DL = .data:0x00004160; // type:object size:0x138 scope:global -l_J_hana01_c_00DL = .data:0x000042A0; // type:object size:0xDE scope:global -l_J_hana01_c_01DL = .data:0x00004380; // type:object size:0x128 scope:global +l_J_hana01DL = .data:0x00004160; // type:object size:0x138 scope:global align:32 +l_J_hana01_c_00DL = .data:0x000042A0; // type:object size:0xDE scope:global align:32 +l_J_hana01_c_01DL = .data:0x00004380; // type:object size:0x128 scope:global align:32 l_mat2DL = .data:0x000044C0; // type:object size:0x99 scope:global l_mat2Light4DL = .data:0x00004560; // type:object size:0x99 scope:global @5875 = .data:0x000045FC; // type:object size:0xC scope:local data:4byte diff --git a/configure.py b/configure.py index f0cfe240057..66ad71a1335 100755 --- a/configure.py +++ b/configure.py @@ -1644,7 +1644,7 @@ config.libs = [ ActorRel(MatchingFor(ALL_GCN), "d_a_e_rd"), ActorRel(MatchingFor(ALL_GCN), "d_a_econt"), ActorRel(MatchingFor(ALL_GCN), "d_a_fr"), - ActorRel(Equivalent, "d_a_grass"), # __sinit regalloc + ActorRel(MatchingFor(ALL_GCN), "d_a_grass"), ActorRel(MatchingFor(ALL_GCN, "Shield"), "d_a_kytag05"), ActorRel(MatchingFor(ALL_GCN), "d_a_kytag10"), ActorRel(MatchingFor(ALL_GCN), "d_a_kytag11"), diff --git a/src/d/actor/d_a_grass.cpp b/src/d/actor/d_a_grass.cpp index 1a860135a1a..24ce3d15abc 100644 --- a/src/d/actor/d_a_grass.cpp +++ b/src/d/actor/d_a_grass.cpp @@ -385,15 +385,12 @@ static int daGrass_Delete(daGrass_c* i_this) { } int daGrass_c::execute() { - // fake match, inlines save to register instead of reloading - // dComIfG_Ccsp()->PrepareMass(); - g_dComIfG_gameInfo.play.mCcs.mMass_Mng.Prepare(); + dComIfG_Ccsp()->PrepareMass(); executeGrass(); executeFlower(); - // dComIfG_Ccsp()->MassClear(); - g_dComIfG_gameInfo.play.mCcs.MassClear(); + dComIfG_Ccsp()->MassClear(); return 1; } diff --git a/tools/converters/matDL_dis.py b/tools/converters/matDL_dis.py index 56ed3f3f4da..6bdea71b484 100755 --- a/tools/converters/matDL_dis.py +++ b/tools/converters/matDL_dis.py @@ -330,7 +330,7 @@ def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name, scope): with open(src_path, "rb") as binary_file, open(dest_path, "w") as c_file: c_file.write("#ifndef LOAD_BP_REG\n") c_file.write("#define U32_AS_U8(v) ((u8)((v) >> 24)), ((u8)((v) >> 16)), ((u8)((v) >> 8)), ((u8)((v) >> 0))\n") - c_file.write("#define U24_AS_U8(v) ((u8)((v) >> 16)), ((u8)((v) >> 8)), ((u8)((v) >> 0))\n") + c_file.write("#define U24_AS_U8(v) (((v) >> 16) & 0xff), (((v) >> 8)& 0xff), (((v) >> 0) & 0xff)\n") c_file.write("#define U16_AS_U8(v) ((u8)((v) >> 8)), ((u8)((v) >> 0))\n") c_file.write("#define IMAGE_ADDR(addr) (u32)(addr) >> 5\n") c_file.write("#define LOAD_BP_REG(reg, value) GX_CMD_LOAD_BP_REG, reg, U24_AS_U8(value)\n")