From ea36b2db2466462ee8d3cf8c46a5de54a2e36d22 Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Fri, 13 Jun 2025 22:58:23 -0400 Subject: [PATCH] m_shop: hack to fakematch mSP_SelectRandomItemToAGB() --- configure.py | 2 +- src/game/m_shop.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configure.py b/configure.py index e83119b6..b0d71d5c 100644 --- a/configure.py +++ b/configure.py @@ -1485,7 +1485,7 @@ config.libs = [ Object(Matching, "game/m_scene_ftr.c"), Object(Matching, "game/m_scene_table.c"), Object(Matching, "game/m_select.c"), - Object(Equivalent, "game/m_shop.c"), + Object(Matching, "game/m_shop.c"), Object(Matching, "game/m_skin_matrix.c"), Object(Matching, "game/m_snowman.c"), Object(Matching, "game/m_soncho.c"), diff --git a/src/game/m_shop.c b/src/game/m_shop.c index d21e016e..43030585 100644 --- a/src/game/m_shop.c +++ b/src/game/m_shop.c @@ -2367,7 +2367,9 @@ static void mSP_SelectRandomItemToAGB_Unit(mActor_name_t* item, xyz_t* wpos, int } } -/* @nonmatching - minor float load/store issue with xyz_t.z & weird scheduling issue */ +// @fakematch +// @HACK - we shouldn't have to force propagation off, nor access the Save_t* struct directly +#pragma opt_propagation off extern void mSP_SelectRandomItemToAGB() { int i; int ut_x; @@ -2398,7 +2400,6 @@ extern void mSP_SelectRandomItemToAGB() { wpos.x = tpos.x; for (ut_x = 0; ut_x < UT_X_NUM; ut_x++) { - // this matches instructions but out of order and wrong registers mSP_SelectRandomItemToAGB_Unit(item_p, &wpos, ut_x, ut_z); wpos.x += mFI_UT_WORLDSIZE_X_F; item_p++; @@ -2409,8 +2410,8 @@ extern void mSP_SelectRandomItemToAGB() { } /* add correctly placed signboard actor */ - save = Common_GetPointer(save.save); for (i = 0; i < mISL_FG_BLOCK_X_NUM; i++) { + save = Common_GetPointer(save.save); start_p = &save->island.fgblock[0][i].items[0][0]; item_p = &save->island.fgblock[0][i].items[0][0]; @@ -2442,7 +2443,9 @@ extern void mSP_SelectRandomItemToAGB() { } } } + wpos.z = wpos.z; } +#pragma opt_propagation reset extern const char* mSP_ShopStatus2String(int status) { static char dummy[] = "hahaha";