Remove most "struct" which makes the repo smolr

This commit is contained in:
Kermalis 2023-09-02 01:46:26 -04:00
parent c04159817d
commit 72430d1072
258 changed files with 4018 additions and 4015 deletions

View File

@ -2923,7 +2923,7 @@ sub_800F204:
thumb_func_end sub_800F204
thumb_func_start GetDungeonPokemonSprite
@ struct DungeonPokemonSprite *GetDungeonPokemonSprite(int id)
@ DungeonPokemonSprite *GetDungeonPokemonSprite(int id)
GetDungeonPokemonSprite:
push {r4,lr}
adds r4, r0, 0
@ -2958,7 +2958,7 @@ _0800F240:
thumb_func_end GetDungeonPokemonSprite
thumb_func_start NewDungeonPokemonSprite
@ struct DungeonPokemonSprite *NewDungeonPokemonSprite(void)
@ DungeonPokemonSprite *NewDungeonPokemonSprite(void)
NewDungeonPokemonSprite:
push {lr}
movs r2, 0
@ -3137,7 +3137,7 @@ _0800F35C:
thumb_func_end sub_800F2EC
thumb_func_start DrawStatusSprite
@ void DrawStatusSprite(?, int status, struct Position *pos, struct Position *pos_offset, struct Position *pos_screen, ?)
@ void DrawStatusSprite(?, int status, Position *pos, Position *pos_offset, Position *pos_screen, ?)
DrawStatusSprite:
push {r4-r7,lr}
mov r7, r8
@ -3807,7 +3807,7 @@ _0800F8CC: .4byte gDungeonPokemonSprites
thumb_func_end sub_800F7D0
thumb_func_start AddPokemonDungeonSprite
@ void AddPokemonDungeonSprite(int id, short species, struct Position *pos, ?)
@ void AddPokemonDungeonSprite(int id, short species, Position *pos, ?)
AddPokemonDungeonSprite:
push {r4-r7,lr}
mov r7, r8

View File

@ -546,7 +546,7 @@ gUnknown_80B71A0: @ 80B71A0
.global gUnknown_80B71E4
gUnknown_80B71E4: @ 80B71E4
@ struct unkEventStruct
@ [struct unkEventStruct]
.2byte 105, 1
.2byte 106, 2
.2byte 107, 3

View File

@ -5,14 +5,14 @@
#include "text.h"
// size: 0xA0
struct AdventureLog
typedef struct AdventureLog
{
struct MenuInputStruct input;
MenuInputStruct input;
u32 unk34;
struct UnkTextStruct2 *unk38;
struct UnkTextStruct2 unk3C[4];
UnkTextStruct2 *unk38;
UnkTextStruct2 unk3C[4];
u8 unk9C[4];
};
} AdventureLog;
void CleanAdventureLogScreen(void);
bool8 CreateAdventureLogScreen(u32);

View File

@ -4,14 +4,14 @@
#include "file_system.h"
// size: 0x8
struct UnkSpriteMem
typedef struct UnkSpriteMem
{
/* 0x0 */ void *src;
/* 0x4 */ s32 byteCount;
};
} UnkSpriteMem;
// size: 0x20
struct axdata1
typedef struct axdata1
{
/* 0x0 */ s16 xPos;
/* 0x2 */ s16 yPos;
@ -27,20 +27,20 @@ struct axdata1
/* 0x1A */ s16 lastPoseId;
u8 fill1C[0x1E - 0x1C];
u8 paletteNum;
};
} axdata1;
// size: 0xA
struct __attribute__ ((packed, aligned(2))) ax_pose
typedef struct __attribute__((packed, aligned(2))) ax_pose
{
/* 0x0 */ s16 sprite;
u16 unk2; // Always 0 in red (except for end markers which are 0xFFFF)
/* 0x4 */ u16 flags1;
/* 0x6 */ u16 flags2;
/* 0x8 */ u16 flags3;
};
} ax_pose;
// size: 0xC
struct ax_anim
typedef struct ax_anim
{
/* 0x0 */ u8 frames;
/* 0x1 */ u8 unkFlags;
@ -49,38 +49,38 @@ struct ax_anim
/* 0x6 */ s16 yOffset;
/* 0x8 */ s16 xShadow;
/* 0xA */ s16 yShadow;
};
} ax_anim;
// size: 0x3C
struct axdata
typedef struct axdata
{
/* 0x0 */ u16 flags; // 0x8000 - animating, 0x2000 finished? 0x1000 continue
/* 0x2 */ s16 animFrames; // frames left in the current animation frame
/* 0x4 */ s16 animWaitFrames; // frames to not update the animation for
/* 0x6 */ s16 totalFrames; // max 30000
/* 0x8 */ struct axdata1 sub1;
/* 0x28 */ struct ax_anim *nextAnimData; // next animation data (if flags&0x1000)
/* 0x2C */ struct ax_anim *activeAnimData; // current animation data
/* 0x8 */ axdata1 sub1;
/* 0x28 */ ax_anim *nextAnimData; // next animation data (if flags&0x1000)
/* 0x2C */ ax_anim *activeAnimData; // current animation data
/* 0x30 */ void *paletteData; // ?
/* 0x34 */ struct ax_pose **poseData;
/* 0x38 */ struct UnkSpriteMem **spriteData;
};
/* 0x34 */ ax_pose **poseData;
/* 0x38 */ UnkSpriteMem **spriteData;
} axdata;
// size: 0x14
struct axmain
typedef struct axmain
{
/* 0x0 */ struct ax_pose **poses;
/* 0x4 */ struct ax_anim ****animations;
/* 0x0 */ ax_pose **poses;
/* 0x4 */ ax_anim ****animations;
/* 0x8 */ u32 animCount;
/* 0xC */ void *spriteData; // ?
/* 0x10 */ void *palettes; // ?
};
} axmain;
// size: ?
struct axPokemon
{
/* 0x0 */ struct axdata axdata;
/* 0x3C */ struct OpenedFile *spriteFile;
/* 0x0 */ axdata axdata;
/* 0x3C */ OpenedFile *spriteFile;
u16 unk40_maybeAnimTimer;
u8 unk42_animId1;
u8 unk43_animId2;
@ -90,7 +90,7 @@ struct axPokemon
u8 unk47;
u8 unk48;
u8 fill49[0x4C - 0x49];
/* 0x4C */ struct axmain *axmain;
/* 0x4C */ axmain *axmain;
u8 flags_0x50;
u8 fill51;
s16 unk52;

View File

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

View File

@ -33,7 +33,7 @@ struct unkDataFor8004AA4
};
void nullsub_6(void);
void sub_8004AA4(struct unkStruct_202EE8C *, struct OpenedFile *, s32);
void sub_8004AA4(struct unkStruct_202EE8C *, OpenedFile *, s32);
bool8 sub_8004AF0(bool8, struct unkStruct_202EE8C *, s32, s32, s32, u8 *);
bool8 sub_8004D14(struct unkStruct_202EE8C *, s32);
bool8 sub_8004D40(struct unkStruct_202EE8C *, s32);

View File

@ -20,7 +20,7 @@ void nullsub_10(bool8);
void nullsub_12(void);
void nullsub_13(void);
void nullsub_14(void);
void sub_8005610(struct OpenedFile *, s32, s32, u8 *);
void sub_8005610(OpenedFile *, s32, s32, u8 *);
void sub_8005770(s32, u8 *, s32, u8 *);
void sub_80057E8(void);
void sub_8005838(s32 *, u8);

9
include/code_800C9CC.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef GUARD_CODE_800D090_H
#define GUARD_CODE_800D090_H
#include "input.h"
void ReadKeyInput(Inputs *);
void sub_800CB20(void);
#endif // GUARD_CODE_800D090_H

View File

@ -8,8 +8,8 @@
extern void sub_8013AA0(u32 *);
extern u32 sub_8013BBC(u32 *);
extern void sub_8013C68(u32 *);
extern void sub_80141B4(const u8 *, u32, struct OpenedFile **, u32);
extern void sub_8014248(const u8 *, u32, u32, const struct MenuItem *, void *, u32, u32, struct OpenedFile **, u32);
extern void sub_80141B4(const u8 *, u32, OpenedFile **, u32);
extern void sub_8014248(const u8 *, u32, u32, const MenuItem *, void *, u32, u32, OpenedFile **, u32);
extern s32 sub_80144A4(s32 *);
extern void xxx_format_and_draw(u32, u32, const u8 *, u32, u32);

View File

@ -2,7 +2,7 @@
#define GUARD_CODE_801B3C0_H
#include "input.h"
#include "item.h"
#include "items.h"
#include "subStruct_203B240.h"
#include "text.h"
@ -10,18 +10,18 @@
struct unkStruct_203B230
{
s32 state;
struct Item item;
Item item;
s32 unk8;
s32 unkC;
struct subStruct_203B240 *unk10[2];
u8 fill18[0x20 - 0x18];
u32 unk20;
u32 unk24;
struct UnkTextStruct2 unk28[4];
struct MenuInputStructSub unk88;
UnkTextStruct2 unk28[4];
MenuInputStructSub unk88;
};
u32 sub_801B3C0(struct Item *);
u32 sub_801B3C0(Item *);
u32 sub_801B410(void);
void sub_801B450(void);

View File

@ -3,7 +3,7 @@
#include "text.h"
bool8 sub_801C8C4(s32, s32, struct UnkTextStruct2_sub *, u32);
bool8 sub_801C8C4(s32, s32, UnkTextStruct2_sub *, u32);
extern u32 sub_801CA08(bool8);
u8 sub_801CB24(void);
void sub_801CB5C(bool8);

View File

@ -5,23 +5,23 @@
#include "pokemon.h"
#include "text.h"
struct unkStruct_203B270
// size 0xBC
typedef struct unkStruct_203B270
{
// size 0xBC
u32 unk0;
u8 unk4;
u8 unk5;
u8 unk6;
u8 unk7;
/* 0x8 */ struct PokemonStruct *pokeStruct;
/* 0x8 */ PokemonStruct1 *pokeStruct;
/* 0xC */ u8 isTeamLeader;
/* 0x10 */ struct Move *moves;
/* 0x10 */ Move *moves;
u8 fill14[0x1C - 0x14];
struct MenuInputStruct input;
MenuInputStruct input;
u32 unk50;
u32 unk54;
struct UnkTextStruct2 unk58[4];
UnkTextStruct2 unk58[4];
u8 *text;
};
} unkStruct_203B270;
#endif

View File

@ -1,9 +1,16 @@
#ifndef GUARD_CODE_8023144_H
#define GUARD_CODE_8023144_H
#include "constants/iq_skill.h"
#include "input.h"
#include "items.h"
#include "menu.h"
#include "pokemon.h"
#include "text.h"
// size: 0x1A8
struct unkStruct_203B294
{
// size: 0x1A8
{
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
u8 iqSkillPreGummi[NUM_IQ_SKILLS];
@ -11,17 +18,34 @@ struct unkStruct_203B294
u32 availIQSkillPreGummi;
u32 availIQSkillPostGummi;
u32 unk40; // Gummi eaten flag?
struct Gummi gummi;
/* 0x48 */ struct PokemonStruct *pokeStruct;
Gummi gummi;
/* 0x48 */ PokemonStruct1 *pokeStruct;
u32 itemIndex;
struct Item item;
struct MenuStruct unk54;
struct MenuStruct unkA4;
Item item;
MenuStruct unk54;
MenuStruct unkA4;
u32 menuAction;
struct MenuItem unkF8[0x8];
MenuItem unkF8[0x8];
u16 unk138[0x8];
struct UnkTextStruct2 unk148[4];
UnkTextStruct2 unk148[4];
};
// size: 0x3FC
struct unkStruct_3001B5C
{
u8 unk0;
u32 unk4;
u32 unk8;
s16 unkC[2];
u32 unk10;
u8 fill14[0x354 - 0x14];
u8 unk354;
u8 fill355[0x35C - 0x355];
MenuInputStruct input;
u32 unk390;
UnkTextStruct2 *unk394;
UnkTextStruct2 unk398[4];
u8 unk3F8[4];
};
#endif // GUARD_CODE_8023144_H
#endif // GUARD_CODE_8023144_H

View File

@ -3,6 +3,6 @@
#include "dungeon_entity.h"
void SendMessage(struct Entity *pokemon, const char message[]);
void SendMessage(Entity *pokemon, const char message[]);
#endif

View File

@ -7,7 +7,7 @@ void CloseAllSpriteFiles(void);
void sub_8068768(void);
void sub_80687AC(void);
extern struct OpenedFile *sub_80687D0(s16);
extern OpenedFile *sub_80687D0(s16);
void sub_8068838(s16, bool32);
#endif // GUARD_CODE_805D8C8_H

View File

@ -5,18 +5,18 @@
void sub_806CC10(void);
void sub_806CC70(void);
void sub_806CCB4(struct Entity *, u8);
void sub_806CCB4(Entity *, u8);
void sub_806CD90(void);
void sub_806CDD4(struct Entity *, u8, u32);
void sub_806CDFC(struct Entity *, u8, u32);
void sub_806CE34(struct Entity *, u32);
void sub_806CE68(struct Entity *, u32);
void sub_806CE94(struct Entity *, u32);
u8 sub_806CEBC(struct Entity *);
void sub_806CEFC(struct Entity *, u32);
void sub_806CF18(struct Entity *);
u8 sub_806CF54(struct Entity *);
void sub_806CDD4(Entity *, u8, u32);
void sub_806CDFC(Entity *, u8, u32);
void sub_806CE34(Entity *, u32);
void sub_806CE68(Entity *, u32);
void sub_806CE94(Entity *, u32);
u8 sub_806CEBC(Entity *);
void sub_806CEFC(Entity *, u32);
void sub_806CF18(Entity *);
u8 sub_806CF54(Entity *);
void sub_806CF60(void);
u32 sub_806CF98(struct Entity *);
u32 sub_806CF98(Entity *);
#endif // GUARD_CODE_806CD90_H

View File

@ -1,52 +1,52 @@
#ifndef GUARD_CODE_8077274_1_H
#define GUARD_CODE_8077274_1_H
void MuzzleTarget(struct Entity *pokemon, struct Entity *target);
void TransformStatusTarget(struct Entity * pokemon, struct Entity * target);
void MobileStatusTarget(struct Entity * pokemon, struct Entity * target);
void ExposeStatusTarget(struct Entity * pokemon, struct Entity * target, s16 param_3);
void IdentityItemHolders(struct Entity *pokemon, struct Entity *target);
void BlindTarget(struct Entity *pokemon, struct Entity *target);
void CrossEyeVisionTarget(struct Entity *pokemon, struct Entity *target);
void RestoreVisionTarget(struct Entity *pokemon, struct Entity *target);
void RestorePPTarget(struct Entity * pokemon,struct Entity * target, s32 param_3);
void RaiseAtkStatTarget(struct Entity * pokemon,struct Entity * target, s32 increment);
void RaiseSpAtkStatTarget(struct Entity * pokemon,struct Entity * target, s32 increment);
void RaiseDefStatTarget(struct Entity * pokemon,struct Entity * target, s32 increment);
void RaiseSpDefStatTarget(struct Entity * pokemon,struct Entity * target, s32 increment);
void LongTossStatusTarget(struct Entity * pokemon,struct Entity * target);
void PierceStatusTarget(struct Entity * pokemon,struct Entity * target);
void SetChargeStatusTarget(struct Entity *pokemon, struct Entity *target, u8 newStatus, struct Move *move, u8 *message);
void sub_8079764(struct Entity * pokemon);
void CounterStatusTarget(struct Entity * pokemon, struct Entity * target, u8 newStatus);
void SafeguardStatusTarget(struct Entity * pokemon, struct Entity * target);
void MistStatusTarget(struct Entity * pokemon, struct Entity * target);
void WishStatusTarget(struct Entity * pokemon, struct Entity * target);
void MagicCoatStatusTarget(struct Entity * pokemon, struct Entity * target);
void LightScreenStatusTarget(struct Entity * pokemon, struct Entity * target);
void ReflectStatusTarget(struct Entity * pokemon, struct Entity * target);
void ProtectStatusTarget(struct Entity * pokemon, struct Entity * target);
void MirrorCoatStatusTarget(struct Entity * pokemon, struct Entity * target);
void EndureStatusTarget(struct Entity * pokemon, struct Entity * target);
void MirrorMoveStatusTarget(struct Entity * pokemon, struct Entity * target);
void Conversion2StatusTarget(struct Entity * pokemon, struct Entity * target);
void VitalThrowStatusTarget(struct Entity * pokemon, struct Entity * target);
void sub_8079F20(struct Entity * pokemon, struct Entity * target, u8 param_3, u8 param_4);
void sub_807A0CC(struct Entity * pokemon, struct Entity * target);
void SendSleepEndMessage(struct Entity * pokemon, struct Entity * target, bool8 param_3, bool8 param_4);
void SendNonVolatileEndMessage(struct Entity * pokemon, struct Entity * target);
void SendImmobilizeEndMessage(struct Entity * pokemon, struct Entity *target);
void SendVolatileEndMessage(struct Entity * pokemon, struct Entity *target);
void SendProtectionEndMessage(struct Entity * pokemon, struct Entity *target);
void SendWaitingEndMessage(struct Entity * pokemon, struct Entity * target, u8 waitingStatus);
void SendLinkedEndMessage(struct Entity * pokemon, struct Entity * target);
void SendMoveEndMessage(struct Entity * pokemon, struct Entity * target);
void SendTransformEndMessage(struct Entity * pokemon, struct Entity *target);
void SendEyesightEndMessage(struct Entity * pokemon,struct Entity * target);
void SendMuzzledEndMessage(struct Entity * pokemon, struct Entity * target);
void sub_807A96C(struct Entity *pokemon, struct Entity *target);
void WakeUpPokemon(struct Entity * pokemon);
void SendThawedMessage(struct Entity *pokemon, struct Entity *target);
void MuzzleTarget(Entity *pokemon, Entity *target);
void TransformStatusTarget(Entity * pokemon, Entity * target);
void MobileStatusTarget(Entity * pokemon, Entity * target);
void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3);
void IdentityItemHolders(Entity *pokemon, Entity *target);
void BlindTarget(Entity *pokemon, Entity *target);
void CrossEyeVisionTarget(Entity *pokemon, Entity *target);
void RestoreVisionTarget(Entity *pokemon, Entity *target);
void RestorePPTarget(Entity * pokemon,Entity * target, s32 param_3);
void RaiseAtkStatTarget(Entity * pokemon,Entity * target, s32 increment);
void RaiseSpAtkStatTarget(Entity * pokemon,Entity * target, s32 increment);
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 sub_8079764(Entity * pokemon);
void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus);
void SafeguardStatusTarget(Entity * pokemon, Entity * target);
void MistStatusTarget(Entity * pokemon, Entity * target);
void WishStatusTarget(Entity * pokemon, Entity * target);
void MagicCoatStatusTarget(Entity * pokemon, Entity * target);
void LightScreenStatusTarget(Entity * pokemon, Entity * target);
void ReflectStatusTarget(Entity * pokemon, Entity * target);
void ProtectStatusTarget(Entity * pokemon, Entity * target);
void MirrorCoatStatusTarget(Entity * pokemon, Entity * target);
void EndureStatusTarget(Entity * pokemon, Entity * target);
void MirrorMoveStatusTarget(Entity * pokemon, Entity * target);
void Conversion2StatusTarget(Entity * pokemon, Entity * target);
void VitalThrowStatusTarget(Entity * pokemon, Entity * target);
void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4);
void sub_807A0CC(Entity * pokemon, Entity * target);
void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8 param_4);
void SendNonVolatileEndMessage(Entity * pokemon, Entity * target);
void SendImmobilizeEndMessage(Entity * pokemon, Entity *target);
void SendVolatileEndMessage(Entity * pokemon, Entity *target);
void SendProtectionEndMessage(Entity * pokemon, Entity *target);
void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus);
void SendLinkedEndMessage(Entity * pokemon, Entity * target);
void SendMoveEndMessage(Entity * pokemon, Entity * target);
void SendTransformEndMessage(Entity * pokemon, Entity *target);
void SendEyesightEndMessage(Entity * pokemon,Entity * target);
void SendMuzzledEndMessage(Entity * pokemon, Entity * target);
void sub_807A96C(Entity *pokemon, Entity *target);
void WakeUpPokemon(Entity * pokemon);
void SendThawedMessage(Entity *pokemon, Entity *target);
void sub_807AA30(void);
#endif // !GUARD_CODE_8077274_1_H

