mirror of
https://github.com/pret/pmd-sky.git
synced 2026-04-25 15:42:34 -05:00
Decomped ClearMonsterActionFields
This commit is contained in:
parent
51c92ad995
commit
c585361b8d
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
.public _s32_div_f
|
||||
.public AbilityIsActiveVeneer
|
||||
.public AdvanceFrame
|
||||
.public DUNGEON_PRNG_STATE
|
||||
|
|
@ -12,8 +11,16 @@
|
|||
.public IqSkillIsEnabled
|
||||
.public IsCurrentFixedRoomBossFight
|
||||
.public LogMessageByIdWithPopupCheckUserTarget
|
||||
.public MoveMonsterToPos
|
||||
.public MUSIC_ID_TABLE
|
||||
.public MoveMonsterToPos
|
||||
.public PlayBgmByIdVeneer
|
||||
.public PlayBgmByIdVolumeVeneer
|
||||
.public RANDOM_MUSIC_ID_TABLE
|
||||
.public RoundUpDiv256
|
||||
.public StringFromId
|
||||
.public SubstitutePlaceholderStringTags
|
||||
.public UpdateEntityPixelPos
|
||||
.public _s32_div_f
|
||||
.public ov29_022E555C
|
||||
.public ov29_02321260
|
||||
.public ov29_023516E8
|
||||
|
|
@ -22,12 +29,7 @@
|
|||
.public ov29_02352070
|
||||
.public ov29_0237C91C
|
||||
.public ov29_0237C91E
|
||||
.public PlayBgmByIdVeneer
|
||||
.public PlayBgmByIdVolumeVeneer
|
||||
.public RANDOM_MUSIC_ID_TABLE
|
||||
.public RoundUpDiv256
|
||||
.public strcmp
|
||||
.public StringFromId
|
||||
.public sub_0200D208
|
||||
.public sub_02017ACC
|
||||
.public sub_02017B18
|
||||
|
|
@ -37,5 +39,3 @@
|
|||
.public sub_02017C68
|
||||
.public sub_02017C74
|
||||
.public sub_02017D80
|
||||
.public SubstitutePlaceholderStringTags
|
||||
.public UpdateEntityPixelPos
|
||||
|
|
|
|||
|
|
@ -754,12 +754,3 @@ SetLeaderActionFields: ; 0x022EB3C8
|
|||
strh r1, [r0, #0x5c]
|
||||
ldmia sp!, {r4, pc}
|
||||
arm_func_end SetLeaderActionFields
|
||||
|
||||
arm_func_start ClearMonsterActionFields
|
||||
ClearMonsterActionFields: ; 0x022EB3F4
|
||||
mov r1, #0
|
||||
strh r1, [r0]
|
||||
strb r1, [r0, #4]
|
||||
strb r1, [r0, #0xa]
|
||||
bx lr
|
||||
arm_func_end ClearMonsterActionFields
|
||||
|
|
|
|||
|
|
@ -3,11 +3,16 @@
|
|||
|
||||
#include "dungeon_mode.h"
|
||||
|
||||
// Clears the fields related to AI in the monster's data struct, setting them all to 0.
|
||||
// Specifically, monster::action::action_id, monster::action::action_use_idx and monster::action::field_0xA are cleared.
|
||||
//
|
||||
// monster_action: Pointer to the monster's action field
|
||||
void ClearMonsterActionFields(struct action_data *monster_action);
|
||||
// Sets some the fields related to AI in the monster's data struct.
|
||||
// Specifically, monster::action::action_id, monster::action::action_use_idx and monster::action::field_0xA. The last 2 are always set to 0.
|
||||
//
|
||||
// action_pointer: Pointer to the monster's action field
|
||||
// action: Value to set monster::action::action_id to.
|
||||
void SetMonsterActionFields(struct action_data *action_pointer, enum action action);
|
||||
void SetMonsterActionFields(struct action_data *monster_action, enum action action);
|
||||
|
||||
#endif //PMDSKY_DUNGEON_ACTION_H
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
#include "dungeon_action.h"
|
||||
|
||||
void SetMonsterActionFields(struct action_data *action_pointer, enum action action)
|
||||
void ClearMonsterActionFields(struct action_data *monster_action)
|
||||
{
|
||||
action_pointer->action_id = action;
|
||||
action_pointer->action_parameters[0].action_use_idx = 0;
|
||||
action_pointer->action_parameters[1].action_use_idx = 0;
|
||||
monster_action->action_id = ACTION_NOTHING;
|
||||
monster_action->action_parameters[0].action_use_idx = 0;
|
||||
monster_action->action_parameters[1].action_use_idx = 0;
|
||||
}
|
||||
|
||||
void SetMonsterActionFields(struct action_data *monster_action, enum action action_id)
|
||||
{
|
||||
monster_action->action_id = action_id;
|
||||
monster_action->action_parameters[0].action_use_idx = 0;
|
||||
monster_action->action_parameters[1].action_use_idx = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "dungeon_ai.h"
|
||||
#include "dg_random.h"
|
||||
#include "direction.h"
|
||||
#include "dungeon_action.h"
|
||||
#include "dungeon_ai_items.h"
|
||||
#include "dungeon_capabilities_1.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
|
|
@ -24,7 +25,6 @@ extern struct dungeon *DUNGEON_PTR[];
|
|||
extern void EndFrozenClassStatus(struct entity *user, struct entity *target, bool8 log);
|
||||
extern void SubstitutePlaceholderStringTags(u8 *string_id, struct entity *entity, u32 param_3);
|
||||
extern void LogMessageByIdWithPopupCheckUser(struct entity *user, u32 message_id);
|
||||
extern void ClearMonsterActionFields(struct action_data *monster_action);
|
||||
extern void SetActionPassTurnOrWalk(struct action_data *monster_action, s16 monster_id);
|
||||
extern void ChooseAiMove(struct entity *monster);
|
||||
extern bool8 GetCanMoveFlag(s16 monster_id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user