mirror of
https://github.com/pret/pmd-sky.git
synced 2026-08-27 21:25:43 -05:00
Decomped SetActionRegularAttack
This commit is contained in:
@@ -5,17 +5,9 @@
|
||||
.public GetItemCategoryVeneer
|
||||
.public GetItemInfo
|
||||
.public GetTile
|
||||
.public IsHM
|
||||
.public ITEM_CATEGORY_ACTIONS
|
||||
.public IsHM
|
||||
.public ItemZInit
|
||||
.public ov29_02347040
|
||||
.public ov29_02352074
|
||||
.public ov29_0237C918
|
||||
.public ov29_0237C91C
|
||||
.public ov29_0237C91E
|
||||
.public ov29_0237C920
|
||||
.public ov29_0237C922
|
||||
.public ov29_0237C96C
|
||||
.public RemoveEmptyItemsInBagWrapper
|
||||
.public RemoveEquivItemNoHole
|
||||
.public RemoveGroundItem
|
||||
@@ -24,3 +16,11 @@
|
||||
.public SetMonsterActionFields
|
||||
.public ShouldDisplayEntityWrapper
|
||||
.public SpawnItem
|
||||
.public ov29_02347040
|
||||
.public ov29_02352074
|
||||
.public ov29_0237C918
|
||||
.public ov29_0237C91C
|
||||
.public ov29_0237C91E
|
||||
.public ov29_0237C920
|
||||
.public ov29_0237C922
|
||||
.public ov29_0237C96C
|
||||
|
||||
2
asm/include/overlay_29_022EBC74.inc
Normal file
2
asm/include/overlay_29_022EBC74.inc
Normal file
@@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
.public SetMonsterActionFields
|
||||
@@ -693,42 +693,3 @@ ov29_022EBC2C: ; 0x022EBC2C
|
||||
strb r4, [r6, #0xa]
|
||||
ldmia sp!, {r4, r5, r6, pc}
|
||||
arm_func_end ov29_022EBC2C
|
||||
|
||||
arm_func_start SetActionRegularAttack
|
||||
SetActionRegularAttack: ; 0x022EBC50
|
||||
stmdb sp!, {r3, r4, r5, lr}
|
||||
mov r4, r1
|
||||
mov r1, #0x32
|
||||
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 SetActionRegularAttack
|
||||
|
||||
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}
|
||||
mov r5, r1
|
||||
mov r1, #0x14
|
||||
mov r6, r0
|
||||
mov r4, r2
|
||||
bl SetMonsterActionFields
|
||||
strb r5, [r6, #4]
|
||||
strb r4, [r6, #0xa]
|
||||
ldmia sp!, {r4, r5, r6, pc}
|
||||
arm_func_end SetActionUseMovePlayer
|
||||
|
||||
30
asm/overlay_29_022EBC74.s
Normal file
30
asm/overlay_29_022EBC74.s
Normal file
@@ -0,0 +1,30 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "overlay_29_022EBC74.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}
|
||||
mov r5, r1
|
||||
mov r1, #0x14
|
||||
mov r6, r0
|
||||
mov r4, r2
|
||||
bl SetMonsterActionFields
|
||||
strb r5, [r6, #4]
|
||||
strb r4, [r6, #0xa]
|
||||
ldmia sp!, {r4, r5, r6, pc}
|
||||
arm_func_end SetActionUseMovePlayer
|
||||
9
include/overlay_29_022EBC50.h
Normal file
9
include/overlay_29_022EBC50.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_022EBC50_H
|
||||
#define PMDSKY_OVERLAY_29_022EBC50_H
|
||||
|
||||
#include "dungeon_mode.h"
|
||||
|
||||
// Sets a monster's action to action::ACTION_REGULAR_ATTACK, with a specified direction.
|
||||
void SetActionRegularAttack(struct action_data *monster_action, u8 direction);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022EBC50_H
|
||||
2
main.lsf
2
main.lsf
@@ -373,6 +373,8 @@ Overlay OVY_29
|
||||
Object asm/overlay_29_022EAB50.o
|
||||
Object src/dungeon_action.o
|
||||
Object asm/overlay_29_022EB44C.o
|
||||
Object src/overlay_29_022EBC50.o
|
||||
Object asm/overlay_29_022EBC74.o
|
||||
Object src/dungeon_action_helper.o
|
||||
Object asm/overlay_29_022EBCE8.o
|
||||
Object src/overlay_29_022EC608.o
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
#include "dungeon_util_static.h"
|
||||
#include "fixed_room_data.h"
|
||||
#include "moves_1.h"
|
||||
#include "overlay_29_022EBC50.h"
|
||||
#include "overlay_29_02338350.h"
|
||||
|
||||
#define REGULAR_ATTACK_INDEX 4
|
||||
|
||||
extern void SetActionRegularAttack(struct action_data *monster_action, u8 direction);
|
||||
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);
|
||||
|
||||
9
src/overlay_29_022EBC50.c
Normal file
9
src/overlay_29_022EBC50.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "overlay_29_022EBC50.h"
|
||||
#include "dungeon_action.h"
|
||||
|
||||
void SetActionRegularAttack(struct action_data *monster_action, u8 direction)
|
||||
{
|
||||
SetMonsterActionFields(monster_action, ACTION_REGULAR_ATTACK);
|
||||
if (direction != DIR_NONE_UNSIGNED)
|
||||
monster_action->direction = direction & DIRECTION_MASK;
|
||||
}
|
||||
Reference in New Issue
Block a user