View File

@ -1,6 +1,6 @@
#ifndef GUARD_808417C_H
#define GUARD_808417C_H
s32 CalculateStatusTurns(struct Entity *target, s16 *turnRange, bool8 factorCurerSkills);
s32 CalculateStatusTurns(Entity *target, s16 *turnRange, bool8 factorCurerSkills);
#endif // GUARD_808417C_H

View File

@ -1,21 +1,20 @@
#ifndef GUARD_CODE_8092334_H
#define GUARD_CODE_8092334_H
struct unkStruct_8094924
// size: 0x10?
typedef struct unkStruct_8094924
{
// size: 0x10?
u8 *unk0; // head?
u8 *unk4; // tail?
u32 unk8;
u32 unkC;
};
} unkStruct_8094924;
void xxx_init_struct_8094924_save_809486C(struct unkStruct_8094924 *r0, u8 *r1, s32 size);
void nullsub_102(struct unkStruct_8094924 *r0);
void SaveIntegerBits(struct unkStruct_8094924 *r0, void *r1, s32 size);
void xxx_init_struct_8094924_restore_809485C(struct unkStruct_8094924 *r0, u8 *r1, s32 size);
void sub_80948E4(struct unkStruct_8094924 *r0, u8 *r1, s32 size);
void RestoreIntegerBits(struct unkStruct_8094924 *r0, void *r1, s32 size);
void xxx_init_struct_8094924_save_809486C(unkStruct_8094924 *, u8 *, s32);
void nullsub_102(unkStruct_8094924 *);
void SaveIntegerBits(unkStruct_8094924 *, void *, s32);
void xxx_init_struct_8094924_restore_809485C(unkStruct_8094924 *, u8 *, s32);
void sub_80948E4(unkStruct_8094924 *, u8 *, s32);
void RestoreIntegerBits(unkStruct_8094924 *, void *, s32);
#endif
#endif // GUARD_CODE_8092334_H

View File

@ -3,12 +3,12 @@
#include "code_8092334.h"
#include "dungeon_global_data.h"
#include "item.h"
#include "items.h"
#include "pokemon.h"
struct WonderMailSub
{
/* 0x4 */ struct DungeonLocation dungeon;
/* 0x4 */ DungeonLocation dungeon;
u32 seed;
};
@ -26,7 +26,7 @@ struct unkStruct_203B480
u16 unk10_u16;
} unk10;
/* 0x14 */ u8 playerName[0x20 - 0x14];
struct Item item;
Item item;
u32 unk24;
u32 unk28;
/* 0x2C */ s8 rescuesAllowed;
@ -37,7 +37,7 @@ struct unkStruct_203B480
struct unkStruct_203B484
{
/* 0x0 */ u32 unk0;
/* 0x4 */ struct PokemonStruct unk4;
/* 0x4 */ PokemonStruct1 unk4;
};
// size: 0x84

View File

@ -4,7 +4,7 @@
struct subStruct_203B490
{
// size: 0xC
struct DungeonLocation dungeon;
DungeonLocation dungeon;
u32 seed;
u32 unk8;
};

View File

@ -10,7 +10,7 @@ struct unkStruct_203B494
/* 0x4 */ s32 numAdventures;
s32 unk8;
s32 unkC;
/* 0x10 */ struct DungeonLocation dungeonLocation;
/* 0x10 */ DungeonLocation dungeonLocation;
s16 unk14;
s16 unk16;
s16 unk18;
@ -23,7 +23,7 @@ struct unkStruct_203B494
extern struct unkStruct_203B494 *gUnknown_203B494;
const u8 *GetAdventureLogLine(u8 index);
struct DungeonLocation *GetDungeonLocationInfo(void);
DungeonLocation *GetDungeonLocationInfo(void);
s32 GetNumAdventures(void);
void ResetNumAdventures(void);

View File

@ -1,7 +1,11 @@
#ifndef GUARD_CONSTANTS_ITEM_H
#define GUARD_CONSTANTS_ITEM_H
#define NUMBER_OF_ITEM_IDS 0xF0
#define MAX_KECLEON_ITEM_SHOP_ITEMS 8
#define MAX_KECLEON_WARE_SHOP_ITEMS 4
#define MAX_TEAM_MONEY 99999
#define MAX_TEAM_SAVINGS 9999999
#define CATEGORY_THROWN_LINE 0
#define CATEGORY_THROWN_ARC 1
@ -272,4 +276,13 @@
#define ITEM_G_MACHINE_7 0xEE
#define ITEM_G_MACHINE_8 0xEF
#endif
#define NUMBER_OF_ITEM_IDS (ITEM_G_MACHINE_8 + 1)
#define NUMBER_OF_GUMMIS 18
#define INVENTORY_SIZE 20
#define STORAGE_SIZE NUMBER_OF_ITEM_IDS
#define MIN_SPAWN_AMOUNT 0
#define MAX_SPAWN_AMOUNT 1
#endif // GUARD_CONSTANTS_ITEM_H

View File

@ -34,7 +34,8 @@ enum AccuracyType
NUM_ACCURACY_TYPES
};
struct MoveDataEntry
// size: 0x24
typedef struct MoveDataEntry
{
/* 0x0 */ u8 *name;
/* 0x4 */ s16 basePower;
@ -57,16 +58,17 @@ struct MoveDataEntry
/* 0x19 */ u8 rangeID;
/* 0x1C */ u8 *description;
/* 0x20 */ u8 *useText; // The text displayed when this move is used.
};
} MoveDataEntry;
struct Move
// size: 0x8
typedef struct Move
{
u8 moveFlags;
u8 moveFlags2;
u16 id;
u8 PP;
u8 ginseng; // How much the move is boosted by Ginsengs.
};
} Move;
enum TargetingFlag
{
@ -94,4 +96,4 @@ enum TargetingFlag
TARGETING_FLAG_EXPOSE = 0x600,
};
#endif
#endif // GUARD_CONSTANTS_MOVE_H

View File

@ -1,16 +1,17 @@
#ifndef GUARD_DEBUG_H
#define GUARD_DEBUG_H
#include "gba/gba.h"
struct DebugLocation
// size: 0xC
typedef struct DebugLocation
{
char *file;
u32 line;
char *func;
};
/* 0x0 */ u8 *file;
/* 0x4 */ u32 line;
/* 0x8 */ u8 *func;
} DebugLocation;
void Log(u8 num, const char *text, ...);
void Log(u8, const u8 *, ...);
void NDS_DebugInit(void);
void nullsub_25(void);
void nullsub_26(void);
@ -22,17 +23,17 @@ void nullsub_31(void);
void nullsub_32(void);
void nullsub_137(void);
void nullsub_199(void);
void PrintFuncFileLineOrNotEntry(char * buf, struct DebugLocation *debug);
void PrintFuncFileLine(char *buf, struct DebugLocation *loc, const char* prefix);
void PrintMessageWithFuncFileLine(u8 *buffer, struct DebugLocation *debug, const char *text, ...);
void PrintFuncFileLine(u8 *, DebugLocation *, const u8 *);
void PrintMessageWithFuncFileLine(u8 *, DebugLocation *, const u8 *, ...);
void sub_8011B08(void);
void sub_8011B88(const char *text, ...);
void sub_8011B88(const u8 *, ...);
u32 sub_8011BA4(void);
u32 sub_8011BA8(void);
const char *sub_8011BAC(void);
const u8 *sub_8011BAC(void);
void sub_8011B14(void);
u8 sub_8011B20(void);
u8 sub_8011B3C(void);
void sub_8011BC8(u32 r0, u32 r1, u32 r2, ...);
void sub_8011BC8(u32, u32, u32, ...);
void UnusedHang(void);
#endif
#endif // GUARD_DEBUG_H

View File

@ -7,8 +7,8 @@
// size: 0x1A4
struct DebugMenu
{
struct MenuStruct unk0[4];
struct UnkTextStruct2 unk140[4];
MenuStruct unk0[4];
UnkTextStruct2 unk140[4];
u32 fill1A0;
};

View File

@ -10,19 +10,19 @@ struct unkStruct_203B3F0
/* 0x0 */ u32 state;
/* 0x4 */ u8 id;
/* 0x8 */ u32 menuAction;
/* 0xC */ struct MenuItem menuItems[8];
struct MenuStruct unk4C;
/* 0xC */ MenuItem menuItems[8];
MenuStruct unk4C;
u32 unk9C;
u32 unkA0;
u32 unkA4;
u32 unkA8;
u32 unkAC;
u32 unkB0;
struct UnkTextStruct2 *unkB4;
UnkTextStruct2 *unkB4;
u32 unkB8;
u32 unkBC;
u8 fill4[0xD8 - 0xC0];
struct UnkTextStruct2 unkD8[4];
UnkTextStruct2 unkD8[4];
};
#endif // GUARD_DEBUG_MENU2_H

View File

@ -5,14 +5,14 @@
#include "text.h"
// size: 0xFC
struct unkStruct_203B3F4
typedef struct unkStruct_203B3F4
{
/* 0x0 */ u32 state;
/* 0x4 */ u8 friendArea;
/* 0x8 */ u32 menuAction;
/* 0xC */ struct MenuItem menuItems[8];
struct MenuStruct unk4C;
struct UnkTextStruct2 unk9C[4];
};
/* 0xC */ MenuItem menuItems[8];
MenuStruct unk4C;
UnkTextStruct2 unk9C[4];
} unkStruct_203B3F4;
#endif // GUARD_DEBUG_MENU3_H

View File

@ -6,27 +6,27 @@
#include "text.h"
// size: 0x140
struct unkStruct_203B3F8
typedef struct unkStruct_203B3F8
{
/* 0x0 */ u32 state;
s16 unk4;
u16 unk6;
/* 0x8 */ struct PokemonStruct *pokemon;
/* 0x8 */ PokemonStruct1 *pokemon;
/* 0xC */ u32 menuAction;
struct MenuStruct unk10;
MenuStruct unk10;
u32 unk60;
u32 unk64;
u32 unk68;
u32 unk6C;
u32 unk70;
u32 unk74;
struct UnkTextStruct2 *unk78;
UnkTextStruct2 *unk78;
u32 unk7C;
u32 unk80;
u8 fill84[0x90 - 0x84];
struct MenuItem unk90[8];
MenuItem unk90[8];
u16 unkD0[8];
struct UnkTextStruct2 unkE0[4];
};
UnkTextStruct2 unkE0[4];
} unkStruct_203B3F8;
#endif // GUARD_DEBUG_MENU4_H

View File

@ -4,14 +4,14 @@
#include "dungeon_global_data.h"
// size: 0x8
struct DungeonName
typedef struct DungeonName
{
const u8 *name1;
const u8 *name2;
};
} DungeonName;
// size: 0x10
struct DungeonDataEntry
typedef struct DungeonDataEntry
{
/* 0x0 */ bool8 stairDirectionUp;
// If enabled, enemies will evolve when a team member is KOed (and doesn't revive) if their evolution spawns on the floor.
@ -31,13 +31,13 @@ struct DungeonDataEntry
// The chance that a wild Pokémon's moveRandomly flag will be set when spawning,
// causing them to move randomly inside a room instead of exploring rooms.
/* 0xE */ s16 randomMovementChance;
};
} DungeonDataEntry;
extern struct DungeonDataEntry gDungeons[];
extern struct DungeonName gDungeonNames[];
extern DungeonDataEntry gDungeons[];
extern DungeonName gDungeonNames[];
const u8 *GetDungeonName1(u8 dungeon);
u32 sub_80908D8(struct DungeonLocation *dungeon);
u8 sub_8090910(struct DungeonLocation *dungeon, u32 param_2);
u32 sub_80908D8(DungeonLocation *dungeon);
u8 sub_8090910(DungeonLocation *dungeon, u32 param_2);
bool8 sub_809095C(u8 dungeon);
u32 GetMaxItemsAllowed(u8 dungeon);
s8 GetRescuesAllowed(u8 dungeon);

View File

@ -3,8 +3,8 @@
#include "dungeon_entity.h"
void ClearMonsterActionFields(struct ActionContainer *actionPointer);
void SetMonsterActionFields(struct ActionContainer *actionPointer, u16 action);
void SetActionPassTurnOrWalk(struct ActionContainer *actionPointer, s16 species);
void ClearMonsterActionFields(ActionContainer *actionPointer);
void SetMonsterActionFields(ActionContainer *actionPointer, u16 action);
void SetActionPassTurnOrWalk(ActionContainer *actionPointer, s16 species);
#endif

View File

@ -3,8 +3,8 @@
#include "dungeon_entity.h"
u32 sub_8075818(struct Entity *entity);
void sub_8075900(struct Entity *pokemon, u8 r1);
void RunMonsterAI(struct Entity *pokemon, u32 unused);
u32 sub_8075818(Entity *entity);
void sub_8075900(Entity *pokemon, u8 r1);
void RunMonsterAI(Entity *pokemon, u32 unused);
#endif

View File

@ -13,13 +13,13 @@ struct AIPossibleMove
s32 weight;
};
void DecideAttack(struct Entity *pokemon);
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, struct Entity *pokemon, struct Move *move);
bool8 IsTargetInLineRange(struct Entity *user, struct Entity *target, s32 range);
s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, struct Entity *user, struct Entity *target, struct Move *move, u32 hasStatusChecker);
bool8 IsAITargetEligible(s32 targetingFlags, struct Entity *user, struct Entity *target, struct Move *move, bool32 hasStatusChecker);
s32 WeightMove(struct Entity *user, s32 targetingFlags, struct Entity *target, u32 moveType);
bool8 TargetRegularAttack(struct Entity *pokemon, u32 *targetDir, bool8 checkPetrified);
bool8 IsTargetInRange(struct Entity *pokemon, struct Entity *targetPokemon, s32 direction, s32 maxRange);
void DecideAttack(Entity *pokemon);
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, struct 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 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);
#endif

View File

@ -3,7 +3,7 @@
#include "dungeon_entity.h"
u32 EvaluateItem(struct Entity *targetPokemon, struct Item *item, u32 itemTargetFlags);
bool8 CanTargetAdjacentPokemon(struct Entity *pokemon);
u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags);
bool8 CanTargetAdjacentPokemon(Entity *pokemon);
#endif

View File

@ -4,9 +4,9 @@
#include "dungeon_entity.h"
#include "position.h"
void DecideUseItem(struct Entity *pokemon);
void FindStraightThrowableTargets(struct Entity *pokemon, s32 thrownAIFlag, struct Item *item, bool8 ignoreRollChance);
void FindRockItemTargets(struct Entity *pokemon, struct Item *item, struct Position potentialTargets[], bool8 ignoreRollChance);
void TargetThrownItem(struct Entity *pokemon, struct Entity *targetPokemon, struct Item *item, s32 targetingFlags, bool8 ignoreRollChance);
void DecideUseItem(Entity *pokemon);
void FindStraightThrowableTargets(Entity *pokemon, s32 thrownAIFlag, Item *item, bool8 ignoreRollChance);
void FindRockItemTargets(Entity *pokemon, Item *item, Position potentialTargets[], bool8 ignoreRollChance);
void TargetThrownItem(Entity *pokemon, Entity *targetPokemon, Item *item, s32 targetingFlags, bool8 ignoreRollChance);
#endif

View File

@ -3,7 +3,7 @@
#include "dungeon_entity.h"
bool8 TargetLeader(struct Entity *pokemon);
struct Entity* GetLeaderIfVisible(struct Entity *pokemon);
bool8 TargetLeader(Entity *pokemon);
Entity* GetLeaderIfVisible(Entity *pokemon);
#endif

View File

@ -3,11 +3,11 @@
#include "dungeon_entity.h"
void MoveIfPossible(struct Entity *pokemon, bool8 showRunAwayEffect);
bool8 CanTakeItem(struct Entity *pokemon);
bool8 ChooseTargetPosition(struct Entity *pokemon);
void DecideMovement(struct Entity *pokemon, bool8 showRunAwayEffect);
bool8 AvoidEnemies(struct Entity *pokemon);
bool8 Wander(struct Entity *pokemon);
void MoveIfPossible(Entity *pokemon, bool8 showRunAwayEffect);
bool8 CanTakeItem(Entity *pokemon);
bool8 ChooseTargetPosition(Entity *pokemon);
void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect);
bool8 AvoidEnemies(Entity *pokemon);
bool8 Wander(Entity *pokemon);
#endif

View File

