diff options
| author | Tal Hayon <talhayon1@gmail.com> | 2022-07-21 19:04:09 +0300 |
|---|---|---|
| committer | Tal Hayon <talhayon1@gmail.com> | 2022-07-21 19:04:09 +0300 |
| commit | e03eec07b9d3e7ec1b17a7d41220436ee6a8f24e (patch) | |
| tree | b855e365f3c2bde52a6c89471d39354e1ce3ec4a /src | |
| parent | 4a945872d7b514ff51523a97a902e21c44c4fb9a (diff) | |
Match sub_08079C30
Diffstat (limited to 'src')
| -rw-r--r-- | src/playerUtils.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/playerUtils.c b/src/playerUtils.c index a45a7a6f..8e8388c6 100644 --- a/src/playerUtils.c +++ b/src/playerUtils.c @@ -1185,7 +1185,7 @@ void ClearPlayerState(void) { gPlayerState.field_0xe = 0; gPlayerState.field_0x11 = 0; gPlayerState.floor_type = SURFACE_NORMAL; - gPlayerState.floor_type_last = 0; + gPlayerState.floor_type_last = SURFACE_NORMAL; gPlayerState.field_0x14 = 0; gPlayerState.sword_state = 0; gPlayerState.dash_state = 0; @@ -1610,34 +1610,34 @@ void sub_08079BD8(Entity* this) { this->spritePriority.b0 = gPlayerEntity.spritePriority.b0; } -NONMATCH("asm/non_matching/playerUtils/sub_08079C30.inc", bool32 sub_08079C30(Entity* this)) { - if ((gPlayerState.field_0x14 == 0) && ((gPlayerState.flags & PL_FLAGS2) == 0)) { +bool32 sub_08079C30(Entity* param_1) { + if (gPlayerState.field_0x14 == 0 && (gPlayerState.flags & PL_FLAGS2) == 0) { if ((gPlayerState.flags & PL_MINISH) != 0) { return TRUE; } switch (gPlayerState.floor_type_last) { - case 0xd: - case 0x0e: - case 0x0f: - case 0x10: - case 0x14: - case 0x17: - case 0x2a: + case SURFACE_D: + case SURFACE_E: + case SURFACE_F: + case SURFACE_10: + case SURFACE_14: + case SURFACE_ICE: + case SURFACE_AUTO_LADDER: return TRUE; } - if (gPlayerState.floor_type == sub_08007DD6(GetRelativeCollisionTile(this, 0, -1), (u16*)gUnk_08007CAC)) { - if (gPlayerState.floor_type == sub_08007DD6(GetRelativeCollisionTile(this, 2, 0), (u16*)gUnk_08007CAC)) { - if (gPlayerState.floor_type == - sub_08007DD6(GetRelativeCollisionTile(this, -2, 0), (u16*)gUnk_08007CAC)) { - return TRUE; - } - } + if (gPlayerState.floor_type != sub_08007DD6(GetRelativeCollisionTile(param_1, 0, -1), (u16*)gUnk_08007CAC)) + return FALSE; + + if (gPlayerState.floor_type != sub_08007DD6(GetRelativeCollisionTile(param_1, 2, 0), (u16*)gUnk_08007CAC)) + return FALSE; + + if (gPlayerState.floor_type == sub_08007DD6(GetRelativeCollisionTile(param_1, -2, 0), (u16*)gUnk_08007CAC)) { + return TRUE; } } return FALSE; } -END_NONMATCH bool32 sub_08079D48(void) { if (!sub_08079C30(&gPlayerEntity)) { |
