mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
Decomped SetActionStruggle
This commit is contained in:
parent
4efffb8b3a
commit
6fdf587b7c
|
|
@ -1,21 +1,8 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "overlay_29_022EBC74.inc"
|
||||
.include "overlay_29_022EBC98.inc"
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start SetActionStruggle
|
||||
SetActionStruggle: ; 0x022EBC74
|
||||
stmdb sp!, {r3, r4, r5, lr}
|
||||
mov r4, r1
|
||||
mov r1, #0x17
|
||||
mov r5, r0
|
||||
bl SetMonsterActionFields
|
||||
cmp r4, #0xff
|
||||
andne r0, r4, #7
|
||||
strneb r0, [r5, #2]
|
||||
ldmia sp!, {r3, r4, r5, pc}
|
||||
arm_func_end SetActionStruggle
|
||||
|
||||
arm_func_start SetActionUseMovePlayer
|
||||
SetActionUseMovePlayer: ; 0x022EBC98
|
||||
stmdb sp!, {r4, r5, r6, lr}
|
||||
|
|
@ -5,5 +5,7 @@
|
|||
|
||||
// Sets a monster's action to action::ACTION_REGULAR_ATTACK, with a specified direction.
|
||||
void SetActionRegularAttack(struct action_data *monster_action, u8 direction);
|
||||
// Sets a monster's action to action::ACTION_STRUGGLE, with a specified direction.
|
||||
void SetActionStruggle(struct action_data *monster_action, u8 direction);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022EBC50_H
|
||||
|
|
|
|||
2
main.lsf
2
main.lsf
|
|
@ -374,7 +374,7 @@ Overlay OVY_29
|
|||
Object src/dungeon_action.o
|
||||
Object asm/overlay_29_022EB44C.o
|
||||
Object src/overlay_29_022EBC50.o
|
||||
Object asm/overlay_29_022EBC74.o
|
||||
Object asm/overlay_29_022EBC98.o
|
||||
Object src/dungeon_action_helper.o
|
||||
Object asm/overlay_29_022EBCE8.o
|
||||
Object src/overlay_29_022EC608.o
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#define REGULAR_ATTACK_INDEX 4
|
||||
|
||||
extern void SetActionStruggle(struct action_data *monster_action, u8 direction);
|
||||
extern bool8 CanAiUseMove(struct entity *monster, u32 move_index, bool8 extra_checks);
|
||||
extern u8 GetMoveAiWeight(struct move *move);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,3 +7,10 @@ void SetActionRegularAttack(struct action_data *monster_action, u8 direction)
|
|||
if (direction != DIR_NONE_UNSIGNED)
|
||||
monster_action->direction = direction & DIRECTION_MASK;
|
||||
}
|
||||
|
||||
void SetActionStruggle(struct action_data *monster_action, u8 direction)
|
||||
{
|
||||
SetMonsterActionFields(monster_action, ACTION_STRUGGLE);
|
||||
if (direction != DIR_NONE_UNSIGNED)
|
||||
monster_action->direction = direction & DIRECTION_MASK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user