@ -3,14 +3,14 @@
#include "dungeon_entity.h"
bool8 CanAttackInDirection(struct Entity *pokemon, s32 direction);
bool8 CanAIMonsterMoveInDirection(struct Entity *pokemon, s32 direction, bool8 *pokemonInFront);
bool8 IsAtJunction(struct Entity *pokemon);
bool8 ShouldAvoidFirstHit(struct Entity *pokemon, bool8 forceAvoid);
bool8 ShouldMonsterRunAway(struct Entity *pokemon);
bool8 ShouldMonsterRunAwayAndShowEffect(struct Entity *pokemon, bool8 showRunAwayEffect);
void CheckRunAwayVisualFlag(struct Entity *pokemon, bool8 showRunAwayEffect);
u8 CanTarget(struct Entity *pokemon, struct Entity *targetPokemon, bool8 ignoreInvisible, bool8 checkPetrified);
u8 sub_807167C(struct Entity * pokemon, struct Entity * target);
bool8 CanAttackInDirection(Entity *pokemon, s32 direction);
bool8 CanAIMonsterMoveInDirection(Entity *pokemon, s32 direction, bool8 *pokemonInFront);
bool8 IsAtJunction(Entity *pokemon);
bool8 ShouldAvoidFirstHit(Entity *pokemon, bool8 forceAvoid);
bool8 ShouldMonsterRunAway(Entity *pokemon);
bool8 ShouldMonsterRunAwayAndShowEffect(Entity *pokemon, bool8 showRunAwayEffect);
void CheckRunAwayVisualFlag(Entity *pokemon, bool8 showRunAwayEffect);
u8 CanTarget(Entity *pokemon, Entity *targetPokemon, bool8 ignoreInvisible, bool8 checkPetrified);
u8 sub_807167C(Entity * pokemon, Entity * target);
#endif

View File

@ -3,11 +3,11 @@
#include "dungeon_entity.h"
bool8 CannotMove(struct Entity *pokemon, bool8 checkBlinker);
bool8 sub_8070BC0(struct Entity* entity);
bool8 CannotUseItems(struct Entity *pokemon);
bool8 HasStatusThatPreventsActing(struct Entity *pokemon);
bool8 CannotAttack(struct Entity *pokemon, bool8 skipSleep);
bool8 CanMoveInDirection(struct Entity *pokemon, u32 direction);
bool8 CannotMove(Entity *pokemon, bool8 checkBlinker);
bool8 sub_8070BC0(Entity* entity);
bool8 CannotUseItems(Entity *pokemon);
bool8 HasStatusThatPreventsActing(Entity *pokemon);
bool8 CannotAttack(Entity *pokemon, bool8 skipSleep);
bool8 CanMoveInDirection(Entity *pokemon, u32 direction);
#endif

View File

@ -3,7 +3,7 @@
#include "constants/global.h"
#include "constants/move.h"
#include "item.h"
#include "items.h"
#include "position.h"
#include "sprite.h"
@ -24,7 +24,7 @@
#define STAT_STAGE_EVASION 1
// size: 0x18
struct ActionContainer
typedef struct ActionContainer
{
/* 0x0 */ u16 action;
/* 0x2 */ u8 direction;
@ -32,16 +32,16 @@ struct ActionContainer
// Additional parameter alongside actionIndex. Used for things like indicating which move a Pokémon should use from its moveset.
/* 0x4 */ u8 actionUseIndex;
// Position of the Pokémon the last time it threw an item.
/* 0x8 */ struct Position lastItemThrowPosition;
/* 0x8 */ Position lastItemThrowPosition;
u8 unkC;
u8 fillD[3];
u8 fill10[4];
// Position of the target that the Pokémon wants throw an item at.
/* 0x14 */ struct Position itemTargetPosition;
};
/* 0x14 */ Position itemTargetPosition;
} ActionContainer;
// size: 0x208
struct EntityInfo
typedef struct EntityInfo
{
// This has different purposes for Pokémon, items, and traps.
// Pokemon: MovementFlag
@ -85,12 +85,12 @@ struct EntityInfo
/* 0x3E */ u8 hiddenPowerType;
u8 fill3F;
/* 0x40 */ u8 joinedAt; // Uses the dungeon index in dungeon.h.
/* 0x44 */ struct ActionContainer action;
/* 0x44 */ ActionContainer action;
/* 0x5C */ u8 types[2];
/* 0x5E */ u8 abilities[2];
/* 0x60 */ struct Item heldItem;
/* 0x60 */ Item heldItem;
u8 fill64[0x68 - 0x64];
/* 0x68 */ struct Position prevPos[NUM_PREV_POS];
/* 0x68 */ Position prevPos[NUM_PREV_POS];
/* 0x78 */ u8 aiObjective;
/* 0x79 */ bool8 aiNotNextToTarget;
/* 0x7A */ bool8 aiTargetingEnemy;
@ -98,7 +98,7 @@ struct EntityInfo
/* 0x7C */ u16 aiTargetSpawnGenID;
/* 0x80 */ struct Entity *aiTarget;
u8 fill84[0x88 - 0x84];
/* 0x88 */ struct Position aiTargetPos;
/* 0x88 */ Position aiTargetPos;
// Bitwise flags corresponding to selected IQ skills.
/* 0x8C */ u8 IQSkillMenuFlags[4]; // IQ skills selected in the IQ skills menu.
/* 0x90 */ u8 IQSkillFlags[4];
@ -191,7 +191,7 @@ struct EntityInfo
// When non-zero, an AI Pokémon will move in a random direction every turn when it is a room.
// There is a chance of this flag being set when a wild Pokémon spawns. The chance depends on the dungeon's randomMovementChance.
/* 0x114 */ u32 moveRandomly;
/* 0x118 */ struct Move moves[MAX_MON_MOVES];
/* 0x118 */ Move moves[MAX_MON_MOVES];
/* 0x138 */ u8 struggleMoveFlags;
/* 0x13C */ u32 belly;
/* 0x140 */ u32 maxBelly;
@ -228,17 +228,17 @@ struct EntityInfo
/* 0x167 */ u8 unk167;
/* 0x168 */ u8 unk168;
/* 0x169 */ u8 turnsSinceWarpScarfActivation;
/* 0x16C */ struct Position targetPos;
/* 0x170 */ struct Position pixelPos;
/* 0x16C */ Position targetPos;
/* 0x170 */ Position pixelPos;
u32 unk174;
u16 unk178;
/* 0x17A */ u16 mimicMoveIDs[MAX_MON_MOVES]; // All moves that Mimic has copied (not sure on size...)
// Previous value of targetPosition for movement, 1 and 2 moves ago.
/* 0x184 */ struct Position previousTargetMovePosition1;
/* 0x188 */ struct Position32 previousTargetMovePosition2;
/* 0x184 */ Position previousTargetMovePosition1;
/* 0x188 */ Position32 previousTargetMovePosition2;
/* 0x190 */ u8 lastMoveDirection; // The last direction that the Pokémon moved in.
// Number of tiles that the Pokémon moved last, multiplied by 0x100.
/* 0x194 */ struct Position32 lastMoveIncrement;
/* 0x194 */ Position32 lastMoveIncrement;
/* 0x19C */ u8 walkAnimFramesLeft; // Set when the Pokémon starts moving, and counts down until the Pokémon's walk animation stops.
u8 fill19D[0x1F4 - 0x19D];
/* 0x1F4 */ u8 numMoveTiles; // Number of tiles to move in a turn. Can be greater than 1 if the user's movement speed is boosted.
@ -249,18 +249,18 @@ struct EntityInfo
/* 0x1FC */ u16 expGainedInTurn; // Used to accumulate experience when multiple enemies are defeated in one turn.
/* 0x200 */ u32 statusIcons;
u8 unk204;
};
} EntityInfo;
// size: 0x74 | Used for Pokémon, items, and traps.
struct Entity
typedef struct Entity
{
/* 0x0 */ u32 type;
/* 0x4 */ struct Position pos;
/* 0x8 */ struct Position prevPos;
/* 0x4 */ Position pos;
/* 0x8 */ Position prevPos;
// The center of the entity acccording to pixel-space coordinates, using the same origin as posWorld.
// X = (posWorld * 24 + 16) * 256, while Y = (posWorld * 24 + 12) * 256.
/* 0xC */ struct Position32 pixelPos;
/* 0x14 */ struct Position32 prevPixelPos;
/* 0xC */ Position32 pixelPos;
/* 0x14 */ Position32 prevPixelPos;
s32 unk1C;
/* 0x20 */ bool8 isVisible; // Turned off when a Pokémon faints.
u8 fill21;
@ -271,8 +271,8 @@ struct Entity
// The global spawn index counter starts at 10. Each Pokémon that spawns increments the counter and
// gets assigned the current counter value as its spawn index.
/* 0x26 */ u16 spawnGenID;
/* 0x28*/ struct EntitySpriteInfo spriteInfo;
struct OpenedFile *sprite;
/* 0x28*/ EntitySpriteInfo spriteInfo;
OpenedFile *sprite;
s16 unk68;
u8 unk6A;
u8 unk6B;
@ -280,8 +280,8 @@ struct Entity
/* 0x6D */ u8 direction2; // Duplicate of 0x6C?
u8 unk6E;
u8 unk6F;
/* 0x70 */ struct EntityInfo *info;
};
/* 0x70 */ EntityInfo *info;
} Entity;
enum EntityType
{

View File

@ -14,32 +14,30 @@
#define DUNGEON_MAX_WILD_POKEMON 16
#define DUNGEON_MAX_POKEMON MAX_TEAM_MEMBERS + DUNGEON_MAX_WILD_POKEMON
extern struct Dungeon *gDungeon;
// size: 0x4
struct DungeonLocation
typedef struct DungeonLocation
{
/* 0x0 */ u8 id;
/* 0x1 */ u8 floor;
};
} DungeonLocation;
// size: 0x4
struct Dungeon_sub
typedef struct Dungeon_sub
{
u8 unk0;
u8 unk1;
u8 unk2;
};
} Dungeon_sub;
// size: 0x30
struct unkDungeonGlobal_unk1CE98_sub
typedef struct unkDungeonGlobal_unk1CE98_sub
{
/* 0x0 */ u8 buffer1[10];
/* 0xA */ u8 buffer2[10];
/* 0x14 */ s16 moveID;
/* 0x16 */ u8 fill16[0x2];
/* 0x18 */ struct DungeonLocation dungeonLocation;
/* 0x1C */ struct Item heldItem;
/* 0x18 */ DungeonLocation dungeonLocation;
/* 0x1C */ Item heldItem;
/* 0x20 */ u32 exp;
/* 0x24 */ s16 maxHPStat;
/* 0x26 */ u8 atk;
@ -52,10 +50,10 @@ struct unkDungeonGlobal_unk1CE98_sub
/* 0x2D */ u8 defBoost;
/* 0x2E */ u8 spDefBoost;
u8 unk2F; // speedBoost?
};
} unkDungeonGlobal_unk1CE98_sub;
// size: 0x10
struct DungeonMusicPlayer
typedef struct DungeonMusicPlayer
{
/* 0x0 */ u32 state;
/* 0x4 */ u32 fadeOutSpeed;
@ -63,10 +61,10 @@ struct DungeonMusicPlayer
/* 0xA */ u16 songIndex;
/* 0xC */ u16 pastSongIndex;
/* 0xE */ u16 queuedSongIndex;
};
} DungeonMusicPlayer;
// size: 0x1CEDC
struct Dungeon
typedef struct Dungeon
{
u8 unk0;
u8 unk1;
@ -85,16 +83,16 @@ struct Dungeon
u8 unk11;
s16 unk12;
u8 fill14[0xB8 - 0x14];
struct Entity *unkB8;
struct Entity *unkBC;
Entity *unkB8;
Entity *unkBC;
u8 fillC0[0x16D - 0xC0];
u8 unk16D;
u8 fill16E[0x179 - 0x16E];
/* 0x179 */ bool8 pokemonExposed; // True if a Pokémon on the floor has the Exposed status.
u8 fill17A[0x17C - 0x17A];
struct Dungeon_sub unk17C[0x100];
Dungeon_sub unk17C[0x100];
/* 0x57C */ u8 fill57C[0x644 - 0x57c];
/* 0x644 */ struct DungeonLocation dungeonLocation;
/* 0x644 */ DungeonLocation dungeonLocation;
u8 fill646[0x654 - 0x648];
u8 unk654;
u8 fill655[0x65C - 0x655];
@ -126,7 +124,7 @@ struct Dungeon
u8 fill68B[0x699 - 0x68B];
u8 unk699;
u8 fill69A[0x69C - 0x69A];
/* 0x69C */ struct EntityInfo unk69C[4];
/* 0x69C */ EntityInfo unk69C[4];
u8 fillEBC[0x363C - 0xEBC];
/* 0x363C */ u8 expYieldRankings[NUM_MONSTERS];
u8 fill37D9[0x37F0 - 0x37D9];
@ -147,9 +145,9 @@ struct Dungeon
/* 0x3A10 */ u16 unk3A10;
u8 fill3A10[0x3A14 - 0x3A12];
/* 0x3A14 */ s16 bossBattleIndex;
/* 0x3A18 */ struct Tile tiles[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
/* 0x3A18 */ Tile tiles[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
u8 fillE218[0xE220 - 0xE218];
struct Position unkE220[4];
Position unkE220[4];
u8 unkE230[0xE23C - 0xE230];
s16 unkE23C; // x coord of some kind
s16 unkE23E; // y coord of some kind
@ -168,13 +166,13 @@ struct Dungeon
/* 0xE278 */ u8 waterSportTurns;
/* 0xE279 */ bool8 nullifyWeather; // Air Lock and Cloud Nine toggle this to disable weather effects
u8 fillE27A[0xE8C0 - 0xE27A];
/* 0xE8C0 */ struct Tile* tilePointers[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
/* 0xE8C0 */ Tile *tilePointers[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
u8 unk104C0;
/* 0x104C4 */ struct RoomData roomData[MAX_ROOM_COUNT];
/* 0x104C4 */ RoomData roomData[MAX_ROOM_COUNT];
u8 fill10764[0x10844 - 0x10764];
/* 0x10844 */ s16 naturalJunctionListCounts[MAX_ROOM_COUNT];
u8 fill10874[0x10884 - 0x10874];
/* 0x10884 */ struct Position naturalJunctionList[MAX_ROOM_COUNT][32]; // Arrays of room exits for each room.
/* 0x10884 */ Position naturalJunctionList[MAX_ROOM_COUNT][32]; // Arrays of room exits for each room.
u8 fill11444[0x11884 - 0x11484];
u8 unk11884[0x1194];
u8 fill12A18[0x12C24 - 0x12A18];
@ -189,28 +187,28 @@ struct Dungeon
/* 0x13578 */ u8 unk13578;
/* 0x13579 */ u8 unk13579;
u8 fill1357A[0x1357C - 0x1357A];
/* 0x1357C */ struct Entity *teamPokemon[MAX_TEAM_MEMBERS];
/* 0x1358C */ struct Entity *wildPokemon[DUNGEON_MAX_WILD_POKEMON];
/* 0x135CC */ struct Entity *allPokemon[DUNGEON_MAX_POKEMON]; // Contains both team and wild Pokémon
/* 0x1361C */ struct Entity *clientPokemon[0x40];
/* 0x1371C */ struct Entity *unk1371C[0x40];
/* 0x1381C */ struct Entity teamPokemonEntities[MAX_TEAM_MEMBERS];
/* 0x139EC */ struct Entity wildPokemonEntities[DUNGEON_MAX_WILD_POKEMON];
/* 0x1412C */ struct Entity clientPokemonEntities[0x40];
/* 0x15E2C */ struct Entity unk15E2C[0x40];
/* 0x17B2C */ struct Entity *lightningRodPokemon;
/* 0x17B30 */ struct Entity *snatchPokemon;
/* 0x1357C */ Entity *teamPokemon[MAX_TEAM_MEMBERS];
/* 0x1358C */ Entity *wildPokemon[DUNGEON_MAX_WILD_POKEMON];
/* 0x135CC */ Entity *allPokemon[DUNGEON_MAX_POKEMON]; // Contains both team and wild Pokémon
/* 0x1361C */ Entity *clientPokemon[0x40];
/* 0x1371C */ Entity *unk1371C[0x40];
/* 0x1381C */ Entity teamPokemonEntities[MAX_TEAM_MEMBERS];
/* 0x139EC */ Entity wildPokemonEntities[DUNGEON_MAX_WILD_POKEMON];
/* 0x1412C */ Entity clientPokemonEntities[0x40];
/* 0x15E2C */ Entity unk15E2C[0x40];
/* 0x17B2C */ Entity *lightningRodPokemon;
/* 0x17B30 */ Entity *snatchPokemon;
/* 0x17B34 */ u8 fillunk1734[0x17B38 - 0x17B34];
/* 0x17B38 */ u32 unk17B38;
/* 0x17B3C */ u32 unk17B3C;
u8 fill17B40[0x17B44 - 0x17B40];
/* 0x17B44 */ struct OpenedFile *sprites[MONSTER_MAX + 1];
/* 0x181E4 */ struct OpenedFile *paletFile;
/* 0x181E8 */ struct Position cameraPos;
/* 0x181EC */ struct Position cameraPosMirror;
/* 0x181F0 */ struct Position cameraPixelPos;
/* 0x181F4 */ struct Position cameraPixelPosMirror;
/* 0x181F8 */ struct Entity *cameraTarget;
/* 0x17B44 */ OpenedFile *sprites[MONSTER_MAX + 1];
/* 0x181E4 */ OpenedFile *paletFile;
/* 0x181E8 */ Position cameraPos;
/* 0x181EC */ Position cameraPosMirror;
/* 0x181F0 */ Position cameraPixelPos;
/* 0x181F4 */ Position cameraPixelPosMirror;
/* 0x181F8 */ Entity *cameraTarget;
u32 unk181FC;
u32 unk18200;
u32 unk18204;
@ -231,9 +229,11 @@ struct Dungeon
u8 fill1C57F[0x1C58B - 0x1C57F];
u8 unk1C58B;
u8 fill1C58C[0x1CE98 - 0x1C58C];
struct unkDungeonGlobal_unk1CE98_sub unk1CE98; // TODO: not sure how large this is
unkDungeonGlobal_unk1CE98_sub unk1CE98; // TODO: not sure how large this is
u32 unk1CEC8;
/* 0x1CECC */ struct DungeonMusicPlayer musPlayer;
};
/* 0x1CECC */ DungeonMusicPlayer musPlayer;
} Dungeon;
extern Dungeon *gDungeon;
#endif

View File

@ -3,6 +3,6 @@
#include "dungeon_entity.h"
bool8 HasHeldItem(struct Entity *pokemon, u8 id);
bool8 HasHeldItem(Entity *pokemon, u8 id);
#endif

View File

@ -1,7 +1,9 @@
#ifndef GUARD_DUNGEON_LEADER_H
#define GUARD_DUNGEON_LEADER_H
struct Entity* GetLeader();
struct EntityInfo* GetLeaderInfo(void);
#include "dungeon_entity.h"
Entity* GetLeader();
EntityInfo* GetLeaderInfo(void);
#endif

View File

@ -3,12 +3,12 @@
#include "map.h"
struct unkStruct_202F190
typedef struct unkStruct_202F190
{
struct Tile* unk0[6];
};
Tile *unk0[6];
} unkStruct_202F190;
struct Tile* GetTile(s32 x, s32 y);
struct Tile* GetTileSafe(s32 x, s32 y);
Tile *GetTile(s32 x, s32 y);
Tile *GetTileSafe(s32 x, s32 y);
#endif

View File

@ -5,12 +5,12 @@
u8 GetCrossableTerrain(s16 species);
u8 sub_807034C(s16 id, struct Tile *tile);
u8 sub_80703A0(struct Entity *pokemon, struct Position *pos);
bool8 CanCrossWalls(struct Entity *pokemon);
bool8 sub_807049C(struct Entity *pokemon, struct Position *pos);
bool8 sub_8070564(struct Entity *pokemon, struct Position *pos);
bool8 sub_80705F0(struct Entity *pokemon, struct Position *pos);
bool8 sub_80706A4(struct Entity *pokemon, struct Position *pos);
s32 CalcSpeedStage(struct Entity *pokemon);
u8 sub_80703A0(Entity *pokemon, Position *pos);
bool8 CanCrossWalls(Entity *pokemon);
bool8 sub_807049C(Entity *pokemon, Position *pos);
bool8 sub_8070564(Entity *pokemon, Position *pos);
bool8 sub_80705F0(Entity *pokemon, Position *pos);
bool8 sub_80706A4(Entity *pokemon, Position *pos);
s32 CalcSpeedStage(Entity *pokemon);
#endif

View File

@ -3,18 +3,18 @@
#include "dungeon_entity.h"
bool8 HasSafeguardStatus(struct Entity * param_1, struct Entity * param_2, bool8 displayMessage);
bool8 sub_80717A4(struct Entity *pokemon, u16 moveID);
bool8 HasAbility(struct Entity *pokemon, u8 ability);
bool8 MonsterIsType(struct Entity *pokemon, u8 type);
bool8 CanSeeInvisibleMonsters(struct Entity *pokemon);
bool8 HasTactic(struct Entity *pokemon, u8 tactic);
bool8 IQSkillIsEnabled(struct Entity *pokemon, u8 IQSkill);
void LoadIQSkills(struct Entity *pokemon);
bool8 CanSeeTeammate(struct Entity * pokemon);
u8 GetMoveTypeForMonster(struct Entity *pokemon, struct Move *pokeMove);
s32 GetMovePower(struct Entity *pokemon, struct Move *pokeMove);
bool8 ToolboxEnabled(struct EntityInfo *pokemon);
bool8 SetVisualFlags(struct EntityInfo *entityInfo, u16 newFlag, bool8 param_3);
bool8 HasSafeguardStatus(Entity * param_1, Entity * param_2, bool8 displayMessage);
bool8 sub_80717A4(Entity *pokemon, u16 moveID);
bool8 HasAbility(Entity *pokemon, u8 ability);
bool8 MonsterIsType(Entity *pokemon, u8 type);
bool8 CanSeeInvisibleMonsters(Entity *pokemon);
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);
bool8 ToolboxEnabled(EntityInfo *pokemon);
bool8 SetVisualFlags(EntityInfo *entityInfo, u16 newFlag, bool8 param_3);
#endif

View File

@ -3,13 +3,13 @@
#include "position.h"
struct DungeonPokemonStatusSprite
DungeonPokemonStatusSprite
{
u32 status;
u32 frame;
};
struct DungeonPokemonSprite
DungeonPokemonSprite
{
/* 0x0000 */ u8 exists;
/* 0x0004 */ u32 id;
@ -18,22 +18,22 @@ struct DungeonPokemonSprite
/* 0x000C */ u32 status;
/* 0x0010 */ u8 visible;
/* 0x0011 */ u8 unk11;
/* 0x0014 */ struct Position pos;
/* 0x0018 */ struct Position statusOffsets[2];
/* 0x0014 */ Position pos;
/* 0x0018 */ Position statusOffsets[2];
/* 0x0020 */ u32 unk20;
/* 0x0024 */ u32 unk24;
/* 0x0028 */ struct DungeonPokemonStatusSprite statusSprites[2];
/* 0x0028 */ DungeonPokemonStatusSprite statusSprites[2];
/* 0x0038 */ u8 unk38;
/* 0x003C */ u16 unk3C;
/* 0x003E */ u16 unk3E;
}
struct DungeonPokemonSprites
DungeonPokemonSprites
{
u32 frame;
struct DungeonPokemonSprites sprites[22];
DungeonPokemonSprites sprites[22];
};
extern struct DungeonPokemonSprites *gDungeonPokemonSprites;
extern DungeonPokemonSprites *gDungeonPokemonSprites;
#endif

View File

@ -3,8 +3,8 @@
#include "position.h"
bool8 IsPositionActuallyInSight(struct Position *pos1, struct Position *pos2);
bool8 IsPositionInSight(struct Position *pos1, struct Position *pos2);
bool8 IsTargetTwoTilesAway(struct Position *pos1, struct Position *pos2);
bool8 IsPositionActuallyInSight(Position *pos1, Position *pos2);
bool8 IsPositionInSight(Position *pos1, Position *pos2);
bool8 IsTargetTwoTilesAway(Position *pos1, Position *pos2);
#endif

View File

@ -5,14 +5,14 @@
#include "dungeon_entity.h"
#include "position.h"
extern const struct Position gAdjacentTileOffsets[NUM_DIRECTIONS];
extern const Position gAdjacentTileOffsets[NUM_DIRECTIONS];
bool8 EntityExists(struct Entity *pokemon);
u32 GetEntityType(struct Entity *entity);
u8 GetEntityRoom(struct Entity *entity);
struct EntityInfo *GetTrapData(struct Entity *entity);
struct Item *GetItemData(struct Entity *entity);
struct Tile *GetTileAtEntitySafe(struct Entity *entity);
struct Item *GetItemData_1(struct Entity *entity);
bool8 EntityExists(Entity *pokemon);
u32 GetEntityType(Entity *entity);
u8 GetEntityRoom(Entity *entity);
EntityInfo *GetTrapData(Entity *entity);
Item *GetItemData(Entity *entity);
struct Tile *GetTileAtEntitySafe(Entity *entity);
Item *GetItemData_1(Entity *entity);
#endif

View File

@ -3,20 +3,20 @@
#include "dungeon_entity.h"
struct Entity *xxx_call_GetLeader(void);
struct Entity *GetPartnerEntity(void);
Entity *xxx_call_GetLeader(void);
Entity *GetPartnerEntity(void);
void sub_80854D4(void);
struct Entity *GetEntityFromClientType(u8 entityType);
void sub_80856C8(struct Entity * pokemon, s32 x, s32 y);
void sub_80856E0(struct Entity * pokemon, s32 direction);
Entity *GetEntityFromClientType(u8 entityType);
void sub_80856C8(Entity * pokemon, s32 x, s32 y);
void sub_80856E0(Entity * pokemon, s32 direction);
void sub_8085764(void);
void sub_8085860(s32 x, s32 y);
void sub_8085890(s32 x, s32 y);
void ShiftCameraToPosition(struct Position32 *posStruct, s32 cameraSteps);
void SetFacingDirection(struct Entity *pokemon, s32 direction);
void ShiftCameraToPosition(Position32 *posStruct, s32 cameraSteps);
void SetFacingDirection(Entity *pokemon, s32 direction);
void sub_8085930(s32 direction);
void sub_80859F0(s32 direction);
bool8 IsMovingClient(struct Entity *entity);
void sub_8085B0C(struct Entity *pokemon);
bool8 IsMovingClient(Entity *entity);
void sub_8085B0C(Entity *pokemon);
#endif

View File

@ -3,10 +3,10 @@
#include "dungeon_entity.h"
bool8 CanSeeTarget(struct Entity *entity, struct Entity *targetEntity);
bool8 CanTargetEntity(struct Entity *entity, struct Entity *targetEntity);
bool8 sub_8045A70(struct Entity *entity, struct Entity *targetEntity);
bool8 sub_8045AAC(struct Entity *entity, struct Position *pos);
bool8 CanTargetPosition(struct Entity *entity, struct Position *pos);
bool8 CanSeeTarget(Entity *entity, Entity *targetEntity);
bool8 CanTargetEntity(Entity *entity, Entity *targetEntity);
bool8 sub_8045A70(Entity *entity, Entity *targetEntity);
bool8 sub_8045AAC(Entity *entity, Position *pos);
bool8 CanTargetPosition(Entity *entity, Position *pos);
#endif

View File

@ -13,7 +13,7 @@ struct FelicityBankWork
/* 0x8 */ u32 fallbackState;
/* 0xC */ u32 chosenAmount;
/* 0x10 */ u32 menuAction;
struct MenuItem unk14[8];
MenuItem unk14[8];
u16 unk54[8];
u32 unk64;
s32 unk68;
@ -21,11 +21,11 @@ struct FelicityBankWork
/* 0x70 */ s32 maximumDepositWithdraw;
s32 unk74;
u32 unk78;
struct UnkTextStruct2 *unk7C;
UnkTextStruct2 *unk7C;
s32 unk80;
s32 unk84;
u8 fill88[0x94 - 0x88];
/* 0x94 */ struct OpenedFile *faceFile;
/* 0x94 */ OpenedFile *faceFile;
/* 0x98 */ u8 *faceData;
u16 unk9C;
u16 unk9E;
@ -33,8 +33,8 @@ struct FelicityBankWork
u8 unkA1;
u8 unkA2;
u8 unkA3;
struct OpenedFile **unkA4;
struct UnkTextStruct2 unkA8[4];
OpenedFile **unkA4;
UnkTextStruct2 unkA8[4];
};
extern struct FelicityBankWork *gFelicityBankWork;

