diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2022-07-23 12:43:43 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2022-07-25 22:45:55 +0200 |
| commit | 852effa474c159398014da736ade6f0fea454de7 (patch) | |
| tree | 97da22c4758ca4156dc9fb7ac123c7a3b0a9e9f5 /src/item | |
| parent | ccba86d292a0e4c8a0e07325ac4fb25e5a58dc89 (diff) | |
Rename objects
Diffstat (limited to 'src/item')
| -rw-r--r-- | src/item/itemLantern.c | 12 | ||||
| -rw-r--r-- | src/item/itemMoleMitts.c | 2 | ||||
| -rw-r--r-- | src/item/itemPegasusBoots.c | 2 | ||||
| -rw-r--r-- | src/item/itemSword.c | 2 | ||||
| -rw-r--r-- | src/item/itemTryPickupObject.c | 7 |
5 files changed, 13 insertions, 12 deletions
diff --git a/src/item/itemLantern.c b/src/item/itemLantern.c index 717b9250..bf702e6a 100644 --- a/src/item/itemLantern.c +++ b/src/item/itemLantern.c @@ -41,7 +41,7 @@ void sub_08075A0C(ItemBehavior* this, u32 idx) { this->behaviorID = 0x10; ForceEquipItem(ITEM_LANTERN_ON, itemSlot); tmp = &gUnk_08126EEC[gPlayerEntity.animationState & 6]; - object = CreateObjectWithParent(&gPlayerEntity, OBJECT_45, 1, 0); + object = CreateObjectWithParent(&gPlayerEntity, LAMP_PARTICLE, 1, 0); if (object != NULL) { object->spriteVramOffset = gPlayerEntity.spriteVramOffset; object->x.HALF.HI = tmp[0] + object->x.HALF.HI; @@ -60,7 +60,7 @@ void sub_08075ADC(ItemBehavior* this, u32 idx) { (this->field_0x5[9] & 1) == 0 || (gPlayerState.flags & (PL_DISABLE_ITEMS | PL_CAPTURED)) != 0 || sub_08079D48() == 0) { this->field_0xf = 0; - this->stateID += 1; + this->stateID++; gPlayerState.flags |= PL_USE_LANTERN; bVar1 = 8 >> idx; gPlayerState.field_0x3[1] = gPlayerState.field_0x3[1] & ~((bVar1 << 4) | bVar1); @@ -95,9 +95,9 @@ void sub_08075B54(ItemBehavior* this, u32 idx) { (sub_080B1BA4(TILE(gPlayerEntity.x.HALF.HI + tmp[0], gPlayerEntity.y.HALF.HI + tmp[1]), gPlayerEntity.collisionLayer, 0x40) != 0)) { this->field_0xf = 0xf; - this->stateID += 1; + this->stateID++; gPlayerEntity.field_0x7a.HWORD = 2; - object = CreateObjectWithParent(&gPlayerEntity, OBJECT_45, 1, 0); + object = CreateObjectWithParent(&gPlayerEntity, LAMP_PARTICLE, 1, 0); if (object != NULL) { object->spriteVramOffset = gPlayerEntity.spriteVramOffset; object->x.HALF.HI = tmp[0] + object->x.HALF.HI; @@ -123,10 +123,10 @@ void sub_08075C9C(ItemBehavior* this, u32 idx) { } if ((this->field_0x5[9] & 0x80) != 0) { this->field_0xf = 0; - this->stateID -= 1; + this->stateID--; gPlayerState.field_0xa = (~(8 >> idx)) & gPlayerState.field_0xa; gPlayerState.keepFacing = (~(8 >> idx)) & gPlayerState.keepFacing; } else { - gPlayerEntity.field_0x7a.HWORD += 1; + gPlayerEntity.field_0x7a.HWORD++; } } diff --git a/src/item/itemMoleMitts.c b/src/item/itemMoleMitts.c index a2e04e6f..59607eb9 100644 --- a/src/item/itemMoleMitts.c +++ b/src/item/itemMoleMitts.c @@ -138,7 +138,7 @@ void sub_080772A8(ItemBehavior* this, u32 idx) { gPlayerEntity.frameDuration = 1; if (sub_0807B5B0(&gPlayerEntity)) { SoundReq(SFX_108); - CreateObjectWithParent(&gPlayerEntity, OBJECT_1E, this->field_0x5[9], 0); + CreateObjectWithParent(&gPlayerEntity, MOLE_MITTS_PARTICLE, this->field_0x5[9], 0); } else { sub_08077DF4(this, 0x51c); effect = CreateFx(&gPlayerEntity, FX_STARS_STRIKE, 0); diff --git a/src/item/itemPegasusBoots.c b/src/item/itemPegasusBoots.c index eb2696c6..a0424387 100644 --- a/src/item/itemPegasusBoots.c +++ b/src/item/itemPegasusBoots.c @@ -156,7 +156,7 @@ void sub_08076A88(ItemBehavior* this, u32 idx) { return; } ptr = gUnk_0811BE38; - if ((*(u16*)&ptr[(gPlayerEntity.animationState & 0xfe)] & gPlayerState.field_0x90) == 0) { + if ((*(u16*)&ptr[(gPlayerEntity.animationState & 0xfe)] & gPlayerState.playerInput.field_0x90) == 0) { this->field_0x5[6] = (this->field_0x5[5] & 0xe) * 4; if ((gPlayerState.field_0xd != 0xff) && (gPlayerState.field_0xd != this->field_0x5[6])) { if (((gPlayerState.field_0xd - this->field_0x5[6]) & 0x1f) < 0x10) { diff --git a/src/item/itemSword.c b/src/item/itemSword.c index 6e5b0d6f..814e1cf9 100644 --- a/src/item/itemSword.c +++ b/src/item/itemSword.c @@ -148,7 +148,7 @@ void sub_08075580(ItemBehavior* this, u32 idx) { this->field_0x5[2] = 0x50; } sub_08077DF4(this, 0x168); - CreateObject(OBJECT_43, 0, 0); + CreateObject(SWORD_PARTICLE, 0, 0); return; } sub_080759B8(this, idx); diff --git a/src/item/itemTryPickupObject.c b/src/item/itemTryPickupObject.c index 976366ca..cae32fd5 100644 --- a/src/item/itemTryPickupObject.c +++ b/src/item/itemTryPickupObject.c @@ -91,12 +91,12 @@ void sub_08076488(ItemBehavior* this, u32 idx) { bVar1 = ~(8 >> idx); gPlayerState.keepFacing = bVar1 & gPlayerState.keepFacing; gPlayerState.field_0xa = bVar1 & gPlayerState.field_0xa; - this->stateID += 1; + this->stateID++; this->field_0xf = 0; } } } else { - this->field_0x5[2] -= 1; + this->field_0x5[2]--; } gPlayerState.framestate = PL_STATE_HOLD; } @@ -108,7 +108,8 @@ void sub_08076518(ItemBehavior* this, u32 index) { if (gPlayerEntity.knockbackDuration != 0) { PlayerCancelHoldItem(this, index); } else { - if ((gPlayerState.field_0x92 & 0x8018) != 0) { + if ((gPlayerState.playerInput.field_0x92 & (PLAYER_INPUT_8000 | PLAYER_INPUT_10 | PLAYER_INPUT_8)) != + 0) { sub_0806F948(&gPlayerEntity); gPlayerState.heldObject = 5; this->field_0x18->subAction = 2; |
