summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/code_8044210.s12
-rw-r--r--include/dungeon_action.h1
-rw-r--r--src/dungeon_action.c7
-rw-r--r--src/dungeon_ai_attack.c2
-rw-r--r--src/dungeon_ai_movement.c3
5 files changed, 11 insertions, 14 deletions
diff --git a/asm/code_8044210.s b/asm/code_8044210.s
index 282af3b..32a8e69 100644
--- a/asm/code_8044210.s
+++ b/asm/code_8044210.s
@@ -1316,14 +1316,4 @@ sub_8044C50:
_08044C84: .4byte 0x0000ffff
thumb_func_end sub_8044C50
- thumb_func_start ResetAction
-ResetAction:
- movs r2, 0
- movs r1, 0
- strh r1, [r0]
- strb r2, [r0, 0x4]
- strb r2, [r0, 0xC]
- bx lr
- thumb_func_end ResetAction
-
- .align 2, 0
+ .align 2, 0 \ No newline at end of file
diff --git a/include/dungeon_action.h b/include/dungeon_action.h
index 39add48..d625ba5 100644
--- a/include/dungeon_action.h
+++ b/include/dungeon_action.h
@@ -3,6 +3,7 @@
#include "dungeon_entity.h"
+void ResetAction(struct DungeonActionContainer *actionPointer);
void SetAction(struct DungeonActionContainer *actionPointer, u16 action);
void SetWalkAction(struct DungeonActionContainer *actionPointer, s16 species);
diff --git a/src/dungeon_action.c b/src/dungeon_action.c
index 9034e4c..912e8b4 100644
--- a/src/dungeon_action.c
+++ b/src/dungeon_action.c
@@ -5,6 +5,13 @@
#include "dungeon_entity.h"
#include "pokemon.h"
+void ResetAction(struct DungeonActionContainer *actionPointer)
+{
+ actionPointer->action = DUNGEON_ACTION_NONE;
+ actionPointer->actionUseIndex = 0;
+ actionPointer->unkC = 0;
+}
+
void SetAction(struct DungeonActionContainer *actionPointer, u16 action)
{
actionPointer->action = action;
diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c
index 6dbefbd..c84aca1 100644
--- a/src/dungeon_ai_attack.c
+++ b/src/dungeon_ai_attack.c
@@ -760,7 +760,7 @@ s32 WeightMove(struct DungeonEntity *user, s32 targetingFlags, struct DungeonEnt
else if (HasIQSkill(user, IQ_SKILL_EXP_GO_GETTER))
{
// BUG: expYieldRankings has lower values as the Pokémon's experience yield increases.
- // This causes Exp. Go-Getter to prioritizes Pokémon worth less experience
+ // This causes Exp. Go-Getter to prioritize Pokémon worth less experience
// instead of Pokémon worth more experience.
weight = gDungeonGlobalData->expYieldRankings[targetData->entityID];
}
diff --git a/src/dungeon_ai_movement.c b/src/dungeon_ai_movement.c
index 49609d7..326913a 100644
--- a/src/dungeon_ai_movement.c
+++ b/src/dungeon_ai_movement.c
@@ -28,7 +28,6 @@ extern char *gPtrItsaMonsterHouseMessage;
extern void SendImmobilizeEndMessage(struct DungeonEntity*, struct DungeonEntity*);
extern void SetMessageArgument(char[], struct DungeonEntity*, u32);
-extern void ResetAction(u16*);
extern void MoveIfPossible(struct DungeonEntity*, bool8);
extern u8 sub_8044B28(void);
extern void sub_807AB38(struct DungeonEntity *, u32);
@@ -206,7 +205,7 @@ void DecideAction(struct DungeonEntity *pokemon)
}
}
}
- ResetAction(&pokemonData->action.action);
+ ResetAction(&pokemonData->action);
if (pokemonData->clientType == CLIENT_TYPE_CLIENT)
{
SetWalkAction(&pokemonData->action, pokemonData->entityID);