View File

@ -2,48 +2,48 @@
#define GUARD_FILE_SYSTEM_H
// size: 0x8
struct File
typedef struct File
{
/* 0x0 */ char *name;
/* 0x4 */ u8 *data;
};
} File;
// size: 0x8
struct OpenedFile
typedef struct OpenedFile
{
/* 0x0 */ struct File *file;
/* 0x0 */ File *file;
/* 0x4 */ u8 *data;
};
} OpenedFile;
// size: 0x10
struct FileArchive
typedef struct FileArchive
{
/* 0x0 */ char magic[8];
/* 0x8 */ s32 count;
/* 0xC */ struct File *entries;
};
/* 0xC */ File *entries;
} FileArchive;
// size: 0x8
struct SiroArchive
typedef struct SiroArchive
{
/* 0x0 */ u32 magic;
/* 0x4 */ u8 *data;
};
} SiroArchive;
// size: 0x8
struct UnkFileStruct1
typedef struct UnkFileStruct1
{
u32 unk0;
u32 unk4;
};
/* 0x0 */ u32 unk0;
/* 0x4 */ u32 unk4;
} UnkFileStruct1;
void InitFileSystem(void);
struct OpenedFile *OpenFile(const char *filename, const struct FileArchive *arc);
u8 *GetFileDataPtr(struct OpenedFile *openedFile, int unused);
struct OpenedFile *OpenFileAndGetFileDataPtr(const char *filename, const struct FileArchive *arc);
struct OpenedFile *Call_OpenFileAndGetFileDataPtr(const char *filename, const struct FileArchive *arc);
u32 DecompressATFile(char *result, s32 resultLength, struct OpenedFile *file);
void CloseFile(struct OpenedFile *openedFile);
u32 DecompressATGlobalFile(u32 *result, s32 resultLength, struct OpenedFile *file);
OpenedFile *OpenFile(const u8 *, const FileArchive *);
u8 *GetFileDataPtr(OpenedFile *, s32);
OpenedFile *OpenFileAndGetFileDataPtr(const u8 *, const FileArchive *);
OpenedFile *Call_OpenFileAndGetFileDataPtr(const u8 *, const FileArchive *);
u32 DecompressATFile(u8 *, s32, OpenedFile *);
void CloseFile(OpenedFile *);
u32 DecompressATGlobalFile(u32 *, s32, OpenedFile *);
#endif //GUARD_FILE_SYSTEM_H

View File

@ -1,21 +1,23 @@
#ifndef GUARD_FRIEND_AREA_H
#define GUARD_FRIEND_AREA_H
struct FriendAreaSettings
// size: 0x8
typedef struct FriendAreaSettings
{
s16 num_pokemon;
u16 unlock_condition;
u32 price;
};
/* 0x0 */ s16 num_pokemon;
/* 0x2 */ u16 unlock_condition;
/* 0x4 */ u32 price;
} FriendAreaSettings;
struct unkStruct_8092638
// size: 0xC
typedef struct unkStruct_8092638
{
/* 0x0 */ s16 numPokemon;
s16 unk2;
/* 0x4 */ bool8 hasFriendArea;
u8 fill5[3];
s32 unk8;
};
} unkStruct_8092638;
extern bool8 *gFriendAreas;
@ -33,9 +35,9 @@ s32 GetFriendAreaPrice(u8 index);
void sub_8092578(u8 *buffer, u8 index, bool8 printPrice);
const char *GetFriendAreaName(u8 index);
void sub_809249C(u8 friendArea, u8 clear);
void sub_8092638(u8 friendArea, struct unkStruct_8092638 *param_2, bool8 checkLeader, bool8 checkDungeon);
void sub_8092638(u8 friendArea, unkStruct_8092638 *param_2, bool8 checkLeader, bool8 checkDungeon);
u32 SaveFriendAreas(u8 *r0, u32 r1);
u32 ReadSavedFriendAreas(u8 *r0, s32 r1);
#endif
#endif // GUARD_FRIEND_AREA_H

View File

@ -10,9 +10,9 @@ struct unkStruct_203B2BC
s16 targetPoke;
u16 unkA;
u32 id;
struct BulkItem itemToGive;
struct BulkItem item2;
struct PokemonStruct *pokeStruct;
BulkItem itemToGive;
BulkItem item2;
PokemonStruct1 *pokeStruct;
bool8 isTeamLeader;
u32 moveIndex; // some sort of move index
u16 moveID;
@ -21,14 +21,14 @@ struct unkStruct_203B2BC
u32 menuAction1;
u32 menuAction2;
u32 menuAction3;
struct MenuStruct unk7C;
MenuStruct unk7C;
u8 fill80[0xFD - 0xCC];
u32 unkFD;
u8 fill101[0x11C - 0x104];
struct MenuItem menuItems[4];
MenuItem menuItems[4];
u8 fill120[0x16C - 0x13C];
u16 unk16C[10];
struct UnkTextStruct2 unk180[4];
UnkTextStruct2 unk180[4];
};
enum FriendAreaActionMenuStates {

View File

@ -2,7 +2,7 @@
#define GUARD_FRIEND_RESCUE_H
#include "code_8094F88.h"
#include "item.h"
#include "items.h"
#include "pokemon.h"
#include "wonder_mail.h"
#include "menu.h"
@ -22,10 +22,10 @@ struct WonderMailStruct_203B33C
struct unkStruct_203B480 unk1B8;
struct unkStruct_203B480 unk1E8;
u8 unk218;
struct MenuStruct unk21C[4];
struct UnkTextStruct2 unk35C[4];
struct UnkTextStruct2 unk3BC[4];
/* 0x41C */ struct Item item;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
UnkTextStruct2 unk3BC[4];
/* 0x41C */ Item item;
u32 unk420; // Is this supposed to be a File like 203B2C4?
u8 unk424[0x100];
s32 unk524;

View File

@ -1,6 +1,15 @@
#ifndef GUARD_GROUND_MAP_1_H
#define GUARD_GROUND_MAP_1_H
typedef struct unkStruct_811BAF4
{
s16 unk0;
s16 unk2;
s16 unk4;
s16 unk6;
u8 *text;
} unkStruct_811BAF4;
bool8 sub_80A4D48(s16);
#endif // GUARD_GROUND_MAP_1_H

View File

@ -1,13 +1,16 @@
struct GroundScript_ExecutePP_3
#ifndef GUARD_GROUND_SCRIPT_H
#define GUARD_GROUND_SCRIPT_H
typedef struct GroundScript_ExecutePP_3
{
// size: 0xC
u8 *scriptPointer;
s16 scriptType;
s16 unk6;
u8 unk8;
};
} GroundScript_ExecutePP_3;
struct GroundScript_ExecutePP_1_sub
typedef struct __attribute__((packed)) GroundScript_ExecutePP_1_sub
{
// size: 0x60
/* 0x0 */ s16 scriptType;
@ -24,25 +27,28 @@ struct GroundScript_ExecutePP_1_sub
/* 0x24 */ u16 unk24;
/* 0x26 */ u32 unk26;
u8 fill50[0x60 - 0x2A];
} __attribute__((packed));
} GroundScript_ExecutePP_1_sub;
typedef void (*Callback)(u32, void *);
struct GroundScript_ExecutePP_1_sub2
typedef struct GroundScript_ExecutePP_1_sub2
{
Callback callbacks[10]; // IDK the size..
};
} GroundScript_ExecutePP_1_sub2;
// size: 0x110
struct GroundScript_ExecutePP_1
typedef struct GroundScript_ExecutePP_1
{
struct GroundScript_ExecutePP_1_sub2 *unk0;
GroundScript_ExecutePP_1_sub2 *unk0;
u32 unk4;
u32 fill8;
u32 unkC;
u16 unk10;
u8 unk12;
u8 *unk14[4];
struct GroundScript_ExecutePP_1_sub unk24;
struct GroundScript_ExecutePP_1_sub unk84;
GroundScript_ExecutePP_1_sub unk24;
GroundScript_ExecutePP_1_sub unk84;
u16 unkE4;
};
u8 fillE8[0x110 - 0xE8];
} GroundScript_ExecutePP_1;
#endif // GUARD_GROUND_SCRIPT_H

