More typedef and data

This commit is contained in:
Kermalis 2023-09-02 08:50:36 -04:00
parent 8ab503b172
commit b9afeb7fd6
48 changed files with 1169 additions and 1184 deletions

View File

@ -3,7 +3,7 @@
#include "dungeon_entity.h"
bool8 MoveMatchesChargingStatus(Entity *pokemon, struct Move *move);
bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move);
// checkCharge = Check for the move named Charge.
bool8 IsCharging(Entity *pokemon, bool8 checkCharge);

View File

@ -1,6 +1,8 @@
#ifndef CODE_801EE10_H
#define CODE_801EE10_H
#include "constants/move.h"
#include "input.h"
#include "pokemon.h"
#include "text.h"
@ -21,7 +23,16 @@ typedef struct unkStruct_203B270
u32 unk50;
u32 unk54;
UnkTextStruct2 unk58[4];
u8 *text;
const u8 *text;
} unkStruct_203B270;
u8 sub_801EE10(u32, s16, Move *, u32, const u8 *, u32);
// code_801EE10.s
extern u32 sub_801EF38(u32);
extern u32 sub_801F194(void);
extern void sub_801F1B0(bool8, bool8);
extern void sub_801F214(void);
extern void sub_801F280(u32); // Probably bool
#endif

View File

@ -1,6 +1,10 @@
#ifndef GUARD_CODE_801EE10_MID_H
#define GUARD_CODE_801EE10_MID_H
bool8 sub_801F808(u16 *);
u32 sub_801F890(void);
void sub_801F8D0(void);
// code_801EE10_mid.s
extern void sub_8021494(void);

View File

@ -16,7 +16,7 @@ void RaiseDefStatTarget(Entity * pokemon,Entity * target, s32 increment);
void RaiseSpDefStatTarget(Entity * pokemon,Entity * target, s32 increment);
void LongTossStatusTarget(Entity * pokemon,Entity * target);
void PierceStatusTarget(Entity * pokemon,Entity * target);
void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, struct Move *move, u8 *message);
void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *move, u8 *message);
void sub_8079764(Entity * pokemon);
void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus);
void SafeguardStatusTarget(Entity * pokemon, Entity * target);

View File

@ -14,10 +14,10 @@ struct AIPossibleMove
};
void DecideAttack(Entity *pokemon);
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, struct Move *move);
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move *move);
bool8 IsTargetInLineRange(Entity *user, Entity *target, s32 range);
s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, Entity *user, Entity *target, struct Move *move, u32 hasStatusChecker);
bool8 IsAITargetEligible(s32 targetingFlags, Entity *user, Entity *target, struct Move *move, bool32 hasStatusChecker);
s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, Entity *user, Entity *target, Move *move, u32 hasStatusChecker);
bool8 IsAITargetEligible(s32 targetingFlags, Entity *user, Entity *target, Move *move, bool32 hasStatusChecker);
s32 WeightMove(Entity *user, s32 targetingFlags, Entity *target, u32 moveType);
bool8 TargetRegularAttack(Entity *pokemon, u32 *targetDir, bool8 checkPetrified);
bool8 IsTargetInRange(Entity *pokemon, Entity *targetPokemon, s32 direction, s32 maxRange);

View File

@ -12,8 +12,8 @@ bool8 HasTactic(Entity *pokemon, u8 tactic);
bool8 IQSkillIsEnabled(Entity *pokemon, u8 IQSkill);
void LoadIQSkills(Entity *pokemon);
bool8 CanSeeTeammate(Entity * pokemon);
u8 GetMoveTypeForMonster(Entity *pokemon, struct Move *pokeMove);
s32 GetMovePower(Entity *pokemon, struct Move *pokeMove);
u8 GetMoveTypeForMonster(Entity *pokemon, Move *pokeMove);
s32 GetMovePower(Entity *pokemon, Move *pokeMove);
bool8 ToolboxEnabled(EntityInfo *pokemon);
bool8 SetVisualFlags(EntityInfo *entityInfo, u16 newFlag, bool8 param_3);

View File

@ -16,7 +16,7 @@ struct unkStruct_203B2BC
bool8 isTeamLeader;
u32 moveIndex; // some sort of move index
u16 moveID;
struct Move moves[8];
Move moves[8];
u16 moveIDs[MAX_MON_MOVES]; // some list of move IDs
u32 menuAction1;
u32 menuAction2;

View File

@ -7,14 +7,14 @@
#include "text.h"
// size: 0x18C
struct GulpinShopWork
typedef struct GulpinShopWork
{
/* 0x0 */ u32 isAsleep;
/* 0x4 */ s32 state;
u32 unk8;
/* 0xC */ s16 speciesNum; // species of chosen Pokemon
/* 0xE */ bool8 isNextMoveLinked;
/* 0x10 */ struct Move * moves;
/* 0x10 */ Move *moves;
u16 unk14[4];
u16 unk1C;
u16 unk1E;
@ -34,10 +34,12 @@ struct GulpinShopWork
u8 unk127;
OpenedFile **unk128;
UnkTextStruct2 unk12C[4];
};
} GulpinShopWork;
u32 CreateGulpinShop(s32 isAsleep, s16 pokeSpecies, struct Move *moves);
bool8 CreateGulpinShop(s32, s16, Move *);
void DestroyGulpinShop(void);
bool8 GulpinIsNextMoveLinked(void);
#endif
u32 sub_801E8C0(void);
#endif // GUARD_GULPIN_SHOP_H

47
include/gulpin_shop_1.h Normal file
View File

@ -0,0 +1,47 @@
#ifndef GUARD_GULPIN_SHOP_1_H
#define GUARD_GULPIN_SHOP_1_H
#include "constants/move.h"
#include "file_system.h"
#include "menu.h"
#include "pokemon.h"
#include "text.h"
// size: 0x1E0
struct unkStruct_203B27C
{
/* 0x0 */ bool32 isAsleep;
/* 0x4 */ s32 state;
/* 0x8 */ u32 fallbackState;
/* 0xC */ s16 speciesNum;
/* 0x10 */ PokemonStruct1 *pokeStruct;
/* 0x14 */ bool8 isNextMoveLinked;
bool8 unk15;
/* 0x16 */ bool8 isTeamLeader;
/* 0x18 */ u32 moveIndex;
// Group of move ids but not sure purpose just yet...
u16 unk1C;
u16 unk1E;
u16 unk20;
/* 0x24 */ Move moves[MAX_MON_MOVES * 2];
/* 0x64 */ u16 sequenceMoveIDs[MAX_MON_MOVES];
/* 0x6C */ u32 menuAction1;
/* 0x70 */ u32 menuAction2;
/* 0x74 */ u32 menuAction3;
/* 0x78 */ u32 menuAction4;
MenuItem unk7C[8];
u16 unkBC[8];
MenuStruct unkCC;
u8 fill11C[0x16C - 0x11C];
/* 0x16C */ OpenedFile *faceFile;
/* 0x170 */ u8 *faceData;
u16 unk174;
u16 unk176;
u8 unk178;
u8 unk179;
u8 unk17A;
OpenedFile **unk17C;
UnkTextStruct2 unk180[4];
};
#endif // GUARD_GULPIN_SHOP_1_H

View File

@ -1,10 +1,10 @@
#ifndef GUARD_MOVE_CHECKS_H
#define GUARD_MOVE_CHECKS_H
bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, struct Move *move);
bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, struct Move *move);
bool8 HasDisabledMove(struct Move *moves);
bool8 LastUsedMoveOutOfPP(struct Move *moves);
bool8 HasLastUsedMove(struct Move *moves);
bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move);
bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move);
bool8 HasDisabledMove(Move *moves);
bool8 LastUsedMoveOutOfPP(Move *moves);
bool8 HasLastUsedMove(Move *moves);
#endif

View File

@ -4,10 +4,10 @@
#include "dungeon_entity.h"
u32 sub_8057144(Entity * pokemon);
bool8 sub_80571F0(Entity * pokemon, struct Move *move);
bool8 sub_80571F0(Entity * pokemon, Move *move);
bool8 sub_805727C(Entity * pokemon, Entity * target, s32 chance);
bool8 sub_8057308(Entity *pokemon, s32 chance);
bool8 CanAIUseMove(Entity *pokemon, s32 moveIndex, bool8 hasPPChecker);
bool8 CanMonsterUseMove(Entity *pokemon, struct Move *move, bool8 hasPPChecker);
bool8 CanMonsterUseMove(Entity *pokemon, Move *move, bool8 hasPPChecker);
#endif

View File

@ -8,84 +8,84 @@
#include "subStruct_203B240.h"
// size: 0x8
struct MoveLearnset
typedef struct MoveLearnset
{
const u8 *levelUpMoves;
const u8 *HMTMMoves;
};
} MoveLearnset;
// size: 0x8
struct MoveDataFile
typedef struct MoveDataFile
{
struct MoveDataEntry *moveData;
struct MoveLearnset *moveLearnsets;
};
MoveDataEntry *moveData;
MoveLearnset *moveLearnsets;
} MoveDataFile;
bool8 CanBeSnatched(u16);
void CopyAndResetMoves(struct Move *, struct Move *);
void CopyBareMoveData(struct Move *, struct Move *);
void CopyAndResetMoves(Move *, Move *);
void CopyBareMoveData(Move *, Move *);
bool8 DoesMoveCharge(u16);
bool8 FailsWhileMuzzled(u16);
const u8 *GetHMTMMoves(s16);
const u8 *GetLevelUpMoves(s16);
s32 GetLinkedSequence(s32, struct Move *, u16 *);
s32 GetMoveAccuracyOrAIChance(struct Move *, u32);
u8 GetMoveAIWeight(struct Move *);
s32 GetMoveBasePower(struct Move *);
u32 GetMoveBasePP(struct Move *);
u32 GetMoveCritChance(struct Move *);
u32 GetMoveMaxUpgradeLevel(struct Move *);
u32 GetMoveNumberOfChainedHits(struct Move *);
s16 GetMoveTargetAndRange(struct Move *, bool32);
s32 GetLinkedSequence(s32, Move *, u16 *);
s32 GetMoveAccuracyOrAIChance(Move *, u32);
u8 GetMoveAIWeight(Move *);
s32 GetMoveBasePower(Move *);
u32 GetMoveBasePP(Move *);
u32 GetMoveCritChance(Move *);
u32 GetMoveMaxUpgradeLevel(Move *);
u32 GetMoveNumberOfChainedHits(Move *);
s16 GetMoveTargetAndRange(Move *, bool32);
u8 *GetMoveUseText(u16);
u8 GetMoveType(struct Move *);
void InitPokemonMove(struct Move *, u16);
void InitZeroedPPPokemonMove(struct Move *, u16);
bool8 IsAnyMoveLinked(s32, struct Move *);
bool8 IsMoveEnabled(s32, struct Move *);
bool8 IsMoveSet(s32, struct Move *);
bool8 IsNextMoveLinked(s32, struct Move *);
u8 GetMoveType(Move *);
void InitPokemonMove(Move *, u16);
void InitZeroedPPPokemonMove(Move *, u16);
bool8 IsAnyMoveLinked(s32, Move *);
bool8 IsMoveEnabled(s32, Move *);
bool8 IsMoveSet(s32, Move *);
bool8 IsNextMoveLinked(s32, Move *);
bool8 IsReflectedByMagicCoat(u16);
bool8 IsSoundMove(struct Move *);
bool8 IsSoundMove(Move *);
void LoadWazaParameters(void);
bool8 MoveCannotHitFrozen(struct Move *);
bool8 MoveIgnoresTaunted(struct Move *);
void RemoveLinkSequenceFromMoves8(struct Move *, s32);
void RestorePokemonMoves(struct unkStruct_8094924 *, struct Move *);
void SavePokemonMoves(struct unkStruct_8094924 *, struct Move *);
bool8 ToggleMoveEnabled(s32, struct Move *);
bool8 ToggleSetMove(s32, struct Move *);
bool8 TryLinkMovesAfter(s32, struct Move *);
void unk_CopyMoves4To8(struct Move *, struct Move *);
void unk_CopyMoves4To8AndClearFlag2Unk4(struct Move *, struct Move *);
s32 unk_FindMoveEnabledForAIAfter4(struct Move *, s32);
s32 unk_FindMoveEnabledForAIAfter8(struct Move *, s32);
s32 unk_FindMoveEnabledForAIAfter8_v2(struct Move *, s32);
s32 unk_FindMoveEnabledForAIBefore8(struct Move *, s32);
s32 unk_FindMoveEnabledForAIBefore8_v2(struct Move *, s32);
void unk_FixLinkedMovesSetEnabled4(struct Move *);
void unk_FixLinkedMovesSetEnabled8(struct Move *);
void unk_FixLinkedMovesSetEnabled8_v2(struct Move *);
bool8 MoveCannotHitFrozen(Move *);
bool8 MoveIgnoresTaunted(Move *);
void RemoveLinkSequenceFromMoves8(Move *, s32);
void RestorePokemonMoves(struct unkStruct_8094924 *, Move *);
void SavePokemonMoves(struct unkStruct_8094924 *, Move *);
bool8 ToggleMoveEnabled(s32, Move *);
bool8 ToggleSetMove(s32, Move *);
bool8 TryLinkMovesAfter(s32, Move *);
void unk_CopyMoves4To8(Move *, Move *);
void unk_CopyMoves4To8AndClearFlag2Unk4(Move *, Move *);
s32 unk_FindMoveEnabledForAIAfter4(Move *, s32);
s32 unk_FindMoveEnabledForAIAfter8(Move *, s32);
s32 unk_FindMoveEnabledForAIAfter8_v2(Move *, s32);
s32 unk_FindMoveEnabledForAIBefore8(Move *, s32);
s32 unk_FindMoveEnabledForAIBefore8_v2(Move *, s32);
void unk_FixLinkedMovesSetEnabled4(Move *);
void unk_FixLinkedMovesSetEnabled8(Move *);
void unk_FixLinkedMovesSetEnabled8_v2(Move *);
s32 unk_MoveIDPrintMoveDescription(s32, u16, s32, struct subStruct_203B240 **);
s32 unk_PrintMoveDescription(s32, struct Move *, s32, struct subStruct_203B240 **);
s32 unk_SetMoveToFirstInLinkedSequence4(struct Move *, s32);
s32 unk_SetMoveToFirstInLinkedSequence8_v2(struct Move *, s32);
s32 unk_SetMoveToLastInLinkedSequence4(struct Move *, s32);
s32 unk_SetMoveToLastInLinkedSequence8_v2(struct Move *, s32);
bool8 UnlinkMovesAfter(s32, struct Move *);
void UnSetMove(s32, struct Move *);
s32 unk_PrintMoveDescription(s32, Move *, s32, struct subStruct_203B240 **);
s32 unk_SetMoveToFirstInLinkedSequence4(Move *, s32);
s32 unk_SetMoveToFirstInLinkedSequence8_v2(Move *, s32);
s32 unk_SetMoveToLastInLinkedSequence4(Move *, s32);
s32 unk_SetMoveToLastInLinkedSequence8_v2(Move *, s32);
bool8 UnlinkMovesAfter(s32, Move *);
void UnSetMove(s32, Move *);
u8 sub_809287C(struct Move *);
void sub_80928A0(u8 *, struct Move *, const struct unkStruct_80928C0 *);
void sub_80928C0(u8 *, struct Move *, const struct unkStruct_80928C0 *);
void sub_8092AA8(struct Move *, u16);
u8 sub_809287C(Move *);
void sub_80928A0(u8 *, Move *, const struct unkStruct_80928C0 *);
void sub_80928C0(u8 *, Move *, const struct unkStruct_80928C0 *);
void sub_8092AA8(Move *, u16);
void sub_8092C84(u8 *, u16);
s32 sub_8092DB8(struct Move *, s32);
s32 sub_8092F4C(struct Move *, s32);
bool8 sub_8093318(s32, struct Move *);
bool8 sub_809333C(s32, struct Move *);
s32 sub_80935B8(struct Move *, s32);
void sub_8094060(struct Move *, struct Move *);
s32 sub_8092DB8(Move *, s32);
s32 sub_8092F4C(Move *, s32);
bool8 sub_8093318(s32, Move *);
bool8 sub_809333C(s32, Move *);
s32 sub_80935B8(Move *, s32);
void sub_8094060(Move *, Move *);
void sub_8094184(struct unkStruct_8094924 *, struct unkStruct_8094184 *);
void sub_80941FC(struct unkStruct_8094924 *, struct unkStruct_8094184 *);

View File

