mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-09 01:25:58 -05:00
Decomped ResetAction()
This commit is contained in:
@@ -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
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user