View File

@ -20,11 +20,11 @@ struct GulpinShopWork
u16 unk1E;
u32 unk20;
u32 unk24;
struct MenuItem unk28[8];
MenuItem unk28[8];
u16 unk68[8];
struct MenuStruct unk78;
MenuStruct unk78;
u8 fillC8[0x118 - 0xC8];
/* 0x118 */ struct OpenedFile *faceFile;
/* 0x118 */ OpenedFile *faceFile;
/* 0x11C */ u8 *faceData;
u16 unk120;
u16 unk122;
@ -32,8 +32,8 @@ struct GulpinShopWork
u8 unk125;
u8 unk126;
u8 unk127;
struct OpenedFile **unk128;
struct UnkTextStruct2 unk12C[4];
OpenedFile **unk128;
UnkTextStruct2 unk12C[4];
};
u32 CreateGulpinShop(s32 isAsleep, s16 pokeSpecies, struct Move *moves);

View File

@ -2,7 +2,7 @@
#define GUARD_INPUT_H
// size: 0x10
struct Inputs
typedef struct Inputs
{
/* 0x0 */ u16 held;
/* 0x2 */ u16 pressed;
@ -10,21 +10,19 @@ struct Inputs
/* 0x6 */ u16 shortPress;
/* 0x8 */ u16 heldDpad;
/* 0xC */ s32 repeatTimerDpad;
};
extern struct Inputs gRealInputs;
} Inputs;
// size: 0x8
struct InputTimers
typedef struct InputTimers
{
/* 0x0 */ s16 holdTimerB;
/* 0x2 */ s16 holdTimerR;
u16 unk4;
u16 unk6;
};
} InputTimers;
// size: 0x2C
struct UnusedInputStruct
typedef struct UnusedInputStruct
{
u16 unk0;
u16 unk2;
@ -47,10 +45,10 @@ struct UnusedInputStruct
u16 unk26;
u8 unk28;
u8 unk29;
};
} UnusedInputStruct;
// size: 0xC
struct MenuInputStructSub
typedef struct MenuInputStructSub
{
u8 unk0;
/* 0x1 */ u8 a_button;
@ -60,20 +58,20 @@ struct MenuInputStructSub
u8 fill5[3];
u16 unk8;
s16 unkA;
};
} MenuInputStructSub;
// size: 0x34
struct MenuInputStruct
typedef struct MenuInputStruct
{
s32 unk0;
u16 unk4;
s16 unk6;
s16 unk8; // Maybe struct Position
s16 unk8; // Maybe Position
s16 unkA;
s16 unkC; // Maybe struct Position
s16 unkC; // Maybe Position
s16 unkE;
u32 unk10;
s16 unk14; // Maybe struct Position
s16 unk14; // Maybe Position
s16 unk16;
/* 0x18 */ s16 menuIndex;
s16 unk1A;
@ -83,21 +81,19 @@ struct MenuInputStruct
s16 unk22;
u16 unk24;
u16 unk26;
struct MenuInputStructSub unk28;
};
MenuInputStructSub unk28;
} MenuInputStruct;
extern Inputs gRealInputs;
void InitInput(void);
void LoadBufferedInputs(void);
u8 sub_80048B8(void);
u8 sub_80048BC(void);
u8 sub_80048C0(void);
u8 sub_80048C4(void);
u8 sub_80048C8(void);
u8 sub_80048CC(void);
void ResetRepeatTimers(void);
void UnpressButtons(void);
void ResetUnusedInputStruct(void);
void UnpressButtons(void);
void UpdateInput(void);
#endif // GUARD_INPUT_H
bool8 sub_80048BC(void);
bool8 sub_80048C8(void);
#endif // GUARD_INPUT_H

View File

@ -5,7 +5,7 @@
#include "code_8092334.h"
// size: 0x20
struct ItemDataEntry
typedef struct ItemDataEntry
{
/* 0x0 */ u8 *name;
/* 0x4 */ u32 buyPrice;
@ -23,39 +23,50 @@ struct ItemDataEntry
/* 0x1B */ u8 spawnAmountRange[2];
/* 0x1D */ u8 palette;
/* 0x1E */ u8 actionType;
};
} ItemDataEntry;
// size: 0x4
struct Item
typedef struct Item
{
/* 0x0 */ u8 flags;
/* 0x1 */ u8 quantity;
/* 0x2 */ u8 id;
};
} Item;
// size: 0x4
struct BulkItem
typedef struct BulkItem
{
/* 0x0 */ u8 id;
/* 0x1 */ u8 quantity;
};
} BulkItem;
// size: 0x4
struct Gummi
typedef struct Gummi
{
/* 0x0 */ s16 boostAmount;
/* 0x2 */ u16 flags;
};
} Gummi;
// size: 0xC
struct unkStruct_8090F58
typedef struct unkStruct_8090F58
{
u32 unk0;
u8 unk4;
u8 unk5;
s16 unk6;
u8 unk8;
};
} unkStruct_8090F58;
// size: 0x268
typedef struct TeamInventory
{
/* 0x0 */ Item teamItems[INVENTORY_SIZE];
/* 0x50 */ u16 teamStorage[STORAGE_SIZE];
/* 0x230 */ BulkItem kecleonShopItems[MAX_KECLEON_ITEM_SHOP_ITEMS];
/* 0x250 */ BulkItem kecleonWareItems[MAX_KECLEON_WARE_SHOP_ITEMS];
/* 0x260 */ s32 teamMoney;
/* 0x264 */ s32 teamSavings;
} TeamInventory;
enum ItemFlag
{
@ -73,27 +84,22 @@ enum ItemAIFlag
ITEM_AI_FLAG_TARGET_ENEMY
};
#define NUMBER_OF_GUMMIS 18
#define INVENTORY_SIZE 20
#define STORAGE_SIZE NUMBER_OF_ITEM_IDS
#define MIN_SPAWN_AMOUNT 0
#define MAX_SPAWN_AMOUNT 1
extern TeamInventory *gTeamInventoryRef;
void LoadItemParameters(void);
struct TeamInventory *GetMoneyItemsInfo(void);
TeamInventory *GetMoneyItemsInfo(void);
void InitializeMoneyItems(void);
s32 GetNumberOfFilledInventorySlots(void);
bool8 IsThrowableItem(u8 id);
void xxx_init_itemslot_8090A8C(struct Item *param_1,u8 id,u8 param_3);
void xxx_init_helditem_8090B08(struct BulkItem *param_1,u8 id);
void HeldItemToSlot(struct Item *param_1, struct BulkItem *param_2);
void SlotToHeldItem(struct BulkItem *held,struct Item *slot);
void xxx_init_itemslot_8090A8C(Item *param_1,u8 id,u8 param_3);
void xxx_init_helditem_8090B08(BulkItem *param_1,u8 id);
void HeldItemToSlot(Item *param_1, BulkItem *param_2);
void SlotToHeldItem(BulkItem *held, Item *slot);
u8 GetItemCategory(u8 index);
s32 GetStackBuyValue(struct Item *param_1);
s32 GetStackSellValue(struct Item *param_1);
s32 GetStackBuyPrice(struct Item *param_1);
s32 GetStackSellPrice(struct Item *param_1);
s32 GetStackBuyValue(Item *param_1);
s32 GetStackSellValue(Item *param_1);
s32 GetStackBuyPrice(Item *param_1);
s32 GetStackSellPrice(Item *param_1);
s32 GetItemBuyPrice(u8 id);
s32 GetItemSellPrice(u8 id);
s32 GetItemOrder(u8 id);
@ -102,35 +108,35 @@ u32 GetItemActionType(u8 id);
u32 GetSpawnAmountRange(u8 id, u32 r1);
u8 *GetItemDescription(u8 id);
bool8 GetItemAIFlag(u8 id, u32 r1);
void sub_8090DC4(void* param_1,u8 id, struct unkStruct_8090F58* param_3);
void sub_8090E14(u8* ext_buffer, struct Item* slot, struct unkStruct_8090F58* a3);
bool8 AddItemToInventory(const struct Item* slot);
void sub_8090DC4(void *param_1, u8 id, unkStruct_8090F58 *);
void sub_8090E14(u8 *ext_buffer, Item *slot, unkStruct_8090F58 *);
bool8 AddItemToInventory(const Item* slot);
void ConvertMoneyItemToMoney();
void AddToTeamMoney(s32 amount);
u32 GetMoneyValue(struct Item* slot);
u32 GetMoneyValue(Item* slot);
u16 GetItemMoveID(u8 index);
bool8 CanSellItem(u32 id);
bool8 IsGummiItem(u8);
void sub_8090F58(void*, u8 *, struct Item *, struct unkStruct_8090F58*);
void sub_8090F58(void *, u8 *, Item *, unkStruct_8090F58 *);
void ShiftItemsDownFrom(s32 start);
void ClearItemSlotAt(u32 index);
void MoveToStorage(struct Item* slot);
void MoveToStorage(Item *slot);
s32 CountKecleonShopItems(void);
void InitKecleonShopItem(u8 index);
struct BulkItem *GetKecleonShopItem(u8 index);
BulkItem *GetKecleonShopItem(u8 index);
void FillKecleonShopGaps(void);
void SortKecleonShopInventory(void);
void ChooseKecleonShopInventory(u8 index);
bool8 AddKecleonShopItem(u8 itemIndex);
u32 CountKecleonWareItems(void);
void InitKecleonWareItem(u8 index);
struct BulkItem* GetKecleonWareItem(u8 index);
BulkItem* GetKecleonWareItem(u8 index);
void FillKecleonWareGaps(void);
void SortKecleonWareInventory(void);
void ChooseKecleonWareInventory(u8 index);
bool8 AddKecleonWareItem(u8 itemIndex);
void FillInventoryGaps();
bool8 AddHeldItemToInventory(struct BulkItem* slot);
bool8 AddHeldItemToInventory(BulkItem* slot);
bool8 IsNotMoneyOrUsedTMItem(u8 id);
s32 FindItemInInventory(u8 id);
bool8 IsHMItem(u8 id);
@ -138,11 +144,11 @@ bool8 IsEdibleItem(u8 id);
u8 xxx_bit_lut_lookup_8091E50(u8 i0, u8 i1);
bool8 IsInvalidItemReward(u8 itemID);
void RestoreHeldItem(struct unkStruct_8094924*, struct BulkItem*);
void SaveHeldItem(struct unkStruct_8094924*, struct BulkItem*);
void RestoreItemSlot(struct unkStruct_8094924 *a1, struct Item *a2);
void SaveItemSlot(struct unkStruct_8094924 *a1, struct Item *a2);
s32 RestoreTeamInventory(u8 *unk0, u32 size);
s32 SaveTeamInventory(u8 *unk0, u32 size);
void RestoreHeldItem(unkStruct_8094924 *, BulkItem *);
void SaveHeldItem(unkStruct_8094924 *, BulkItem *);
void RestoreItemSlot(unkStruct_8094924 *, Item *);
void SaveItemSlot(unkStruct_8094924 *, Item *);
s32 RestoreTeamInventory(u8 *, u32);
s32 SaveTeamInventory(u8 *, u32);
#endif

View File

@ -2,7 +2,7 @@
#define GUARD_KANGASKHAN_STORAGE_H
#include "file_system.h"
#include "item.h"
#include "items.h"
#include "menu.h"
#include "text.h"
@ -12,27 +12,27 @@ struct KangaskhanStorageWork
/* 0x0 */ bool32 isAsleep;
/* 0x4 */ u32 currState;
/* 0x8 */ u32 fallbackState;
/* 0xC */ struct Item storedItem;
/* 0xC */ Item storedItem;
/* 0x10 */ u32 itemIndex;
/* 0x14 */ u8 id; // another id?
/* 0x18 */ u32 menuAction1;
/* 0x1C */ u32 menuAction2;
/* 0x20 */ u32 menuAction3;
struct MenuItem unk24[5];
MenuItem unk24[5];
u16 unk4C[5];
struct MenuStruct unk58;
MenuStruct unk58;
u32 unkA8;
u32 unkAC;
u32 unkB0;
u32 unkB4;
u32 unkB8;
u32 unkBC;
struct UnkTextStruct2 *unkC0;
UnkTextStruct2 *unkC0;
u32 unkC4;
u32 unkC8;
u8 unkCC[0xD4 - 0xCC];
u32 unkD4;
/* 0xD8 */ struct OpenedFile *faceFile;
/* 0xD8 */ OpenedFile *faceFile;
/* 0xDC */ u8 *faceData;
u16 unkE0;
u16 unkE2;
@ -40,8 +40,8 @@ struct KangaskhanStorageWork
u8 unkE5;
u8 unkE6;
u8 unkE7;
struct OpenedFile **unkE8;
struct UnkTextStruct2 unkEC[4];
OpenedFile **unkE8;
UnkTextStruct2 unkEC[4];
};
// size: 0x150
@ -49,26 +49,26 @@ struct unkStruct_203B20C
{
/* 0x0 */ u32 state;
u8 unk4[4];
/* 0x8 */ struct Item item;
/* 0x8 */ Item item;
/* 0xC */ u32 itemIndex;
/* 0x10 */ u8 id;
/* 0x14 */ u32 menuAction1;
/* 0x18 */ u32 menuAction2;
/* 0x1C */ u32 menuAction3;
struct MenuItem unk20[8];
MenuItem unk20[8];
u16 unk60[8];
struct MenuStruct unk70;
MenuStruct unk70;
u32 unkC0;
u32 unkC4;
u32 unkC8;
u32 unkCC;
u32 unkD0;
u32 unkD4;
struct UnkTextStruct2 *unkD8;
UnkTextStruct2 *unkD8;
u32 unkDC;
u32 unkE0;
u8 fillE4[0xF0 - 0xE4];
struct UnkTextStruct2 unkF0[4];
UnkTextStruct2 unkF0[4];
};
enum KangaskhanStorageStates

View File

@ -2,7 +2,7 @@
#define GUARD_KECLEON_BROS_H
#include "file_system.h"
#include "item.h"
#include "items.h"
#include "menu.h"
#include "text.h"
@ -16,17 +16,17 @@ struct KecleonBrosWork
/* 0x10 */ s32 itemSellPrice;
/* 0x14 */ u32 numInventoryItemToSell;
/* 0x18 */ s32 inventoryItemSellPrice;
/* 0x1C */ struct Item soldItem;
/* 0x1C */ Item soldItem;
/* 0x20 */ u8 itemShopItemIndex;
/* 0x21 */ u8 wareShopItemIndex;
/* 0x24 */ u32 soldItemInventoryIndex;
/* 0x28 */ u32 menuAction1;
/* 0x2C */ u32 menuAction2;
/* 0x30 */ u32 menuAction3;
/* 0x34 */ struct MenuItem menuItems[8];
/* 0x34 */ MenuItem menuItems[8];
u16 unk74[8];
/* 0x84 */ struct MenuStruct menu;
/* 0xD4 */ struct OpenedFile *faceFile;
/* 0x84 */ MenuStruct menu;
/* 0xD4 */ OpenedFile *faceFile;
/* 0xD8 */ u8 *faceData;
u16 unkDC;
u16 unkDE;
@ -34,17 +34,17 @@ struct KecleonBrosWork
u8 unkE1;
u8 unkE2;
u8 unkE3;
struct OpenedFile **unkE4;
struct UnkTextStruct2 unkE8[4];
OpenedFile **unkE4;
UnkTextStruct2 unkE8[4];
};
// size: 0xA0
struct unkStruct_203B214
{
/* 0x0 */ struct MenuInputStruct input;
/* 0x0 */ MenuInputStruct input;
u32 unk34;
struct UnkTextStruct2 *unk38;
struct UnkTextStruct2 unk3C[4];
UnkTextStruct2 *unk38;
UnkTextStruct2 unk3C[4];
u8 unk9C[4];
};
@ -53,10 +53,10 @@ struct unkStruct_203B224
{
u32 unk0;
u32 unk4[INVENTORY_SIZE];
/* 0x54 */ struct MenuInputStruct input;
/* 0x54 */ MenuInputStruct input;
u32 unk88;
struct UnkTextStruct2 *unk8C;
struct UnkTextStruct2 unk90[4];
UnkTextStruct2 *unk8C;
UnkTextStruct2 unk90[4];
u8 unkF0[4];
};
@ -87,7 +87,7 @@ u32 CreateKecleonBros(u32 mode);
void DeleteKecleonBros(void);
u32 KecleonBrosCallback(void);
bool32 sub_801A5D8(u32, s32, struct UnkTextStruct2_sub *, u32);
bool32 sub_801A5D8(u32, s32, UnkTextStruct2_sub *, u32);
u32 sub_801A6E8(bool8);
s32 sub_801A8AC(void);
void sub_801A8D0(u8);

View File

@ -2,7 +2,7 @@
#define GUARD_LUMINOUS_CAVE_H
#include "file_system.h"
#include "item.h"
#include "items.h"
#include "menu.h"
#include "pokemon_3.h"
#include "text.h"
@ -11,29 +11,29 @@ struct unkStruct_203B2B0
{
// size: 0x174
bool8 evolutionComplete;
struct EvolveStatus evolveStatus;
struct PokemonStruct *pokeStruct;
EvolveStatus evolveStatus;
PokemonStruct1 *pokeStruct;
/* 0x10 */ bool8 pokeRenamed;
/* 0x14 */ u32 evoItem1_InvIndex; // inventory index of item
/* 0x18 */ u32 evoItem2_InvIndex; // inventory index of item
struct Item chosenItem;
Item chosenItem;
u32 state;
u32 fallbackState;
u32 menuAction1;
u32 menuAction2;
u32 menuAction3;
struct MenuItem unk34[8];
MenuItem unk34[8];
u16 unk74[0x8];
struct MenuStruct unk84;
MenuStruct unk84;
u8 fillD4[0x104 - 0xD4];
struct OpenedFile *unk104;
OpenedFile *unk104;
u8 *unk108;
u16 unk10C;
u16 unk10E;
u8 unk110;
u8 unk111;
u8 unk112;
struct UnkTextStruct2 unk114[4];
UnkTextStruct2 unk114[4];
};
#endif // GUARD_LUMINOUS_CAVE_H

View File

