diff options
| author | theo3 <arisstephenson2@gmail.com> | 2022-03-28 21:01:02 -0700 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2022-03-28 21:01:02 -0700 |
| commit | 65b80571b230d08426e6329dc7eb4348ca5012d1 (patch) | |
| tree | d1329b47d3ec3a2f993f995b33328b82196d0964 /src/object | |
| parent | 6000b4f2d3bc4ef482496560e3a47b3ca2b7e2b8 (diff) | |
naming
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/bigPushableLever.c | 2 | ||||
| -rw-r--r-- | src/object/bird.c | 6 | ||||
| -rw-r--r-- | src/object/board.c | 2 | ||||
| -rw-r--r-- | src/object/button.c | 2 | ||||
| -rw-r--r-- | src/object/fan.c | 2 | ||||
| -rw-r--r-- | src/object/floatingPlatform.c | 12 | ||||
| -rw-r--r-- | src/object/gyorgBossObject.c | 4 | ||||
| -rw-r--r-- | src/object/lavaPlatform.c | 12 | ||||
| -rw-r--r-- | src/object/lightableSwitch.c | 4 | ||||
| -rw-r--r-- | src/object/lilypadSmall.c | 12 | ||||
| -rw-r--r-- | src/object/object98.c | 4 | ||||
| -rw-r--r-- | src/object/pushableLever.c | 2 | ||||
| -rw-r--r-- | src/object/warpPoint.c | 2 |
13 files changed, 33 insertions, 33 deletions
diff --git a/src/object/bigPushableLever.c b/src/object/bigPushableLever.c index 23aa475f..b36a0c00 100644 --- a/src/object/bigPushableLever.c +++ b/src/object/bigPushableLever.c @@ -57,7 +57,7 @@ void BigPushableLever_Idle(BigPushableLeverEntity* this) { SetTile(this->tileIndexLower, this->tilePositionLower, super->collisionLayer); EnqueueSFX(SFX_132); RequestPriorityDuration(super, 0x1e); - if (sub_08079F8C()) { + if (PlayerCanBeMoved()) { gPlayerState.pushedObject = 0x98; gPlayerState.queued_action = 5; gPlayerState.flags |= PL_BUSY; diff --git a/src/object/bird.c b/src/object/bird.c index 78798b49..94b13bf2 100644 --- a/src/object/bird.c +++ b/src/object/bird.c @@ -211,9 +211,9 @@ void Bird_Type8(Entity* this) { this->speed = 0x300; } - if ((gPlayerEntity.flags & 0x80) != 0 && (gMessage.doTextBox & 0x7f) == 0 && gPlayerEntity.action != 28 && - gPlayerEntity.action != 6 && gPlayerEntity.action != 9 && gPlayerState.framestate != 24 && - gPlayerState.framestate != 11 && gPlayerState.framestate != 8 && sub_08079F8C() && + if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 && gPlayerEntity.action != PLAYER_SLEEP && + gPlayerEntity.action != PLAYER_BOUNCE && gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB && + gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE && PlayerCanBeMoved() && (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) { s32 z = gPlayerEntity.z.HALF.HI - this->z.HALF.HI - 8; if ((u16)z < 0x20 && gPlayerEntity.health != 0) { diff --git a/src/object/board.c b/src/object/board.c index 7c3607c3..18e7ff97 100644 --- a/src/object/board.c +++ b/src/object/board.c @@ -58,7 +58,7 @@ void sub_08098BE0(BoardEntity* this) { } void sub_08098BE8(BoardEntity* this) { - if ((gPlayerState.flags & PL_MINISH) && sub_08098C30(this, &gPlayerEntity) && sub_08079F8C() && + if ((gPlayerState.flags & PL_MINISH) && sub_08098C30(this, &gPlayerEntity) && PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) { gPlayerState.field_0x14 = 1; sub_0807AAF8(&gPlayerEntity, this->tile); diff --git a/src/object/button.c b/src/object/button.c index 20a34d21..c16a1334 100644 --- a/src/object/button.c +++ b/src/object/button.c @@ -165,7 +165,7 @@ Entity* sub_08081D74(Entity* this) { u32 sub_08081E0C(Entity* this) { Entity* tmp = &gPlayerEntity; - if (tmp->z.HALF.HI != 0 || !sub_08079F8C()) { + if (tmp->z.HALF.HI != 0 || !PlayerCanBeMoved()) { return 0; } else { return EntityInRectRadius(this, tmp, 5, 6); diff --git a/src/object/fan.c b/src/object/fan.c index 51815c83..882edd33 100644 --- a/src/object/fan.c +++ b/src/object/fan.c @@ -113,7 +113,7 @@ void sub_0809EE44(FanEntity* this) { if (uVar4 != 0) { pEVar1 = &gPlayerEntity; if (sub_0809EF78(this, pEVar1)) { - if (sub_08079F8C()) { + if (PlayerCanBeMoved()) { sub_08079E58(super->speed, super->direction); } } diff --git a/src/object/floatingPlatform.c b/src/object/floatingPlatform.c index 74ab1231..f762a719 100644 --- a/src/object/floatingPlatform.c +++ b/src/object/floatingPlatform.c @@ -29,7 +29,7 @@ void sub_080860D8(FloatingPlatformEntity* this) { super->frameIndex = super->type; super->spritePriority.b0 = 7; super->child = (Entity*)GetCurrentRoomProperty(super->type2); - sub_080A2CC0(super, (u16**)&super->child, &this->unk70); + UpdateRailMovement(super, (u16**)&super->child, &this->unk70); } void sub_0808611C(FloatingPlatformEntity* this) { @@ -41,15 +41,15 @@ void sub_0808611C(FloatingPlatformEntity* this) { super->parent->timer++; } - sub_080A2BE4(super, iVar2); + SyncPlayerToPlatform(super, iVar2); } else if (super->timer == 0) { - sub_080A2BE4(super, iVar2); + SyncPlayerToPlatform(super, iVar2); } else { - sub_080A2BE4(super, FALSE); + SyncPlayerToPlatform(super, FALSE); } if (--this->unk70 == 0) { - sub_080A2CC0(super, (u16**)&super->child, &this->unk70); + UpdateRailMovement(super, (u16**)&super->child, &this->unk70); } } @@ -58,7 +58,7 @@ bool32 sub_08086168(FloatingPlatformEntity* this) { const u8* ptr; ptr = gUnk_08120658 + super->type * 2; - if (((EntityInRectRadius(super, &gPlayerEntity, ptr[0], ptr[1])) && sub_08079F8C())) { + if (((EntityInRectRadius(super, &gPlayerEntity, ptr[0], ptr[1])) && PlayerCanBeMoved())) { gPlayerState.field_0x14 = 1; if (gPlayerEntity.z.HALF.HI == 0) { return TRUE; diff --git a/src/object/gyorgBossObject.c b/src/object/gyorgBossObject.c index b0f0920b..047c9a40 100644 --- a/src/object/gyorgBossObject.c +++ b/src/object/gyorgBossObject.c @@ -225,7 +225,7 @@ void GyorgBossObject_FemalePhase4(GyorgBossObjectEntity* this) { } this->unk_6c = 0; gRoomTransition.field_0x39 = 0; - if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) { + if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) { super->action = 9; super->timer = 0; super->subtimer = 0xF0; @@ -479,7 +479,7 @@ u32 sub_080A20B8(GyorgBossObjectEntity* this, GyorgMaleEntity* other) { if (other == NULL) { return 1; } - if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) { + if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) { return other->unk_7c == 0 && gPlayerState.field_0x14 != 0; } return 0; diff --git a/src/object/lavaPlatform.c b/src/object/lavaPlatform.c index 830ba02e..4459128b 100644 --- a/src/object/lavaPlatform.c +++ b/src/object/lavaPlatform.c @@ -18,11 +18,11 @@ typedef struct { /*0x72*/ u16 wobbleTime; /**< Time the player can stand on the platform. */ /*0x74*/ u16 respawnTime; /**< Time until the platform respawns after it has sunk. */ /*0x76*/ u16 unk_76; - /*0x78*/ Entity* unk_78; // Typed same as second argument of sub_080A2CC0 + /*0x78*/ Entity* unk_78; // Typed same as second argument of UpdateRailMovement } LavaPlatformEntity; typedef struct { - /*0x00*/ Entity* unk_78; // Typed same as second argument of sub_080A2CC0 + /*0x00*/ Entity* unk_78; // Typed same as second argument of UpdateRailMovement /*0x04*/ s16 x; /*0x06*/ s16 y; /*0x08*/ u8 collisionLayer; @@ -246,7 +246,7 @@ void LavaPlatform_SpawnPlatforms(LavaPlatformEntity* this) { platform->respawnTime = entry->respawnTime; platform->unk_78 = entry->unk_78; UpdateSpriteForCollisionLayer((Entity*)platform); - sub_080A2CC0(&platform->base, (u16**)&platform->unk_78, &platform->unk_76); + UpdateRailMovement(&platform->base, (u16**)&platform->unk_78, &platform->unk_76); } entry++; } @@ -282,7 +282,7 @@ void sub_0809264C(LavaPlatformEntity* this) { bool32 LavaPlatform_IsPlayerOnPlatform(LavaPlatformEntity* this) { if ((gPlayerState.flags & PL_MINISH) == 0 && EntityInRectRadius(super, &gPlayerEntity, 0x10, 0x10) && - sub_08079F8C()) { + PlayerCanBeMoved()) { gPlayerState.field_0x14 = 1; if (gPlayerEntity.z.HALF.HI == 0) { super->subtimer = 1; @@ -294,12 +294,12 @@ bool32 LavaPlatform_IsPlayerOnPlatform(LavaPlatformEntity* this) { } void sub_080926E4(LavaPlatformEntity* this) { - sub_080A2BE4(super, super->subtimer); + SyncPlayerToPlatform(super, super->subtimer); if (super->action == 1) { (super->parent)->x.HALF.HI = super->x.HALF.HI; (super->parent)->y.HALF.HI = super->y.HALF.HI; } if (--this->unk_76 == 0) { - sub_080A2CC0(super, (u16**)&this->unk_78, &this->unk_76); + UpdateRailMovement(super, (u16**)&this->unk_78, &this->unk_76); } } diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c index dcf5ca1e..3c5aefd0 100644 --- a/src/object/lightableSwitch.c +++ b/src/object/lightableSwitch.c @@ -65,7 +65,7 @@ void sub_0809EAD8(Entity* this) { if (this->type2 != 0) { this->child = GetCurrentRoomProperty(this->type2); - sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD); + UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD); } else { SetTile(0x4050, COORD_TO_TILE(this), this->collisionLayer); @@ -82,7 +82,7 @@ void sub_0809EB30(Entity* this) { } puVar2 = &this->field_0x74.HWORD; if (!--*puVar2) { - sub_080A2CC0(this, (u16**)&this->child, puVar2); + UpdateRailMovement(this, (u16**)&this->child, puVar2); } } } diff --git a/src/object/lilypadSmall.c b/src/object/lilypadSmall.c index 3f72f3e3..6cbd40e4 100644 --- a/src/object/lilypadSmall.c +++ b/src/object/lilypadSmall.c @@ -4,7 +4,7 @@ extern u16 gUnk_08123318[]; static void sub_08097B24(Entity* this); -static bool32 sub_08097ADC(Entity* this); +static bool32 CheckMovePlayer(Entity* this); void LilypadSmall(Entity* this) { u32 rand; @@ -19,22 +19,22 @@ void LilypadSmall(Entity* this) { this->spriteSettings.draw = TRUE; this->spritePriority.b0 = 7; this->child = GetCurrentRoomProperty(this->type2); - sub_080A2CC0(this, (u16**)&this->child, &this->field_0x70.HALF.LO); + UpdateRailMovement(this, (u16**)&this->child, &this->field_0x70.HALF.LO); } - sub_080A2BE4(this, sub_08097ADC(this)); + SyncPlayerToPlatform(this, CheckMovePlayer(this)); sub_08097B24(this); psVar4 = (u16*)&this->field_0x70; if (--*psVar4 == 0) { - sub_080A2CC0(this, (u16**)&this->child, psVar4); + UpdateRailMovement(this, (u16**)&this->child, psVar4); } } -static bool32 sub_08097ADC(Entity* this) { +static bool32 CheckMovePlayer(Entity* this) { if (!(gPlayerState.flags & PL_MINISH)) { return FALSE; } else if (EntityInRectRadius(this, &gPlayerEntity, 8, 8) == 0) { return FALSE; - } else if (!sub_08079F8C()) { + } else if (!PlayerCanBeMoved()) { return FALSE; } else { gPlayerState.field_0x14 = 1; diff --git a/src/object/object98.c b/src/object/object98.c index d39d7ea2..a5de48e9 100644 --- a/src/object/object98.c +++ b/src/object/object98.c @@ -48,7 +48,7 @@ void sub_0809E360(Object98Entity* this) { SetDefaultPriority(super, 0); if (super->type != 0) { super->child = (Entity*)GetCurrentRoomProperty(super->type); - sub_080A2CC0(super, (u16**)&super->child, &this->unk74); + UpdateRailMovement(super, (u16**)&super->child, &this->unk74); } } } @@ -62,7 +62,7 @@ void sub_0809E3E4(Object98Entity* this) { } if (--this->unk74 == 0) { - sub_080A2CC0(super, (u16**)&super->child, &this->unk74); + UpdateRailMovement(super, (u16**)&super->child, &this->unk74); } } } diff --git a/src/object/pushableLever.c b/src/object/pushableLever.c index 8142a0f9..bdd17fa9 100644 --- a/src/object/pushableLever.c +++ b/src/object/pushableLever.c @@ -56,7 +56,7 @@ void PushableLever_Idle(PushableLeverEntity* this) { SetTile(this->tileIndex, this->tilePosition, super->collisionLayer); EnqueueSFX(SFX_16A); RequestPriorityDuration(super, 0x1e); - if (sub_08079F8C()) { + if (PlayerCanBeMoved()) { gPlayerState.pushedObject = 0x90; gPlayerState.queued_action = 5; gPlayerState.flags |= PL_BUSY; diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c index 84949f45..c558ce37 100644 --- a/src/object/warpPoint.c +++ b/src/object/warpPoint.c @@ -205,7 +205,7 @@ void sub_0808B73C(Entity* this) { u32 sub_0808B7C8(Entity* this) { if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.framestate != PL_STATE_DIE && gPlayerEntity.health != 0 && - sub_08079F8C() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) { + PlayerCanBeMoved() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) { if (this->timer == 0 && gPlayerEntity.action == PLAYER_08072C9C) { ResetPlayerAnimationAndAction(); } |
