diff options
| author | Tal Hayon <talhayon1@gmail.com> | 2022-02-18 18:18:40 +0200 |
|---|---|---|
| committer | Tal Hayon <talhayon1@gmail.com> | 2022-02-18 18:18:40 +0200 |
| commit | 0e224cf2323a76539730ee35f4e8a0856cf7a1fd (patch) | |
| tree | 4153b4359e569ce555626b85c63a0533d26eb348 /src/item | |
| parent | 10f8096abd9533e14a5ad03eedcbee4fcbb9019a (diff) | |
Add playeritem enum and use ids and kinds in all Findentity calls
Diffstat (limited to 'src/item')
| -rw-r--r-- | src/item/itemBomb.c | 4 | ||||
| -rw-r--r-- | src/item/itemSword.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/item/itemBomb.c b/src/item/itemBomb.c index 4cba1598..4154e1f6 100644 --- a/src/item/itemBomb.c +++ b/src/item/itemBomb.c @@ -2,6 +2,7 @@ #include "coord.h" #include "sound.h" #include "functions.h" +#include "playeritem.h" extern void (*const gUnk_0811BD98[])(ItemBehavior*, u32); @@ -23,7 +24,8 @@ void sub_08075FF8(ItemBehavior* this, u32 arg1) { if ((gPlayerState.jump_status | gPlayerState.field_0x3[1]) == 0) { bombCount = 0; - for (entity = FindEntityByID(8, 2, 2); entity != NULL; entity = FindNextDuplicateID(entity, 2)) { + for (entity = FindEntityByID(PLAYER_ITEM, PLAYER_ITEM_BOMB, 2); entity != NULL; + entity = FindNextDuplicateID(entity, 2)) { bombCount += 1; } maxBombs = this->behaviorID == 7 ? 3 : 1; diff --git a/src/item/itemSword.c b/src/item/itemSword.c index bcba4054..ae15069d 100644 --- a/src/item/itemSword.c +++ b/src/item/itemSword.c @@ -112,7 +112,7 @@ void sub_080754B8(ItemBehavior* this, u32 arg1) { if (gPlayerEntity.frameSpriteSettings & 1) { iVar1 = sub_0807B014(); - if (iVar1 && FindEntityByID(PLAYER_ITEM, 15, 2) == 0) { + if (iVar1 && FindEntityByID(PLAYER_ITEM, PLAYER_ITEM_SWORD_BEAM1, 2) == 0) { CreatePlayerBomb(this, 0xf); if (iVar1 == 0xf) { gPlayerState.field_0xab = 5; |