@ -16,10 +16,10 @@ struct unkStruct_203B304
struct unkStruct_802C39C unkC;
u32 menuAction1;
u32 menuAction2;
struct MenuStruct unk6C;
struct MenuItem menuItems[8];
MenuStruct unk6C;
MenuItem menuItems[8];
u16 unkFC[8];
struct UnkTextStruct2 unk10C[4];
UnkTextStruct2 unk10C[4];
};
extern void SetMailboxState(u32);

View File

@ -73,10 +73,10 @@ void CleanUpMenu(void);
void DeleteMainMenu(void);
struct MainMenu *GetMainMenu(void);
void InitMainMenu(void);
void SetMenuItems(struct MenuStruct *, struct UnkTextStruct2 *, s32, const struct UnkTextStruct2 *, const struct MenuItem *, u8, u32, u32);
void SetMenuItems(MenuStruct *, UnkTextStruct2 *, s32, const UnkTextStruct2 *, const MenuItem *, u8, u32, u32);
void SetUpMenu(void);
void sub_8035CC0(struct UnkTextStruct2 *, u32);
void sub_8035CF4(struct MenuStruct*, u32, bool8);
void sub_8035CC0(UnkTextStruct2 *, u32);
void sub_8035CF4(MenuStruct*, u32, bool8);
struct unkStruct_8035D94 *sub_8035D94(void);
void sub_8035DA0(void);
bool8 sub_80363E0(void);

View File

@ -16,9 +16,9 @@ struct unkStruct_203B318
/* 0xC */ s32 fallbackState;
s16 unk10;
/* 0x14 */ s32 menuAction;
struct MenuItem unk18[4];
MenuItem unk18[4];
u8 fill38[0x58 - 0x38];
/* 0x58 */ struct OpenedFile *faceFile;
/* 0x58 */ OpenedFile *faceFile;
/* 0x5C */ u8 *faceData;
u16 unk60;
u16 unk62;
@ -26,18 +26,18 @@ struct unkStruct_203B318
u8 unk65;
u8 unk66;
u8 unk67;
struct OpenedFile** unk68;
struct UnkTextStruct2 unk6C[4];
OpenedFile** unk68;
UnkTextStruct2 unk6C[4];
};
// size: 0xD0
struct unkStruct_203B31C
{
s16 unk0[NUM_DUNGEON_MAZE];
/* 0x30 */ struct MenuInputStruct input;
/* 0x30 */ MenuInputStruct input;
u32 unk64;
struct UnkTextStruct2 *unk68;
struct UnkTextStruct2 unk6C[4];
UnkTextStruct2 *unk68;
UnkTextStruct2 unk6C[4];
u8 unkCC[4];
};
@ -47,7 +47,7 @@ void MakuhitaDojo_Delete(void);
u32 sub_802FE58(void);
s16 sub_802FED0(void);
bool8 sub_80302E8(s32, struct UnkTextStruct2_sub *, u32);
bool8 sub_80302E8(s32, UnkTextStruct2_sub *, u32);
u32 sub_80303AC(bool8);
s16 sub_8030418(void);
void sub_8030480(void);

View File

@ -17,7 +17,7 @@ enum TerrainType
TERRAIN_TYPE_SHOP = 1 << 5,
TERRAIN_TYPE_IN_MONSTER_HOUSE = 1 << 6,
TERRAIN_TYPE_UNK_8 = 1 << 8,
TERRAIN_TYPE_STAIRS = 1 << 9
TERRAIN_TYPE_STAIRS = 1 << 9,
};
enum CrossableTerrain
@ -30,7 +30,7 @@ enum CrossableTerrain
};
// size: 0x18
struct Tile
typedef struct Tile
{
// Uses the TerrainType bit flags.
/* 0x0 */ u16 terrainType;
@ -43,12 +43,12 @@ struct Tile
// Different sets of flags are used for Pokémon that can cross special terrain, corresponding to the CrossableTerrain enum.
/* 0xA */ u8 walkableNeighborFlags[NUM_CROSSABLE_TERRAIN];
u8 fillE[0x10 - 0xE];
/* 0x10 */ struct Entity *monster; // Pokémon on the tile.
/* 0x14 */ struct Entity *object; // Item or trap on the tile.
};
/* 0x10 */ Entity *monster; // Pokémon on the tile.
/* 0x14 */ Entity *object; // Item or trap on the tile.
} Tile;
// size: 0x1C
struct RoomData
typedef struct RoomData
{
u8 unk0;
u8 unk1;
@ -63,6 +63,6 @@ struct RoomData
u32 unk10; // bottom right y
u32 unk14; // top left x
u32 unk18; // top left y
};
} RoomData;
#endif
#endif // GUARD_MAP_H

View File

@ -4,25 +4,25 @@
#include "input.h"
// size: 0x8
struct MenuItem
typedef struct MenuItem
{
const u8 *text;
s32 menuAction; // action??
};
} MenuItem;
// size: 0x50
struct MenuStruct
typedef struct MenuStruct
{
const u8 *unk0; // header text?
/* 0x4 */ const struct MenuItem *menuItems;
/* 0x4 */ const MenuItem *menuItems;
const u32 *menuTextColorArray;
u16 *unkC;
/* 0x10 */ s32 index;
/* 0x14 */ struct MenuInputStruct input;
/* 0x14 */ MenuInputStruct input;
/* 0x48 */ s32 menuAction;
bool8 unk4C;
bool8 unk4D;
bool8 unk4E;
};
} MenuStruct;
#endif // GUARD_MENU_H

View File

@ -4,43 +4,43 @@
#include "menu.h"
#include "text.h"
u32 sub_8012A64(struct MenuInputStructSub *r0, s32 r1);
s32 GetKeyPress(struct MenuInputStruct *r0);
u32 sub_8012A64(MenuInputStructSub *r0, s32 r1);
s32 GetKeyPress(MenuInputStruct *r0);
s32 sub_8012AE8(void);
void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 param_6);
void sub_8012C60(u32 x, u32 y, u32 param_3, u32 color, u32 param_5);
void sub_8012CAC(struct UnkTextStruct2 *param_1, const struct MenuItem *param_2);
void sub_8012D08(struct UnkTextStruct2 *param_1, s32 param_2);
void sub_8012D34(struct UnkTextStruct2 *param_1, s32 param_2);
void sub_8012D60(struct MenuStruct *param_1, const struct MenuItem *menuItems, u32 *colorArray, u16 *param_4, s32 menuAction, s32 index);
void sub_8012E04(struct MenuStruct *param_1, const struct MenuItem *menuItems, u32 *colorArray, u16 *param_4, s32 menuAction, s32 index);
void sub_8012EA4(struct MenuStruct *param_1, bool8 r1);
void sub_8012EBC(struct MenuStruct *param_1);
bool8 sub_8012FD8(struct MenuStruct *param_1);
bool8 sub_80130A8(struct MenuStruct *param_1);
bool8 sub_8013114(struct MenuStruct *param_1, s32 *menuAction);
void sub_801317C(struct MenuInputStructSub *param_1);
void AddMenuCursorSprite(struct MenuInputStruct *param_1);
void sub_8013660(struct MenuInputStruct *param_1);
void UpdateMenuCursorSpriteCoords(struct MenuInputStruct *param_1);
void MoveMenuCursorDown(struct MenuInputStruct *param_1);
void sub_80136E0(struct MenuInputStruct *param_1, u8 param_2);
void MoveMenuCursorUp(struct MenuInputStruct *param_1);
void sub_8013744(struct MenuInputStruct *param_1, u8 param_2);
void sub_8013780(struct MenuInputStruct *param_1, s32 param_2);
s32 sub_80137A8(struct MenuInputStruct *param_1);
void sub_80137B0(struct MenuInputStruct *param_1, s32 param_2);
void sub_80137F8(struct MenuInputStruct *param_1, u32 param_2);
s32 sub_8013800(struct MenuInputStruct *param_1, s32 param_2);
void sub_8013818(struct MenuInputStruct *param_1, s32 param_2, u32 param_3, s32 param_4);
void sub_8013848(struct MenuInputStruct *param_1, s32 param_2, u32 param_3, s32 param_4);
void sub_8013878(struct MenuInputStruct *param_1, s32 param_2);
bool8 sub_80138B8(struct MenuInputStruct *param_1, bool8 param_2);
bool8 sub_8013938(struct MenuInputStruct *param_1);
void sub_8013984(struct MenuInputStruct * param_1);
void sub_8013A54(struct MenuInputStruct *param_1);
void sub_8013A7C(struct MenuInputStruct *param_1);
void AddMenuCursorSprite_(struct MenuInputStruct *, u32);
void nullsub_34(struct MenuInputStructSub *);
void sub_8012CAC(UnkTextStruct2 *param_1, const MenuItem *param_2);
void sub_8012D08(UnkTextStruct2 *param_1, s32 param_2);
void sub_8012D34(UnkTextStruct2 *param_1, s32 param_2);
void sub_8012D60(MenuStruct *param_1, const MenuItem *menuItems, u32 *colorArray, u16 *param_4, s32 menuAction, s32 index);
void sub_8012E04(MenuStruct *param_1, const MenuItem *menuItems, u32 *colorArray, u16 *param_4, s32 menuAction, s32 index);
void sub_8012EA4(MenuStruct *param_1, bool8 r1);
void sub_8012EBC(MenuStruct *param_1);
bool8 sub_8012FD8(MenuStruct *param_1);
bool8 sub_80130A8(MenuStruct *param_1);
bool8 sub_8013114(MenuStruct *param_1, s32 *menuAction);
void sub_801317C(MenuInputStructSub *param_1);
void AddMenuCursorSprite(MenuInputStruct *param_1);
void sub_8013660(MenuInputStruct *param_1);
void UpdateMenuCursorSpriteCoords(MenuInputStruct *param_1);
void MoveMenuCursorDown(MenuInputStruct *param_1);
void sub_80136E0(MenuInputStruct *param_1, u8 param_2);
void MoveMenuCursorUp(MenuInputStruct *param_1);
void sub_8013744(MenuInputStruct *param_1, u8 param_2);
void sub_8013780(MenuInputStruct *param_1, s32 param_2);
s32 sub_80137A8(MenuInputStruct *param_1);
void sub_80137B0(MenuInputStruct *param_1, s32 param_2);
void sub_80137F8(MenuInputStruct *param_1, u32 param_2);
s32 sub_8013800(MenuInputStruct *param_1, s32 param_2);
void sub_8013818(MenuInputStruct *param_1, s32 param_2, u32 param_3, s32 param_4);
void sub_8013848(MenuInputStruct *param_1, s32 param_2, u32 param_3, s32 param_4);
void sub_8013878(MenuInputStruct *param_1, s32 param_2);
bool8 sub_80138B8(MenuInputStruct *param_1, bool8 param_2);
bool8 sub_8013938(MenuInputStruct *param_1);
void sub_8013984(MenuInputStruct * param_1);
void sub_8013A54(MenuInputStruct *param_1);
void sub_8013A7C(MenuInputStruct *param_1);
void AddMenuCursorSprite_(MenuInputStruct *, u32);
void nullsub_34(MenuInputStructSub *);
#endif // GUARD_MENU_INPUT_H

View File

@ -1,8 +1,8 @@
#ifndef GUARD_MOVE_CHECKS_H
#define GUARD_MOVE_CHECKS_H
bool8 CanUseOnSelfWithStatusChecker(struct Entity *pokemon, struct Move *move);
bool8 CanUseOnTargetWithStatusChecker(struct Entity *user, struct Entity *target, struct Move *move);
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);

View File

@ -1,28 +1,28 @@
#ifndef GUARD_MOVE_EFFECTS_TARGET_H
#define GUARD_MOVE_EFFECTS_TARGET_H
u8 sub_8075BF4(struct Entity * pokemon, s32 sleepTurns);
void sub_8075C58(struct Entity * pokemon, struct Entity * target, s32 turns, bool8 displayMessage);
bool8 CannotSleep(struct Entity * pokemon, struct Entity * target, u8 param_3, bool8 displayMessage);
void NightmareStatusTarget(struct Entity * pokemon, struct Entity * target, s32 turns);
void NappingStatusTarget(struct Entity * pokemon, struct Entity * target, s32 turns);
void YawnedStatusTarget(struct Entity * pokemon, struct Entity * target, s32 turns);
void SleeplessStatusTarget(struct Entity * pokemon, struct Entity * target);
void PausedStatusTarget(struct Entity * pokemon, struct Entity * target, u8 param_3, s32 turns, bool8 displayMessage);
void InfatuateStatusTarget(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void BurnedStatusTarget(struct Entity * pokemon, struct Entity * target, u8 param_3, bool8 displayMessage);
void PoisonedStatusTarget(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void BadlyPoisonedStatusTarget(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void FrozenStatusTarget(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void SqueezedStatusTarget(struct Entity * pokemon, struct Entity * target, s16 param_3, bool32 displayMessage);
void ImmobilizedStatusTarget(struct Entity * pokemon, struct Entity * target);
void IngrainedStatusTarget(struct Entity * pokemon, struct Entity * target);
void WrapTarget(struct Entity * pokemon, struct Entity * target);
u8 sub_8075BF4(Entity * pokemon, s32 sleepTurns);
void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, bool8 displayMessage);
bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMessage);
void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns);
void NappingStatusTarget(Entity * pokemon, Entity * target, s32 turns);
void YawnedStatusTarget(Entity * pokemon, Entity * target, s32 turns);
void SleeplessStatusTarget(Entity * pokemon, Entity * target);
void PausedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, s32 turns, bool8 displayMessage);
void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage);
void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMessage);
void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage);
void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage);
void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage);
void SqueezedStatusTarget(Entity * pokemon, Entity * target, s16 param_3, bool32 displayMessage);
void ImmobilizedStatusTarget(Entity * pokemon, Entity * target);
void IngrainedStatusTarget(Entity * pokemon, Entity * target);
void WrapTarget(Entity * pokemon, Entity * target);
void sub_8076CB4(s32 param_1);
void PetrifiedStatusTarget(struct Entity * pokemon, struct Entity * target);
void LowerAttackStageTarget(struct Entity * pokemon, struct Entity * target, s32 index, s32 decrement, u8 param_5, bool8 displayMessage);
void LowerDefenseStageTarget(struct Entity * pokemon, struct Entity * target, s32 index, s32 decrement, u8 param_5, bool8 displayMessage);
void RaiseAttackStageTarget(struct Entity * pokemon, struct Entity * target, s32 index, s32 increment);
void RaiseDefenseStageTarget(struct Entity * pokemon, struct Entity * target, s32 index, s32 increment);
void PetrifiedStatusTarget(Entity * pokemon, Entity * target);
void LowerAttackStageTarget(Entity * pokemon, Entity * target, s32 index, s32 decrement, u8 param_5, bool8 displayMessage);
void LowerDefenseStageTarget(Entity * pokemon, Entity * target, s32 index, s32 decrement, u8 param_5, bool8 displayMessage);
void RaiseAttackStageTarget(Entity * pokemon, Entity * target, s32 index, s32 increment);
void RaiseDefenseStageTarget(Entity * pokemon, Entity * target, s32 index, s32 increment);
#endif

View File

@ -3,11 +3,11 @@
#include "dungeon_entity.h"
u32 sub_8057144(struct Entity * pokemon);
bool8 sub_80571F0(struct Entity * pokemon, struct Move *move);
bool8 sub_805727C(struct Entity * pokemon, struct Entity * target, s32 chance);
bool8 sub_8057308(struct Entity *pokemon, s32 chance);
bool8 CanAIUseMove(struct Entity *pokemon, s32 moveIndex, bool8 hasPPChecker);
bool8 CanMonsterUseMove(struct Entity *pokemon, struct Move *move, bool8 hasPPChecker);
u32 sub_8057144(Entity * pokemon);
bool8 sub_80571F0(Entity * pokemon, struct 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);
#endif

View File

@ -9,10 +9,10 @@ struct unkStruct_203B308
struct unkStruct_802C39C unkC;
u32 menuAction1;
u32 menuAction2;
struct MenuStruct unk6C;
struct MenuItem menuItems[8];
MenuStruct unk6C;
MenuItem menuItems[8];
u16 unkFC[8];
struct UnkTextStruct2 unk10C[4];
UnkTextStruct2 unk10C[4];
};
extern struct unkStruct_203B308 *gPelipperBoard;

View File

@ -39,7 +39,7 @@ struct PersonalityTestTracker
/* 0x44 */ s32 NatureTotals[NUM_PERSONALITIES];
/* 0x78 */ u8 QuestionTracker[NUM_QUIZ_QUESTIONS];
/* 0xB0 */ u32 playerGender; // 1 = Female, 0 = Male
/* 0xB4 */ struct MenuInputStructSub input;
/* 0xB4 */ MenuInputStructSub input;
};
struct PersonalityStruct_203B404
@ -48,10 +48,10 @@ struct PersonalityStruct_203B404
/* 0x0 */ s16 StarterID;
/* 0x2 */ s16 PartnerArray[NUM_PARTNERS];
u8 unk16;
/* 0x18 */ struct MenuInputStruct input;
/* 0x18 */ MenuInputStruct input;
u32 unk4C;
/* 0x50 */ struct UnkTextStruct2 *unk50;
/* 0x54 */ struct UnkTextStruct2 unk54[4];
/* 0x50 */ UnkTextStruct2 *unk50;
/* 0x54 */ UnkTextStruct2 unk54[4];
/* 0xB4 */ u8 unkb4[4];
};

View File

