m_shop: hack to fakematch mSP_SelectRandomItemToAGB()

This commit is contained in:
Cuyler36
2025-06-13 22:58:23 -04:00
parent c7de50a584
commit ea36b2db24
2 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -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"),
+6 -3
View File
@@ -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";