mirror of https://github.com/zeldaret/tmc.git
OK sub_0807A5B8
This commit is contained in:
parent
d05f7dff2d
commit
43f25e93af
|
@ -1688,7 +1688,45 @@ void sub_080792BC(s32 speed, u32 direction, u32 field_0x38) {
|
|||
gPlayerEntity.direction = direction;
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/playerUtils/sub_080792D8.inc", void sub_080792D8())
|
||||
void sub_080792D8(void) {
|
||||
Entity* playerEntity = &gPlayerEntity;
|
||||
|
||||
if (playerEntity->knockbackDuration != 0) {
|
||||
if (((((playerEntity->action == 0xb) || (gPlayerState.dash_state != 0)) ||
|
||||
((u8)(gPlayerState.heldObject - 1) < 4)) ||
|
||||
(((gPlayerState.jump_status != 0 || (gPlayerState.floor_type == 0xff)) ||
|
||||
(((gPlayerState.field_0x7 & 0x80) != 0 ||
|
||||
((0 < (s32)((gPlayerState.swim_state & 0xf) - 1) || (playerEntity->action == 3)))))))) ||
|
||||
((gPlayerState.flags & 0x40000) != 0)) {
|
||||
playerEntity->knockbackDuration = 0;
|
||||
} else if ((playerEntity->action == 0x1d) && (playerEntity->knockbackDirection != 0x10)) {
|
||||
playerEntity->knockbackDuration = 0;
|
||||
} else {
|
||||
|
||||
if ((s8)(playerEntity->knockbackDuration) >= 1) {
|
||||
playerEntity->knockbackDuration--;
|
||||
|
||||
} else {
|
||||
playerEntity->knockbackDuration++;
|
||||
}
|
||||
if (playerEntity->knockbackDuration != 0) {
|
||||
gPlayerState.field_0x7 &= 0xdf;
|
||||
if ((((0 < playerEntity->iframes) && (gPlayerState.swim_state == 0)) &&
|
||||
((gPlayerState.flags & 0x80) == 0)) &&
|
||||
gPlayerState.jump_status == 0) {
|
||||
ResetActiveItems();
|
||||
if ((gPlayerState.flags & 8) == 0) {
|
||||
gPlayerState.animation = 0x114;
|
||||
} else {
|
||||
gPlayerState.animation = 0x418;
|
||||
}
|
||||
}
|
||||
sub_080027EA(playerEntity, 0x280, playerEntity->knockbackDirection);
|
||||
sub_0807A5B8(playerEntity->knockbackDirection);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_080793E4(u32 param_1) {
|
||||
u32 tmp;
|
||||
|
|
Loading…
Reference in New Issue