@ -3,7 +3,7 @@
#include "dungeon_global_data.h"
#include "file_system.h"
#include "item.h"
#include "items.h"
#include "constants/move.h"
@ -11,120 +11,120 @@
#define OFFENSE_SP 1
// size: 0x4
struct Offense
typedef struct Offense
{
/* 0x0 */ u8 att[2]; // Atk, SpAtk
/* 0x2 */ u8 def[2]; // Def, SpDef
};
} Offense;
// size: 0x4
struct unkPokeSubStruct_C
typedef struct unkPokeSubStruct_C
{
u8 level;
u8 fill1[3];
};
} unkPokeSubStruct_C;
enum PokemonUnk0Flags {
FLAG_ON_TEAM = 2,
};
// size: 0x58
struct PokemonStruct
typedef struct PokemonStruct1
{
u16 unk0; // recruited??
u16 unk0; // Probably a union: Sometimes ldrh and sometimes ldrb. Recruited??
/* 0x2 */ bool8 isTeamLeader;
/* 0x3 */ u8 level;
/* 0x4 */ struct DungeonLocation dungeonLocation;
/* 0x8 */ s16 speciesNum; // species #
struct unkPokeSubStruct_C unkC[2];
/* 0x4 */ DungeonLocation dungeonLocation;
/* 0x8 */ s16 speciesNum;
unkPokeSubStruct_C unkC[2];
/* 0x14 */ s16 IQ;
/* 0x16 */ u16 pokeHP;
/* 0x18 */ struct Offense offense;
/* 0x18 */ Offense offense;
/* 0x1C */ u32 currExp;
/* 0x20 */ u32 IQSkills;
/* 0x24 */ u8 tacticIndex;
/* 0x28 */ struct BulkItem heldItem;
/* 0x2C */ struct Move moves[MAX_MON_MOVES];
/* 0x28 */ BulkItem heldItem;
/* 0x2C */ Move moves[MAX_MON_MOVES];
/* 0x4C */ u8 name[POKEMON_NAME_LENGTH];
};
} PokemonStruct1;
// size: 0x4
struct unkStruct_808E6F4
typedef struct unkStruct_808E6F4
{
s16 unk0;
u8 unk2;
};
} unkStruct_808E6F4;
// size: 0x4
struct EvolveStage
typedef struct EvolveStage
{
/* 0x0 */ s16 speciesNum;
/* 0x2 */ u8 level;
};
} EvolveStage;
// size: 0x24
struct unkStruct_8094184
typedef struct unkStruct_8094184
{
/* 0x0 */ struct Move moves[MAX_MON_MOVES];
/* 0x0 */ Move moves[MAX_MON_MOVES];
u8 unk20;
};
} unkStruct_8094184;
// size: 0x64
struct PokemonStruct2
typedef struct PokemonStruct2
{
u16 unk0; // corresponds to unk0 in PokemonStruct
u16 unk0; // corresponds to unk0 in PokemonStruct
/* 0x2 */ bool8 isTeamLeader;
/* 0x3 */ u8 level;
/* 0x4 */ struct DungeonLocation dungeonLocation;
/* 0x4 */ DungeonLocation dungeonLocation;
/* 0x8 */ u16 IQ;
s16 unkA;
u16 unkC;
/* 0xE */ s16 speciesNum;
u16 unk10; // pokeHP
u16 unk12; // pokeHP
/* 0x14 */ struct Offense offense; // offense (other offset)
u16 unk10; // pokeHP
u16 unk12; // pokeHP
/* 0x14 */ Offense offense; // offense (other offset)
/* 0x18 */ u32 currExp;
/* 0x1C */ struct unkStruct_8094184 moves;
/* 0x40 */ struct Item itemSlot; // heldItem
u32 unk44; // some struct
u32 unk48; // some struct (same type as 44)
/* 0x4C */ u32 IQSkills; // unk20
/* 0x1C */ unkStruct_8094184 moves;
/* 0x40 */ Item itemSlot; // heldItem
u32 unk44; // some struct
u32 unk48; // some struct (same type as 44)
/* 0x4C */ u32 IQSkills; // unk20
/* 0x50 */ u8 tacticIndex;
struct unkStruct_808E6F4 unk54;
/* 0x58 */ u8 name[POKEMON_NAME_LENGTH]; // name (other offset)
};
unkStruct_808E6F4 unk54;
/* 0x58 */ u8 name[POKEMON_NAME_LENGTH]; // name (other offset)
} PokemonStruct2;
// size: 0x90E8
struct unkStruct_203B45C
typedef struct unkStruct_203B45C
{
/* 0x0 */ struct PokemonStruct pokemon[NUM_MONSTERS];
/* 0x8DF8 */ struct PokemonStruct2 pokemon2[4];
/* 0x8F88 */ struct PokemonStruct team[MAX_TEAM_MEMBERS];
};
/* 0x0 */ PokemonStruct1 pokemon[NUM_MONSTERS];
/* 0x8DF8 */ PokemonStruct2 pokemon2[4];
/* 0x8F88 */ PokemonStruct1 team[MAX_TEAM_MEMBERS];
} unkStruct_203B45C;
// size: 0x4
struct PreEvolution
typedef struct PreEvolution
{
/* 0x0 */ s16 evolveFrom;
/* 0x2 */ u16 evolveType;
};
} PreEvolution;
// size: 0x4
struct EvolutionRequirements
typedef struct EvolutionRequirements
{
/* 0x0 */ s16 mainRequirement;
/* 0x2 */ u16 additionalRequirement;
};
} EvolutionRequirements;
// size: 0x8
struct unkEvolve
typedef struct unkEvolve
{
/* 0x0 */ struct PreEvolution preEvolution;
/* 0x4 */ struct EvolutionRequirements evolutionRequirements;
};
/* 0x0 */ PreEvolution preEvolution;
/* 0x4 */ EvolutionRequirements evolutionRequirements;
} unkEvolve;
// size: 0x48
struct MonsterDataEntry
typedef struct MonsterDataEntry
{
/* 0x0 */ u8* species;
/* 0x4 */ u8* category;
@ -152,16 +152,15 @@ struct MonsterDataEntry
u8 unk31; // 10 for all Pokémon.
u8 unk32; // 24 for all Pokémon.
/* 0x33 */ bool8 toolboxEnabled; // If false, the AI can't use items. Doesn't seem to be used, as it's true for all Pokémon.
/* 0x34 */ struct PreEvolution preEvolution;
/* 0x38 */ struct EvolutionRequirements evolutionRequirements;
/* 0x34 */ PreEvolution preEvolution;
/* 0x38 */ EvolutionRequirements evolutionRequirements;
/* 0x3C */ s16 dexInternal[2]; // dexNo and internalNo
/* 0x40 */ s16 recruitRate;
/* 0x42 */ s16 alphabetParent[2]; // alphabetNo and parentNo
};
} MonsterDataEntry;
// size: 0xC | https://www.pokecommunity.com/showthread.php?t=407371
struct LevelData
typedef struct LevelData
{
/* 0x0 */ s32 expRequired;
/* 0x4 */ u8 gainHP;
@ -171,26 +170,26 @@ struct LevelData
/* 0x8 */ u8 gainDef;
/* 0x9 */ u8 gainSPDef;
u16 fillA;
};
} LevelData;
// size: 0x1A4
struct unkStruct_808E218_arg
typedef struct unkStruct_808E218_arg
{
u16 unk0[NUM_MONSTERS];
/* 0x1A0 */ u32 count;
};
} unkStruct_808E218_arg;
// size: 0xC
struct unkStruct_808E218
typedef struct unkStruct_808E218
{
// leveldata? (same size)
struct unkStruct_808E6F4 unk0[3];
};
unkStruct_808E6F4 unk0[3];
} unkStruct_808E218;
extern struct unkStruct_203B45C *gRecruitedPokemonRef;
extern unkStruct_203B45C *gRecruitedPokemonRef;
void LoadMonsterParameters(void);
struct unkStruct_203B45C *GetRecruitedPokemon(void);
unkStruct_203B45C *GetRecruitedPokemon(void);
void InitializeRecruitedPokemon(void);
// These two need to be overridden in status_actions.c
@ -201,13 +200,13 @@ void InitializeRecruitedPokemon(void);
void CopyMonsterNametoBuffer(u8 * buffer, s16 index);
void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index);
void PrintColoredPokeNameToBuffer(u8 *buffer, struct PokemonStruct *pokemon, s32 colorNum);
void PrintColoredPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon, s32 colorNum);
void sub_808D930(u8 *buffer, s32 index);
void sub_808D9DC(u8 *buffer, struct PokemonStruct2 *param_2, s32 colorNum);
void sub_808DA0C(u8 *buffer, struct PokemonStruct2 *param_2);
void PeekPokemonItem(s16 index_, struct BulkItem* item);
void GivePokemonItem(s16 index_, struct BulkItem* item);
bool8 IsPokemonRenamed(struct PokemonStruct* pokemon);
void sub_808D9DC(u8 *, PokemonStruct2 *, s32);
void sub_808DA0C(u8 *, PokemonStruct2 *);
void PeekPokemonItem(s16 index_, BulkItem* item);
void GivePokemonItem(s16 index_, BulkItem* item);
bool8 IsPokemonRenamed(PokemonStruct1* pokemon);
bool8 CanMonLearnMove(u16 moveID, s16 _species);
u8 *GetCategoryString(s16 index);
@ -234,18 +233,18 @@ s16 GetRecruitRate(s16 index);
s16 GetAlphabetParentNo(s16 index, s32 r1);
s16 GetInternalNo(s16 index);
s32 CalculateEXPGain(s16 index, s32 level);
s16 GetPokemonEvolveConditons(s16 index, struct unkEvolve *r1);
s16 GetPokemonEvolveConditons(s16 index, unkEvolve *);
u8 GetPokemonOverworldPalette(s16 index, u32 r1);
bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 r1);
struct OpenedFile *OpenPokemonDialogueSpriteFile(s16 index);
struct OpenedFile *GetDialogueSpriteDataPtr(s16 index);
OpenedFile *OpenPokemonDialogueSpriteFile(s16 index);
OpenedFile *GetDialogueSpriteDataPtr(s16 index);
s32 GetUnownIndex(s16 index);
void sub_808E6F4(struct unkStruct_808E6F4* a1);
s32 GetEvolutionSequence(struct PokemonStruct* pokemon, struct EvolveStage* a2);
void xxx_pokemonstruct_to_pokemon2_808DE50(struct PokemonStruct2* r0, struct PokemonStruct *r1, s32 r2);
void SavePokemonStruct(struct unkStruct_8094924* a1, struct PokemonStruct* pokemon);
void RestorePokemonStruct(struct unkStruct_8094924*, struct PokemonStruct*);
s32 sub_808E218(struct unkStruct_808E218_arg* a1, struct PokemonStruct* pokemon);
void sub_808E6F4(unkStruct_808E6F4 *);
s32 GetEvolutionSequence(PokemonStruct1 *, EvolveStage *);
void xxx_pokemonstruct_to_pokemon2_808DE50(PokemonStruct2 *, PokemonStruct1 *, s32);
void SavePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *);
void RestorePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *);
s32 sub_808E218(unkStruct_808E218_arg *, PokemonStruct1 *);
// pokemon.s
extern void sub_808CFD0(u8 *, s16, u8 *, u8, u32 *, u16 *);

View File

@ -3,14 +3,14 @@
#include "pokemon.h"
struct EvolveStatus
typedef struct EvolveStatus
{
u8 evoItem1;
u8 evoItem2;
u8 unk6;
u16 evolutionConditionStatus;
s16 targetEvolveSpecies;
};
} EvolveStatus;
bool8 HasRecruitedMon(s16 species);
s16 GetBaseSpecies(s16 index);
@ -26,7 +26,7 @@ void ToggleIQSkill(u8 *param_1, u32 skillIndex);
void SetIQSkill(u8 *param_1, u32 skillIndex);
bool8 IsIQSkillSet(u8 *IQSkillFlags, u32 IQSkill);
void SetDefaultIQSkills(u8 *param_1, bool8 enableSelfCurer);
void sub_808F468(struct PokemonStruct *param_1, struct EvolveStatus *evolveStatus, u8 param_3);
u32 sub_808F734(struct PokemonStruct *pokemon, s16 _species);
void sub_808F468(PokemonStruct1 *param_1, EvolveStatus *evolveStatus, u8 param_3);
u32 sub_808F734(PokemonStruct1 *pokemon, s16 _species);
#endif

View File

@ -2,17 +2,17 @@
#define GUARD_POSITION_H
// size: 0x4
struct Position
typedef struct Position
{
s16 x;
s16 y;
};
/* 0x0 */ s16 x;
/* 0x2 */ s16 y;
} Position;
// size: 0x8
struct Position32
typedef struct Position32
{
s32 x;
s32 y;
};
/* 0x0 */ s32 x;
/* 0x4 */ s32 y;
} Position32;
#endif
#endif // GUARD_POSITION_H

View File

@ -3,7 +3,7 @@
#include "position.h"
s32 GetDirectionTowardsPosition(struct Position *originPos, struct Position *targetPos);
s32 GetDistance(struct Position *pos1, struct Position *pos2);
s32 GetDirectionTowardsPosition(Position *originPos, Position *targetPos);
s32 GetDistance(Position *pos1, Position *pos2);
#endif

View File

@ -11,10 +11,10 @@ struct RescuePasswordMenu
// size: 0x214
u32 currMenu;
u32 state;
struct MenuStruct unk8[4];
struct UnkTextStruct2 unk148[4];
struct UnkTextStruct2 unk1A8[4];
struct SpriteOAM unk208;
MenuStruct unk8[4];
UnkTextStruct2 unk148[4];
UnkTextStruct2 unk1A8[4];
SpriteOAM unk208;
u32 unk210;
};

View File

@ -6,7 +6,7 @@
#include "exclusive_pokemon.h"
#include "rescue_team_info.h"
#include "pokemon.h"
#include "item.h"
#include "items.h"
#include "code_80958E8.h"
enum
@ -47,8 +47,8 @@ struct UnkStruct_sub_8011DAC {
struct UnkStruct_203B184 {
/* 0x0 */ struct TeamInventory *MoneyItems;
/* 0x4 */ struct unkStruct_203B45C *recruitedPokemon;
/* 0x0 */ TeamInventory *MoneyItems;
/* 0x4 */ unkStruct_203B45C *recruitedPokemon;
/* 0x8 */ struct unkStruct_203B480 *unk8;
/* 0xC */ struct unkStruct_203B484 *unkC;
/* 0x10 */ u32 *unk10;

View File

@ -7,30 +7,30 @@
#include "sprite_oam.h"
// size: 0x8
struct UnkSpriteLink
typedef struct UnkSpriteLink
{
struct UnkSpriteLink *unk0;
struct SpriteOAM *unk4;
};
SpriteOAM *unk4;
} UnkSpriteLink;
// size: 0x808
struct SpriteList
typedef struct SpriteList
{
struct UnkSpriteLink sprites[256];
UnkSpriteLink sprites[256];
u32 unk800;
u32 unk804;
};
} SpriteList;
// size: 0xC
struct unkStruct_20266B0
typedef struct unkStruct_20266B0
{
/* 0x0 */ s32 byteCount;
/* 0x4 */ void *src;
/* 0x8 */ void *dest;
};
} unkStruct_20266B0;
// size: ? 0x3C for now
struct EntitySpriteInfo
typedef struct EntitySpriteInfo
{
u16 unk0;
// 0x2 and 0x6 seem to be related to the sprite animation, though not sure how they're related.
@ -42,9 +42,9 @@ struct EntitySpriteInfo
/* 0x4 */ u16 spriteAnimationIndex;
/* 0x6 */ u16 spriteAnimationCounter2;
// The position of the sprite within the tile. The animation may change the position slightly.
/* 0x8 */ struct Position spritePos;
/* 0x8 */ Position spritePos;
// Offset of the sprite from its position at the start of the animation. Changes alongside spritePos.
/* 0xC */ struct Position spritePosOffset;
/* 0xC */ Position spritePosOffset;
u8 fill10[0x14 - 0x10];
u32 unk14;
u32 unk18;
@ -62,31 +62,31 @@ struct EntitySpriteInfo
u32 unk30;
u32 unk34;
u32 unk38;
};
} EntitySpriteInfo;
// size: ?
struct Dungeon_ax
typedef struct Dungeon_ax
{
u32 unk0;
u32 **unk4;
u8 fill8[0xC - 0x8];
u32 unkC;
u32 unk10;
};
} Dungeon_ax;
void AddSprite(struct SpriteOAM *, s32, struct UnkSpriteMem *, struct unkStruct_2039DB0 *);
void AddSprite(SpriteOAM *, s32, UnkSpriteMem *, struct unkStruct_2039DB0 *);
void BlinkSavingIcon(void);
void CopySpritesToOam(void);
void InitSprites(void);
void ResetSprites(bool8);
void SetSavingIconCoords(struct Position *);
void SetSavingIconCoords(Position *);
void sub_8004E8C(struct unkStruct_2039DB0 *);
void sub_8005180(void);
void sub_8005304(void);
void sub_800533C(struct ax_pose **, struct UnkSpriteMem **, struct axdata1 *, u16 *, bool8);
void sub_80053AC(struct EntitySpriteInfo *, struct OpenedFile *, u32, u32, u32, u32, bool8);
void sub_80053D0(struct EntitySpriteInfo *, struct Dungeon_ax *, u32, u32, u32, u32, bool8);
void sub_800543C(struct EntitySpriteInfo *, struct OpenedFile *, u32, u32, u32, bool8);
void sub_800533C(ax_pose **, UnkSpriteMem **, axdata1 *, u16 *, bool8);
void sub_80053AC(EntitySpriteInfo *, OpenedFile *, u32, u32, u32, u32, bool8);
void sub_80053D0(EntitySpriteInfo *, Dungeon_ax *, u32, u32, u32, u32, bool8);
void sub_800543C(EntitySpriteInfo *, OpenedFile *, u32, u32, u32, bool8);
void sub_80054BC(struct axPokemon *);
#endif // GUARD_SPRITE_H

View File

@ -2,7 +2,7 @@
#define GUARD_SPRITE_OAM_H
// size: 0x8. Similar to struct OamData but unk6 is not copied to OAM
struct SpriteOAM
typedef struct SpriteOAM
{
// y:8 affineMode1:1 affineMode2:1 objMode:2 mosaic:1 bpp:1 shape:2
/* 0x0 */ u16 attrib1;
@ -12,7 +12,7 @@ struct SpriteOAM
/* 0x4 */ u16 attrib3;
// unk6_0:1 unk6_1:1 unk6_2:2? unk6_4:12
u16 unk6;
};
} SpriteOAM;
// The SpriteOAM struct is handled with macros most likely.
// Most funcs that deal with it look the same and do some weird bit manipulations one by one on the attributes.

View File