@ -4,24 +4,24 @@
#include "constants/move.h"
#include "dungeon_entity.h"
bool8 sub_805B668(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B668(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B734(Entity *pokemon, Entity *target);
bool8 RecycleMoveAction(Entity *pokemon, Entity *target);
bool8 ReflectMoveAction(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B808(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 ReflectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B808(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B884(Entity *pokemon, Entity *target);
bool8 SkullBashMoveAction(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B910(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B968(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 SkullBashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B910(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B968(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805BA44(Entity *pokemon, Entity *target);
bool8 sub_805BA50(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805BA50(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805BB64(Entity *pokemon, Entity *target);
bool8 sub_805BB74(Entity *pokemon, Entity *target);
bool8 sub_805BB98(Entity *pokemon, Entity *target);
bool8 CleanseOrbAction(Entity *pokemon,Entity *target);
bool8 sub_805BC70(Entity *pokemon, Entity *target);
bool8 sub_805BC98(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805BC98(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SilenceOrbAction(Entity *pokemon,Entity *target);
bool8 ScannerOrbAction(Entity *pokemon, Entity *target);
bool8 RadarOrbAction(Entity *pokemon, Entity *target);
@ -36,12 +36,12 @@ bool8 sub_805BF34(Entity *pokemon, Entity *target);
bool8 TrapbustOrbAction(Entity *pokemon,Entity *target);
bool8 sub_805C080(Entity *pokemon, Entity *target);
bool8 sub_805C128(Entity *pokemon, Entity *target);
bool8 sub_805C138(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805C138(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target);
bool8 sub_805C1BC(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805C1E4(Entity *pokemon, Entity *target);
bool8 ShockerOrbAction(Entity *pokemon, Entity *target);
bool8 sub_805C208(Entity *pokemon, Entity *target, struct Move *move, u32 param_4);
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4);
bool8 sub_805C288(Entity *pokemon, Entity *target);
bool8 sub_805C2A0(Entity *pokemon, Entity *target);
bool8 FillInOrbAction(Entity *pokemon,Entity *target);

View File

@ -4,6 +4,6 @@
#include "constants/move.h"
#include "dungeon_entity.h"
s16 GetMoveTargetAndRangeForPokemon(Entity *pokemon, struct Move *move, bool32 isAI);
s16 GetMoveTargetAndRangeForPokemon(Entity *pokemon, Move *move, bool32 isAI);
#endif

View File

@ -41,7 +41,7 @@ const u32 gMultiTurnChargingStatuses[10] = {
ALIGNED(4) const char chargingStatusFill[] = "pksdir0";
u32 sub_8057070(struct Move *move)
u32 sub_8057070(Move *move)
{
u32 numberOfChainedHits;
numberOfChainedHits = GetMoveNumberOfChainedHits(move);
@ -51,7 +51,7 @@ u32 sub_8057070(struct Move *move)
return numberOfChainedHits;
}
bool8 MoveCausesPaused(struct Move *move)
bool8 MoveCausesPaused(Move *move)
{
if(move->id == MOVE_FRENZY_PLANT) return TRUE;
if(move->id == MOVE_HYDRO_CANNON) return TRUE;
@ -61,7 +61,7 @@ bool8 MoveCausesPaused(struct Move *move)
return FALSE;
}
bool8 MoveMatchesChargingStatus(Entity *pokemon, struct Move *move)
bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move)
{
if (!EntityExists(pokemon))
{

View File

@ -7,7 +7,6 @@
#include "menu.h"
#include "moves.h"
#include "pokemon.h"
#include "text.h"
extern void sub_8099690(u32);
@ -32,7 +31,6 @@ extern u8 gUnknown_202E218[0x50];
extern bool8 IsHMItem(u8);
extern void sub_801B178(void);
extern void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon);
extern u32 sub_801E8C0(void);
extern bool8 CanMonLearnMove(u16 moveID, s16 _species);
extern s32 sub_808D580(s32*);
@ -44,7 +42,7 @@ struct unkStruct_203B22C
/* 0x4 */ u32 teamItemIndex;
/* 0x8 */ u8 id; // item index
/* 0xA */ u16 moveID; // item move??
/* 0xC */ struct Move moves[MAX_MON_MOVES * 2];
/* 0xC */ Move moves[MAX_MON_MOVES * 2];
/* 0x4C */ s32 monsAbleToLearnMove; // number of party members able to learn move
/* 0x50 */ s16 unk50[MAX_TEAM_MEMBERS]; // species IDs of each member able to learn move
/* 0x58 */ s16 chosenPokemon; // species of pokemon that will learn move
@ -169,7 +167,7 @@ void sub_801B200(void)
{
s32 temp;
s32 moveIndex;
struct Move *pokeMove;
Move *pokeMove;
if(sub_80144A4(&temp) == 0)
{

View File

@ -11,9 +11,8 @@ extern UnkTextStruct2 gUnknown_80DC274;
u32 sub_8006544(u32 index);
s32 sub_801F3F8(void);
void sub_801F280(u32);
u8 sub_801EE10(u32 param_1, s16 species, struct Move *moves, u32 param_4, u8 *text, u32 param_6)
u8 sub_801EE10(u32 param_1, s16 species, Move *moves, u32 param_4, const u8 *text, u32 param_6)
{
s32 iVar5;
s32 iVar8;

View File

@ -72,7 +72,7 @@ void sub_801F700(void);
s32 sub_801F3F8(void)
{
struct Move *move;
Move *move;
int index;
s32 counter;
@ -275,10 +275,9 @@ bool8 sub_801F808(u16 *moveIDs)
return 1;
}
s32 sub_801F890(void)
u32 sub_801F890(void)
{
switch(gUnknown_203B278->state)
{
switch (gUnknown_203B278->state) {
case 0:
sub_801FA58();
break;

View File

@ -252,11 +252,11 @@ void sub_80485B0(Entity *pokemon, Entity * target)
s32 moveIndex;
EntityInfo *entityInfo;
#ifndef NONMATCHING
register struct Move *movePtr1 asm("r4"); // r4
register struct Move *movePtr2 asm("r5"); // r5
register Move *movePtr1 asm("r4"); // r4
register Move *movePtr2 asm("r5"); // r5
#else
struct Move *movePtr1; // r4
struct Move *movePtr2; // r5
Move *movePtr1; // r4
Move *movePtr2; // r5
#endif
u8 moveBoost;
s32 movePowerBoost;

View File

@ -19,7 +19,7 @@
#include "tile_types.h"
#include "weather.h"
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, Move *move, s32 param_4);
struct NaturePowerMove
{
u16 moveID;
@ -109,15 +109,15 @@ extern void sub_806ABAC(Entity *, Entity *);
extern u8 sub_806F4A4(Entity *, u32);
extern void sub_807DF38(Entity *pokemon, Entity *target, Position *pos, u32, u8 moveType, s16);
extern void nullsub_92(Entity *);
extern u32 sub_8055864(Entity *pokemon, Entity *target, struct Move *param_3, s32 param_4, s32 param_5);
extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5);
void sub_8079E34(Entity * pokemon, Entity * target, bool8 param_3);
extern u8 sub_807EAA0(u32, u32);
extern void sub_80522F4(Entity *r1, Entity *r2, const char[]);
extern s32 sub_80556BC(Entity *, Entity *, u8, struct Move *, u32, u32);
extern s32 sub_80556BC(Entity *, Entity *, u8, Move *, u32, u32);
extern bool8 sub_805727C(Entity *, Entity *, s16);
extern void sub_806F370(Entity *r0, Entity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
extern void SetMessageArgument(char[], Entity*, u32);
extern u32 sub_8055640(Entity *, Entity *, struct Move *, u32, u32);
extern u32 sub_8055640(Entity *, Entity *, Move *, u32, u32);
u8 sub_8057620(u32 param_1);
extern s16 sub_8094828(u16, u8);
extern bool8 sub_8057308(Entity *, u32);
@ -197,7 +197,7 @@ bool8 sub_805755C(Entity* pokemon, u16 moveID)
void sub_8057588(Entity * pokemon, u8 param_2)
{
struct Move *move;
Move *move;
s32 index;
s32 PPtoRemove;
s32 PPCounter;
@ -231,7 +231,7 @@ void sub_8057588(Entity * pokemon, u8 param_2)
}
}
s16 sub_8057600(struct Move *move, s32 itemID)
s16 sub_8057600(Move *move, s32 itemID)
{
return sub_8094828(move->id, sub_8057620(itemID));
}
@ -244,7 +244,7 @@ u8 sub_8057620(u32 itemID)
return itemID;
}
bool8 sub_8057634(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 sub_8057634(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool8 flag;
@ -258,7 +258,7 @@ bool8 sub_8057634(Entity *pokemon, Entity *target, struct Move *move, s32 param_
return flag;
}
bool8 sub_805768C(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool8 flag;
@ -302,7 +302,7 @@ bool8 VitalThrowMoveAction(Entity * pokemon, Entity * target)
return TRUE;
}
bool8 DigMoveAction(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
struct Tile *tile;
bool8 flag;
@ -363,7 +363,7 @@ bool32 sub_80578EC(Entity *pokemon, Entity *target)
return TRUE;
}
bool32 sub_80578FC(Entity *pokemon, Entity *target, struct Move * move, u32 param_4)
bool32 sub_80578FC(Entity *pokemon, Entity *target, Move * move, u32 param_4)
{
bool32 flag;
@ -383,14 +383,14 @@ bool32 EncoreMoveAction(Entity *pokemon, Entity *target)
return TRUE;
}
bool32 RageMoveAction(Entity *pokemon, Entity *target, struct Move *move)
bool32 RageMoveAction(Entity *pokemon, Entity *target, Move *move)
{
// {ARG_POKEMON_0} is enraged
SetChargeStatusTarget(pokemon,target,STATUS_ENRAGED,move,gUnknown_80FAC88);
return TRUE;
}
bool32 sub_8057974(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool32 sub_8057974(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
s32 newHP;
bool8 local_24;
@ -444,9 +444,9 @@ bool8 PainSplitMoveAction(Entity *pokemon, Entity *target)
bool8 TormentMoveAction(Entity *pokemon, Entity *target)
{
struct Move *movePtr;
Move *movePtr;
s32 iVar4;
struct Move struggleMove;
Move struggleMove;
EntityInfo *entityInfo;
bool8 isTormented;
@ -512,7 +512,7 @@ bool8 sub_8057BC4(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 SnoreMoveAction(Entity *pokemon, Entity *target, struct Move * move, u32 param_4)
bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, u32 param_4)
{
bool8 flag;
@ -537,7 +537,7 @@ bool8 sub_8057C68(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 sub_8057C88(Entity *pokemon, Entity *target, struct Move * move, u32 param_4)
bool8 sub_8057C88(Entity *pokemon, Entity *target, Move * move, u32 param_4)
{
bool8 flag;
@ -551,7 +551,7 @@ bool8 sub_8057C88(Entity *pokemon, Entity *target, struct Move * move, u32 param
return flag;
}
bool32 sub_8057CD0(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool32 sub_8057CD0(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
u32 weather;
s32 flag;
@ -565,7 +565,7 @@ bool32 sub_8057CD0(Entity * pokemon, Entity * target, struct Move * move, u32 pa
return flag;
}
bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
u32 uVar3;
bool8 flag;
@ -680,7 +680,7 @@ bool8 sub_8057E50(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 sub_8057E6C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8057E6C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
EntityInfo *entityInfo;
bool8 flag;
@ -697,7 +697,7 @@ bool8 sub_8057E6C(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8057ED0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8057ED0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -724,7 +724,7 @@ bool8 sub_8057F24(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 sub_8057F7C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8057F7C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -769,7 +769,7 @@ bool8 sub_8057FF4(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 sub_805805C(Entity * pokemon,Entity * target,struct Move * move,s32 param_4)
bool8 sub_805805C(Entity * pokemon,Entity * target,Move * move,s32 param_4)
{
s16 *psVar3;
s32 index;
@ -824,7 +824,7 @@ bool8 sub_805815C(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 sub_805816C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805816C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -840,7 +840,7 @@ bool8 sub_805816C(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_80581D0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80581D0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -856,7 +856,7 @@ bool8 sub_80581D0(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058234(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058234(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
u16 uVar1;
uVar1 = (move->id == MOVE_FORESIGHT) ? 0x7A : 0x51;
@ -864,13 +864,13 @@ bool8 sub_8058234(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return TRUE;
}
bool8 sub_805825C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805825C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseAccuracyStageTarget(pokemon, target, gUnknown_8106A50);
return TRUE;
}
bool8 sub_8058270(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
u32 r3;
@ -882,25 +882,25 @@ bool8 sub_8058270(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_80582AC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80582AC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1);
return TRUE;
}
bool8 sub_80582C4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80582C4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
ParalyzeStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 sub_80582D4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80582D4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1);
return TRUE;
}
bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
bool8 flag;
@ -915,13 +915,13 @@ bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, struct Move * move,
return flag;
}
bool8 BideMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
SetChargeStatusTarget(pokemon, target, STATUS_BIDE, move, *gUnknown_80FAC74);
return TRUE;
}
bool8 sub_805836C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805836C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
s32 iVar2;
bool8 local_18;
@ -937,7 +937,7 @@ bool8 sub_805836C(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return local_18;
}
bool8 sub_80583D8(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80583D8(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -952,7 +952,7 @@ bool8 sub_80583D8(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058430(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058430(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -967,7 +967,7 @@ bool8 sub_8058430(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058478(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058478(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -982,7 +982,7 @@ bool8 sub_8058478(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_80584C0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80584C0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
s32 diffHP;
bool8 local_24;
@ -1003,7 +1003,7 @@ bool8 sub_80584C0(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return local_24;
}
bool8 sub_8058548(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058548(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
u32 r5;
@ -1015,7 +1015,7 @@ bool8 sub_8058548(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058580(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1030,7 +1030,7 @@ bool8 sub_8058580(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_80585CC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80585CC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1045,7 +1045,7 @@ bool8 sub_80585CC(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058638(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058638(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1060,7 +1060,7 @@ bool8 sub_8058638(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
bool8 flag;
@ -1075,7 +1075,7 @@ bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, struct Move * move
return flag;
}
bool8 sub_80586DC(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 sub_80586DC(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
bool8 hasLiquidOoze;
s32 uVar3;
@ -1108,7 +1108,7 @@ bool8 sub_80586DC(Entity * pokemon, Entity * target, struct Move * move, u32 par
// NOTE: copy of sub_805AFA4 in status_checker.c except for different reg for entityInfo
bool8 sub_8058770(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 sub_8058770(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
s32 r0;
s32 r2;
@ -1147,7 +1147,7 @@ bool8 sub_8058770(Entity * pokemon, Entity * target, struct Move * move, u32 par
return flag;
}
bool8 sub_80587E8(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 sub_80587E8(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
bool8 flag;
@ -1161,13 +1161,13 @@ bool8 sub_80587E8(Entity * pokemon, Entity * target, struct Move * move, u32 par
return flag;
}
bool8 sub_8058838(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058838(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 3, 1, TRUE);
return TRUE;
}
bool8 sub_8058858(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058858(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
s32 index = gUnknown_8106A4C;
LowerAttackStageTarget(pokemon, target, index, 1, 1, TRUE);
@ -1175,19 +1175,19 @@ bool8 sub_8058858(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return TRUE;
}
bool8 sub_805889C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
ImmobilizedStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_80588A8(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80588A8(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
sub_8079E34(pokemon, target, TRUE);
return TRUE;
}
bool8 sub_80588B8(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80588B8(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag = FALSE;
if(sub_8055640(pokemon, target, move, 0x80 << 1, param_4) != 0)
@ -1201,7 +1201,7 @@ bool8 sub_80588B8(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_80588F4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80588F4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
EntityInfo *entityInfo = target->info;
@ -1211,7 +1211,7 @@ bool8 sub_80588F4(Entity *pokemon, Entity *target, struct Move *move, u32 param_
}
bool8 sub_8058930(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058930(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag = FALSE;
EntityInfo *entityInfo;
@ -1239,19 +1239,19 @@ bool8 sub_8058930(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_80589D4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80589D4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
HealTargetHP(pokemon, target, gUnknown_80F500A[GetApparentWeather(pokemon)], 0, TRUE);
return TRUE;
}
bool8 sub_8058A08(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058A08(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
return TRUE;
}
bool8 sub_8058A18(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058A18(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag = FALSE;
if(sub_8055640(pokemon, target, move, 0x80 << 1, param_4) != 0)
@ -1265,20 +1265,20 @@ bool8 sub_8058A18(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058A54(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058A54(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
SureShotStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4EB8, FALSE));
return TRUE;
}
bool8 sub_8058A7C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058A7C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1);
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A50, 1);
return TRUE;
}
bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag = FALSE;
@ -1298,7 +1298,7 @@ bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, struct Move *move, u3
return flag;
}
bool8 sub_8058B3C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058B3C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1313,7 +1313,7 @@ bool8 sub_8058B3C(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058B84(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058B84(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
EntityInfo *entityInfo;
@ -1332,19 +1332,19 @@ bool8 sub_8058B84(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 EndureMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
EndureStatusTarget(pokemon, pokemon);
return TRUE;
}
bool8 sub_8058BF0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058BF0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
return TRUE;
}
bool8 sub_8058C00(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1359,7 +1359,7 @@ bool8 sub_8058C00(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058C48(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058C48(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
s32 rand;
s32 iVar2;
@ -1382,7 +1382,7 @@ bool8 sub_8058C48(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058C98(Entity *pokemon, Entity *target, struct Move *move, u32 param_4, u32 param_5)
bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5)
{
bool8 flag;
@ -1397,7 +1397,7 @@ bool8 sub_8058C98(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058CEC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058CEC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag = FALSE;
if(sub_8055640(pokemon, target, move, 0x80 << 1, param_4) != 0)
@ -1411,7 +1411,7 @@ bool8 sub_8058CEC(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8058D38(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058D38(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
SleeplessStatusTarget(pokemon, target);
return TRUE;
@ -1419,7 +1419,7 @@ bool8 sub_8058D38(Entity *pokemon, Entity *target, struct Move *move, u32 param_
// NOTE: same as sub_8058770
bool8 sub_8058D44(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 sub_8058D44(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
s32 r0;
s32 r2;
@ -1459,7 +1459,7 @@ bool8 sub_8058D44(Entity * pokemon, Entity * target, struct Move * move, u32 par
}
bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
s32 index;
EntityInfo *iVar3;
@ -1485,7 +1485,7 @@ bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, struct Move * move, u
return TRUE;
}
bool8 sub_8058E5C(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
int iVar2;
int iVar3;
@ -1509,13 +1509,13 @@ bool8 sub_8058E5C(Entity *pokemon, Entity *target, struct Move *move, s32 param_
return flag;
}
bool8 sub_8058EE0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
HealTargetHP(pokemon, target, target->info->maxHPStat / 2, 0, TRUE);
return TRUE;
}
bool32 sub_8058F04(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool32 sub_8058F04(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool32 flag;
EntityInfo *entityInfo;
@ -1535,11 +1535,11 @@ bool32 sub_8058F04(Entity *pokemon, Entity *target, struct Move *move, s32 param
return flag;
}
bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool8 flag;
s32 tileset;
struct Move natureMove;
Move natureMove;
tileset = gDungeon->tileset;
if (tileset < 0) {
@ -1553,7 +1553,7 @@ bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, struct Move *move,
return flag;
}
bool8 sub_8058FBC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8058FBC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1568,25 +1568,25 @@ bool8 sub_8058FBC(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8059004(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059004(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
sub_807DF38(pokemon, target, &target->pos, 1, GetMoveType(move), sub_8057600(move, param_4));
return TRUE;
}
bool8 sub_8059050(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059050(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
ParalyzeStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 ChargeMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
SetChargeStatusTarget(pokemon, target, STATUS_CHARGING, move, *gUnknown_80FAD6C);
return TRUE;
}
bool8 sub_8059080(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059080(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1601,13 +1601,13 @@ bool8 sub_8059080(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 MistMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
MistStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_80590D4(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 sub_80590D4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
u8 moveType;
bool8 uVar5;
@ -1631,7 +1631,7 @@ bool8 sub_80590D4(Entity *pokemon, Entity *target, struct Move *move, s32 param_
return flag;
}
bool8 sub_8059190(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059190(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1646,13 +1646,13 @@ bool8 sub_8059190(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
SafeguardStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_80591E4(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 sub_80591E4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool8 hasLiquidOoze;
s32 iVar3;
@ -1687,7 +1687,7 @@ bool8 sub_80591E4(Entity *pokemon, Entity *target, struct Move *move, s32 param_
return flag;
}
bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
u8 ability_1;
u8 ability_2;

View File

@ -95,9 +95,9 @@ extern s16 gUnknown_80F4DE2;
extern u8 *gUnknown_80FEB90[];
extern s16 gUnknown_80F501A[];
extern u32 sub_8055864(Entity *pokemon, Entity *target, struct Move *param_3, s32 param_4, s32 param_5);
extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5);
extern void sub_80943A0(void*, s32);
extern s16 sub_8057600(struct Move*, u32);
extern s16 sub_8057600(Move*, u32);
extern u8 sub_8044B28(void);
extern u8 sub_803F428(Position *pos);
extern void IncreaseEntityPixelPos(Entity *, u32, u32);
@ -114,7 +114,7 @@ extern void SetMessageArgument(u8 *buffer, Entity *r1, u32);
extern void SetMessageArgument_2(u8 *buffer, EntityInfo *r1, u32);
void sub_80522F4(Entity *r0, Entity *r1, char r2[]);
extern void sub_806A6E8(Entity *);
extern u32 sub_8055640(Entity *, Entity *, struct Move *, u32, u32);
extern u32 sub_8055640(Entity *, Entity *, Move *, u32, u32);
extern void sub_807EA30(u32);
extern void sub_806ABAC(Entity *, Entity *);
extern u8 sub_807EAA0(u32, u32);
@ -132,7 +132,7 @@ extern u8 sub_806F4A4(Entity *, u32);
extern void sub_807DF38(Entity *pokemon, Entity *target, Position *pos, u32, u8 moveType, s16);
bool8 sub_8059424(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059424(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -147,7 +147,7 @@ bool8 sub_8059424(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_805946C(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_805946C(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
s32 HP;
bool8 flag;
@ -170,7 +170,7 @@ bool8 sub_805946C(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return flag;
}
bool8 sub_80594E0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80594E0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
gDungeon->unkE269 = gUnknown_80F4F42;
if(sub_807EAA0(1, 0) == 0)
@ -180,13 +180,13 @@ bool8 sub_80594E0(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return TRUE;
}
bool8 sub_8059528(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
LowerAccuracyStageTarget(pokemon, target, gUnknown_8106A4C, TRUE);
return TRUE;
}
bool8 sub_8059540(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059540(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -201,13 +201,13 @@ bool8 sub_8059540(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8059588(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059588(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1);
return TRUE;
}
bool8 sub_80595A0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80595A0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -222,7 +222,7 @@ bool8 sub_80595A0(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_80595EC(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_80595EC(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
u8 moveType;
u8 local_20;
@ -240,7 +240,7 @@ bool8 sub_80595EC(Entity * pokemon,Entity * target,struct Move * move,u32 param_
}
}
bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
u8 weather; // weather and flag are reused in same variable
s32 movePower;
@ -262,7 +262,7 @@ bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,struct Move * move,u3
return weather;
}
bool8 sub_8059714(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_8059714(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
u8 local_20;
@ -272,7 +272,7 @@ bool8 sub_8059714(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return local_20;
}
bool8 FlyMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 FlyMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
bool8 flag;
@ -288,13 +288,13 @@ bool8 FlyMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32 p
return flag;
}
bool8 sub_80597F0(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_80597F0(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
sub_807DF38(pokemon,target,&target->pos,2,GetMoveType(move),sub_8057600(move,param_4));
return TRUE;
}
bool8 DiveMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32 param_4)
bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4)
{
bool8 flag;
@ -313,7 +313,7 @@ bool8 DiveMoveAction(Entity * pokemon, Entity * target, struct Move * move, u32
return flag;
}
bool8 sub_80598CC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80598CC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -328,13 +328,13 @@ bool8 sub_80598CC(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 StockpileMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
HandleStockpile(pokemon, target);
return TRUE;
}
bool8 sub_8059928(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_8059928(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
bool8 flag;
s32 iVar2;
@ -354,7 +354,7 @@ bool8 sub_8059928(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return flag;
}
bool8 sub_8059988(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_8059988(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
bool8 flag;
@ -370,7 +370,7 @@ bool8 sub_8059988(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return flag;
}
bool8 sub_80599EC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
s32 HP;
@ -381,13 +381,13 @@ bool8 sub_80599EC(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return TRUE;
}
bool8 sub_8059A18(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059A18(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseAccuracyStageTarget(pokemon, target, gUnknown_8106A50);
return TRUE;
}
bool8 sub_8059A2C(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_8059A2C(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
u8 local_20;
u32 level;
@ -399,25 +399,25 @@ bool8 sub_8059A2C(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return local_20;
}
bool8 sub_8059AA8(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059AA8(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
ConfuseStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 sub_8059AB8(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059AB8(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
TauntStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_8059AC4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059AC4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
HealTargetHP(pokemon, target, gUnknown_80F501A[GetApparentWeather(pokemon)], 0, TRUE);
return TRUE;
}
bool8 sub_8059AF8(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_8059AF8(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
u8 local_20;
@ -433,21 +433,21 @@ bool8 sub_8059AF8(Entity * pokemon,Entity * target,struct Move * move,u32 param_
}
}
bool8 sub_8059B94(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059B94(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2);
return TRUE;
}
bool8 ConversionMoveAction(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
u8 moveType;
struct Move *movePtr;
Move *movePtr;
s32 index;
EntityInfo * info;
s32 counter;
s32 newIndex;
struct Move *moveStack [MAX_MON_MOVES];
Move *moveStack [MAX_MON_MOVES];
counter = 0;
info = target->info;
@ -483,13 +483,13 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,struct Move * move,u
}
}
bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
Conversion2StatusTarget(pokemon, target);
return TRUE;
}
bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
flag = FALSE;
@ -505,19 +505,19 @@ bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, struct Move *move,
return flag;
}
bool8 sub_8059CD8(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 2);
return TRUE;
}
bool8 sub_8059CF0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059CF0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
sub_807D148(pokemon, target, 0, NULL);
return TRUE;
}
bool8 sub_8059D00(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059D00(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -532,13 +532,13 @@ bool8 sub_8059D00(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8059D48(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059D48(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
ParalyzeStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 sub_8059D58(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059D58(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -553,25 +553,25 @@ bool8 sub_8059D58(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8059D98(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059D98(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
ImmobilizedStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_8059DA4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059DA4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
PoisonedStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 sub_8059DB4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059DB4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
BadlyPoisonedStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 sub_8059DC4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059DC4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -586,7 +586,7 @@ bool8 sub_8059DC4(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8059E0C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_8059E0C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -601,7 +601,7 @@ bool8 sub_8059E0C(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_8059E54(Entity * pokemon,Entity * target,struct Move * move,u32 param_4,u8 param_5)
bool8 sub_8059E54(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5)
{
u8 moveType;
u32 movePower;
@ -630,7 +630,7 @@ bool8 sub_8059E54(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return flag;
}
bool8 sub_8059F38(Entity * pokemon,Entity * target,struct Move * move,u32 param_4)
bool8 sub_8059F38(Entity * pokemon,Entity * target,Move * move,u32 param_4)
{
bool8 flag;
@ -651,7 +651,7 @@ bool8 sub_8059F38(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return flag;
}
bool8 sub_8059FC8(Entity * pokemon,Entity * target,struct Move * move,u32 param_4,u8 param_5)
bool8 sub_8059FC8(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5)
{
u8 moveType;
u32 movePower;
@ -680,7 +680,7 @@ bool8 sub_8059FC8(Entity * pokemon,Entity * target,struct Move * move,u32 param_
return flag;
}
bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
bool8 flag;
@ -708,7 +708,7 @@ bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, struct Move *move,
return flag;
}
bool8 sub_805A120(Entity * pokemon,Entity * target, struct Move *move, u32 param_4)
bool8 sub_805A120(Entity * pokemon,Entity * target, Move *move, u32 param_4)
{
EntityInfo *r9;
EntityInfo *r8;
@ -766,7 +766,7 @@ bool8 sub_805A120(Entity * pokemon,Entity * target, struct Move *move, u32 param
}
}
bool8 sub_805A210(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805A210(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
bool8 flag;
@ -775,7 +775,7 @@ bool8 sub_805A210(Entity * pokemon, Entity * target, struct Move *move, u32 para
return flag;
}
bool8 sub_805A23C(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805A23C(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
if(move->id == MOVE_MUD_SPORT)
{
@ -789,7 +789,7 @@ bool8 sub_805A23C(Entity * pokemon, Entity * target, struct Move *move, u32 para
}
bool8 sub_805A258(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A258(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -804,24 +804,24 @@ bool8 sub_805A258(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_805A2A0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A2A0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
return sub_805BA50(pokemon, target, move, param_4);
}
bool8 sub_805A2B0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A2B0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A50, 2);
return TRUE;
}
bool8 sub_805A2C8(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A2C8(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, TRUE);
return TRUE;
}
bool8 SurfMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
u32 uVar2;
@ -839,7 +839,7 @@ bool8 SurfMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 par
return flag;
}
bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
EntityInfo * entityInfo;
EntityInfo * targetEntityInfo;
@ -864,7 +864,7 @@ bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32
}
}
bool8 sub_805A394(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A394(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
gDungeon->unkE267[1] = gUnknown_80F4F42;
if (sub_807EAA0(1,0) == 0) {
@ -873,19 +873,19 @@ bool8 sub_805A394(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return TRUE;
}
bool8 sub_805A3DC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A3DC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, TRUE);
return TRUE;
}
bool8 WishMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
WishStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_805A408(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A408(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -900,13 +900,13 @@ bool8 sub_805A408(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_805A450(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
sub_80522F4(pokemon,target,*gUnknown_80FC730);
return FALSE;
}
bool8 sub_805A464(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A464(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool32 flag;
Item item;
@ -927,25 +927,25 @@ bool8 sub_805A464(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_805A4C0(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A4C0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
sub_80522F4(pokemon,target,*gUnknown_80FC74C);
return FALSE;
}
bool8 sub_805A4D4(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A4D4(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
NappingStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E94, FALSE));
return TRUE;
}
bool8 sub_805A4FC(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A4FC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
IngrainedStatusTarget(pokemon, target);
return TRUE;
}
bool8 SwallowMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
u8 *stockpileStage;
@ -960,13 +960,13 @@ bool8 SwallowMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32
return TRUE;
}
bool8 CurseMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
CurseStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_805A568(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805A568(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
bool8 flag;
@ -974,7 +974,7 @@ bool8 sub_805A568(Entity * pokemon, Entity * target, struct Move *move, u32 para
return flag;
}
bool8 TickleMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
u32 stat;
bool32 flag;
@ -991,7 +991,7 @@ bool8 TickleMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 p
return flag;
}
bool8 sub_805A5E8(Entity *pokemon, Entity *target, struct Move *move, u32 stat, u32 param_5)
bool8 sub_805A5E8(Entity *pokemon, Entity *target, Move *move, u32 stat, u32 param_5)
{
EntityInfo *entityInfo;
bool32 flag;
@ -1010,7 +1010,7 @@ bool8 sub_805A5E8(Entity *pokemon, Entity *target, struct Move *move, u32 stat,
return flag;
}
bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
u8 *stockpileStage;
@ -1025,7 +1025,7 @@ bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 p
return TRUE;
}
bool8 sub_805A688(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805A688(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1040,7 +1040,7 @@ bool8 sub_805A688(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
EntityInfo *entityInfo;
EntityInfo *targetEntityInfo1;
@ -1114,14 +1114,14 @@ void sub_805A7D4(Entity * pokemon, Entity * target, Item *item, Position *pos)
sub_804652C(pokemon,&stackEntity,item,1,0);
}
bool8 sub_805A85C(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805A85C(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
int x;
int y;
int counter;
Position *r9;
Position pos1;
struct Move stackMove;
Move stackMove;
Position32 pos2;
struct Tile *tile;
Entity *entity;
@ -1219,13 +1219,13 @@ _0805AA5E:
return TRUE;
}
bool8 sub_805AAD0(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805AAD0(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
FixedDamageStatusTarget(pokemon, pokemon);
return TRUE;
}
bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, struct Move *move, u32 param_4)
bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, u32 param_4)
{
u32 *belly;
u32 newBelly;
@ -1248,13 +1248,13 @@ bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, struct Move *move, u
return flag;
}
bool8 LightScreenMoveAction(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 LightScreenMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
LightScreenStatusTarget(pokemon, target);
return TRUE;
}
bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
bool8 flag;
@ -1297,7 +1297,7 @@ bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, struct Move *move
return flag;
}
bool8 sub_805AC90(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805AC90(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
bool8 flag;
@ -1311,7 +1311,7 @@ bool8 sub_805AC90(Entity * pokemon, Entity * target, struct Move *move, u32 para
return flag;
}
bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
s32 stat = gUnknown_8106A4C;
RaiseAttackStageTarget(pokemon, target, stat, 1);
@ -1319,13 +1319,13 @@ bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, struct Move *move, u32 p
return TRUE;
}
bool8 sub_805AD04(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805AD04(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
PausedStatusTarget(pokemon, target, 1, CalculateStatusTurns(target, &gUnknown_80F4EE0, TRUE), TRUE);
return TRUE;
}
bool8 sub_805AD34(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805AD34(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2, 1, TRUE);
return TRUE;
@ -1341,7 +1341,7 @@ static inline bool8 sub_805AD54_sub(Entity *entity)
}
}
bool8 sub_805AD54(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805AD54(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
s32 numPossibleTargets;
EntityInfo *info;
@ -1384,7 +1384,7 @@ bool8 sub_805AD54(Entity * pokemon, Entity * target, struct Move *move, u32 para
return flag;
}
bool8 sub_805AE3C(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805AE3C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
bool8 flag;
@ -1393,7 +1393,7 @@ bool8 sub_805AE3C(Entity *pokemon, Entity *target, struct Move *move, u32 param_
return flag;
}
bool8 sub_805AE74(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805AE74(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
bool8 flag;
@ -1407,7 +1407,7 @@ bool8 sub_805AE74(Entity * pokemon, Entity * target, struct Move *move, u32 para
return flag;
}
bool8 sub_805AECC(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805AECC(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
bool8 flag;
@ -1422,17 +1422,17 @@ bool8 sub_805AECC(Entity * pokemon, Entity * target, struct Move *move, u32 para
return flag;
}
bool8 PresentMoveAction(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
s32 rand1;
s32 rand2;
s32 HP;
bool8 flag;
#ifndef NONMATCHING
register struct Move *move_r6 asm("r6");
register Move *move_r6 asm("r6");
register u32 param_4_r4 asm("r4");
#else
struct Move *move_r6;
Move *move_r6;
u32 param_4_r4;
#endif

View File

@ -116,7 +116,7 @@ static inline u8 sub_8069F9C_sub(Entity *pokemon)
return gUnknown_80F51E4[weather];
}
void sub_8069F9C(Entity *pokemon,Entity * target,struct Move *move)
void sub_8069F9C(Entity *pokemon,Entity * target,Move *move)
{
u8 type;
u8 ability;
@ -203,7 +203,7 @@ _0806A068:
}
}
void sub_806A120(Entity * pokemon, Entity * target, struct Move* move)
void sub_806A120(Entity * pokemon, Entity * target, Move* move)
{
u32 uVar2_u32;
u8 moveType;

View File

@ -464,8 +464,8 @@ void RestorePPTarget(Entity * pokemon,Entity * target, s32 param_3)
{
volatile s32 PP;
volatile s32 basePP;
struct Move *movePtr;
struct Move *movePtr1;
Move *movePtr;
Move *movePtr1;
s32 index;
bool8 PPChanged;
EntityInfo *entityInfo;
@ -668,10 +668,10 @@ void PierceStatusTarget(Entity * pokemon, Entity * target)
EntityUpdateStatusSprites(target);
}
void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, struct Move *move, u8 *message)
void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *move, u8 *message)
{
bool8 bVar2;
struct Move *movePtr;
Move *movePtr;
s32 index;
bool8 uVar5;
s32 iVar7;
@ -1072,7 +1072,7 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4)
{
bool8 moveUnsealed; // r9
s32 moveSpeed;
struct Move *move;
Move *move;
EntityInfo *entityInfo; // r7
bool8 bVar8; // r8
s32 index;
@ -1143,7 +1143,7 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4)
void sub_807A0CC(Entity * pokemon, Entity * target)
{
struct Move *move;
Move *move;
EntityInfo *entityInfo;
s32 index;

View File

@ -39,7 +39,7 @@ void sub_807E1A0(Entity *pokemon,Entity *target,u8 param_3,s16 param_4,s32 param
{
EntityInfo *targetInfo;
u8 flag;
struct Move move;
Move move;
s32 newHP;
s32 param_4_s32;

View File

@ -58,7 +58,7 @@ static void sub_80944BC(s16 moveID, u8 *buffer)
{
u16 moveID_u16;
s32 moveID_s32 = moveID;
struct Move move;
Move move;
if (moveID_s32 < 0x1F4) {
// Needed this cast/variable to match

View File

@ -0,0 +1,83 @@
static const UnkTextStruct2 sUnknown_80DD6EC =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD704 =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x13, 0x04,
0x09, 0x03,
0x03, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD71C =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x14, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD734 =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x16, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD74C =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x11,
0x1A, 0x02,
0x02, 0x00,
NULL
};
ALIGNED(4) static const u8 sSayFarewellPrompt[] = _(
"You have chosen to say farewell\n"
"to this Pokémon.{EXTRA_MSG}"
"The Pokémon will leave its Friend Area.\n"
"It will no longer be available for\n"
"adventures. Is that OK?");
ALIGNED(4) static const u8 sSayFarewellConfirm[] = _(
"If you say farewell to this\n"
"Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
"You will never be able to get another one\n"
"like it to join your team.\n"
"Will you release it anyway?");
ALIGNED(4) static const u8 sReturnedToToolbox[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) static const u8 sSentToStorage[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n{CENTER_ALIGN}sent to storage.");
ALIGNED(4) static const u8 sStandBy[] = "Stand By";
ALIGNED(4) static const u8 sMakeLeader[] = "Make Leader";
ALIGNED(4) static const u8 sJoinTeam[] = "Join Team";
ALIGNED(4) static const u8 sSayFarewell[] = "Say Farewell";
ALIGNED(4) static const u8 sGive[] = "Give";
ALIGNED(4) static const u8 sTake[] = "Take";
ALIGNED(4) static const u8 sSummary[] = "Summary";
ALIGNED(4) static const u8 sMoves[] = "Moves";
ALIGNED(4) static const u8 sCheckIQ[] = "Check IQ";
ALIGNED(4) static const u8 sItemBuffered[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
static const u8 sFill1[] = "pksdir0";

View File

@ -0,0 +1,66 @@
static const UnkTextStruct2 sUnknown_80DD148 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD160 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x13, 0x04,
0x08, 0x03,
0x03, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD178 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x14, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD190 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x11,
0x1A, 0x02,
0x02, 0x00,
NULL
};
ALIGNED(4) static const u8 sVisitWhoPrompt[] = "Whom would you like to visit?";
ALIGNED(4) static const u8 sItemHandedOver[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over. ");
ALIGNED(4) static const u8 sItemExchanged[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over.{EXTRA_MSG}"
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) static const u8 sReturnedToToolbox[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) static const u8 sLeftOnStandby[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} left the team to remain\n"
"{CENTER_ALIGN}on standby in the Friend Area.");
ALIGNED(4) static const u8 sGive[] = "Give";
ALIGNED(4) static const u8 sTake[] = "Take";
ALIGNED(4) static const u8 sStandBy[] = "Stand By";
ALIGNED(4) static const u8 sVisit[] = "Visit";
ALIGNED(4) static const u8 sName[] = "Name";
ALIGNED(4) static const u8 sSummary[] = "Summary";
ALIGNED(4) static const u8 sMoves[] = "Moves";
ALIGNED(4) static const u8 sCheckIQ[] = "Check IQ";
ALIGNED(4) static const u8 sItemBuffered[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
ALIGNED(4) static const u8 sFill1[] = "pksdir0";

107
src/data/party_list_menu.h Normal file
View File

@ -0,0 +1,107 @@
static const UnkTextStruct2 sUnknown_80DD310 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD328 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x13, 0x03,
0x08, 0x03,
0x03, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD340 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x14, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD358 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x11,
0x1A, 0x02,
0x02, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80DD370 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x03,
0x0F, 0x02,
0x02, 0x00,
NULL
};
ALIGNED(4) static const u8 sUnknown_80DD388[] = _(
"You have chosen to say farewell\n"
"to this Pokémon.{EXTRA_MSG}"
"The Pokémon will leave its Friend Area.\n"
"It will no longer be available for\n"
"adventures. Is that OK?");
ALIGNED(4) static const u8 sUnknown_80DD420[] = _(
"If you say farewell to this\n"
"Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
"You will never be able to get another one\n"
"like it to join your team.\n"
"Will you release it anyway?");
ALIGNED(4) static const u8 sUnknown_80DD4C4[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} joined the\n"
"{CENTER_ALIGN}rescue team for adventures!");
ALIGNED(4) static const u8 sUnknown_80DD4F4[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} left the team to remain\n"
"{CENTER_ALIGN}on standby in the Friend Area.");
ALIGNED(4) static const u8 sBecameLeader[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} became the leader\n"
"{CENTER_ALIGN}of the rescue team.");
ALIGNED(4) static const u8 sUnknown_80DD564[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} left\n"
"{CENTER_ALIGN}the Friend Area.\n"
"{CENTER_ALIGN}Bye-bye{COMMA} {ARG_POKEMON_1}!");
ALIGNED(4) static const u8 sUnknown_80DD594[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over. ");
ALIGNED(4) static const u8 sUnknown_80DD5B8[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over.{EXTRA_MSG}"
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) static const u8 sUnknown_80DD60C[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) static const u8 sUnknown_80DD63C[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}sent to storage.");
ALIGNED(4) static const u8 sPartyMenuStandBy[] = "Stand By";
ALIGNED(4) static const u8 sPartyMenuMakeLeader[] = "Make Leader";
ALIGNED(4) static const u8 sPartyMenuJoinTeam[] = "Join Team";
ALIGNED(4) static const u8 sPartyMenuGiveGummi[] = "Give Gummi";
ALIGNED(4) static const u8 sPartyMenuGive[] = "Give";
ALIGNED(4) static const u8 sPartyMenuTake[] = "Take";
ALIGNED(4) static const u8 sPartyMenuSayFarewell[] = "Say Farewell";
ALIGNED(4) static const u8 sPartyMenuSummary[] = "Summary";
ALIGNED(4) static const u8 sPartyMenuMoves[] = "Moves";
ALIGNED(4) static const u8 sPartyMenuCheckIQ[] = "Check IQ";
ALIGNED(4) static const u8 sPartyMenuItemPlaceholder[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
ALIGNED(4) static const u8 sUnknown_80DD6E0[] = "%s";
ALIGNED(4) static const u8 sFill1[] = "pksdir0";

View File

@ -16,7 +16,7 @@ s32 sub_8091E94(s32 a1, s32 a2, s32 a3); // items.c
bool8 sub_8090820(u16 moveID)
{
PokemonStruct1 *pokeStruct;
struct Move *move;
Move *move;
s32 moveIndex;
s32 index;
s32 one;

View File

@ -103,7 +103,7 @@ void DecideAttack(Entity *pokemon)
numUsableMoves = 0;
for (i = 0; i < MAX_MON_MOVES; i++)
{
struct Move *move = &pokemonInfo->moves[i];
Move *move = &pokemonInfo->moves[i];
if (pokemonInfo->moves[i].moveFlags & MOVE_FLAG_EXISTS)
{
if (pokemonInfo->moves[i].moveFlags & MOVE_FLAG_ENABLED_FOR_AI)
@ -115,7 +115,7 @@ void DecideAttack(Entity *pokemon)
}
if (total == 0)
{
struct Move struggle;
Move struggle;
InitPokemonMove(&struggle, MOVE_STRUGGLE);
AIConsiderMove(&aiPossibleMove[0], pokemon, &struggle);
if (aiPossibleMove[0].canBeUsed)
@ -142,7 +142,7 @@ void DecideAttack(Entity *pokemon)
// This requires a separate check from the 0-PP check used for unlinked moves.
for (i = 0; i < MAX_MON_MOVES; i++)
{
struct Move *move = &pokemonInfo->moves[i];
Move *move = &pokemonInfo->moves[i];
if (!(move->moveFlags & MOVE_FLAG_EXISTS))
{
break;
@ -181,7 +181,7 @@ void DecideAttack(Entity *pokemon)
}
for (i = 0; i < MAX_MON_MOVES; i++)
{
struct Move *move;
Move *move;
aiPossibleMove[i].canBeUsed = FALSE;
move = &pokemonInfo->moves[i];
if (move->moveFlags & MOVE_FLAG_EXISTS &&
@ -337,7 +337,7 @@ void DecideAttack(Entity *pokemon)
}
}
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, struct Move *move)
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move *move)
{
s32 targetingFlags;
s32 moveWeight = 1;
@ -595,7 +595,7 @@ bool8 IsTargetInLineRange(Entity *user, Entity *target, s32 range)
return TRUE;
}
s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, Entity *user, Entity *target, struct Move *move, bool32 hasStatusChecker)
s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, Entity *user, Entity *target, Move *move, bool32 hasStatusChecker)
{
s32 direction;
s32 targetingFlags2 = (s16) targetingFlags;
@ -624,7 +624,7 @@ s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, Enti
return numPotentialTargets;
}
bool8 IsAITargetEligible(s32 targetingFlags, Entity *user, Entity *target, struct Move *move, bool32 hasStatusChecker)
bool8 IsAITargetEligible(s32 targetingFlags, Entity *user, Entity *target, Move *move, bool32 hasStatusChecker)
{
EntityInfo *targetData;
s32 targetingFlags2 = (s16) targetingFlags;
@ -967,7 +967,7 @@ void sub_807CB3C(Entity *pokemon)
Item IVar5;
EntityInfo *entityInfo; // r7
ActionContainer act;
struct Move move;
Move move;
struct AIPossibleMove sp28;
bool8 r8;

View File

@ -18,8 +18,8 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
bool8 targetOther = itemTargetFlags & 1;
u16 targetAlly = (itemTargetFlags >> 1) & 1;
s32 i;
struct Move *move;
struct Move *move2;
Move *move;
Move *move2;
switch (item->id)
{
case ITEM_STICK:

View File

@ -22,7 +22,7 @@ extern u8 gAvailablePokemonNames[];
extern u32 gUnknown_80FC31C;
extern u32 gUnknown_80FCEFC;
extern u32 gUnknown_80FC2FC;
extern bool8 sub_805744C(Entity *, struct Move *, u32);
extern bool8 sub_805744C(Entity *, Move *, u32);
extern void SetMessageArgument(char[], Entity*, u32);
extern void sub_80522F4(Entity *r1, Entity *r2, u32);
@ -72,12 +72,12 @@ bool8 sub_80717A4(Entity *pokemon, u16 moveID)
{
// Pin this register to match
#ifndef NONMATCHING
register struct Move *pokeMove asm("r4");
register Move *pokeMove asm("r4");
#else
struct Move *pokeMove;
Move *pokeMove;
#endif
struct Move *pokeMove2; // some reason uses another pointer to same struct
Move *pokeMove2; // some reason uses another pointer to same struct
for(index = 0, pokeMove = entityInfo->moves, pokeMove2 = pokeMove; index < MAX_MON_MOVES; pokeMove++, pokeMove2++, index++)
{
@ -215,7 +215,7 @@ bool8 CanSeeTeammate(Entity * pokemon)
}
}
u8 GetMoveTypeForMonster(Entity *pokemon, struct Move *pokeMove)
u8 GetMoveTypeForMonster(Entity *pokemon, Move *pokeMove)
{
if (pokeMove->id == MOVE_HIDDEN_POWER)
return pokemon->info->hiddenPowerType;
@ -223,7 +223,7 @@ u8 GetMoveTypeForMonster(Entity *pokemon, struct Move *pokeMove)
return GetMoveType(pokeMove);
}
s32 GetMovePower(Entity *pokemon, struct Move *pokeMove)
s32 GetMovePower(Entity *pokemon, Move *pokeMove)
{
if(pokeMove->id == MOVE_HIDDEN_POWER)
return (pokemon->info->hiddenPowerBasePower + pokeMove->ginseng);

View File

@ -5,16 +5,17 @@
#include "text2.h"
#include "items.h"
#include "pokemon.h"
#include "friend_area_action_menu.h"
#include "menu_input.h"
#include "kecleon_bros.h"
#include "sprite.h"
#include "code_80130A8.h"
#include "code_801EE10.h"
#include "code_801EE10_1.h"
#include "code_801B3C0.h"
#include "event_flag.h"
#include "moves.h"
#include "code_801EE10_mid.h"
extern struct unkStruct_203B2BC *gUnknown_203B2BC;
@ -24,9 +25,6 @@ extern u8 *gUnknown_80D4970[];
extern void sub_8024458(s16, u32);
extern void sub_801BEEC(s16);
extern void sub_801F808(u16*);
extern void sub_801F1B0(u32, u32);
extern void sub_801EE10(u32, s16, struct Move *, u32, u32, u32);
void sub_8027D40(u32, BulkItem *heldItem);
void sub_8027794(void);
@ -49,8 +47,6 @@ extern void CreateFriendActionMenu();
extern void sub_80276A8();
bool8 sub_8027D9C(PokemonStruct1 *pokeStruct);
extern u8 sub_8027DCC(PokemonStruct1 *);
extern u32 sub_801EF38(u8 r0);
extern void sub_801F214();
extern void SetFriendAreaActionMenuState(u32);
extern void PlaySound(u32);
@ -60,10 +56,7 @@ extern void sub_8099690(u32);
extern void sub_808D31C(PokemonStruct1 *);
extern PokemonStruct1 *sub_808D3F8(void);
extern PokemonStruct1 *sub_808D3BC(void);
extern u32 sub_801F890(void);
extern void sub_801F8D0(void);
extern u8 gUnknown_202DE58[];
extern u32 sub_801F194(void);
extern u32 sub_801BF48(void);
extern void sub_801BF98(void);
extern u32 sub_80244E4(void);
@ -76,91 +69,7 @@ u32 sub_8027E18(PokemonStruct1 *);
u8 sub_8027E4C(PokemonStruct1 *r0);
void sub_8027EB8(void);
const UnkTextStruct2 gUnknown_80DD6EC =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD704 =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x13, 0x04,
0x09, 0x03,
0x03, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD71C =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x14, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD734 =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x16, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD74C =
{
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x11,
0x1A, 0x02,
0x02, 0x00,
NULL
};
ALIGNED(4) const u8 gFriendAreaActionSayFarewellPrompt[] = _(
"You have chosen to say farewell\n"
"to this Pokémon.{EXTRA_MSG}"
"The Pokémon will leave its Friend Area.\n"
"It will no longer be available for\n"
"adventures. Is that OK?");
ALIGNED(4) const u8 gFriendAreaActionSayFarewellConfirm[] = _(
"If you say farewell to this\n"
"Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
"You will never be able to get another one\n"
"like it to join your team.\n"
"Will you release it anyway?");
ALIGNED(4) const u8 gUnknown_80DD8A0[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) const u8 gUnknown_80DD8D0[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n{CENTER_ALIGN}sent to storage.");
ALIGNED(4) const u8 gFriendActionStandby[] = "Stand By";
ALIGNED(4) const u8 gFriendActionMakeLeader[] = "Make Leader";
ALIGNED(4) const u8 gFriendActionJoinTeam[] = "Join Team";
ALIGNED(4) const u8 gFriendActionSayFarewell[] = "Say Farewell";
ALIGNED(4) const u8 gFriendActionGive[] = "Give";
ALIGNED(4) const u8 gFriendActionTake[] = "Take";
ALIGNED(4) const u8 gFriendActionSummary[] = "Summary";
ALIGNED(4) const u8 gFriendActionMoves[] = "Moves";
ALIGNED(4) const u8 gFriendActionCheckIQ[] = "Check IQ";
ALIGNED(4) const u8 gUnknown_80DD958[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
static const u8 filler[] = "pksdir0";
#include "data/friend_area_action_menu.h"
u32 sub_8027074(void)
{
@ -248,20 +157,20 @@ void sub_802719C(void)
switch(gUnknown_203B2BC->state)
{
case 3:
gUnknown_203B2BC->unk180[3] = gUnknown_80DD74C;
gUnknown_203B2BC->unk180[3] = sUnknown_80DD74C;
CreateFriendActionMenu();
gUnknown_203B2BC->unk180[2] = gUnknown_80DD704;
gUnknown_203B2BC->unk180[2] = sUnknown_80DD704;
sub_8012CAC(&gUnknown_203B2BC->unk180[2], gUnknown_203B2BC->menuItems);
break;
case 0xC:
sub_80276A8();
gUnknown_203B2BC->unk180[2] = gUnknown_80DD71C;
gUnknown_203B2BC->unk180[2] = sUnknown_80DD71C;
sub_8012CAC(&gUnknown_203B2BC->unk180[2], gUnknown_203B2BC->menuItems);
break;
default:
for(index = 0; index < 4; index++)
{
gUnknown_203B2BC->unk180[index] = gUnknown_80DD6EC;
gUnknown_203B2BC->unk180[index] = sUnknown_80DD6EC;
}
break;
}
@ -271,75 +180,71 @@ void sub_802719C(void)
void sub_8027274(void)
{
Item slot;
Item slot;
switch(gUnknown_203B2BC->state) {
case FRIEND_AREA_ACTION_MENU_INIT:
case FRIEND_AREA_ACTION_MENU_EXIT:
break;
case FRIEND_AREA_ACTION_MENU_MAIN:
sub_8023868(1,0,0,7);
break;
case FRIEND_AREA_ACTION_MENU_MAIN_2:
sub_8023B7C(1);
break;
case 3:
sub_8027D40(3,&gUnknown_203B2BC->item2);
sub_8023DA4();
sub_8012D60(&gUnknown_203B2BC->unk7C,gUnknown_203B2BC->menuItems,0,gUnknown_203B2BC->unk16C,gUnknown_203B2BC->menuAction1,2);
break;
case FRIEND_AREA_ACTION_MENU_SUMMARY:
sub_8024458(gUnknown_203B2BC->targetPoke,2);
break;
case FRIEND_AREA_ACTION_MENU_CHECK_IQ:
sub_801BEEC(gUnknown_203B2BC->targetPoke);
break;
case 10:
sub_801A5D8(1,0,0,10);
break;
case 0xb:
sub_801A8D0(1);
break;
case 0xc:
sub_801A9E0();
sub_8012D60(&gUnknown_203B2BC->unk7C,gUnknown_203B2BC->menuItems,0,gUnknown_203B2BC->unk16C,gUnknown_203B2BC->menuAction2,2);
break;
case 0xd:
HeldItemToSlot(&slot, &gUnknown_203B2BC->itemToGive);
sub_801B3C0(&slot);
break;
case 0xe:
unk_CopyMoves4To8(gUnknown_203B2BC->moves,gUnknown_203B2BC->pokeStruct->moves);
sub_801EE10(3,gUnknown_203B2BC->targetPoke,gUnknown_203B2BC->moves,0,0,0);
break;
case 0xf:
sub_801F1B0(1,0);
break;
case FRIEND_AREA_ACTION_MENU_SAY_FAREWELL_PROMPT:
sub_8027794();
sub_8014248(gFriendAreaActionSayFarewellPrompt,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
break;
case FRIEND_AREA_ACTION_MENU_SAY_FAREWELL_CONFIRM:
sub_8027794();
sub_8014248(gFriendAreaActionSayFarewellConfirm,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
break;
case 0x10:
GetLinkedSequence(gUnknown_203B2BC->moveIndex,gUnknown_203B2BC->moves,gUnknown_203B2BC->moveIDs);
sub_801F808(gUnknown_203B2BC->moveIDs);
break;
case 6:
gUnknown_203B2BC->fallbackState = FRIEND_AREA_ACTION_MENU_MAIN_2;
// The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was
// returned to the Toolbox
sub_80141B4(gUnknown_80DD8A0,0,0,0x101);
break;
case 7:
gUnknown_203B2BC->fallbackState = FRIEND_AREA_ACTION_MENU_MAIN_2;
// The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was
// returned to storage
sub_80141B4(gUnknown_80DD8D0,0,0,0x101);
break;
}
switch (gUnknown_203B2BC->state) {
case FRIEND_AREA_ACTION_MENU_INIT:
case FRIEND_AREA_ACTION_MENU_EXIT:
break;
case FRIEND_AREA_ACTION_MENU_MAIN:
sub_8023868(1,0,0,7);
break;
case FRIEND_AREA_ACTION_MENU_MAIN_2:
sub_8023B7C(1);
break;
case 3:
sub_8027D40(3, &gUnknown_203B2BC->item2);
sub_8023DA4();
sub_8012D60(&gUnknown_203B2BC->unk7C, gUnknown_203B2BC->menuItems, 0, gUnknown_203B2BC->unk16C, gUnknown_203B2BC->menuAction1, 2);
break;
case FRIEND_AREA_ACTION_MENU_SUMMARY:
sub_8024458(gUnknown_203B2BC->targetPoke, 2);
break;
case FRIEND_AREA_ACTION_MENU_CHECK_IQ:
sub_801BEEC(gUnknown_203B2BC->targetPoke);
break;
case 10:
sub_801A5D8(1, 0, 0, 10);
break;
case 0xb:
sub_801A8D0(1);
break;
case 0xc:
sub_801A9E0();
sub_8012D60(&gUnknown_203B2BC->unk7C,gUnknown_203B2BC->menuItems,0,gUnknown_203B2BC->unk16C,gUnknown_203B2BC->menuAction2,2);
break;
case 0xd:
HeldItemToSlot(&slot, &gUnknown_203B2BC->itemToGive);
sub_801B3C0(&slot);
break;
case 0xe:
unk_CopyMoves4To8(gUnknown_203B2BC->moves,gUnknown_203B2BC->pokeStruct->moves);
sub_801EE10(3,gUnknown_203B2BC->targetPoke,gUnknown_203B2BC->moves,0,NULL,0);
break;
case 0xf:
sub_801F1B0(TRUE, FALSE);
break;
case FRIEND_AREA_ACTION_MENU_SAY_FAREWELL_PROMPT:
sub_8027794();
sub_8014248(sSayFarewellPrompt,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
break;
case FRIEND_AREA_ACTION_MENU_SAY_FAREWELL_CONFIRM:
sub_8027794();
sub_8014248(sSayFarewellConfirm,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
break;
case 0x10:
GetLinkedSequence(gUnknown_203B2BC->moveIndex,gUnknown_203B2BC->moves,gUnknown_203B2BC->moveIDs);
sub_801F808(gUnknown_203B2BC->moveIDs);
break;
case 6:
gUnknown_203B2BC->fallbackState = FRIEND_AREA_ACTION_MENU_MAIN_2;
sub_80141B4(sReturnedToToolbox, 0, 0, 0x101);
break;
case 7:
gUnknown_203B2BC->fallbackState = FRIEND_AREA_ACTION_MENU_MAIN_2;
sub_80141B4(sSentToStorage, 0, 0, 0x101);
break;
}
}
void CreateFriendActionMenu(void)
@ -354,7 +259,7 @@ void CreateFriendActionMenu(void)
if((pokeStruct->unk0 >> 1) % 2)
{
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionStandby;
gUnknown_203B2BC->menuItems[loopMax].text = sStandBy;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_STANDBY;
if(!sub_8027D9C(pokeStruct))
{
@ -363,21 +268,21 @@ void CreateFriendActionMenu(void)
loopMax += 1;
if(sub_80023E4(8) && !pokeStruct->isTeamLeader)
{
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionMakeLeader;
gUnknown_203B2BC->menuItems[loopMax].text = sMakeLeader;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_MAKE_LEADER;
loopMax += 1;
}
}
else
{
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionJoinTeam;
gUnknown_203B2BC->menuItems[loopMax].text = sJoinTeam;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_JOIN_TEAM;
if(!sub_808D750(gUnknown_203B2BC->targetPoke))
{
gUnknown_203B2BC->unk16C[loopMax] = 1;
}
loopMax += 1;
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionSayFarewell;
gUnknown_203B2BC->menuItems[loopMax].text = sSayFarewell;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_SAY_FAREWELL;
if(!sub_8027DCC(pokeStruct))
{
@ -387,7 +292,7 @@ void CreateFriendActionMenu(void)
}
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionGive;
gUnknown_203B2BC->menuItems[loopMax].text = sGive;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_GIVE;
if(GetNumberOfFilledInventorySlots() == 0)
{
@ -395,23 +300,23 @@ void CreateFriendActionMenu(void)
}
loopMax += 1;
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionTake;
gUnknown_203B2BC->menuItems[loopMax].text = sTake;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_TAKE;
if(GetNumberOfFilledInventorySlots() >= INVENTORY_SIZE || gUnknown_203B2BC->item2.id == ITEM_NOTHING)
{
gUnknown_203B2BC->unk16C[loopMax] = 1;
}
loopMax += 1;
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionSummary;
gUnknown_203B2BC->menuItems[loopMax].text = sSummary;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_SUMMARY;
loopMax += 1;
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionMoves;
gUnknown_203B2BC->menuItems[loopMax].text = sMoves;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_MOVES;
loopMax += 1;
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionCheckIQ;
gUnknown_203B2BC->menuItems[loopMax].text = sCheckIQ;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_CHECK_IQ;
loopMax += 1;
gUnknown_203B2BC->menuItems[loopMax].text = 0;
gUnknown_203B2BC->menuItems[loopMax].text = NULL;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_NONE;
for(index = 0; index < loopMax; index++)
@ -440,7 +345,7 @@ void sub_80276A8(void)
loopMax = 0;
MemoryFill16(gUnknown_203B2BC->unk16C,0,sizeof(gUnknown_203B2BC->unk16C));
gUnknown_203B2BC->menuItems[loopMax].text = gFriendActionGive;
gUnknown_203B2BC->menuItems[loopMax].text = sGive;
gUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_GIVE;
if (GetNumberOfFilledInventorySlots() == 0) {
gUnknown_203B2BC->unk16C[loopMax] = 1;
@ -808,7 +713,7 @@ void sub_8027D40(u32 r0, BulkItem *heldItem)
a3.unk8 = 1;
slot.flags = ITEM_FLAG_EXISTS;
sub_8090E14(gUnknown_202DE58, &slot, &a3);
xxx_format_and_draw(4, 3, gUnknown_80DD958, r0, 0);
xxx_format_and_draw(4, 3, sItemBuffered, r0, 0);
sub_80073E0(r0);
}

View File

@ -7,7 +7,7 @@
#include "pokemon.h"
#include "moves.h"
#include "menu_input.h"
#include "code_801EE10.h"
#include "kecleon_bros.h"
#include "code_80130A8.h"
#include "code_801EE10_1.h"
@ -15,11 +15,12 @@
#include "code_801B3C0.h"
#include "code_80118A4.h"
#include "event_flag.h"
#include "code_801EE10_mid.h"
// there might be more overlap with unkStruct_203B2BC
// I was working on the moves and put the data that seemed to correspond to that
// into a separate struct
struct unkStruct_203B2B4
typedef struct unkStruct_203B2B4
{
// size: 0x178
s32 unk0;
@ -32,95 +33,31 @@ struct unkStruct_203B2B4
BulkItem item1;
BulkItem item2;
/* 0x1C */ PokemonStruct1 *pokeStruct;
u32 moveIndex; // some sort of move index
u32 moveIndex; // some sort of move index
u16 moveID;
struct Move moves[8];
u16 moveIDs[4]; // some list of move IDs
Move moves[8];
u16 moveIDs[4]; // some list of move IDs
u32 menuAction1;
s32 menuAction2;
MenuStruct unk78;
MenuItem unkC8[8];
u16 unk108[8];
UnkTextStruct2 unk118[4];
};
EWRAM_DATA_2 struct unkStruct_203B2B4 *gUnknown_203B2B4 = {0};
} unkStruct_203B2B4;
const UnkTextStruct2 gUnknown_80DD148 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD160 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x13, 0x04,
0x08, 0x03,
0x03, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD178 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x14, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD190 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x11,
0x1A, 0x02,
0x02, 0x00,
NULL
};
extern u8 gAvailablePokemonNames[];
extern u8 gUnknown_202DEA8[];
extern u8 *gUnknown_80D4970[];
extern u8 gUnknown_202DE58[];
extern u8 gUnknown_202DEA8[];
extern u8 gAvailablePokemonNames[];
ALIGNED(4) const u8 gUnknown_80DD1A8[] = "Whom would you like to visit?";
EWRAM_DATA_2 unkStruct_203B2B4 *gUnknown_203B2B4 = {0};
ALIGNED(4) const u8 gUnknown_80DD1C8[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over. ");
extern u8 *gUnknown_80D4970[];
ALIGNED(4) const u8 gUnknown_80DD1EC[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over.{EXTRA_MSG}"
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) const u8 gUnknown_80DD240[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) const u8 gUnknown_80DD270[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} left the team to remain\n"
"{CENTER_ALIGN}on standby in the Friend Area.");
ALIGNED(4) const u8 gFriendListGive[] = "Give";
ALIGNED(4) const u8 gFriendListTake[] = "Take";
ALIGNED(4) const u8 gFriendListStandBy[] = "Stand By";
ALIGNED(4) const u8 gFriendListVisit[] = "Visit";
ALIGNED(4) const u8 gFriendListName[] = "Name";
ALIGNED(4) const u8 gFriendListSummary[] = "Summary";
ALIGNED(4) const u8 gFriendListMoves[] = "Moves";
ALIGNED(4) const u8 gFriendListCheckIQ[] = "Check IQ";
ALIGNED(4) const u8 gFriendListItem[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
ALIGNED(4) static const u8 fill0[] = "pksdir0";
#include "data/friend_list_menu.h"
extern s16 sub_80A5728(void);
extern u8 sub_8002658(s16);
extern bool8 sub_8024108(u32);
extern void sub_801F1B0(u32, u32);
extern void sub_8024458(s16, u32);
extern void sub_801BEEC(s16);
extern void nullsub_104(void);
@ -130,14 +67,7 @@ extern void sub_802453C(void);
extern u32 sub_801BF48(void);
extern void sub_801BF98(void);
extern u32 sub_801EF38(u32);
extern u32 sub_801F194(void);
extern void sub_801F214(void);
extern void sub_801EE10(u32, s16, struct Move *, u32, u32, u32);
extern void sub_801F808(u16 *);
extern void sub_8099690(u32);
extern void sub_801F8D0(void);
extern u32 sub_801F890(void);
extern void sub_80160D8(void);
extern u32 sub_8016080(void);
extern s32 sub_80144A4(s32 *);
@ -168,7 +98,7 @@ bool8 sub_80252F0(s32 param_1)
return FALSE;
}
else {
gUnknown_203B2B4 = MemoryAlloc(sizeof(struct unkStruct_203B2B4),8);
gUnknown_203B2B4 = MemoryAlloc(sizeof(unkStruct_203B2B4),8);
gUnknown_203B2B4->menuAction1 = 0;
gUnknown_203B2B4->unk0 = param_1;
gUnknown_203B2B4->unkC = sub_8002658(sub_80A5728());
@ -251,35 +181,33 @@ void sub_8025434(s32 newState)
void sub_802544C(void)
{
s32 index;
sub_8006518(gUnknown_203B2B4->unk118);
s32 i;
switch(gUnknown_203B2B4->state)
{
case 3:
if (gUnknown_203B2B4->unk0 == 0) {
gUnknown_203B2B4->unk118[3] = gUnknown_80DD190;
}
sub_8025728();
gUnknown_203B2B4->unk118[2] = gUnknown_80DD160;
sub_8012CAC(&gUnknown_203B2B4->unk118[2],gUnknown_203B2B4->unkC8);
break;
case 0xD:
sub_802591C();
gUnknown_203B2B4->unk118[2] = gUnknown_80DD178;
sub_8012CAC(&gUnknown_203B2B4->unk118[2],gUnknown_203B2B4->unkC8);
break;
default:
for(index = 0; index < 4; index++)
{
gUnknown_203B2B4->unk118[index] = gUnknown_80DD148;
}
break;
sub_8006518(gUnknown_203B2B4->unk118);
}
ResetUnusedInputStruct();
sub_800641C(gUnknown_203B2B4->unk118, TRUE, TRUE);
switch (gUnknown_203B2B4->state) {
case 3:
if (gUnknown_203B2B4->unk0 == 0)
gUnknown_203B2B4->unk118[3] = sUnknown_80DD190;
sub_8025728();
gUnknown_203B2B4->unk118[2] = sUnknown_80DD160;
sub_8012CAC(&gUnknown_203B2B4->unk118[2], gUnknown_203B2B4->unkC8);
break;
case 13:
sub_802591C();
gUnknown_203B2B4->unk118[2] = sUnknown_80DD178;
sub_8012CAC(&gUnknown_203B2B4->unk118[2], gUnknown_203B2B4->unkC8);
break;
default:
for (i = 0; i < 4; i++)
gUnknown_203B2B4->unk118[i] = sUnknown_80DD148;
break;
}
ResetUnusedInputStruct();
sub_800641C(gUnknown_203B2B4->unk118, TRUE, TRUE);
}
void sub_8025518(void)
@ -291,7 +219,7 @@ void sub_8025518(void)
{
case 0:
gUnknown_203B2B4->fallbackState = 1;
sub_80141B4(gUnknown_80DD1A8,0,0,0x301);
sub_80141B4(sVisitWhoPrompt,0,0,0x301);
break;
case 1:
uVar3 = 4;
@ -334,27 +262,27 @@ void sub_8025518(void)
break;
case 8:
gUnknown_203B2B4->fallbackState = 2;
sub_80141B4(gUnknown_80DD1C8,0,0,0x101);
sub_80141B4(sItemHandedOver,0,0,0x101);
break;
case 9:
gUnknown_203B2B4->fallbackState = 2;
sub_80141B4(gUnknown_80DD1EC,0,0,0x101);
sub_80141B4(sItemExchanged,0,0,0x101);
break;
case 10:
gUnknown_203B2B4->fallbackState = 2;
sub_80141B4(gUnknown_80DD240,0,0,0x101);
sub_80141B4(sReturnedToToolbox,0,0,0x101);
break;
case 7:
gUnknown_203B2B4->fallbackState = 1;
PlaySound(0xcf);
sub_80141B4(gUnknown_80DD270,0,0,0x101);
sub_80141B4(sLeftOnStandby,0,0,0x101);
break;
case 0xf:
unk_CopyMoves4To8(gUnknown_203B2B4->moves,gUnknown_203B2B4->pokeStruct->moves);
sub_801EE10(3,gUnknown_203B2B4->species,gUnknown_203B2B4->moves,0,0,0);
sub_801EE10(3,gUnknown_203B2B4->species,gUnknown_203B2B4->moves,0,NULL,0);
break;
case 0x10:
sub_801F1B0(1,0);
sub_801F1B0(TRUE, FALSE);
break;
case 0x11:
GetLinkedSequence(gUnknown_203B2B4->moveIndex,gUnknown_203B2B4->moves, gUnknown_203B2B4->moveIDs);
@ -377,14 +305,14 @@ void sub_8025728(void)
pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_203B2B4->species];
MemoryFill16(gUnknown_203B2B4->unk108,0,sizeof(gUnknown_203B2B4->unk108));
if (gUnknown_203B2B4->unk0 == 0) {
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListGive;
gUnknown_203B2B4->unkC8[loopMax].text = sGive;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 10;
if (GetNumberOfFilledInventorySlots() == 0) {
gUnknown_203B2B4->unk108[loopMax] = 1;
}
loopMax += 1;
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListTake;
gUnknown_203B2B4->unkC8[loopMax].text = sTake;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 0xb;
if ((INVENTORY_SIZE <= GetNumberOfFilledInventorySlots()) || (gUnknown_203B2B4->item2.id == ITEM_NOTHING)) {
gUnknown_203B2B4->unk108[loopMax] = 1;
@ -392,13 +320,13 @@ void sub_8025728(void)
loopMax += 1;
if (sub_8025EC4(pokeStruct)) {
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListStandBy;
gUnknown_203B2B4->unkC8[loopMax].text = sStandBy;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 9;
loopMax += 1;
}
}
else {
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListVisit;
gUnknown_203B2B4->unkC8[loopMax].text = sVisit;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 7;
if (gUnknown_203B2B4->unkC == GetFriendArea(gUnknown_203B2B4->pokeStruct->speciesNum)) {
gUnknown_203B2B4->unk108[loopMax] = 1;
@ -407,17 +335,17 @@ void sub_8025728(void)
}
if ((pokeStruct->speciesNum == 0x13d) &&
(IsPokemonRenamed(pokeStruct))) {
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListName;
gUnknown_203B2B4->unkC8[loopMax].text = sName;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 8;
loopMax += 1;
}
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListSummary;
gUnknown_203B2B4->unkC8[loopMax].text = sSummary;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 4;
loopMax += 1;
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListMoves;
gUnknown_203B2B4->unkC8[loopMax].text = sMoves;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 6;
loopMax += 1;
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListCheckIQ;
gUnknown_203B2B4->unkC8[loopMax].text = sCheckIQ;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 5;
loopMax += 1;
gUnknown_203B2B4->unkC8[loopMax].text = NULL;
@ -449,7 +377,7 @@ void sub_802591C(void)
MemoryFill16(gUnknown_203B2B4->unk108,0, sizeof(gUnknown_203B2B4->unk108));
gUnknown_203B2B4->unkC8[loopMax].text = gFriendListGive;
gUnknown_203B2B4->unkC8[loopMax].text = sGive;
gUnknown_203B2B4->unkC8[loopMax].menuAction = 10;
if (GetNumberOfFilledInventorySlots() == 0) {
gUnknown_203B2B4->unk108[loopMax] = 1;
@ -750,7 +678,7 @@ void sub_8025E68(u32 r0, BulkItem *heldItem)
a3.unk8 = 1;
item.flags = ITEM_FLAG_EXISTS;
sub_8090E14(gUnknown_202DE58, &item, &a3);
xxx_format_and_draw(4, 3, gFriendListItem, r0, 0);
xxx_format_and_draw(4, 3, sItemBuffered, r0, 0);
sub_80073E0(r0);
}

View File

@ -1,5 +1,7 @@
#include "global.h"
#include "code_80118A4.h"
#include "code_801EE10.h"
#include "code_801EE10_mid.h"
#include "code_80130A8.h"
#include "gulpin_shop.h"
#include "pokemon.h"
@ -9,73 +11,68 @@
#include "text1.h"
#include "text2.h"
extern struct GulpinShopWork *gGulpinShopWork;
extern const UnkTextStruct2 gUnknown_80DC11C;
extern const UnkTextStruct2 gUnknown_80DC134;
extern u8 gAvailablePokemonNames[]; // 202DF98
EWRAM_DATA_2 GulpinShopWork *sGulpinShopWork = {0};
// data_80D47B8.s
extern const u8 *gUnknown_80D4920[];
extern const u8 *gUnknown_80D4928[];
extern const u8 *gUnknown_80D4970[];
extern const u8 *gUnknown_80DC164[];
extern const u8 *gGulpinDialogue[2][25]; // 80D8888
extern const UnkTextStruct2 gUnknown_80DC11C;
extern const UnkTextStruct2 gUnknown_80DC134;
extern const u8 gUnknown_80DC164[];
extern const u8 gUnknown_80DC1A0[];
extern const u8 gUnknown_80DC1FC[];
extern const u8 gUnknown_80DC230[];
extern u8 gAvailablePokemonNames[0x50 * 2];
extern const u8 *gGulpinDialogue[2][25];
void sub_801EC7C(void);
void sub_801ECBC(void);
void sub_801ED28(void);
void sub_801EDA4(void);
void sub_801EDC0(void);
void sub_801E980(void);
void sub_801EA28(void);
void sub_801EBC4(void);
extern void sub_801EE10(u32, s16, struct Move *, u32, void *, u32);
extern u32 sub_801EF38(u32);
extern u32 sub_801F194(void);
extern void sub_801F1B0(u32, u32);
extern void sub_801F214(void);
extern void sub_801F280(u32);
extern void sub_801F808(u16 *);
extern u32 sub_801F890(void);
extern void sub_801F8D0(void);
void SetGulpinShopState(u32);
static void SetGulpinShopState(u32);
u32 CreateGulpinShop(s32 isAsleep, s16 pokeSpecies, struct Move *moves)
static void sub_801E980(void);
static void sub_801EA28(void);
static void sub_801EBC4(void);
static void sub_801EC7C(void);
static void sub_801ECBC(void);
static void sub_801ED28(void);
static void sub_801EDA4(void);
static void sub_801EDC0(void);
bool8 CreateGulpinShop(s32 isAsleep, s16 pokeSpecies, Move *moves)
{
OpenedFile *faceFile;
s32 species_32;
OpenedFile *faceFile;
s32 species_32;
species_32 = pokeSpecies; // dumb cast needed to get lsr/asr combo
gGulpinShopWork = MemoryAlloc(sizeof(struct GulpinShopWork), 8);
gGulpinShopWork->isAsleep = isAsleep;
gGulpinShopWork->speciesNum = species_32;
gGulpinShopWork->moves = moves;
gGulpinShopWork->unk1C = moves[4].id; // 5th move..?
species_32 = pokeSpecies; // dumb cast needed to get lsr/asr combo
if (isAsleep == 0)
gGulpinShopWork->unk128 = &gGulpinShopWork->faceFile;
else
gGulpinShopWork->unk128 = NULL;
sGulpinShopWork = MemoryAlloc(sizeof(GulpinShopWork), 8);
sGulpinShopWork->isAsleep = isAsleep;
sGulpinShopWork->speciesNum = species_32;
sGulpinShopWork->moves = moves;
sGulpinShopWork->unk1C = moves[4].id; // 5th move..?
faceFile = GetDialogueSpriteDataPtr(MONSTER_GULPIN);
gGulpinShopWork->faceFile = faceFile;
gGulpinShopWork->faceData = faceFile->data;
if (isAsleep == 0)
sGulpinShopWork->unk128 = &sGulpinShopWork->faceFile;
else
sGulpinShopWork->unk128 = NULL;
gGulpinShopWork->unk124 = 0;
gGulpinShopWork->unk125 = 0;
gGulpinShopWork->unk126 = 0;
faceFile = GetDialogueSpriteDataPtr(MONSTER_GULPIN);
sGulpinShopWork->faceFile = faceFile;
sGulpinShopWork->faceData = faceFile->data;
gGulpinShopWork->unk120 = 2;
gGulpinShopWork->unk122 = 8;
SetGulpinShopState(0);
return 1;
sGulpinShopWork->unk124 = 0;
sGulpinShopWork->unk125 = 0;
sGulpinShopWork->unk126 = 0;
sGulpinShopWork->unk120 = 2;
sGulpinShopWork->unk122 = 8;
SetGulpinShopState(0);
return TRUE;
}
u32 sub_801E8C0(void)
{
switch (gGulpinShopWork->state) {
switch (sGulpinShopWork->state) {
case 0:
case 1:
sub_801ECBC();
@ -88,7 +85,7 @@ u32 sub_801E8C0(void)
break;
case 4:
sub_801EDC0();
if (gGulpinShopWork->state == 5)
if (sGulpinShopWork->state == 5)
return 3;
break;
case 5:
@ -101,123 +98,123 @@ u32 sub_801E8C0(void)
bool8 GulpinIsNextMoveLinked(void)
{
return gGulpinShopWork->isNextMoveLinked;
return sGulpinShopWork->isNextMoveLinked;
}
void DestroyGulpinShop(void)
{
if (gGulpinShopWork != NULL) {
CloseFile(gGulpinShopWork->faceFile);
MemoryFree(gGulpinShopWork);
gGulpinShopWork = NULL;
if (sGulpinShopWork != NULL) {
CloseFile(sGulpinShopWork->faceFile);
MemoryFree(sGulpinShopWork);
sGulpinShopWork = NULL;
}
}
void SetGulpinShopState(u32 newState)
static void SetGulpinShopState(u32 newState)
{
gGulpinShopWork->state = newState;
sGulpinShopWork->state = newState;
sub_801E980();
sub_801EA28();
}
void sub_801E980(void)
static void sub_801E980(void)
{
s32 index;
sub_8006518(gGulpinShopWork->unk12C);
sub_8006518(sGulpinShopWork->unk12C);
switch (gGulpinShopWork->state) {
switch (sGulpinShopWork->state) {
case 2:
sub_801EBC4();
gGulpinShopWork->unk12C[1] = gUnknown_80DC11C;
gGulpinShopWork->unk12C[2] = gUnknown_80DC134;
sub_8012CAC(&gGulpinShopWork->unk12C[2], gGulpinShopWork->unk28);
sGulpinShopWork->unk12C[1] = gUnknown_80DC11C;
sGulpinShopWork->unk12C[2] = gUnknown_80DC134;
sub_8012CAC(&sGulpinShopWork->unk12C[2], sGulpinShopWork->unk28);
break;
default:
for(index = 0; index < 4; index++) {
gGulpinShopWork->unk12C[index] = gUnknown_80DC11C;
sGulpinShopWork->unk12C[index] = gUnknown_80DC11C;
}
break;
}
ResetUnusedInputStruct();
sub_800641C(gGulpinShopWork->unk12C, TRUE, TRUE);
sub_800641C(sGulpinShopWork->unk12C, TRUE, TRUE);
}
void sub_801EA28(void)
static void sub_801EA28(void)
{
switch (gGulpinShopWork->state) {
switch (sGulpinShopWork->state) {
case 0:
sub_801EE10(2, gGulpinShopWork->speciesNum, gGulpinShopWork->moves, 0, gUnknown_80DC164, 0);
sub_801EE10(2, sGulpinShopWork->speciesNum, sGulpinShopWork->moves, 0, gUnknown_80DC164, 0);
break;
case 1:
sub_801F1B0(1, 0);
sub_801F1B0(TRUE, FALSE);
break;
case 2:
sub_801F280(0);
sub_8012D60(&gGulpinShopWork->unk78, gGulpinShopWork->unk28, 0, gGulpinShopWork->unk68, gGulpinShopWork->unk24, 2);
sub_8012D60(&sGulpinShopWork->unk78, sGulpinShopWork->unk28, 0, sGulpinShopWork->unk68, sGulpinShopWork->unk24, 2);
break;
case 3:
GetLinkedSequence(gGulpinShopWork->unk20, gGulpinShopWork->moves, &gGulpinShopWork->unk14[0]);
sub_801F808(&gGulpinShopWork->unk14[0]);
GetLinkedSequence(sGulpinShopWork->unk20, sGulpinShopWork->moves, &sGulpinShopWork->unk14[0]);
sub_801F808(&sGulpinShopWork->unk14[0]);
break;
case 4:
sub_801EC7C();
sub_8092C84(gAvailablePokemonNames, gGulpinShopWork->unk1C);
sub_8092C84(&gAvailablePokemonNames[0x50], gGulpinShopWork->unk1E);
sub_8092C84(gAvailablePokemonNames, sGulpinShopWork->unk1C);
sub_8092C84(&gAvailablePokemonNames[0x50], sGulpinShopWork->unk1E);
switch (gGulpinShopWork->isAsleep) {
switch (sGulpinShopWork->isAsleep) {
case 0:
case 1:
if (gGulpinShopWork->isNextMoveLinked)
sub_8014248(gGulpinDialogue[gGulpinShopWork->isAsleep][12], 0, 5, &gGulpinShopWork->unk28[0],
&gGulpinShopWork->unk68, 4, 0, gGulpinShopWork->unk128, 12); // Forget the move and any moves linked to it and learn?
if (sGulpinShopWork->isNextMoveLinked)
sub_8014248(gGulpinDialogue[sGulpinShopWork->isAsleep][12], 0, 5, &sGulpinShopWork->unk28[0],
&sGulpinShopWork->unk68, 4, 0, sGulpinShopWork->unk128, 12); // Forget the move and any moves linked to it and learn?
else
sub_8014248(gGulpinDialogue[gGulpinShopWork->isAsleep][11], 0, 5, &gGulpinShopWork->unk28[0],
&gGulpinShopWork->unk68, 4, 0, gGulpinShopWork->unk128, 12); // Forget the move and learn?
sub_8014248(gGulpinDialogue[sGulpinShopWork->isAsleep][11], 0, 5, &sGulpinShopWork->unk28[0],
&sGulpinShopWork->unk68, 4, 0, sGulpinShopWork->unk128, 12); // Forget the move and learn?
break;
case 2:
if (gGulpinShopWork->isNextMoveLinked)
sub_8014248(gUnknown_80DC1A0, 0, 5, &gGulpinShopWork->unk28[0],
&gGulpinShopWork->unk68, 4, 0, NULL, 32);
if (sGulpinShopWork->isNextMoveLinked)
sub_8014248(gUnknown_80DC1A0, 0, 5, &sGulpinShopWork->unk28[0],
&sGulpinShopWork->unk68, 4, 0, NULL, 32);
else
sub_8014248(gUnknown_80DC1FC, 0, 5, &gGulpinShopWork->unk28[0],
&gGulpinShopWork->unk68, 4, 0, NULL, 32);
sub_8014248(gUnknown_80DC1FC, 0, 5, &sGulpinShopWork->unk28[0],
&sGulpinShopWork->unk68, 4, 0, NULL, 32);
break;
}
break;
}
}
void sub_801EBC4(void)
static void sub_801EBC4(void)
{
s32 which;
s32 i;
which = 0;
MemoryFill16(gGulpinShopWork->unk68, 0, sizeof(gGulpinShopWork->unk68));
MemoryFill16(sGulpinShopWork->unk68, 0, sizeof(sGulpinShopWork->unk68));
gGulpinShopWork->unk28[which].text = gUnknown_80DC230; // "Forget"
gGulpinShopWork->unk28[which].menuAction = 2;
sGulpinShopWork->unk28[which].text = gUnknown_80DC230; // "Forget"
sGulpinShopWork->unk28[which].menuAction = 2;
if (!IsAnyMoveLinked(gGulpinShopWork->unk1E, gGulpinShopWork->moves) || (s32)gGulpinShopWork->unk20 >= 4)
gGulpinShopWork->unk68[0] = 1;
if (!IsAnyMoveLinked(sGulpinShopWork->unk1E, sGulpinShopWork->moves) || (s32)sGulpinShopWork->unk20 >= 4)
sGulpinShopWork->unk68[0] = 1;
which++;
gGulpinShopWork->unk28[which].text = *gUnknown_80D4970; // "Info"
gGulpinShopWork->unk28[which].menuAction = 3;
sGulpinShopWork->unk28[which].text = *gUnknown_80D4970; // "Info"
sGulpinShopWork->unk28[which].menuAction = 3;
which++;
gGulpinShopWork->unk28[which].text = NULL;
gGulpinShopWork->unk28[which].menuAction = 1;
sGulpinShopWork->unk28[which].text = NULL;
sGulpinShopWork->unk28[which].menuAction = 1;
i = 0;
if (i < which) {
if (gGulpinShopWork->unk68[0] == 0)
gGulpinShopWork->unk24 = gGulpinShopWork->unk28[0].menuAction;
if (sGulpinShopWork->unk68[0] == 0)
sGulpinShopWork->unk24 = sGulpinShopWork->unk28[0].menuAction;
else {
while (i < which) {
if (gGulpinShopWork->unk68[i] == 0) {
gGulpinShopWork->unk24 = gGulpinShopWork->unk28[i].menuAction;
if (sGulpinShopWork->unk68[i] == 0) {
sGulpinShopWork->unk24 = sGulpinShopWork->unk28[i].menuAction;
break;
}
i++;
@ -226,42 +223,42 @@ void sub_801EBC4(void)
}
}
void sub_801EC7C(void)
static void sub_801EC7C(void)
{
s32 which;
which = 0;
MemoryFill16(gGulpinShopWork->unk68, 0, sizeof(gGulpinShopWork->unk68));
gGulpinShopWork->unk28[which].text = *gUnknown_80D4920; // "Yes"
gGulpinShopWork->unk28[which].menuAction = 4;
MemoryFill16(sGulpinShopWork->unk68, 0, sizeof(sGulpinShopWork->unk68));
sGulpinShopWork->unk28[which].text = *gUnknown_80D4920; // "Yes"
sGulpinShopWork->unk28[which].menuAction = 4;
which++;
gGulpinShopWork->unk28[which].text = *gUnknown_80D4928; // "No"
gGulpinShopWork->unk28[which].menuAction = 5;
sGulpinShopWork->unk28[which].text = *gUnknown_80D4928; // "No"
sGulpinShopWork->unk28[which].menuAction = 5;
which++;
gGulpinShopWork->unk28[which].text = NULL;
gGulpinShopWork->unk28[which].menuAction = 1;
sGulpinShopWork->unk28[which].text = NULL;
sGulpinShopWork->unk28[which].menuAction = 1;
}
void sub_801ECBC(void)
static void sub_801ECBC(void)
{
switch (sub_801EF38(1)) {
case 3:
{
struct Move* move;
gGulpinShopWork->unk20 = sub_801F194();
move = gGulpinShopWork->moves;
move = &move[gGulpinShopWork->unk20];
gGulpinShopWork->unk1E = move->id;
Move* move;
sGulpinShopWork->unk20 = sub_801F194();
move = sGulpinShopWork->moves;
move = &move[sGulpinShopWork->unk20];
sGulpinShopWork->unk1E = move->id;
SetGulpinShopState(2);
break;
}
case 4:
{
struct Move* move;
gGulpinShopWork->unk20 = sub_801F194();
move = gGulpinShopWork->moves;
move = &move[gGulpinShopWork->unk20];
gGulpinShopWork->unk1E = move->id;
Move* move;
sGulpinShopWork->unk20 = sub_801F194();
move = sGulpinShopWork->moves;
move = &move[sGulpinShopWork->unk20];
sGulpinShopWork->unk1E = move->id;
SetGulpinShopState(3);
break;
}
@ -272,14 +269,14 @@ void sub_801ECBC(void)
}
}
void sub_801ED28(void)
static void sub_801ED28(void)
{
s32 menuAction;
menuAction = 0;
sub_801EF38(0);
if (sub_8012FD8(&gGulpinShopWork->unk78) == 0)
sub_8013114(&gGulpinShopWork->unk78, &menuAction);
if (sub_8012FD8(&sGulpinShopWork->unk78) == 0)
sub_8013114(&sGulpinShopWork->unk78, &menuAction);
switch (menuAction) {
case 1:
@ -288,7 +285,7 @@ void sub_801ED28(void)
break;
case 2:
PlaySound(0x133);
gGulpinShopWork->isNextMoveLinked = IsNextMoveLinked(gGulpinShopWork->unk20, gGulpinShopWork->moves);
sGulpinShopWork->isNextMoveLinked = IsNextMoveLinked(sGulpinShopWork->unk20, sGulpinShopWork->moves);
SetGulpinShopState(4);
break;
case 3:
@ -297,7 +294,7 @@ void sub_801ED28(void)
}
}
void sub_801EDA4(void)
static void sub_801EDA4(void)
{
switch (sub_801F890()) {
case 2:
@ -311,7 +308,7 @@ void sub_801EDA4(void)
}
}
void sub_801EDC0(void)
static void sub_801EDC0(void)
{
s32 temp;
@ -319,8 +316,8 @@ void sub_801EDC0(void)
switch (temp) {
case 4:
sub_801F214();
RemoveLinkSequenceFromMoves8(gGulpinShopWork->moves, gGulpinShopWork->unk20);
gGulpinShopWork->state = 5;
RemoveLinkSequenceFromMoves8(sGulpinShopWork->moves, sGulpinShopWork->unk20);
sGulpinShopWork->state = 5;
break;
case 1:
case 5:
@ -328,4 +325,4 @@ void sub_801EDC0(void)
break;
}
}
}
}

View File

@ -1,55 +1,19 @@
#include "global.h"
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_801EE10.h"
#include "code_801EE10_1.h"
#include "code_801EE10_mid.h"
#include "felicity_bank.h"
#include "gulpin_shop.h"
#include "gulpin_shop_1.h"
#include "memory.h"
#include "pokemon.h"
#include "menu_input.h"
#include "moves.h"
#include "pokemon_3.h"
#include "text1.h"
#include "text2.h"
#include "menu_input.h"
#include "gulpin_shop.h"
#include "moves.h"
#include "felicity_bank.h"
#include "code_80130A8.h"
#include "code_801EE10_1.h"
#include "code_80118A4.h"
// size: 0x1E0
struct unkStruct_203B27C
{
/* 0x0 */ bool32 isAsleep;
/* 0x4 */ s32 state;
/* 0x8 */ u32 fallbackState;
/* 0xC */ s16 speciesNum;
/* 0x10 */ PokemonStruct1 *pokeStruct;
/* 0x14 */ bool8 isNextMoveLinked;
bool8 unk15;
/* 0x16 */ bool8 isTeamLeader;
/* 0x18 */ u32 moveIndex;
// Group of move ids but not sure purpose just yet...
u16 unk1C;
u16 unk1E;
u16 unk20;
/* 0x24 */ struct Move moves[MAX_MON_MOVES * 2];
/* 0x64 */ u16 sequenceMoveIDs[MAX_MON_MOVES];
/* 0x6C */ u32 menuAction1;
/* 0x70 */ u32 menuAction2;
/* 0x74 */ u32 menuAction3;
/* 0x78 */ u32 menuAction4;
MenuItem unk7C[8];
u16 unkBC[8];
MenuStruct unkCC;
u8 fill11C[0x16C - 0x11C];
/* 0x16C */ OpenedFile *faceFile;
/* 0x170 */ u8 *faceData;
u16 unk174;
u16 unk176;
u8 unk178;
u8 unk179;
u8 unk17A;
OpenedFile **unk17C;
UnkTextStruct2 unk180[4];
};
EWRAM_DATA_2 struct unkStruct_203B27C *gUnknown_203B27C = {0};
extern u8 gAvailablePokemonNames[];
@ -63,7 +27,7 @@ extern UnkTextStruct2 gUnknown_80DC31C;
extern UnkTextStruct2 gUnknown_80DC34C;
extern UnkTextStruct2 gUnknown_80DC37C;
extern const u8 *gGulpinDialogue[2][25];
extern const u8 *gGulpinDialogue[2][25]; // 80D8888
extern u8 gUnknown_80DC3D8[];
extern u8 gUnknown_80DC3E0[];
extern u8 gUnknown_80DC3E8[];
@ -89,15 +53,11 @@ bool8 sub_8021178(void);
void CreateGulpinShopMenu(void);
void sub_8020950(void);
void sub_8020900(void);
bool8 sub_801F808(u16 *moveIDs);
void sub_801F700(void);
bool8 sub_801F428(s16 index, s32 param_2);
void sub_801F5F0(u8 r0);
extern void sub_801F1B0(u32, u32);
extern void sub_801F280(u32);
void sub_8024458(u32, u32);
extern void sub_801BEEC(s16);
extern void sub_801EE10(u32, s16, struct Move *, u32, void *, u32);
void sub_80208B0(void);
void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon);
extern PokemonStruct1 *GetPlayerPokemonStruct(void);
@ -128,13 +88,7 @@ extern void sub_801BF98(void);
extern u32 sub_801F520(u32);
extern void sub_801F63C(void);
extern u16 sub_801F5B4(void);
extern void sub_801F8D0(void);
extern u32 sub_801F890(void);
extern u32 sub_801E8C0(void);
extern u32 sub_801F194(void);
bool8 sub_801F1A4(void);
void sub_801F214(void);
extern u32 sub_801EF38(u32);
extern void CreateGulpinLinkMenu(void);
extern void sub_802069C(void);
@ -453,7 +407,7 @@ void sub_801FF28(void)
sub_801EE10(1,gUnknown_203B27C->speciesNum,gUnknown_203B27C->moves,gUnknown_203B27C->unk15,gUnknown_80DC394,0);
break;
case 0x1f:
sub_801F1B0(1,gUnknown_203B27C->unk15);
sub_801F1B0(TRUE, gUnknown_203B27C->unk15);
break;
case 0x20:
sub_801F280(0);
@ -877,7 +831,7 @@ void sub_8020CC0(void)
{
s32 menuAction;
s32 index;
struct Move *move;
Move *move;
menuAction = 0;
sub_801F520(0);

View File

@ -693,7 +693,7 @@ u32 sub_80913E0(Item* slot, u32 a2, struct subStruct_203B240 ** a3)
xxx_format_and_draw(8, 24, GetItemDescription(slot->id), a2, 0);
if (GetItemCategory(slot->id) == CATEGORY_TMS_HMS) {
struct Move *buffer8 = (struct Move*) (buffer88 + 0x50); // field in struct
Move *buffer8 = (Move*) (buffer88 + 0x50); // field in struct
u16 move = GetItemMoveID(slot->id);
u8 moves_data;
const u8* typestring;

View File

@ -102,7 +102,7 @@ const u8 gDungeonCamouflageTypes[76] = {
};
bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, struct Move *move)
bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
{
EntityInfo *pokemonInfo = pokemon->info;
switch (move->id)
@ -541,7 +541,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, struct Move *move)
return TRUE;
}
bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, struct Move *move)
bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
{
EntityInfo *userData = user->info;
EntityInfo *targetData = target->info;
@ -904,7 +904,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, struct Move
return TRUE;
}
bool8 HasDisabledMove(struct Move *moves)
bool8 HasDisabledMove(Move *moves)
{
s32 i;
for (i = 0; i < MAX_MON_MOVES; i++)
@ -921,7 +921,7 @@ bool8 HasDisabledMove(struct Move *moves)
return FALSE;
}
bool8 LastUsedMoveOutOfPP(struct Move *moves)
bool8 LastUsedMoveOutOfPP(Move *moves)
{
s32 i;
for (i = 0; i < MAX_MON_MOVES; i++)
@ -936,7 +936,7 @@ bool8 LastUsedMoveOutOfPP(struct Move *moves)
return FALSE;
}
bool8 HasLastUsedMove(struct Move *moves)
bool8 HasLastUsedMove(Move *moves)
{
s32 i;
for (i = 0; i < MAX_MON_MOVES; i++)

View File

@ -14,7 +14,7 @@
extern bool8 sub_8044B28(void);
extern void sub_80429C8(Entity *r0);
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, Move *move, s32 param_4);
struct NaturePowerMove
{
u16 moveID;
@ -27,21 +27,21 @@ bool8 sub_805755C(Entity* pokemon,u16 param_2);
u32 sub_8057144(Entity * pokemon)
{
struct Move **ppbVar3;
Move **ppbVar3;
s32 entityIndex;
struct Move *move1;
struct Move *move2;
Move *move1;
Move *move2;
s32 index;
Entity *entity;
s32 counter;
struct Move *moveStack [80];
struct Move **local_20;
Move *moveStack [80];
Move **local_20;
#ifndef NONMATCHING
register s32 counter_1 asm("r0");
register struct Move** move_1 asm("r1");
register Move** move_1 asm("r1");
#else
s32 counter_1;
struct Move** move_1;
Move** move_1;
#endif
counter = 0;
@ -83,7 +83,7 @@ u32 sub_8057144(Entity * pokemon)
}
}
bool8 sub_80571F0(Entity * pokemon, struct Move *move)
bool8 sub_80571F0(Entity * pokemon, Move *move)
{
u16 moveID;
s32 tileset;
@ -168,7 +168,7 @@ bool8 sub_8057308(Entity *pokemon, s32 chance)
bool8 CanAIUseMove(Entity *pokemon, s32 moveIndex, bool8 hasPPChecker)
{
EntityInfo *pokemonInfo = pokemon->info;
struct Move *move = &pokemonInfo->moves[moveIndex];
Move *move = &pokemonInfo->moves[moveIndex];
s32 i;
if (!(move->moveFlags & MOVE_FLAG_EXISTS))
{
@ -208,7 +208,7 @@ bool8 CanAIUseMove(Entity *pokemon, s32 moveIndex, bool8 hasPPChecker)
goto incMoveIndex;
}
bool8 CanMonsterUseMove(Entity *pokemon, struct Move *move, bool8 hasPPChecker)
bool8 CanMonsterUseMove(Entity *pokemon, Move *move, bool8 hasPPChecker)
{
EntityInfo *pokemonInfo = pokemon->info;
if (move->id == MOVE_REGULAR_ATTACK)
@ -247,7 +247,7 @@ bool8 CanMonsterUseMove(Entity *pokemon, struct Move *move, bool8 hasPPChecker)
return TRUE;
}
bool8 sub_805744C(Entity * pokemon, struct Move *move, bool8 param_3)
bool8 sub_805744C(Entity * pokemon, Move *move, bool8 param_3)
{
EntityInfo *entityInfo;

View File

@ -10,8 +10,8 @@
#include "text2.h"
static EWRAM_DATA OpenedFile *sWazaParametersFile = {0};
static EWRAM_DATA struct MoveDataEntry *sMovesData = {0};
static EWRAM_DATA struct MoveLearnset *sMoveLearnsets = {0}; // 420 entries, aka (MONSTER_DEOXYS_SPEED + 1), aka (MONSTER_MUNCHLAX)
static EWRAM_DATA MoveDataEntry *sMovesData = {0};
static EWRAM_DATA MoveLearnset *sMoveLearnsets = {0}; // 420 entries, aka (MONSTER_DEOXYS_SPEED + 1), aka (MONSTER_MUNCHLAX)
// ???
extern u32 gUnknown_202DE30;
@ -42,28 +42,28 @@ extern const struct FileArchive gSystemFileArchive;
// code_8097DD0.s
extern u32 sub_8097DF0(u8 *, struct subStruct_203B240 **);
static void CopyAndResetMove(struct Move *, struct Move *);
static bool8 sub_80933D8(s32, struct Move *);
static s32 unk_FindMarkedMoveInLinkedSequences44(struct Move [MAX_MON_MOVES][MAX_MON_MOVES]);
static s32 unk_FindMarkedMoveInLinkedSequences88(struct Move [8][8]);
static s32 unk_FindMarkedMoveInLinkedSequences88_v2(struct Move [8][8]);
static void unk_GetLinkedSequences4(struct Move *, struct Move [MAX_MON_MOVES][MAX_MON_MOVES]);
static void unk_GetLinkedSequences8(struct Move *, struct Move [8][8]);
static void unk_GetLinkedSequences8_v2(struct Move *, struct Move [8][8]);
static void unk_LinkedSequencesToMoves4(struct Move *, struct Move [MAX_MON_MOVES][MAX_MON_MOVES]);
static void unk_LinkedSequencesToMoves8(struct Move *, struct Move [8][8]);
static void unk_LinkedSequencesToMoves8_v2(struct Move *, struct Move [8][8]);
static void unk_MovePrintData(struct Move *, s32);
static void CopyAndResetMove(Move *, Move *);
static bool8 sub_80933D8(s32, Move *);
static s32 unk_FindMarkedMoveInLinkedSequences44(Move [MAX_MON_MOVES][MAX_MON_MOVES]);
static s32 unk_FindMarkedMoveInLinkedSequences88(Move [8][8]);
static s32 unk_FindMarkedMoveInLinkedSequences88_v2(Move [8][8]);
static void unk_GetLinkedSequences4(Move *, Move [MAX_MON_MOVES][MAX_MON_MOVES]);
static void unk_GetLinkedSequences8(Move *, Move [8][8]);
static void unk_GetLinkedSequences8_v2(Move *, Move [8][8]);
static void unk_LinkedSequencesToMoves4(Move *, Move [MAX_MON_MOVES][MAX_MON_MOVES]);
static void unk_LinkedSequencesToMoves8(Move *, Move [8][8]);
static void unk_LinkedSequencesToMoves8_v2(Move *, Move [8][8]);
static void unk_MovePrintData(Move *, s32);
void LoadWazaParameters(void)
{
sWazaParametersFile = OpenFileAndGetFileDataPtr(gUnknown_81098D0, &gSystemFileArchive);
sMovesData = ((struct MoveDataFile *)(sWazaParametersFile->data))->moveData;
sMoveLearnsets = ((struct MoveDataFile *)(sWazaParametersFile->data))->moveLearnsets;
sMovesData = ((MoveDataFile *)(sWazaParametersFile->data))->moveData;
sMoveLearnsets = ((MoveDataFile *)(sWazaParametersFile->data))->moveLearnsets;
}
u8 sub_809287C(struct Move *move)
u8 sub_809287C(Move *move)
{
if (move->moveFlags & MOVE_FLAG_DISABLED)
return 50;
@ -72,14 +72,14 @@ u8 sub_809287C(struct Move *move)
return 50;
}
void sub_80928A0(u8 *buffer, struct Move *move, const struct unkStruct_80928C0 *a2)
void sub_80928A0(u8 *buffer, Move *move, const struct unkStruct_80928C0 *a2)
{
struct Move stack;
Move stack;
CopyAndResetMove(&stack, move);
sub_80928C0(buffer, &stack, a2);
}
void sub_80928C0(u8 *buffer, struct Move *move, const struct unkStruct_80928C0 *param_3)
void sub_80928C0(u8 *buffer, Move *move, const struct unkStruct_80928C0 *param_3)
{
u32 uVar2;
u32 basePP;
@ -132,7 +132,7 @@ void sub_80928C0(u8 *buffer, struct Move *move, const struct unkStruct_80928C0 *
}
}
void InitPokemonMove(struct Move *move, u16 moveID)
void InitPokemonMove(Move *move, u16 moveID)
{
move->moveFlags = MOVE_FLAG_ENABLED_FOR_AI | MOVE_FLAG_EXISTS;
move->moveFlags2 = 0;
@ -141,7 +141,7 @@ void InitPokemonMove(struct Move *move, u16 moveID)
move->ginseng = 0;
}
void sub_8092AA8(struct Move *move, u16 moveID)
void sub_8092AA8(Move *move, u16 moveID)
{
if (moveID == 0)
move->moveFlags = 0;
@ -154,19 +154,19 @@ void sub_8092AA8(struct Move *move, u16 moveID)
}
}
void InitZeroedPPPokemonMove(struct Move *move, u16 moveID)
void InitZeroedPPPokemonMove(Move *move, u16 moveID)
{
move->moveFlags = MOVE_FLAG_ENABLED_FOR_AI | MOVE_FLAG_EXISTS;
move->id = moveID;
move->PP = 0;
}
s16 GetMoveTargetAndRange(struct Move *move, bool32 isAI)
s16 GetMoveTargetAndRange(Move *move, bool32 isAI)
{
return sMovesData[move->id].targetingFlags[isAI];
}
u8 GetMoveType(struct Move *move)
u8 GetMoveType(Move *move)
{
return sMovesData[move->id].type;
}
@ -209,59 +209,59 @@ const u8 *GetHMTMMoves(s16 species)
return sMoveLearnsets[species2].HMTMMoves;
}
u8 GetMoveAIWeight(struct Move *move)
u8 GetMoveAIWeight(Move *move)
{
return sMovesData[move->id].aiWeight;
}
u32 GetMoveNumberOfChainedHits(struct Move *move)
u32 GetMoveNumberOfChainedHits(Move *move)
{
return sMovesData[move->id].numberOfChainedHits;
}
s32 GetMoveBasePower(struct Move *move)
s32 GetMoveBasePower(Move *move)
{
return sMovesData[move->id].basePower;
}
s32 GetMoveAccuracyOrAIChance(struct Move *move, u32 accuracyType)
s32 GetMoveAccuracyOrAIChance(Move *move, u32 accuracyType)
{
return sMovesData[move->id].accuracy[accuracyType];
}
u32 GetMoveBasePP(struct Move *move)
u32 GetMoveBasePP(Move *move)
{
return sMovesData[move->id].basePP;
}
u32 GetMoveMaxUpgradeLevel(struct Move *move)
u32 GetMoveMaxUpgradeLevel(Move *move)
{
return sMovesData[move->id].maxUpgradeLevel;
}
u32 GetMoveCritChance(struct Move *move)
u32 GetMoveCritChance(Move *move)
{
return sMovesData[move->id].critChance;
}
bool8 MoveCannotHitFrozen(struct Move *move)
bool8 MoveCannotHitFrozen(Move *move)
{
return sMovesData[move->id].cannotHitFrozen;
}
bool8 MoveIgnoresTaunted(struct Move *move)
bool8 MoveIgnoresTaunted(Move *move)
{
return sMovesData[move->id].ignoresTaunted;
}
static u32 GetMoveRangeID(struct Move *move)
static u32 GetMoveRangeID(Move *move)
{
return sMovesData[move->id].rangeID;
}
void sub_8092C84(u8 *buffer, u16 moveID)
{
struct Move stack;
Move stack;
InitPokemonMove(&stack, moveID);
sub_80928C0(buffer, &stack, NULL);
}
@ -286,7 +286,7 @@ bool8 FailsWhileMuzzled(u16 moveID)
return sMovesData[moveID].usesMouth;
}
bool8 IsSoundMove(struct Move *move)
bool8 IsSoundMove(Move *move)
{
if (move->id == MOVE_GROWL) return TRUE;
if (move->id == MOVE_ROAR) return TRUE;
@ -303,14 +303,14 @@ bool8 IsSoundMove(struct Move *move)
return FALSE;
}
static void sub_8092D54(u8 *buffer, struct Move *move)
static void sub_8092D54(u8 *buffer, Move *move)
{
sprintfStatic(buffer, gUnknown_810992C, gRangeNames[GetMoveRangeID(move)]);
}
// this function is the same as the two after the next one
// except this one is for 4, and the other 2 for 8 and 8_v2
s32 unk_FindMoveEnabledForAIAfter4(struct Move *moves, s32 index)
s32 unk_FindMoveEnabledForAIAfter4(Move *moves, s32 index)
{
s32 i;
@ -332,7 +332,7 @@ s32 unk_FindMoveEnabledForAIAfter4(struct Move *moves, s32 index)
return 0;
}
s32 sub_8092DB8(struct Move *moves, s32 index)
s32 sub_8092DB8(Move *moves, s32 index)
{
s32 i, j;
@ -366,7 +366,7 @@ s32 sub_8092DB8(struct Move *moves, s32 index)
return 0;
}
s32 unk_FindMoveEnabledForAIAfter8(struct Move *moves, s32 index)
s32 unk_FindMoveEnabledForAIAfter8(Move *moves, s32 index)
{
s32 i;
@ -388,7 +388,7 @@ s32 unk_FindMoveEnabledForAIAfter8(struct Move *moves, s32 index)
return 0;
}
s32 unk_FindMoveEnabledForAIAfter8_v2(struct Move *moves, s32 index)
s32 unk_FindMoveEnabledForAIAfter8_v2(Move *moves, s32 index)
{
s32 i;
@ -412,7 +412,7 @@ s32 unk_FindMoveEnabledForAIAfter8_v2(struct Move *moves, s32 index)
// the next 2 functions are the same
// should be 8 and 8_v2
s32 unk_FindMoveEnabledForAIBefore8(struct Move *moves, s32 index)
s32 unk_FindMoveEnabledForAIBefore8(Move *moves, s32 index)
{
s32 i, j;
@ -444,7 +444,7 @@ s32 unk_FindMoveEnabledForAIBefore8(struct Move *moves, s32 index)
return 0;
}
s32 unk_FindMoveEnabledForAIBefore8_v2(struct Move *moves, s32 index)
s32 unk_FindMoveEnabledForAIBefore8_v2(Move *moves, s32 index)
{
s32 i, j;
@ -476,12 +476,12 @@ s32 unk_FindMoveEnabledForAIBefore8_v2(struct Move *moves, s32 index)
return 0;
}
s32 sub_8092F4C(struct Move *moves, s32 index)
s32 sub_8092F4C(Move *moves, s32 index)
{
s32 i;
for (i = index; i > 0; i--) {
struct Move* move = &moves[i];
Move* move = &moves[i];
u8 flag;
if (!(move->moveFlags & MOVE_FLAG_EXISTS))
@ -498,10 +498,10 @@ s32 sub_8092F4C(struct Move *moves, s32 index)
// the next 3 functions are the same, except the first
// is for 4, then for 8 then for 8_v2
s32 unk_SetMoveToLastInLinkedSequence4(struct Move *moves, s32 index)
s32 unk_SetMoveToLastInLinkedSequence4(Move *moves, s32 index)
{
struct Move* move;
struct Move linkedSequence[4][4];
Move* move;
Move linkedSequence[4][4];
s32 startIndex;
s32 result;
s32 i;
@ -515,7 +515,7 @@ s32 unk_SetMoveToLastInLinkedSequence4(struct Move *moves, s32 index)
startIndex = unk_FindMarkedMoveInLinkedSequences44(linkedSequence);
if (startIndex >= 0 && startIndex < 3) {
for (i = 0; i < 4; i++) {
const struct Move temp = linkedSequence[startIndex][i];
const Move temp = linkedSequence[startIndex][i];
linkedSequence[startIndex][i] = linkedSequence[startIndex + 1][i];
linkedSequence[startIndex + 1][i] = temp;
}
@ -533,10 +533,10 @@ s32 unk_SetMoveToLastInLinkedSequence4(struct Move *moves, s32 index)
return result;
}
UNUSED static s32 unk_SetMoveToLastInLinkedSequence8(struct Move *moves, s32 index)
UNUSED static s32 unk_SetMoveToLastInLinkedSequence8(Move *moves, s32 index)
{
struct Move* move;
struct Move linkedSequence[8][8];
Move* move;
Move linkedSequence[8][8];
s32 startIndex;
s32 result;
s32 i;
@ -550,7 +550,7 @@ UNUSED static s32 unk_SetMoveToLastInLinkedSequence8(struct Move *moves, s32 ind
startIndex = unk_FindMarkedMoveInLinkedSequences88(linkedSequence);
if (startIndex >= 0 && startIndex < 7) {
for (i = 0; i < 8; i++) {
const struct Move temp = linkedSequence[startIndex][i];
const Move temp = linkedSequence[startIndex][i];
linkedSequence[startIndex][i] = linkedSequence[startIndex + 1][i];
linkedSequence[startIndex + 1][i] = temp;
}
@ -568,10 +568,10 @@ UNUSED static s32 unk_SetMoveToLastInLinkedSequence8(struct Move *moves, s32 ind
return result;
}
s32 unk_SetMoveToLastInLinkedSequence8_v2(struct Move *moves, s32 index)
s32 unk_SetMoveToLastInLinkedSequence8_v2(Move *moves, s32 index)
{
struct Move* move;
struct Move linkedSequence[8][8];
Move* move;
Move linkedSequence[8][8];
s32 startIndex;
s32 result;
s32 i;
@ -585,7 +585,7 @@ s32 unk_SetMoveToLastInLinkedSequence8_v2(struct Move *moves, s32 index)
startIndex = unk_FindMarkedMoveInLinkedSequences88_v2(linkedSequence);
if (startIndex >= 0 && startIndex < 7) {
for (i = 0; i < 8; i++) {
const struct Move temp = linkedSequence[startIndex][i];
const Move temp = linkedSequence[startIndex][i];
linkedSequence[startIndex][i] = linkedSequence[startIndex + 1][i];
linkedSequence[startIndex + 1][i] = temp;
}
@ -605,10 +605,10 @@ s32 unk_SetMoveToLastInLinkedSequence8_v2(struct Move *moves, s32 index)
// the next 3 functions are the same, but for
// 4, 8 and 8_v2
s32 unk_SetMoveToFirstInLinkedSequence4(struct Move *moves, s32 index)
s32 unk_SetMoveToFirstInLinkedSequence4(Move *moves, s32 index)
{
struct Move* move;
struct Move linkedSequence[4][4];
Move* move;
Move linkedSequence[4][4];
s32 startIndex, prevIndex;
s32 result;
s32 i;
@ -623,7 +623,7 @@ s32 unk_SetMoveToFirstInLinkedSequence4(struct Move *moves, s32 index)
prevIndex = startIndex - 1;
if (prevIndex >= 0 && prevIndex < 3) {
for (i = 0; i < 4; i++) {
const struct Move temp = linkedSequence[startIndex][i];
const Move temp = linkedSequence[startIndex][i];
linkedSequence[startIndex][i] = linkedSequence[prevIndex][i];
linkedSequence[prevIndex][i] = temp;
}
@ -641,10 +641,10 @@ s32 unk_SetMoveToFirstInLinkedSequence4(struct Move *moves, s32 index)
return result;
}
UNUSED static s32 unk_SetMoveToFirstInLinkedSequence8(struct Move *moves, s32 index)
UNUSED static s32 unk_SetMoveToFirstInLinkedSequence8(Move *moves, s32 index)
{
struct Move* move;
struct Move linkedSequence[8][8];
Move* move;
Move linkedSequence[8][8];
s32 startIndex, prevIndex;
int result;
int i;
@ -659,7 +659,7 @@ UNUSED static s32 unk_SetMoveToFirstInLinkedSequence8(struct Move *moves, s32 in
prevIndex = startIndex - 1;
if (prevIndex >= 0 && prevIndex < 7) {
for (i = 0; i < 8; i++) {
const struct Move temp = linkedSequence[startIndex][i];
const Move temp = linkedSequence[startIndex][i];
linkedSequence[startIndex][i] = linkedSequence[prevIndex][i];
linkedSequence[prevIndex][i] = temp;
}
@ -677,10 +677,10 @@ UNUSED static s32 unk_SetMoveToFirstInLinkedSequence8(struct Move *moves, s32 in
return result;
}
s32 unk_SetMoveToFirstInLinkedSequence8_v2(struct Move *moves, s32 index)
s32 unk_SetMoveToFirstInLinkedSequence8_v2(Move *moves, s32 index)
{
struct Move* move;
struct Move linkedSequence[8][8];
Move* move;
Move linkedSequence[8][8];
s32 startIndex, prevIndex;
s32 result;
s32 i;
@ -695,7 +695,7 @@ s32 unk_SetMoveToFirstInLinkedSequence8_v2(struct Move *moves, s32 index)
prevIndex = startIndex - 1;
if (prevIndex >= 0 && prevIndex < 7) {
for (i = 0; i < 8; i++) {
const struct Move temp = linkedSequence[startIndex][i];
const Move temp = linkedSequence[startIndex][i];
linkedSequence[startIndex][i] = linkedSequence[prevIndex][i];
linkedSequence[prevIndex][i] = temp;
}
@ -713,49 +713,49 @@ s32 unk_SetMoveToFirstInLinkedSequence8_v2(struct Move *moves, s32 index)
return result;
}
bool8 IsMoveSet(s32 index, struct Move *struct_ptr)
bool8 IsMoveSet(s32 index, Move *struct_ptr)
{
if (struct_ptr[index].moveFlags & MOVE_FLAG_SET)
return TRUE;
return FALSE;
}
bool8 IsMoveEnabled(s32 index, struct Move *struct_ptr)
bool8 IsMoveEnabled(s32 index, Move *struct_ptr)
{
if (struct_ptr[index].moveFlags & MOVE_FLAG_ENABLED_FOR_AI)
return TRUE;
return FALSE;
}
bool8 sub_8093318(s32 param_1, struct Move *src_struct)
bool8 sub_8093318(s32 param_1, Move *src_struct)
{
struct Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(struct Move) * MAX_MON_MOVES * 2);
Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(Move) * MAX_MON_MOVES * 2);
return TryLinkMovesAfter(param_1, dest_struct);
}
bool8 sub_809333C(s32 param_1, struct Move *src_struct)
bool8 sub_809333C(s32 param_1, Move *src_struct)
{
struct Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(struct Move) * MAX_MON_MOVES * 2);
Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(Move) * MAX_MON_MOVES * 2);
return UnlinkMovesAfter(param_1, dest_struct);
}
UNUSED static bool8 sub_8093360(s32 param_1, struct Move *src_struct)
UNUSED static bool8 sub_8093360(s32 param_1, Move *src_struct)
{
struct Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(struct Move) * MAX_MON_MOVES * 2);
Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(Move) * MAX_MON_MOVES * 2);
return sub_80933D8(param_1, dest_struct);
}
UNUSED static bool8 IsMoveNotSet(s32 index, struct Move* struct_ptr)
UNUSED static bool8 IsMoveNotSet(s32 index, Move* struct_ptr)
{
if (struct_ptr[index].moveFlags & MOVE_FLAG_SET)
return FALSE;
return TRUE;
}
bool8 IsAnyMoveLinked(s32 unused, struct Move *moves)
bool8 IsAnyMoveLinked(s32 unused, Move *moves)
{
s32 i;
s32 counter;
@ -772,7 +772,7 @@ bool8 IsAnyMoveLinked(s32 unused, struct Move *moves)
return FALSE;
}
static bool8 sub_80933D8(s32 param_1, struct Move *src_struct)
static bool8 sub_80933D8(s32 param_1, Move *src_struct)
{
if (TryLinkMovesAfter(param_1, src_struct))
return TRUE;
@ -780,10 +780,10 @@ static bool8 sub_80933D8(s32 param_1, struct Move *src_struct)
return UnlinkMovesAfter(param_1, src_struct);
}
bool8 TryLinkMovesAfter(s32 index, struct Move *moves)
bool8 TryLinkMovesAfter(s32 index, Move *moves)
{
s32 i;
const struct Move *move = &moves[index];
const Move *move = &moves[index];
if (DoesMoveCharge(move->id))
return FALSE;
@ -805,7 +805,7 @@ bool8 TryLinkMovesAfter(s32 index, struct Move *moves)
return FALSE;
}
bool8 UnlinkMovesAfter(s32 index, struct Move *moves)
bool8 UnlinkMovesAfter(s32 index, Move *moves)
{
s32 i;
bool8 result = FALSE;
@ -823,9 +823,9 @@ label:
return result;
}
bool8 IsNextMoveLinked(s32 index, struct Move *moves)
bool8 IsNextMoveLinked(s32 index, Move *moves)
{
struct Move *move;
Move *move;
if (index + 1 >= MAX_MON_MOVES * 2)
return FALSE;
@ -841,9 +841,9 @@ bool8 IsNextMoveLinked(s32 index, struct Move *moves)
return FALSE;
}
bool8 ToggleSetMove(s32 index, struct Move *moves)
bool8 ToggleSetMove(s32 index, Move *moves)
{
struct Move* move;
Move* move;
u8 flags;
s32 i;
@ -866,26 +866,26 @@ bool8 ToggleSetMove(s32 index, struct Move *moves)
return TRUE;
}
void UnSetMove(s32 index, struct Move *moves)
void UnSetMove(s32 index, Move *moves)
{
struct Move* move = &moves[index];
Move* move = &moves[index];
move->moveFlags &= ~MOVE_FLAG_SET;
unk_FixLinkedMovesSetEnabled8_v2(moves);
}
bool8 ToggleMoveEnabled(s32 index, struct Move *moves)
bool8 ToggleMoveEnabled(s32 index, Move *moves)
{
struct Move* move = &moves[index];
Move* move = &moves[index];
move->moveFlags ^= MOVE_FLAG_ENABLED_FOR_AI;
unk_FixLinkedMovesSetEnabled8_v2(moves);
return TRUE;
}
s32 GetLinkedSequence(s32 index, struct Move *moves, u16 *sequenceMoveIDs)
s32 GetLinkedSequence(s32 index, Move *moves, u16 *sequenceMoveIDs)
{
s32 i;
s32 linkedSequenceLength;
struct Move* move;
Move* move;
linkedSequenceLength = 1;
move = &moves[index];
@ -906,7 +906,7 @@ s32 GetLinkedSequence(s32 index, struct Move *moves, u16 *sequenceMoveIDs)
return linkedSequenceLength;
}
s32 sub_80935B8(struct Move *moves, s32 index)
s32 sub_80935B8(Move *moves, s32 index)
{
s32 i;
s32 linkSequenceStart;
@ -921,7 +921,7 @@ s32 sub_80935B8(struct Move *moves, s32 index)
linkSequenceStart = index;
while (linkSequenceStart >= 0) {
struct Move *move = &moves[linkSequenceStart];
Move *move = &moves[linkSequenceStart];
if (!((move->moveFlags & MOVE_FLAG_EXISTS) && (move->moveFlags & MOVE_FLAG_SUBSEQUENT_IN_LINK_CHAIN)))
break;
@ -935,7 +935,7 @@ s32 sub_80935B8(struct Move *moves, s32 index)
#endif
for (i = linkSequenceStart + 1; i < MAX_MON_MOVES; i++) {
struct Move *move = &moves[i];
Move *move = &moves[i];
if (!((move->moveFlags & MOVE_FLAG_EXISTS) && (move->moveFlags & MOVE_FLAG_SUBSEQUENT_IN_LINK_CHAIN)))
break;
@ -949,7 +949,7 @@ s32 sub_80935B8(struct Move *moves, s32 index)
v1 = FALSE;
while (--i >= linkSequenceStart) {
struct Move* move = &moves[i];
Move* move = &moves[i];
if (!(move->moveFlags & MOVE_FLAG_EXISTS))
break;
@ -966,7 +966,7 @@ s32 sub_80935B8(struct Move *moves, s32 index)
return pp;
for (i = linkSequenceStart + 1; i < MAX_MON_MOVES; i++) {
struct Move* move = &moves[i];
Move* move = &moves[i];
if (!(moves[i].moveFlags & MOVE_FLAG_EXISTS))
break;
@ -984,9 +984,9 @@ s32 sub_80935B8(struct Move *moves, s32 index)
return pp;
}
void unk_FixLinkedMovesSetEnabled4(struct Move *moves)
void unk_FixLinkedMovesSetEnabled4(Move *moves)
{
struct Move linkedSequences[4][4];
Move linkedSequences[4][4];
// all that doing these in a row seems to do is
// fix the set/enabled flags by moving them to
@ -995,23 +995,23 @@ void unk_FixLinkedMovesSetEnabled4(struct Move *moves)
unk_LinkedSequencesToMoves4(moves, linkedSequences);
}
void unk_FixLinkedMovesSetEnabled8(struct Move *moves)
void unk_FixLinkedMovesSetEnabled8(Move *moves)
{
struct Move linkedSequences[8][8];
Move linkedSequences[8][8];
unk_GetLinkedSequences8(moves, linkedSequences);
unk_LinkedSequencesToMoves8(moves, linkedSequences);
}
void unk_FixLinkedMovesSetEnabled8_v2(struct Move *moves)
void unk_FixLinkedMovesSetEnabled8_v2(Move *moves)
{
struct Move linkedSequences[8][8];
Move linkedSequences[8][8];
unk_GetLinkedSequences8_v2(moves, linkedSequences);
unk_LinkedSequencesToMoves8_v2(moves, linkedSequences);
}
static s32 unk_FindMarkedMoveInLinkedSequences44(struct Move moves[MAX_MON_MOVES][MAX_MON_MOVES])
static s32 unk_FindMarkedMoveInLinkedSequences44(Move moves[MAX_MON_MOVES][MAX_MON_MOVES])
{
s32 i, j;
@ -1025,7 +1025,7 @@ static s32 unk_FindMarkedMoveInLinkedSequences44(struct Move moves[MAX_MON_MOVES
return -1;
}
static void unk_GetLinkedSequences4(struct Move *moves, struct Move linkedSequences[MAX_MON_MOVES][MAX_MON_MOVES])
static void unk_GetLinkedSequences4(Move *moves, Move linkedSequences[MAX_MON_MOVES][MAX_MON_MOVES])
{
s32 i, j;
s32 k;
@ -1049,7 +1049,7 @@ static void unk_GetLinkedSequences4(struct Move *moves, struct Move linkedSequen
}
}
static void unk_LinkedSequencesToMoves4(struct Move *moves, struct Move linkedSequences[MAX_MON_MOVES][MAX_MON_MOVES])
static void unk_LinkedSequencesToMoves4(Move *moves, Move linkedSequences[MAX_MON_MOVES][MAX_MON_MOVES])
{
s32 i, j;
s32 movesCopied;
@ -1108,7 +1108,7 @@ static void unk_LinkedSequencesToMoves4(struct Move *moves, struct Move linkedSe
}
// The next two functions are exactly the same
static s32 unk_FindMarkedMoveInLinkedSequences88(struct Move linkedSequences[8][8])
static s32 unk_FindMarkedMoveInLinkedSequences88(Move linkedSequences[8][8])
{
s32 i, j;
@ -1124,7 +1124,7 @@ static s32 unk_FindMarkedMoveInLinkedSequences88(struct Move linkedSequences[8][
// I expect the intent was to check for a different flag in this one...
// or the argument is a struct type that does hold the moves as a field
static s32 unk_FindMarkedMoveInLinkedSequences88_v2(struct Move linkedSequences[8][8])
static s32 unk_FindMarkedMoveInLinkedSequences88_v2(Move linkedSequences[8][8])
{
s32 i, j;
@ -1144,7 +1144,7 @@ static s32 unk_FindMarkedMoveInLinkedSequences88_v2(struct Move linkedSequences[
// it seems to find all the _actually_ separate moves, and split them
// out into link sequences in the destination linkedSequences
static void unk_GetLinkedSequences8(struct Move *moves, struct Move linkedSequences[8][8])
static void unk_GetLinkedSequences8(Move *moves, Move linkedSequences[8][8])
{
s32 i, j;
s32 k;
@ -1159,7 +1159,7 @@ static void unk_GetLinkedSequences8(struct Move *moves, struct Move linkedSequen
moveSetIndex = -1;
for (j = 0, k = 0; k < 8; j++, k++) {
struct Move* move = &moves[k];
Move* move = &moves[k];
if (k == 0 || !(move->moveFlags & MOVE_FLAG_SUBSEQUENT_IN_LINK_CHAIN)) {
moveSetIndex++;
@ -1171,7 +1171,7 @@ static void unk_GetLinkedSequences8(struct Move *moves, struct Move linkedSequen
}
}
static void unk_GetLinkedSequences8_v2(struct Move *moves, struct Move linkedSequences[8][8])
static void unk_GetLinkedSequences8_v2(Move *moves, Move linkedSequences[8][8])
{
s32 i, j;
s32 k;
@ -1185,7 +1185,7 @@ static void unk_GetLinkedSequences8_v2(struct Move *moves, struct Move linkedSeq
moveSetIndex = -1;
for (j = 0, k = 0; k < 8; j++, k++) {
struct Move* move = &moves[k];
Move* move = &moves[k];
if (k == 0 || !(move->moveFlags & 2)) {
moveSetIndex++;
@ -1200,7 +1200,7 @@ static void unk_GetLinkedSequences8_v2(struct Move *moves, struct Move linkedSeq
// the next 2 functions are again exactly the same
// these functions are the same as unk_LinkedSequencesToMoves4 but for [8][8] linkedSequences
// instead of [4][4] linkedSequences
static void unk_LinkedSequencesToMoves8(struct Move *moves, struct Move linkedSequences[8][8])
static void unk_LinkedSequencesToMoves8(Move *moves, Move linkedSequences[8][8])
{
int i, j;
int movesCopied;
@ -1258,7 +1258,7 @@ static void unk_LinkedSequencesToMoves8(struct Move *moves, struct Move linkedSe
}
}
static void unk_LinkedSequencesToMoves8_v2(struct Move *moves, struct Move linkedSequences[8][8])
static void unk_LinkedSequencesToMoves8_v2(Move *moves, Move linkedSequences[8][8])
{
s32 i, j;
s32 movesCopied;
@ -1317,16 +1317,16 @@ static void unk_LinkedSequencesToMoves8_v2(struct Move *moves, struct Move linke
}
// The next two are the same again
UNUSED static void RemoveLinkSequenceFromMoves8_v2(struct Move *moves, s32 index)
UNUSED static void RemoveLinkSequenceFromMoves8_v2(Move *moves, s32 index)
{
s32 i;
s32 copiedMoves;
struct Move moveSet[8];
Move moveSet[8];
moves[index].moveFlags = 0;
for (i = index + 1; i < 8; i++) {
struct Move* move = &moves[i];
Move* move = &moves[i];
#ifndef NONMATCHING
asm("");
@ -1355,17 +1355,17 @@ UNUSED static void RemoveLinkSequenceFromMoves8_v2(struct Move *moves, s32 index
moves[i] = moveSet[i];
}
void RemoveLinkSequenceFromMoves8(struct Move *moves, s32 index)
void RemoveLinkSequenceFromMoves8(Move *moves, s32 index)
{
s32 i;
s32 copiedMoves;
struct Move moveSet[8];
Move moveSet[8];
// remove link sequence (set flags to 0)
moves[index].moveFlags = 0;
for (i = index + 1; i < 8; i++) {
struct Move* move = &moves[i];
Move* move = &moves[i];
#ifndef NONMATCHING
asm("");
@ -1399,21 +1399,21 @@ void RemoveLinkSequenceFromMoves8(struct Move *moves, s32 index)
s32 unk_MoveIDPrintMoveDescription(s32 a1, u16 moveID, s32 a3, struct subStruct_203B240 **a4)
{
struct Move move;
Move move;
InitPokemonMove(&move, moveID);
return unk_PrintMoveDescription(a1, &move, a3, a4);
}
UNUSED static s32 unk_MovePrintMoveDescription(s32 a1, struct Move *move, s32 a3, struct subStruct_203B240 **a4)
UNUSED static s32 unk_MovePrintMoveDescription(s32 a1, Move *move, s32 a3, struct subStruct_203B240 **a4)
{
struct Move newMove;
Move newMove;
CopyAndResetMove(&newMove, move);
return unk_PrintMoveDescription(a1, &newMove, a3, a4);
}
s32 unk_PrintMoveDescription(s32 x, struct Move *move, s32 a3, struct subStruct_203B240 **a4)
s32 unk_PrintMoveDescription(s32 x, Move *move, s32 a3, struct subStruct_203B240 **a4)
{
u8 *moveDescription;
s32 y;
@ -1437,7 +1437,7 @@ s32 unk_PrintMoveDescription(s32 x, struct Move *move, s32 a3, struct subStruct_
return sub_8097DF0(buffer, a4);
}
static void unk_MovePrintData(struct Move *move, s32 y)
static void unk_MovePrintData(Move *move, s32 y)
{
u8 type;
s32 power;
@ -1454,7 +1454,7 @@ static void unk_MovePrintData(struct Move *move, s32 y)
gUnknown_202DE30 = power;
}
static void CopyAndResetMove(struct Move *dest, struct Move *src)
static void CopyAndResetMove(Move *dest, Move *src)
{
if (src->moveFlags & MOVE_FLAG_EXISTS) {
dest->moveFlags = src->moveFlags;
@ -1467,7 +1467,7 @@ static void CopyAndResetMove(struct Move *dest, struct Move *src)
dest->moveFlags = 0;
}
void CopyAndResetMoves(struct Move *destMoves, struct Move *srcMoves)
void CopyAndResetMoves(Move *destMoves, Move *srcMoves)
{
s32 i;
@ -1489,7 +1489,7 @@ void CopyAndResetMoves(struct Move *destMoves, struct Move *srcMoves)
destMoves[MAX_MON_MOVES].moveFlags = 0;
}
void CopyBareMoveData(struct Move *destMoves, struct Move *srcMoves)
void CopyBareMoveData(Move *destMoves, Move *srcMoves)
{
s32 i;
@ -1500,7 +1500,7 @@ void CopyBareMoveData(struct Move *destMoves, struct Move *srcMoves)
}
}
void unk_CopyMoves4To8AndClearFlag2Unk4(struct Move *destMoves, struct Move *srcMoves)
void unk_CopyMoves4To8AndClearFlag2Unk4(Move *destMoves, Move *srcMoves)
{
s32 movesCopied;
@ -1518,7 +1518,7 @@ void unk_CopyMoves4To8AndClearFlag2Unk4(struct Move *destMoves, struct Move *src
destMoves[movesCopied++].moveFlags = 0;
}
void unk_CopyMoves4To8(struct Move *destMoves, struct Move *srcMoves)
void unk_CopyMoves4To8(Move *destMoves, Move *srcMoves)
{
s32 movesCopied;
@ -1534,14 +1534,14 @@ void unk_CopyMoves4To8(struct Move *destMoves, struct Move *srcMoves)
destMoves[movesCopied++].moveFlags = 0;
}
void sub_8094060(struct Move *srcMoves, struct Move *destMoves)
void sub_8094060(Move *srcMoves, Move *destMoves)
{
s32 i, j;
j = 0;
for (i = 0; i < 8; i++) {
struct Move* srcMove = &srcMoves[i];
struct Move* destMove;
Move* srcMove = &srcMoves[i];
Move* destMove;
if (!(srcMove->moveFlags & MOVE_FLAG_EXISTS))
continue;
@ -1558,21 +1558,21 @@ void sub_8094060(struct Move *srcMoves, struct Move *destMoves)
destMoves[j++].moveFlags = 0;
}
static void SavePokemonMove(struct unkStruct_8094924 *r0, struct Move *move)
static void SavePokemonMove(struct unkStruct_8094924 *r0, Move *move)
{
SaveIntegerBits(r0, &move->moveFlags, 4);
SaveIntegerBits(r0, &move->id, 9);
SaveIntegerBits(r0, &move->PP, 7);
}
static void RestorePokemonMove(struct unkStruct_8094924 *r0, struct Move *move)
static void RestorePokemonMove(struct unkStruct_8094924 *r0, Move *move)
{
RestoreIntegerBits(r0, &move->moveFlags, 4);
RestoreIntegerBits(r0, &move->id, 9);
RestoreIntegerBits(r0, &move->PP, 7);
}
void SavePokemonMoves(struct unkStruct_8094924 *r0, struct Move *moveSet)
void SavePokemonMoves(struct unkStruct_8094924 *r0, Move *moveSet)
{
s32 i;
@ -1580,7 +1580,7 @@ void SavePokemonMoves(struct unkStruct_8094924 *r0, struct Move *moveSet)
SavePokemonMove(r0, &moveSet[i]);
}
void RestorePokemonMoves(struct unkStruct_8094924 *r0, struct Move *moveSet)
void RestorePokemonMoves(struct unkStruct_8094924 *r0, Move *moveSet)
{
s32 i;
@ -1588,7 +1588,7 @@ void RestorePokemonMoves(struct unkStruct_8094924 *r0, struct Move *moveSet)
RestorePokemonMove(r0, &moveSet[i]);
}
static void sub_8094148(struct unkStruct_8094924 *r0, struct Move *move)
static void sub_8094148(struct unkStruct_8094924 *r0, Move *move)
{
SaveIntegerBits(r0, &move->moveFlags, 4);
SaveIntegerBits(r0, &move->moveFlags2, 1);
@ -1607,9 +1607,9 @@ void sub_8094184(struct unkStruct_8094924 *r0, struct unkStruct_8094184 *r1)
SaveIntegerBits(r0, &r1->unk20, 8);
}
static void sub_80941B0(struct unkStruct_8094924 *r0, struct Move *move)
static void sub_80941B0(struct unkStruct_8094924 *r0, Move *move)
{
memset(move, 0, sizeof(struct Move));
memset(move, 0, sizeof(Move));
RestoreIntegerBits(r0, &move->moveFlags, 4);
RestoreIntegerBits(r0, &move->moveFlags2, 1);
RestoreIntegerBits(r0, &move->id, 9);

View File

@ -3,6 +3,8 @@
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_801B3C0.h"
#include "code_801EE10.h"
#include "code_801EE10_mid.h"
#include "constants/dungeon.h"
#include "event_flag.h"
#include "items.h"
@ -11,13 +13,12 @@
#include "menu_input.h"
#include "moves.h"
#include "pokemon.h"
#include "text_util.h"
#include "text1.h"
#include "text2.h"
// size: 0x280
struct unkStruct_203B2B8
typedef struct unkStruct_203B2B8
{
s32 state;
s32 fallbackState;
@ -30,7 +31,7 @@ struct unkStruct_203B2B8
bool8 isTeamLeader;
u32 moveIndex;
/* 0x24 */ u16 moveID;
struct Move moves[8];
Move moves[8];
u16 moveIDs[4]; // some list of move IDs
u32 menuAction1;
u32 menuAction2;
@ -42,137 +43,27 @@ struct unkStruct_203B2B8
MenuItem unk1BC[10];
u16 unk20C[10];
UnkTextStruct2 unk220[4];
};
EWRAM_DATA_2 struct unkStruct_203B2B8 *gUnknown_203B2B8 = {0};
} unkStruct_203B2B8;
const UnkTextStruct2 gUnknown_80DD310 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD328 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x13, 0x03,
0x08, 0x03,
0x03, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD340 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x14, 0x04,
0x06, 0x03,
0x03, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD358 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x11,
0x1A, 0x02,
0x02, 0x00,
NULL
};
const UnkTextStruct2 gUnknown_80DD370 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x02, 0x03,
0x0F, 0x02,
0x02, 0x00,
NULL
};
extern u8 gAvailablePokemonNames[0x58];
extern u8 gUnknown_202DEA8[0x58];
extern u8 gUnknown_202DE58[0x58];
extern u8 gUnknown_202DEA8[0x58];
extern u8 gAvailablePokemonNames[0x58]; // 202DF98
extern u8 *gUnknown_80D4920[];
extern u8 *gUnknown_80D4928[];
extern u8 *gUnknown_80D4970[];
extern u8 *gUnknown_80D4970[];
EWRAM_DATA_2 unkStruct_203B2B8 *gUnknown_203B2B8 = {0};
ALIGNED(4) const u8 gUnknown_80DD388[] = _(
"You have chosen to say farewell\n"
"to this Pokémon.{EXTRA_MSG}"
"The Pokémon will leave its Friend Area.\n"
"It will no longer be available for\n"
"adventures. Is that OK?");
// data_80D47B8.s
extern const u8 *gUnknown_80D4920[];
extern const u8 *gUnknown_80D4928[];
extern const u8 *gUnknown_80D4970[];
ALIGNED(4) const u8 gUnknown_80DD420[] = _(
"If you say farewell to this\n"
"Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
"You will never be able to get another one\n"
"like it to join your team.\n"
"Will you release it anyway?");
ALIGNED(4) const u8 gUnknown_80DD4C4[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} joined the\n"
"{CENTER_ALIGN}rescue team for adventures!");
ALIGNED(4) const u8 gUnknown_80DD4F4[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} left the team to remain\n"
"{CENTER_ALIGN}on standby in the Friend Area.");
ALIGNED(4) const u8 gBecameLeader[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} became the leader\n"
"{CENTER_ALIGN}of the rescue team.");
ALIGNED(4) const u8 gUnknown_80DD564[] = _(
"{CENTER_ALIGN}{ARG_POKEMON_1} left\n"
"{CENTER_ALIGN}the Friend Area.\n"
"{CENTER_ALIGN}Bye-bye{COMMA} {ARG_POKEMON_1}!");
ALIGNED(4) const u8 gUnknown_80DD594[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over. ");
ALIGNED(4) const u8 gUnknown_80DD5B8[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}handed over.{EXTRA_MSG}"
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) const u8 gUnknown_80DD60C[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}returned to the Toolbox.");
ALIGNED(4) const u8 gUnknown_80DD63C[] = _(
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
"{CENTER_ALIGN}sent to storage.");
ALIGNED(4) const u8 gPartyMenuStandBy[] = "Stand By";
ALIGNED(4) const u8 gPartyMenuMakeLeader[] = "Make Leader";
ALIGNED(4) const u8 gPartyMenuJoinTeam[] = "Join Team";
ALIGNED(4) const u8 gPartyMenuGiveGummi[] = "Give Gummi";
ALIGNED(4) const u8 gPartyMenuGive[] = "Give";
ALIGNED(4) const u8 gPartyMenuTake[] = "Take";
ALIGNED(4) const u8 gPartyMenuSayFarewell[] = "Say Farewell";
ALIGNED(4) const u8 gPartyMenuSummary[] = "Summary";
ALIGNED(4) const u8 gPartyMenuMoves[] = "Moves";
ALIGNED(4) const u8 gPartyMenuCheckIQ[] = "Check IQ";
ALIGNED(4) const u8 gPartyMenuItemPlaceholder[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
ALIGNED(4) const u8 gUnknown_80DD6E0[] = "%s";
ALIGNED(4) static const u8 fill0[] = "pksdir0";
#include "data/party_list_menu.h"
extern u32 sub_8026F04(PokemonStruct1 *);
extern void sub_8026074(s32);
bool8 CanTakePokemonHeldItem(PokemonStruct1 *r0);
extern PokemonStruct1 *sub_808D3F8(void);
extern PokemonStruct1 *sub_808D3BC(void);
extern void sub_801F214(void);
extern u32 sub_801F194(void);
extern u32 sub_801EF38(u32);
extern s32 sub_8008ED0(u8 *);
extern u32 sub_801F890(void);
extern void sub_801F8D0(void);
extern void nullsub_104(void);
extern void sub_8099690(u32);
extern u32 sub_8022860(void);
@ -193,10 +84,7 @@ void sub_8026DAC(u32 r0, BulkItem *item);
bool8 sub_801BEEC(s16 species);
void sub_8026FA4(void);
void sub_8026878(void);
extern void sub_801F808(u16*);
extern void sub_80227B8(PokemonStruct1 *);
extern void sub_801EE10(u32, s16, struct Move *, u32, u32, u32);
extern void sub_801F1B0(u32, u32);
extern void sub_808D31C(PokemonStruct1 *);
void sub_802678C(void);
@ -219,31 +107,29 @@ void sub_8026D88(void);
u32 sub_8025EF4(PokemonStruct1 *pokeStruct)
{
s32 index;
gUnknown_203B2B8 = MemoryAlloc(sizeof(struct unkStruct_203B2B8), 0x8);
s32 i;
gUnknown_203B2B8 = MemoryAlloc(sizeof(unkStruct_203B2B8), 8);
gUnknown_203B2B8->pokeStruct = pokeStruct;
for(index = 0; index < NUM_MONSTERS; index++)
{
if(gUnknown_203B2B8->pokeStruct == &gRecruitedPokemonRef->pokemon[(s16)index])
{
gUnknown_203B2B8->pokeSpecies = index;
for (i = 0; i < NUM_MONSTERS; i++) {
if (gUnknown_203B2B8->pokeStruct == &gRecruitedPokemonRef->pokemon[(s16)i]) {
gUnknown_203B2B8->pokeSpecies = i;
break;
}
}
gUnknown_203B2B8->menuAction1 = 0;
gUnknown_203B2B8->menuAction2 = 0;
gUnknown_203B2B8->menuAction3 = 0;
gUnknown_203B2B8->unk8 = FALSE;
sub_8026074(0);
return 1;
return TRUE;
}
u32 sub_8025F68(void)
{
switch(gUnknown_203B2B8->state)
{
switch (gUnknown_203B2B8->state) {
case 0:
sub_8026074(1);
break;
@ -323,24 +209,24 @@ void sub_802608C(void)
case 2:
for(index = 0; index < 4; index++)
{
gUnknown_203B2B8->unk220[index] = gUnknown_80DD310;
gUnknown_203B2B8->unk220[index] = sUnknown_80DD310;
}
gUnknown_203B2B8->unk220[0] = gUnknown_80DD358;
gUnknown_203B2B8->unk220[3] = gUnknown_80DD370;
gUnknown_203B2B8->unk220[0] = sUnknown_80DD358;
gUnknown_203B2B8->unk220[3] = sUnknown_80DD370;
sub_80264CC();
gUnknown_203B2B8->unk220[2] = gUnknown_80DD328;
gUnknown_203B2B8->unk220[2] = sUnknown_80DD328;
sub_8012CAC(&gUnknown_203B2B8->unk220[2], gUnknown_203B2B8->unk16C);
gUnknown_203B2B8->unk220[2].unkC = 9;
break;
case 0x14:
sub_802678C();
gUnknown_203B2B8->unk220[2] = gUnknown_80DD340;
gUnknown_203B2B8->unk220[2] = sUnknown_80DD340;
sub_8012CAC(&gUnknown_203B2B8->unk220[2], gUnknown_203B2B8->unk16C);
break;
default:
for(index = 0; index < 4; index++)
{
gUnknown_203B2B8->unk220[index] = gUnknown_80DD310;
gUnknown_203B2B8->unk220[index] = sUnknown_80DD310;
}
break;
}
@ -392,18 +278,18 @@ void sub_80261D0(void)
break;
case 0x16:
unk_CopyMoves4To8(gUnknown_203B2B8->moves,gUnknown_203B2B8->pokeStruct->moves);
sub_801EE10(3,gUnknown_203B2B8->pokeSpecies,gUnknown_203B2B8->moves,0,0,0);
sub_801EE10(3,gUnknown_203B2B8->pokeSpecies,gUnknown_203B2B8->moves,0,NULL,0);
break;
case 0x17:
sub_801F1B0(1,0);
sub_801F1B0(TRUE, FALSE);
break;
case 0xc:
sub_8026878();
sub_8014248(gUnknown_80DD388,0,3,gUnknown_203B2B8->unk1BC,0,4,0,0,0x101);
sub_8014248(sUnknown_80DD388,0,3,gUnknown_203B2B8->unk1BC,0,4,0,0,0x101);
break;
case 0xd:
sub_8026878();
sub_8014248(gUnknown_80DD420,0,3,gUnknown_203B2B8->unk1BC,0,4,0,0,0x101);
sub_8014248(sUnknown_80DD420,0,3,gUnknown_203B2B8->unk1BC,0,4,0,0,0x101);
break;
case 0x18:
GetLinkedSequence(gUnknown_203B2B8->moveIndex, gUnknown_203B2B8->moves,gUnknown_203B2B8->moveIDs);
@ -412,22 +298,22 @@ void sub_80261D0(void)
case 5:
gUnknown_203B2B8->fallbackState = 0x19;
PlaySound(0xcf);
sub_80141B4(gUnknown_80DD4C4,0,0,0x101);
sub_80141B4(sUnknown_80DD4C4,0,0,0x101);
break;
case 6:
gUnknown_203B2B8->fallbackState = 0x19;
PlaySound(0xcf);
sub_80141B4(gUnknown_80DD4F4,0,0,0x101);
sub_80141B4(sUnknown_80DD4F4,0,0,0x101);
break;
case 7:
gUnknown_203B2B8->fallbackState = 0x19;
PlaySound(0xcc);
sub_80141B4(gBecameLeader,0,0,0x101);
sub_80141B4(sBecameLeader,0,0,0x101);
break;
case 8:
gUnknown_203B2B8->fallbackState = 9;
PlaySound(0xca);
sub_80141B4(gUnknown_80DD564,0,0,0x101);
sub_80141B4(sUnknown_80DD564,0,0,0x101);
break;
case 9:
sub_8026FA4();
@ -436,23 +322,23 @@ void sub_80261D0(void)
break;
case 0xf:
gUnknown_203B2B8->fallbackState = 2;
sub_80141B4(gUnknown_80DD594,0,0,0x101);
sub_80141B4(sUnknown_80DD594,0,0,0x101);
break;
case 0x10:
gUnknown_203B2B8->fallbackState = 2;
sub_80141B4(gUnknown_80DD5B8,0,0,0x101);
sub_80141B4(sUnknown_80DD5B8,0,0,0x101);
break;
case 0x11:
gUnknown_203B2B8->fallbackState = 2;
sub_80141B4(gUnknown_80DD60C,0,0,0x101);
sub_80141B4(sUnknown_80DD60C,0,0,0x101);
break;
case 10:
gUnknown_203B2B8->fallbackState = 0x19;
sub_80141B4(gUnknown_80DD60C,0,0,0x101);
sub_80141B4(sUnknown_80DD60C,0,0,0x101);
break;
case 0xb:
gUnknown_203B2B8->fallbackState = 0x19;
sub_80141B4(gUnknown_80DD63C,0,0,0x101);
sub_80141B4(sUnknown_80DD63C,0,0,0x101);
break;
case 0:
case 0x19:
@ -474,7 +360,7 @@ void sub_80264CC(void) {
if(temp = pokeStruct->unk0 >> 1, one = 1, temp & one)
{
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuStandBy;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuStandBy;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 7;
if(!sub_8026E88(pokeStruct))
{
@ -484,14 +370,14 @@ void sub_80264CC(void) {
if(sub_80023E4(8) && !pokeStruct->isTeamLeader)
{
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuMakeLeader;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuMakeLeader;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 8;
loopMax += 1;
}
}
else
{
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuJoinTeam;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuJoinTeam;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 6;
if(!sub_808D750(gUnknown_203B2B8->pokeSpecies))
{
@ -500,7 +386,7 @@ void sub_80264CC(void) {
loopMax += 1;
}
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuGiveGummi;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuGiveGummi;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 10;
if(!HasGummiItem())
{
@ -508,7 +394,7 @@ void sub_80264CC(void) {
}
loopMax += 1;
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuGive;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuGive;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 0xB;
if(GetNumberOfFilledInventorySlots() == 0)
{
@ -516,7 +402,7 @@ void sub_80264CC(void) {
}
loopMax += 1;
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuTake;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuTake;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 0xC;
if(GetNumberOfFilledInventorySlots() >= INVENTORY_SIZE || gUnknown_203B2B8->item2.id == ITEM_NOTHING)
{
@ -526,7 +412,7 @@ void sub_80264CC(void) {
if((temp = pokeStruct->unk0 >> 1, one = 1, temp & one) == 0)
{
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuSayFarewell;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuSayFarewell;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 9;
if(!sub_8026EB8(pokeStruct))
{
@ -535,13 +421,13 @@ void sub_80264CC(void) {
loopMax += 1;
}
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuSummary;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuSummary;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 4;
loopMax += 1;
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuMoves;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuMoves;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 0xD;
loopMax += 1;
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuCheckIQ;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuCheckIQ;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 5;
loopMax += 1;
gUnknown_203B2B8->unk16C[loopMax].text = NULL;
@ -570,7 +456,7 @@ void sub_802678C(void)
s32 index;
s32 loopMax = 0;
MemoryFill16(gUnknown_203B2B8->unk20C, 0, sizeof(gUnknown_203B2B8->unk20C));
gUnknown_203B2B8->unk16C[loopMax].text = gPartyMenuGive;
gUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuGive;
gUnknown_203B2B8->unk16C[loopMax].menuAction = 0xB;
if(GetNumberOfFilledInventorySlots() == 0)
{
@ -936,7 +822,7 @@ void sub_8026DAC(u32 r0, BulkItem *item)
temp.unk8 = 1;
slot.flags = ITEM_FLAG_EXISTS;
sub_8090E14(gUnknown_202DE58, &slot, &temp);
xxx_format_and_draw(4, 3, gPartyMenuItemPlaceholder, r0, 0);
xxx_format_and_draw(4, 3, sPartyMenuItemPlaceholder, r0, 0);
sub_80073E0(r0);
}
@ -950,9 +836,9 @@ void sub_8026E08(u32 r0)
sub_80073B8(r0);
sub_80922B4(gAvailablePokemonNames, gUnknown_203B2B8->pokeStruct->name, POKEMON_NAME_LENGTH);
sub_808D930(buffer, gUnknown_203B2B8->pokeStruct->speciesNum);
sprintfStatic(buffer1, gUnknown_80DD6E0, gAvailablePokemonNames);
sprintfStatic(buffer1, sUnknown_80DD6E0, gAvailablePokemonNames);
x = sub_8008ED0(buffer1);
xxx_call_draw_string(((gUnknown_80DD370.unkC << 3) - x) / 2, 3, buffer1, r0, 0);
xxx_call_draw_string(((sUnknown_80DD370.unkC << 3) - x) / 2, 3, buffer1, r0, 0);
sub_80073E0(r0);
}

View File

@ -897,7 +897,7 @@ s32 sub_808E400(s32 _species, s16* _a2, s32 _a3, s32 _a4)
return count;
}
void sub_808E490(struct Move* a1, s16 species)
void sub_808E490(Move* a1, s16 species)
{
u16 buffer[0x10]; // of moveIDs
s32 i;

View File

@ -1194,7 +1194,7 @@ void PerishSongTarget(Entity * pokemon, Entity * target)
void EncoreStatusTarget(Entity *pokemon,Entity *target)
{
struct Move *movePtr;
Move *movePtr;
int index;
EntityInfo *EntityInfo;

View File

@ -47,8 +47,8 @@ extern void sub_8049ED4(void);
extern void sub_80498A8(s32, s32);
extern void sub_8042A54(Position *);
extern void sub_8049BB0(s32, s32);
extern s16 sub_8057600(struct Move*, u32);
extern u32 sub_8055864(Entity *pokemon, Entity *target, struct Move *param_3, s32 param_4, s32 param_5);
extern s16 sub_8057600(Move*, u32);
extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5);
extern void sub_807D148(Entity *pokemon, Entity *r1, u32 r2, Position *r3);
extern void sub_807FE04(u32 *, u32);
extern void sub_807DB74(Entity *);
@ -62,7 +62,7 @@ extern void sub_806BB6C(Entity *, s32);
extern void sub_8075C58(Entity *, Entity *, s32, s32);
extern void sub_807E254(Entity *, Entity *, u32);
extern bool8 sub_805727C(Entity * pokemon, Entity * target, s32 chance);
extern u32 sub_8055640(Entity *, Entity *, struct Move *, u32, u32);
extern u32 sub_8055640(Entity *, Entity *, Move *, u32, u32);
extern void sub_806A6E8(Entity *);
extern void sub_807D3CC(Entity *, Entity *);
extern u8 sub_8069D18(Position *);
@ -153,7 +153,7 @@ extern u8 *gUnknown_80FEFF4[];
extern u32 gUnknown_80F51C4[];
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, struct Move *move, s32 param_4);
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, Move *move, s32 param_4);
struct NaturePowerMove
{
@ -163,7 +163,7 @@ struct NaturePowerMove
};
extern struct NaturePowerMove gUnknown_80F59C8[10];
bool8 sub_805AFA4(Entity * pokemon, Entity * target, struct Move *move, u32 param_4)
bool8 sub_805AFA4(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
s32 r0;
s32 r2;
@ -203,13 +203,13 @@ bool8 sub_805AFA4(Entity * pokemon, Entity * target, struct Move *move, u32 para
return flag;
}
bool8 sub_805B028(Entity * pokemon,Entity * target,struct Move *move)
bool8 sub_805B028(Entity * pokemon,Entity * target,Move *move)
{
ParalyzeStatusTarget(pokemon,target, TRUE);
return TRUE;
}
bool8 TransformMoveAction(Entity * pokemon, Entity * target, struct Move *move)
bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move)
{
if (IsBossFight()) {
sub_80522F4(pokemon,target,*gUnknown_80FEFF4);
@ -222,7 +222,7 @@ bool8 TransformMoveAction(Entity * pokemon, Entity * target, struct Move *move)
}
}
bool8 sub_805B074(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B074(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
bool8 flag;
@ -266,13 +266,13 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target)
}
}
bool8 sub_805B164(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B164(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
RaiseAttackStageTarget(pokemon,target,gUnknown_8106A50, 2);
return TRUE;
}
bool8 sub_805B17C(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B17C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
s32 uVar4;
bool8 flag;
@ -297,13 +297,13 @@ bool8 sub_805B17C(Entity * pokemon, Entity * target, struct Move *move, s32 para
return flag;
}
bool8 PerishSongMoveAction(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 PerishSongMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
PerishSongTarget(pokemon, target);
return TRUE;
}
bool8 sub_805B214(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 sub_805B214(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
WrapTarget(pokemon, target);
return TRUE;
@ -333,7 +333,7 @@ bool8 TrapperOrbAction(Entity * pokemon, Entity * target)
return trapLaid;
}
bool8 sub_805B264(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B264(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
s32 r3;
bool8 r6;
@ -354,31 +354,31 @@ bool8 sub_805B264(Entity * pokemon, Entity * target, struct Move *move, s32 para
return r6;
}
bool8 MagicCoatMoveAction(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 MagicCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
MagicCoatStatusTarget(pokemon, target);
return TRUE;
}
bool8 ProtectMoveAction(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 ProtectMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
ProtectStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_805B2FC(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 sub_805B2FC(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
RaiseDefenseStageTarget(pokemon,target,gUnknown_8106A4C,1);
return TRUE;
}
bool8 sub_805B314(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 sub_805B314(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
sub_80783C4(pokemon, target, 1);
return TRUE;
}
bool8 sub_805B324(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 sub_805B324(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
bool8 flag;
@ -392,24 +392,24 @@ bool8 sub_805B324(Entity * pokemon,Entity * target,struct Move *move, s32 param_
return flag;
}
bool8 DestinyBondMoveAction(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 DestinyBondMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
DestinyBondStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_805B388(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 sub_805B388(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
return (sub_8055640(pokemon,target,move,0x100,param_4)) ? TRUE : FALSE;
}
bool8 MirrorCoatMoveAction(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 MirrorCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
MirrorCoatStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_805B3B4(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 sub_805B3B4(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
u32 stat = gUnknown_8106A50;
RaiseAttackStageTarget(pokemon,target,stat,1);
@ -417,13 +417,13 @@ bool8 sub_805B3B4(Entity * pokemon,Entity * target,struct Move *move, s32 param_
return TRUE;
}
bool8 sub_805B3E0(Entity * pokemon,Entity * target,struct Move *move, s32 param_4)
bool8 sub_805B3E0(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
sub_8055640(pokemon,target,move,0x100,param_4);
return TRUE;
}
bool8 sub_805B3FC(Entity * pokemon,Entity * target,struct Move *move, s32 param_4, s32 param_5)
bool8 sub_805B3FC(Entity * pokemon,Entity * target,Move *move, s32 param_4, s32 param_5)
{
EntityInfo *entityInfo;
bool8 flag;
@ -452,7 +452,7 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target)
{
EntityInfo *entityInfo;
EntityInfo *targetEntityInfo;
struct Move *move;
Move *move;
s32 moveCounter;
s32 moveIndex;
bool8 mimicSuccess;
@ -487,7 +487,7 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target)
return mimicSuccess;
}
bool8 sub_805B53C(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B53C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
s16 *r1;
s32 index;
@ -525,10 +525,10 @@ bool8 LeechSeedMoveAction(Entity * pokemon, Entity * target)
return TRUE;
}
bool8 sub_805B618(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B618(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
bool8 flag;
struct Move natureMove;
Move natureMove;
u32 index;
index = gUnknown_202F228;
@ -538,7 +538,7 @@ bool8 sub_805B618(Entity * pokemon, Entity * target, struct Move *move, s32 para
return flag;
}
bool8 sub_805B668(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B668(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
bool8 hasLiquidOoze;
s32 iVar3;
@ -622,13 +622,13 @@ bool8 RecycleMoveAction(Entity * pokemon, Entity * target)
return isTMRecycled;
}
bool8 ReflectMoveAction(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 ReflectMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
ReflectStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_805B808(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805B808(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
u8 local_20;
@ -645,7 +645,7 @@ bool8 sub_805B884( Entity * pokemon, Entity * target)
return TRUE;
}
bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, struct Move * move, s32 param_4)
bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
{
bool8 flag;
@ -660,7 +660,7 @@ bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, struct Move * move,
return flag;
}
bool8 sub_805B910(Entity * pokemon, Entity * target, struct Move * move, s32 param_4)
bool8 sub_805B910(Entity * pokemon, Entity * target, Move * move, s32 param_4)
{
bool8 flag;
@ -675,7 +675,7 @@ bool8 sub_805B910(Entity * pokemon, Entity * target, struct Move * move, s32 par
return flag;
}
bool8 sub_805B968(Entity * pokemon, Entity * target, struct Move * move, s32 param_4)
bool8 sub_805B968(Entity * pokemon, Entity * target, Move * move, s32 param_4)
{
s32 entityHP;
s32 newHP;
@ -699,7 +699,7 @@ bool8 sub_805B968(Entity * pokemon, Entity * target, struct Move * move, s32 par
return flag;
}
bool8 RockSmashMoveAction(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 RockSmashMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
bool8 flag;
Position pos;
@ -734,7 +734,7 @@ bool8 sub_805BA44(Entity * pokemon, Entity * target)
return TRUE;
}
bool8 sub_805BA50(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
EntityInfo *iVar2;
EntityInfo *iVar3;
@ -866,7 +866,7 @@ bool8 sub_805BC70(Entity * pokemon, Entity * target)
return TRUE;
}
bool8 sub_805BC98(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805BC98(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
EntityInfo *entityInfo;
bool8 flag;
@ -1103,7 +1103,7 @@ bool8 sub_805C128(Entity * pokemon, Entity * target)
return TRUE;
}
bool8 sub_805C138(Entity * pokemon, Entity * target, struct Move *move, s32 param_4)
bool8 sub_805C138(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
u8 local_20;
@ -1119,7 +1119,7 @@ bool8 IdentifyOrbAction(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 sub_805C1BC(Entity *pokemon, Entity *target, struct Move *move, s32 param_4)
bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
bool8 flag;
@ -1139,7 +1139,7 @@ bool8 ShockerOrbAction(Entity *pokemon, Entity *target)
return TRUE;
}
bool8 sub_805C208(Entity *pokemon, Entity *target, struct Move *move, u32 param_4)
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
u32 targetSize;
u8 local_24;

View File

@ -110,8 +110,8 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
bool8 sub_80701A4(Entity *pokemon)
{
bool8 flag;
struct Move *move;
struct Move *move2;
Move *move;
Move *move2;
s32 index;
s32 index_1;
EntityInfo * pokemonInfo;

View File

@ -150,7 +150,7 @@ bool8 HasNegativeStatus(Entity *pokemon)
}
for (i = 0; i < MAX_MON_MOVES; i++)
{
struct Move *moves = pokemonInfo->moves;
Move *moves = pokemonInfo->moves;
if (moves[i].moveFlags & MOVE_FLAG_EXISTS && moves[i].moveFlags2 & MOVE_FLAG_SEALED)
{
return TRUE;

View File

@ -6,7 +6,7 @@
#include "dungeon_pokemon_attributes.h"
#include "moves.h"
s16 GetMoveTargetAndRangeForPokemon(Entity *pokemon, struct Move *move, bool32 isAI)
s16 GetMoveTargetAndRangeForPokemon(Entity *pokemon, Move *move, bool32 isAI)
{
if (move->id == MOVE_CURSE && !isAI && !MonsterIsType(pokemon, TYPE_GHOST))
{

View File

@ -214,8 +214,7 @@ gUnknown_203B264: /* 203B264 */
gUnknown_203B268: /* 203B268 */
.space 0x4
gGulpinShopWork: /* 203B26C */
.space 0x4
.include "src/gulpin_shop.o"
gUnknown_203B270: /* 203B270 */
.space 0x4