From 836adb83ea1ea20fa8f53f83ee5cda304b94ab29 Mon Sep 17 00:00:00 2001 From: fig02 Date: Tue, 7 Nov 2023 14:11:59 -0500 Subject: [PATCH] Rename "ITEM_LAST_USED" (#1572) * rename * format * remove formatter changes * change model group comments --- include/z64item.h | 2 +- include/z64player.h | 10 +- src/code/z_player_lib.c | 150 +++++++++--------- .../actors/ovl_En_Torch2/z_en_torch2.c | 2 +- .../actors/ovl_player_actor/z_player.c | 16 +- tools/disasm_elf_msg.py | 2 +- 6 files changed, 91 insertions(+), 91 deletions(-) diff --git a/include/z64item.h b/include/z64item.h index cc083f1cb0..ba5f11e2f3 100644 --- a/include/z64item.h +++ b/include/z64item.h @@ -307,7 +307,7 @@ typedef enum { /* 0x99 */ ITEM_DEKU_STICK_UPGRADE_30, /* 0x9A */ ITEM_DEKU_NUT_UPGRADE_30, /* 0x9B */ ITEM_DEKU_NUT_UPGRADE_40, - /* 0xFC */ ITEM_LAST_USED = 0xFC, + /* 0xFC */ ITEM_SWORD_CS = 0xFC, /* 0xFE */ ITEM_NONE_FE = 0xFE, /* 0xFF */ ITEM_NONE = 0xFF } ItemID; diff --git a/include/z64player.h b/include/z64player.h index f5da3c88a6..861f90081f 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -71,7 +71,7 @@ typedef enum { typedef enum { /* 0x00 */ PLAYER_IA_NONE, - /* 0x01 */ PLAYER_IA_LAST_USED, + /* 0x01 */ PLAYER_IA_SWORD_CS, // Hold sword without shield in hand. The sword is not useable. /* 0x02 */ PLAYER_IA_FISHING_POLE, /* 0x03 */ PLAYER_IA_SWORD_MASTER, /* 0x04 */ PLAYER_IA_SWORD_KOKIRI, @@ -229,9 +229,9 @@ typedef enum { } PlayerDoorType; typedef enum { - /* 0x00 */ PLAYER_MODELGROUP_0, // unused (except with the `func_80091880` bug) - /* 0x01 */ PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD, // kokiri/master sword, shield not in hand - /* 0x02 */ PLAYER_MODELGROUP_SWORD, // kokiri/master sword and possibly shield + /* 0x00 */ PLAYER_MODELGROUP_0, // unused (except for a bug in `Player_OverrideLimbDrawPause`) + /* 0x01 */ PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD, //hold sword only. used for holding sword only as child link with hylian shield equipped + /* 0x02 */ PLAYER_MODELGROUP_SWORD_AND_SHIELD, // hold sword and shield or just sword if no shield is equipped /* 0x03 */ PLAYER_MODELGROUP_DEFAULT, // non-specific models, for items that don't have particular link models /* 0x04 */ PLAYER_MODELGROUP_4, // unused, same as PLAYER_MODELGROUP_DEFAULT /* 0x05 */ PLAYER_MODELGROUP_BGS, // biggoron sword @@ -244,7 +244,7 @@ typedef enum { /* 0x0C */ PLAYER_MODELGROUP_OCARINA, // ocarina /* 0x0D */ PLAYER_MODELGROUP_OOT, // ocarina of time /* 0x0E */ PLAYER_MODELGROUP_BOTTLE, // bottles (drawn separately) - /* 0x0F */ PLAYER_MODELGROUP_15, // "last used" + /* 0x0F */ PLAYER_MODELGROUP_SWORD, // hold sword and no shield, even if one is equipped /* 0x10 */ PLAYER_MODELGROUP_MAX } PlayerModelGroup; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 5426a780a9..baea71b966 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -21,73 +21,73 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = { // Used to map item actions to model groups u8 sActionModelGroups[PLAYER_IA_MAX] = { - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NONE - PLAYER_MODELGROUP_15, // PLAYER_IA_LAST_USED - PLAYER_MODELGROUP_10, // PLAYER_IA_FISHING_POLE - PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_MASTER - PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_KOKIRI - PLAYER_MODELGROUP_BGS, // PLAYER_IA_SWORD_BIGGORON - PLAYER_MODELGROUP_10, // PLAYER_IA_DEKU_STICK - PLAYER_MODELGROUP_HAMMER, // PLAYER_IA_HAMMER - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_FIRE - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_ICE - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_LIGHT - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0C - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0D - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0E - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_SLINGSHOT - PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_HOOKSHOT - PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_LONGSHOT - PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMB - PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMBCHU - PLAYER_MODELGROUP_BOOMERANG, // PLAYER_IA_BOOMERANG - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_15 - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_16 - PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_MAGIC_SPELL_17 - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FARORES_WIND - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NAYRUS_LOVE - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DINS_FIRE - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DEKU_NUT - PLAYER_MODELGROUP_OCARINA, // PLAYER_IA_OCARINA_FAIRY - PLAYER_MODELGROUP_OOT, // PLAYER_IA_OCARINA_OF_TIME - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FISH - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FIRE - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BUG - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POE - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BIG_POE - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_RUTOS_LETTER - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_RED - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_BLUE - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_GREEN - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_FULL - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_HALF - PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FAIRY - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ZELDAS_LETTER - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_WEIRD_EGG - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CHICKEN - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_BEAN - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_EGG - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_CUCCO - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_COJIRO - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_MUSHROOM - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_POTION - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POACHERS_SAW - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BROKEN_GORONS_SWORD - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_PRESCRIPTION - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FROG - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_EYEDROPS - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CLAIM_CHECK - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_KEATON - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SKULL - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SPOOKY - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_BUNNY_HOOD - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GORON - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_ZORA - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GERUDO - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_TRUTH - PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_LENS_OF_TRUTH + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NONE + PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_CS + PLAYER_MODELGROUP_10, // PLAYER_IA_FISHING_POLE + PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_IA_SWORD_MASTER + PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_IA_SWORD_KOKIRI + PLAYER_MODELGROUP_BGS, // PLAYER_IA_SWORD_BIGGORON + PLAYER_MODELGROUP_10, // PLAYER_IA_DEKU_STICK + PLAYER_MODELGROUP_HAMMER, // PLAYER_IA_HAMMER + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_FIRE + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_ICE + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_LIGHT + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0C + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0D + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0E + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_SLINGSHOT + PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_HOOKSHOT + PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_LONGSHOT + PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMB + PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMBCHU + PLAYER_MODELGROUP_BOOMERANG, // PLAYER_IA_BOOMERANG + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_15 + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_16 + PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_MAGIC_SPELL_17 + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FARORES_WIND + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NAYRUS_LOVE + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DINS_FIRE + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DEKU_NUT + PLAYER_MODELGROUP_OCARINA, // PLAYER_IA_OCARINA_FAIRY + PLAYER_MODELGROUP_OOT, // PLAYER_IA_OCARINA_OF_TIME + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FISH + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FIRE + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BUG + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POE + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BIG_POE + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_RUTOS_LETTER + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_RED + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_BLUE + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_GREEN + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_FULL + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_HALF + PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FAIRY + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ZELDAS_LETTER + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_WEIRD_EGG + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CHICKEN + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_BEAN + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_EGG + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_CUCCO + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_COJIRO + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_MUSHROOM + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_POTION + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POACHERS_SAW + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BROKEN_GORONS_SWORD + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_PRESCRIPTION + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FROG + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_EYEDROPS + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CLAIM_CHECK + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_KEATON + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SKULL + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SPOOKY + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_BUNNY_HOOD + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GORON + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_ZORA + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GERUDO + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_TRUTH + PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_LENS_OF_TRUTH }; typedef struct { @@ -110,7 +110,7 @@ u8 gPlayerModelTypes[PLAYER_MODELGROUP_MAX][PLAYER_MODELGROUPENTRY_MAX] = { /* PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD */ { PLAYER_ANIMTYPE_1, PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_RH_CLOSED, PLAYER_MODELTYPE_SHEATH_19, PLAYER_MODELTYPE_WAIST }, - /* PLAYER_MODELGROUP_SWORD */ + /* PLAYER_MODELGROUP_SWORD_AND_SHIELD */ { PLAYER_ANIMTYPE_1, PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_RH_SHIELD, PLAYER_MODELTYPE_SHEATH_17, PLAYER_MODELTYPE_WAIST }, /* PLAYER_MODELGROUP_DEFAULT */ @@ -149,7 +149,7 @@ u8 gPlayerModelTypes[PLAYER_MODELGROUP_MAX][PLAYER_MODELGROUPENTRY_MAX] = { /* PLAYER_MODELGROUP_BOTTLE */ { PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_BOTTLE, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_18, PLAYER_MODELTYPE_WAIST }, - /* PLAYER_MODELGROUP_15 */ + /* PLAYER_MODELGROUP_SWORD */ { PLAYER_ANIMTYPE_0, PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_RH_OPEN, PLAYER_MODELTYPE_SHEATH_19, PLAYER_MODELTYPE_WAIST }, }; @@ -511,7 +511,7 @@ int Player_IsChildWithHylianShield(Player* this) { s32 Player_ActionToModelGroup(Player* this, s32 itemAction) { s32 modelGroup = sActionModelGroups[itemAction]; - if ((modelGroup == PLAYER_MODELGROUP_SWORD) && Player_IsChildWithHylianShield(this)) { + if ((modelGroup == PLAYER_MODELGROUP_SWORD_AND_SHIELD) && Player_IsChildWithHylianShield(this)) { // child, using kokiri sword with hylian shield equipped return PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD; } else { @@ -767,7 +767,7 @@ s32 Player_GetExplosiveHeld(Player* this) { s32 func_8008F2BC(Player* this, s32 itemAction) { s32 sword = 0; - if (itemAction != PLAYER_IA_LAST_USED) { + if (itemAction != PLAYER_IA_SWORD_CS) { sword = itemAction - PLAYER_IA_SWORD_MASTER; if ((sword < 0) || (sword >= 3)) { goto return_neg; @@ -1668,9 +1668,9 @@ u32 Player_InitPauseDrawData(PlayState* play, u8* segment, SkelAnime* skelAnime) } u8 sPauseModelGroupBySword[] = { - PLAYER_MODELGROUP_SWORD, // PLAYER_SWORD_KOKIRI - PLAYER_MODELGROUP_SWORD, // PLAYER_SWORD_MASTER - PLAYER_MODELGROUP_BGS, // PLAYER_SWORD_BIGGORON + PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_SWORD_KOKIRI + PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_SWORD_MASTER + PLAYER_MODELGROUP_BGS, // PLAYER_SWORD_BIGGORON }; s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* arg) { @@ -1682,7 +1682,7 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve s32 dListOffset = 0; Gfx** dLists; - if ((modelGroup == PLAYER_MODELGROUP_SWORD) && !LINK_IS_ADULT && + if ((modelGroup == PLAYER_MODELGROUP_SWORD_AND_SHIELD) && !LINK_IS_ADULT && (playerSwordAndShield[1] == PLAYER_SHIELD_HYLIAN)) { modelGroup = PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD; } diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 60c6aa8208..a5f86c6361 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -97,7 +97,7 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) { sInput.cur.stick_x = sInput.cur.stick_y = 0; this->currentShield = PLAYER_SHIELD_HYLIAN; this->heldItemAction = this->heldItemId = PLAYER_IA_SWORD_MASTER; - Player_SetModelGroup(this, PLAYER_MODELGROUP_SWORD); + Player_SetModelGroup(this, PLAYER_MODELGROUP_SWORD_AND_SHIELD); play->playerInit(this, play, &gDarkLinkSkel); this->actor.naviEnemyId = NAVI_ENEMY_DARK_LINK; this->cylinder.base.acFlags = AC_ON | AC_TYPE_PLAYER; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 08e8d82c0f..5c9ce6a2c4 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -1245,7 +1245,7 @@ static s8 sItemActions[] = { static s32 (*sItemActionUpdateFuncs[])(Player* this, PlayState* play) = { func_8083485C, // PLAYER_IA_NONE - func_8083485C, // PLAYER_IA_LAST_USED + func_8083485C, // PLAYER_IA_SWORD_CS func_8083485C, // PLAYER_IA_FISHING_POLE func_808349DC, // PLAYER_IA_SWORD_MASTER func_808349DC, // PLAYER_IA_SWORD_KOKIRI @@ -1315,7 +1315,7 @@ static s32 (*sItemActionUpdateFuncs[])(Player* this, PlayState* play) = { static void (*sItemActionInitFuncs[])(PlayState* play, Player* this) = { func_80833770, // PLAYER_IA_NONE - func_80833770, // PLAYER_IA_LAST_USED + func_80833770, // PLAYER_IA_SWORD_CS func_80833770, // PLAYER_IA_FISHING_POLE func_80833770, // PLAYER_IA_SWORD_MASTER func_80833770, // PLAYER_IA_SWORD_KOKIRI @@ -2167,8 +2167,8 @@ void Player_InitItemActionWithAnim(PlayState* play, Player* this, s8 itemAction) s8 Player_ItemToItemAction(s32 item) { if (item >= ITEM_NONE_FE) { return PLAYER_IA_NONE; - } else if (item == ITEM_LAST_USED) { - return PLAYER_IA_LAST_USED; + } else if (item == ITEM_SWORD_CS) { + return PLAYER_IA_SWORD_CS; } else if (item == ITEM_FISHING_POLE) { return PLAYER_IA_FISHING_POLE; } else { @@ -3344,7 +3344,7 @@ void func_80836448(PlayState* play, Player* this, LinkAnimationHeader* anim) { int Player_CanUpdateItems(Player* this) { return (!(Player_Action_808458D0 == this->actionFunc) || ((this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) && - ((this->heldItemId == ITEM_LAST_USED) || (this->heldItemId == ITEM_NONE)))) && + ((this->heldItemId == ITEM_SWORD_CS) || (this->heldItemId == ITEM_NONE)))) && (!(Player_UpperAction_ChangeHeldItem == this->upperActionFunc) || (Player_ItemToItemAction(this->heldItemId) == this->heldItemAction)); } @@ -6789,10 +6789,10 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) { func_80836898(play, this, func_8083A0F4); if (sp24 == PLAYER_IA_SWORD_MASTER) { - this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_IA_LAST_USED); - Player_InitItemAction(play, this, PLAYER_IA_LAST_USED); + this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_IA_SWORD_CS); + Player_InitItemAction(play, this, PLAYER_IA_SWORD_CS); } else { - Player_UseItem(play, this, ITEM_LAST_USED); + Player_UseItem(play, this, ITEM_SWORD_CS); } } else { s32 strength = Player_GetStrength(); diff --git a/tools/disasm_elf_msg.py b/tools/disasm_elf_msg.py index 9030cd2651..97297f7017 100644 --- a/tools/disasm_elf_msg.py +++ b/tools/disasm_elf_msg.py @@ -159,7 +159,7 @@ item_ids = { 0x99 : "ITEM_DEKU_STICK_UPGRADE_30", 0x9A : "ITEM_DEKU_NUT_UPGRADE_30", 0x9B : "ITEM_DEKU_NUT_UPGRADE_40", - 0xFC : "ITEM_LAST_USED", + 0xFC : "ITEM_SWORD_CS", 0xFE : "ITEM_NONE_FE", 0xFF : "ITEM_NONE", }