@ -7,34 +7,34 @@
#define FLASH_FIRE_STATUS_MAXED 1
#define FLASH_FIRE_STATUS_NOT_MAXED 2
u8 GetFlashFireStatus(struct Entity *pokemon);
void UpdateFlashFireBoost(struct Entity * pokemon, struct Entity *target);
void ChangeAttackMultiplierTarget(struct Entity *pokemon, struct Entity *target, u32 statStage, s32 param_4, bool8 displayMessage);
void ChangeDefenseMultiplierTarget(struct Entity *pokemon, struct Entity *target, u32 statStage, s32 param_4, bool8 displayMessage);
void RaiseAccuracyStageTarget(struct Entity * pokemon, struct Entity * target, s32 statStage);
void LowerAccuracyStageTarget(struct Entity * pokemon, struct Entity * target, s32 statStage, bool8 displayMessage);
void CringeStatusTarget(struct Entity * pokemon,struct Entity * target, bool8 displayMessage);
void ParalyzeStatusTarget(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void RaiseMovementSpeedTarget(struct Entity * pokemon, struct Entity * target, s32 turns, bool8 diplayMessage);
void LowerMovementSpeedTarget(struct Entity * pokemon, struct Entity * target, s32 levels, bool8 displayMessage);
void ConfuseStatusTarget(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void CowerStatusTarget(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void HealTargetHP(struct Entity *pokemon, struct Entity *target, s32 param_3, s32 param_4, bool32 displayMessage);
void HandleScannerOrb(struct Entity* pokemon, struct Entity* target);
void HandleStairsOrb(struct Entity* pokemon, struct Entity* target);
void HandleRadarOrb(struct Entity* pokemon, struct Entity* target);
void HandleLeechSeed(struct Entity * pokemon, struct Entity * target, bool8 displayMessage);
void DestinyBondStatusTarget(struct Entity * pokemon, struct Entity * target);
void SureShotStatusTarget(struct Entity *pokemon, struct Entity * target, s32 turns);
void WhifferStatusTarget(struct Entity *pokemon, struct Entity * target, s32 turns);
void FixedDamageStatusTarget(struct Entity *pokemon, struct Entity * target);
void FocusEnergyStatusTarget(struct Entity *pokemon, struct Entity * target);
void CurseStatusTarget(struct Entity *pokemon, struct Entity * target);
void SnatchStatusTarget(struct Entity * pokemon, struct Entity * target);
void TauntStatusTarget(struct Entity * pokemon, struct Entity * target);
void HandleStockpile(struct Entity * pokemon, struct Entity * target);
void InvisibleStatusTarget(struct Entity * pokemon, struct Entity * target);
void PerishSongTarget(struct Entity * pokemon, struct Entity * target);
void EncoreStatusTarget(struct Entity * pokemon, struct Entity * target);
u8 GetFlashFireStatus(Entity *pokemon);
void UpdateFlashFireBoost(Entity * pokemon, Entity *target);
void ChangeAttackMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage, s32 param_4, bool8 displayMessage);
void ChangeDefenseMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage, s32 param_4, bool8 displayMessage);
void RaiseAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage);
void LowerAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage, bool8 displayMessage);
void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage);
void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage);
void RaiseMovementSpeedTarget(Entity * pokemon, Entity * target, s32 turns, bool8 diplayMessage);
void LowerMovementSpeedTarget(Entity * pokemon, Entity * target, s32 levels, bool8 displayMessage);
void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage);
void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage);
void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, bool32 displayMessage);
void HandleScannerOrb(Entity* pokemon, Entity* target);
void HandleStairsOrb(Entity* pokemon, Entity* target);
void HandleRadarOrb(Entity* pokemon, Entity* target);
void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage);
void DestinyBondStatusTarget(Entity * pokemon, Entity * target);
void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns);
void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns);
void FixedDamageStatusTarget(Entity *pokemon, Entity * target);
void FocusEnergyStatusTarget(Entity *pokemon, Entity * target);
void CurseStatusTarget(Entity *pokemon, Entity * target);
void SnatchStatusTarget(Entity * pokemon, Entity * target);
void TauntStatusTarget(Entity * pokemon, Entity * target);
void HandleStockpile(Entity * pokemon, Entity * target);
void InvisibleStatusTarget(Entity * pokemon, Entity * target);
void PerishSongTarget(Entity * pokemon, Entity * target);
void EncoreStatusTarget(Entity * pokemon, Entity * target);
#endif

View File

@ -4,53 +4,53 @@
#include "constants/move.h"
#include "dungeon_entity.h"
bool8 sub_805B668(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B734(struct Entity *pokemon, struct Entity *target);
bool8 RecycleMoveAction(struct Entity *pokemon, struct Entity *target);
bool8 ReflectMoveAction(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B808(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B884(struct Entity *pokemon, struct Entity *target);
bool8 SkullBashMoveAction(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B910(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805B968(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 RockSmashMoveAction(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805BA44(struct Entity *pokemon, struct Entity *target);
bool8 sub_805BA50(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805BB64(struct Entity *pokemon, struct Entity *target);
bool8 sub_805BB74(struct Entity *pokemon, struct Entity *target);
bool8 sub_805BB98(struct Entity *pokemon, struct Entity *target);
bool8 CleanseOrbAction(struct Entity *pokemon,struct Entity *target);
bool8 sub_805BC70(struct Entity *pokemon, struct Entity *target);
bool8 sub_805BC98(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 SilenceOrbAction(struct Entity *pokemon,struct Entity *target);
bool8 ScannerOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 RadarOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 TransferOrbAction(struct Entity *pokemon,struct Entity *target);
bool8 sub_805BE90(struct Entity *pokemon, struct Entity *target);
bool8 LuminousOrbAction(struct Entity *pokemon,struct Entity *target);
bool8 sub_805BEAC(struct Entity *pokemon, struct Entity *target);
bool8 sub_805BEB8(struct Entity *pokemon, struct Entity *target);
bool8 sub_805BEC8(struct Entity *pokemon, struct Entity *target);
bool8 EscapeOrbAction(struct Entity *pokemon,struct Entity *target);
bool8 sub_805BF34(struct Entity *pokemon, struct Entity *target);
bool8 TrapbustOrbAction(struct Entity *pokemon,struct Entity *target);
bool8 sub_805C080(struct Entity *pokemon, struct Entity *target);
bool8 sub_805C128(struct Entity *pokemon, struct Entity *target);
bool8 sub_805C138(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 IdentifyOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 sub_805C1BC(struct Entity *pokemon, struct Entity *target, struct Move *move, s32 param_4);
bool8 sub_805C1E4(struct Entity *pokemon, struct Entity *target);
bool8 ShockerOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 sub_805C208(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4);
bool8 sub_805C288(struct Entity *pokemon, struct Entity *target);
bool8 sub_805C2A0(struct Entity *pokemon, struct Entity *target);
bool8 FillInOrbAction(struct Entity *pokemon,struct Entity *target);
bool8 sub_805C3DC(struct Entity *pokemon, struct Entity *target);
bool8 sub_805C3F8(struct Entity *pokemon, struct Entity *target);
bool8 sub_805C45C(struct Entity *pokemon, struct Entity *target);
bool8 MobileOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 StairsOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 LongtossOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 PierceOrbAction(struct Entity *pokemon, struct Entity *target);
bool8 sub_805B668(Entity *pokemon, Entity *target, struct 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 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 sub_805BA44(Entity *pokemon, Entity *target);
bool8 sub_805BA50(Entity *pokemon, Entity *target, struct 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 SilenceOrbAction(Entity *pokemon,Entity *target);
bool8 ScannerOrbAction(Entity *pokemon, Entity *target);
bool8 RadarOrbAction(Entity *pokemon, Entity *target);
bool8 TransferOrbAction(Entity *pokemon,Entity *target);
bool8 sub_805BE90(Entity *pokemon, Entity *target);
bool8 LuminousOrbAction(Entity *pokemon,Entity *target);
bool8 sub_805BEAC(Entity *pokemon, Entity *target);
bool8 sub_805BEB8(Entity *pokemon, Entity *target);
bool8 sub_805BEC8(Entity *pokemon, Entity *target);
bool8 EscapeOrbAction(Entity *pokemon,Entity *target);
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 IdentifyOrbAction(Entity *pokemon, Entity *target);
bool8 sub_805C1BC(Entity *pokemon, Entity *target, struct 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_805C288(Entity *pokemon, Entity *target);
bool8 sub_805C2A0(Entity *pokemon, Entity *target);
bool8 FillInOrbAction(Entity *pokemon,Entity *target);
bool8 sub_805C3DC(Entity *pokemon, Entity *target);
bool8 sub_805C3F8(Entity *pokemon, Entity *target);
bool8 sub_805C45C(Entity *pokemon, Entity *target);
bool8 MobileOrbAction(Entity *pokemon, Entity *target);
bool8 StairsOrbAction(Entity *pokemon, Entity *target);
bool8 LongtossOrbAction(Entity *pokemon, Entity *target);
bool8 PierceOrbAction(Entity *pokemon, Entity *target);
#endif

View File

@ -5,6 +5,6 @@
extern const s16 gConfusedAttackChance;
bool8 HasStatusAffectingActions(struct Entity *pokemon);
bool8 HasStatusAffectingActions(Entity *pokemon);
#endif

View File

@ -3,9 +3,9 @@
#include "dungeon_entity.h"
bool8 HasNegativeStatus(struct Entity *pokemon);
bool8 IsSleeping(struct Entity *pokemon);
bool8 HasLowHealth(struct Entity *pokemon);
s32 sub_8070828(struct Entity *pokemon, bool8 displayMessage);
bool8 HasNegativeStatus(Entity *pokemon);
bool8 IsSleeping(Entity *pokemon);
bool8 HasLowHealth(Entity *pokemon);
s32 sub_8070828(Entity *pokemon, bool8 displayMessage);
#endif

View File

@ -3,6 +3,6 @@
#include "dungeon_entity.h"
void TargetTileInFront(struct Entity *pokemon);
void TargetTileInFront(Entity *pokemon);
#endif

View File

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

View File

@ -1,26 +0,0 @@
#ifndef GUARD_TEAM_INVENTORY_H
#define GUARD_TEAM_INVENTORY_H
#define MAX_KECLEON_ITEM_SHOP_ITEMS 8
#define MAX_KECLEON_WARE_SHOP_ITEMS 4
#include "item.h"
// size: 0x268
struct TeamInventory
{
/* 0x0 */ struct Item teamItems[INVENTORY_SIZE];
/* 0x50 */ u16 teamStorage[STORAGE_SIZE];
/* 0x230 */ struct BulkItem kecleonShopItems[MAX_KECLEON_ITEM_SHOP_ITEMS];
/* 0x250 */ struct BulkItem kecleonWareItems[MAX_KECLEON_WARE_SHOP_ITEMS];
/* 0x260 */ s32 teamMoney;
/* 0x264 */ s32 teamSavings;
};
// Declared in items.c
extern struct TeamInventory *gTeamInventoryRef;
#define MAX_TEAM_MONEY 99999
#define MAX_TEAM_SAVINGS 9999999
#endif

View File

@ -2,7 +2,7 @@
#define GUARD_TEXT_H
// size: 0x48
struct UnkTextStruct1
typedef struct UnkTextStruct1
{
s16 unk0;
s16 unk2;
@ -26,10 +26,10 @@ struct UnkTextStruct1
u8 unk44;
bool8 unk45;
u8 unk46;
};
} UnkTextStruct1;
// size: 0x4
struct UnkTextStruct2_sub
typedef struct UnkTextStruct2_sub
{
// I haven't found a func that reads these separately yet, but simply making an arr[2] will cause assignments to break.
// Some funcs only match with this union for some reason even though they don't access the variables separately...
@ -42,20 +42,20 @@ struct UnkTextStruct2_sub
} separate;
s16 arr[2];
} unk0;
};
} UnkTextStruct2_sub;
// size: 0x18
struct UnkTextStruct2
typedef struct UnkTextStruct2
{
u8 unk0;
u8 fill1[0x4 - 0x1];
s32 unk4;
struct UnkTextStruct2_sub unk8;
UnkTextStruct2_sub unk8;
s16 unkC;
s16 unkE;
s16 unk10;
s16 unk12;
const u8 *unk14;
};
} UnkTextStruct2;
#endif
#endif // GUARD_TEXT_H

View File

@ -3,8 +3,8 @@
#include "text.h"
extern struct UnkTextStruct1 gUnknown_2027370[4];
extern struct UnkTextStruct2 gUnknown_202AFC0[4];
extern UnkTextStruct1 gUnknown_2027370[4];
extern UnkTextStruct2 gUnknown_202AFC0[4];
extern u32 gUnknown_202B030;
extern u16 gUnknown_202B038[4][32][32];
@ -12,6 +12,6 @@ void LoadCharmaps(void);
void SelectCharmap(u32);
u32 xxx_update_some_bg_tiles(u32 a0);
void sub_800641C(struct UnkTextStruct2 *a0, bool8 a1, bool8 a2);
void sub_800641C(UnkTextStruct2 *a0, bool8 a1, bool8 a2);
#endif // GUARD_TEXT1_H

View File

@ -31,8 +31,8 @@ struct unkStruct_80B8848
u32 xxx_call_draw_char(s32, s32, u32, u32, u32);
void sub_8006518(struct UnkTextStruct2 *);
void sub_8006554(struct UnkTextStruct1 *, u32 *, u32 *, u16 *, u32, const struct UnkTextStruct2 *, u8, u32, struct UnkTextStruct2_sub *, u8);
void sub_8006518(UnkTextStruct2 *);
void sub_8006554(UnkTextStruct1 *, u32 *, u32 *, u16 *, u32, const UnkTextStruct2 *, u8, u32, UnkTextStruct2_sub *, u8);
void sub_80073B8(s32);
void sub_80073E0(s32);
void sub_80078A4(u32, s32, s32, s32, u32);
@ -45,7 +45,7 @@ void sub_8007E20(u32, u32, u32, u32, u32, u8 *, u32);
extern struct unkChar *GetCharacter(u32);
extern void InitGraphics(void);
extern void sub_800898C(void);
extern void sub_80089AC(const struct UnkTextStruct2 *, struct UnkTextStruct2_sub *);
extern void sub_80089AC(const UnkTextStruct2 *, UnkTextStruct2_sub *);
extern void sub_8008C54(u32);
extern void sub_8009388(void);
extern void xxx_call_draw_string(s32 x, u32 y, const u8 *str, u32 , u32);

View File

@ -9,7 +9,7 @@
extern const u8 gDungeonWaterType[];
bool8 IsTileGround(struct Tile* tile);
bool8 IsTileGround(Tile *tile);
bool8 IsWaterTileset();
#endif

View File

@ -2,7 +2,7 @@
#define GUARD_TRADE_ITEMS_MENU_H
#include "text.h"
#include "item.h"
#include "items.h"
#include "menu.h"
struct TradeSubStruct
@ -29,13 +29,13 @@ struct TradeItemsMenu
u32 unk20;
u32 unk24;
u32 unk28;
struct UnkTextStruct2 *unk2C;
UnkTextStruct2 *unk2C;
u32 unk30;
u32 unk34;
u8 fill38[0x44 - 0x38];
struct MenuStruct unk44[4];
struct UnkTextStruct2 unk184[4];
struct UnkTextStruct2 unk1E4[4];
MenuStruct unk44[4];
UnkTextStruct2 unk184[4];
UnkTextStruct2 unk1E4[4];
// TODO These might be structs...
struct TradeSubStruct unk244;
@ -44,7 +44,7 @@ struct TradeItemsMenu
/* 0x254 */ struct TradeSubStruct sentItem;
/* 0x25C */ struct Item itemToSend;
/* 0x25C */ Item itemToSend;
u8 fill25F[0x3A0 - 0x260];
};

View File

@ -3,6 +3,6 @@
#include "position.h"
bool8 CanLayTrap(struct Position *pos);
bool8 CanLayTrap(Position *pos);
#endif

View File

@ -3,6 +3,6 @@
#include "dungeon_entity.h"
s32 WeightWeakTypePicker(struct Entity *user, struct Entity *target, u8 moveType);
s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType);
#endif

View File

@ -3,6 +3,6 @@
#include "dungeon_entity.h"
u8 GetApparentWeather(struct Entity *pokemon);
u8 GetApparentWeather(Entity *pokemon);
#endif

View File

@ -16,10 +16,10 @@ struct WigglytuffShop
s16 chosenSpecies;
u32 menuAction1;
u32 menuAction2;
struct MenuItem unk1C[8];
MenuItem unk1C[8];
u16 unk5C[0x8];
struct MenuStruct unk6C;
/* 0xBC */ struct OpenedFile *faceFile;
MenuStruct unk6C;
/* 0xBC */ OpenedFile *faceFile;
/* 0xC0 */ u8 *faceData;
u16 unkC4;
u16 unkC6;
@ -27,8 +27,8 @@ struct WigglytuffShop
u8 unkC9;
u8 unkCA;
u8 fillCB;
struct OpenedFile **unkCC;
struct UnkTextStruct2 unkD0[4];
OpenedFile **unkCC;
UnkTextStruct2 unkD0[4];
u32 unk130;
u32 unk134;
};

View File

@ -3,7 +3,7 @@
#include "file_system.h"
#include "text.h"
#include "item.h"
#include "items.h"
#include "menu.h"
#include "pokemon.h"
#include "code_8094F88.h"
@ -45,7 +45,7 @@ struct WonderMail
struct WonderMailStruct_203B2C0_sub
{
/* 0x0 */ struct unkStruct_203B480 mail;
/* 0x30 */ struct PokemonStruct pokemon;
/* 0x30 */ PokemonStruct1 pokemon;
};
// size: 0x548
@ -63,11 +63,11 @@ struct WonderMailStruct_203B2C0
struct WonderMailStruct_203B2C0_sub unk130;
u8 fill16A[0x218 - 0x1B8];
/* 0x218 */ u8 mailIndex;
struct MenuStruct unk21C[4];
struct UnkTextStruct2 unk35C[4];
struct UnkTextStruct2 unk3BC[4];
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
UnkTextStruct2 unk3BC[4];
/* 0x41C */ u32 unkfill; // ItemSlot?
/* 0x420 */ struct OpenedFile *faceFile;
/* 0x420 */ OpenedFile *faceFile;
/* 0x424 */ u8 *faceData;
u16 unk428;
u16 unk42A;
@ -95,11 +95,11 @@ struct WonderMailStruct_203B2C4
struct unkStruct_203B480 unk1B8;
struct unkStruct_203B480 unk1E8;
/* 0x218 */ s8 mailIndex;
struct MenuStruct unk21C[4];
struct UnkTextStruct2 unk35C[4];
struct UnkTextStruct2 unk3BC[4];
struct Item unk41C;
/* 0x420 */ struct OpenedFile *faceFile;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
UnkTextStruct2 unk3BC[4];
Item unk41C;
/* 0x420 */ OpenedFile *faceFile;
/* 0x424 */ u8 *faceData;
u16 unk428;
u16 unk42A;

Some files were not shown because too many files have changed in this diff Show More