This commit is contained in:
Ethan Roseman 2020-10-16 20:59:49 -04:00
parent e1b4b8b594
commit f67477a9eb
3 changed files with 28 additions and 42 deletions

View File

@ -1,32 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel inflict_partner_ko
/* 194B34 80266254 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 194B38 80266258 2402000D */ addiu $v0, $zero, 0xd
/* 194B3C 8026625C 14A20013 */ bne $a1, $v0, .L802662AC
/* 194B40 80266260 AFBF0010 */ sw $ra, 0x10($sp)
/* 194B44 80266264 80820216 */ lb $v0, 0x216($a0)
/* 194B48 80266268 10450007 */ beq $v0, $a1, .L80266288
/* 194B4C 8026626C 00000000 */ nop
/* 194B50 80266270 0C0997D0 */ jal inflict_status
/* 194B54 80266274 2405000D */ addiu $a1, $zero, 0xd
/* 194B58 80266278 0C05272D */ jal play_sound
/* 194B5C 8026627C 24042107 */ addiu $a0, $zero, 0x2107
/* 194B60 80266280 080998AB */ j .L802662AC
/* 194B64 80266284 00000000 */ nop
.L80266288:
/* 194B68 80266288 90820217 */ lbu $v0, 0x217($a0)
/* 194B6C 8026628C 00461021 */ addu $v0, $v0, $a2
/* 194B70 80266290 A0820217 */ sb $v0, 0x217($a0)
/* 194B74 80266294 00021600 */ sll $v0, $v0, 0x18
/* 194B78 80266298 00021603 */ sra $v0, $v0, 0x18
/* 194B7C 8026629C 2842000A */ slti $v0, $v0, 0xa
/* 194B80 802662A0 14400002 */ bnez $v0, .L802662AC
/* 194B84 802662A4 24020009 */ addiu $v0, $zero, 9
/* 194B88 802662A8 A0820217 */ sb $v0, 0x217($a0)
.L802662AC:
/* 194B8C 802662AC 8FBF0010 */ lw $ra, 0x10($sp)
/* 194B90 802662B0 24020001 */ addiu $v0, $zero, 1
/* 194B94 802662B4 03E00008 */ jr $ra
/* 194B98 802662B8 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1284,15 +1284,15 @@ typedef struct Actor {
/* 0x208 */ char unk_208[4]; /* 0x208 */ char unk_208[4];
/* 0x20C */ u32* statusTable; /* 0x20C */ u32* statusTable;
/* 0x210 */ u8 debuff; /* 0x210 */ u8 debuff;
/* 0x211 */ u8 debuffDuration; /* 0x211 */ s8 debuffDuration;
/* 0x212 */ u8 staticStatus; /* 0B = yes */ /* 0x212 */ s8 staticStatus; /* 0B = yes */
/* 0x213 */ u8 staticDuration; /* 0x213 */ s8 staticDuration;
/* 0x214 */ s8 stoneStatus; /* 0C = yes */ /* 0x214 */ s8 stoneStatus; /* 0C = yes */
/* 0x215 */ u8 stoneDuration; /* 0x215 */ s8 stoneDuration;
/* 0x216 */ u8 koStatus; /* 0D = yes */ /* 0x216 */ s8 koStatus; /* 0D = yes */
/* 0x217 */ u8 koDuration; /* 0x217 */ s8 koDuration;
/* 0x218 */ u8 transStatus; /* 0E = yes */ /* 0x218 */ s8 transStatus; /* 0E = yes */
/* 0x219 */ u8 transDuration; /* 0x219 */ s8 transDuration;
/* 0x21A */ char unk_21A[2]; /* 0x21A */ char unk_21A[2];
/* 0x21C */ u8 status; /* 0x21C */ u8 status;
/* 0x21D */ char unk_21D[3]; /* 0x21D */ char unk_21D[3];

View File

@ -88,7 +88,21 @@ INCLUDE_ASM(s32, "code_190B20", lookup_status_duration_mod);
INCLUDE_ASM(s32, "code_190B20", inflict_status); INCLUDE_ASM(s32, "code_190B20", inflict_status);
INCLUDE_ASM(s32, "code_190B20", inflict_partner_ko); s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) {
if (statusTypeKey == Status_DAZE) {
if (statusTypeKey != target->koStatus) {
inflict_status(target, Status_DAZE);
play_sound(0x2107);
} else {
target->koDuration += duration;
if (target->koDuration > 9) {
target->koDuration = 9;
}
}
}
return TRUE;
}
INCLUDE_ASM(s32, "code_190B20", get_defense); INCLUDE_ASM(s32, "code_190B20", get_defense);
@ -161,7 +175,11 @@ void remove_part_shadow(s32 actorId, s32 partIndex) {
func_80112328(part->shadow); func_80112328(part->shadow);
} }
INCLUDE_ASM(s32, "code_190B20", func_802673E4); void create_part_shadow_by_ptr(UNK_TYPE actor, ActorPart* part) {
part->flags &= ~4;
part->shadow = create_shadow_type(0, part->currentPos.x, part->currentPos.y, part->currentPos.z);
part->shadowScale = part->size[0] / 24.0;
}
INCLUDE_ASM(s32, "code_190B20", remove_player_buffs); INCLUDE_ASM(s32, "code_190B20", remove_player_buffs);