mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-28 03:48:35 -05:00
Death by 74 files (#65)
* death by 74 files * 20% reached * doc move stuff in pokemon * fix undef reference * doc more and plumb a few more constanst for num party members and num moves * that struct is def PokemonMove.. clean up all code with it
This commit is contained in:
@@ -3,5 +3,11 @@
|
||||
|
||||
#define POKEMON_NAME_LENGTH 10
|
||||
#define TEAM_NAME_LENGTH 10
|
||||
#define MAX_TEAM_MEMBERS 4
|
||||
|
||||
#define MAX_MON_MOVES 4
|
||||
|
||||
#define MALE 0
|
||||
#define FEMALE 1
|
||||
|
||||
#endif // GUARD_CONSTANTS_GLOBAL_H
|
||||
|
||||
6
include/constants/mailbox.h
Normal file
6
include/constants/mailbox.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_CONSTANTS_MAILBOX_H
|
||||
#define GUARD_CONSTANTS_MAILBOX_H
|
||||
|
||||
#define MAX_ACCEPTED_JOBS 8
|
||||
|
||||
#endif // GUARD_CONSTANTS_MAILBOX_H
|
||||
@@ -22,7 +22,4 @@ enum NaturePersonalities {
|
||||
#define NUM_QUIZ_QUESTIONS 55
|
||||
#define MAX_ASKED_QUESTIONS 8
|
||||
|
||||
#define MALE 0
|
||||
#define FEMALE 1
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,4 +25,8 @@ enum RewardType
|
||||
END_REWARDS
|
||||
};
|
||||
|
||||
#define NUM_POKEMON_NEWS 56 // 50 normal + 6 special issues
|
||||
#define PASSWORD_BUFFER_SIZE 54
|
||||
#define MAX_ITEM_REWARDS 3
|
||||
|
||||
#endif //GUARD_CONSTANTS_WONDER_MAIL_H
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define GUARD_DEBUG_MENU_H
|
||||
|
||||
#include "text.h"
|
||||
#include "menu.h"
|
||||
|
||||
enum DebugMenuOptions
|
||||
{
|
||||
@@ -24,6 +25,32 @@ struct DebugMenu
|
||||
};
|
||||
|
||||
|
||||
struct unkStruct_203B3F8
|
||||
{
|
||||
// size: 0x140
|
||||
u32 state;
|
||||
s16 unk4;
|
||||
u16 unk6;
|
||||
struct PokemonStruct *pokemon;
|
||||
u32 unkC;
|
||||
const char *unk10;
|
||||
u8 fill14[0x60 - 0x14];
|
||||
u32 unk60;
|
||||
u32 unk64;
|
||||
u32 unk68;
|
||||
u32 unk6C;
|
||||
u32 unk70;
|
||||
u32 unk74;
|
||||
struct UnkTextStruct2 *unk78;
|
||||
u32 unk7C;
|
||||
u32 unk80;
|
||||
u8 fill84[0x90 - 0x84];
|
||||
struct MenuItem unk90[8];
|
||||
u16 unkD0[8];
|
||||
struct UnkTextStruct2 unkE0[4];
|
||||
};
|
||||
|
||||
|
||||
void CreateDebugMenu(void);
|
||||
void DeleteDebugMenu(void);
|
||||
u32 UpdateDebugMenu(void);
|
||||
|
||||
@@ -179,7 +179,7 @@ struct DungeonEntityData
|
||||
// Unclear where this is set in-game; it is not set by statuses (e.g., confusion) or mission clients.
|
||||
/* 0x114 */ bool8 moveRandomly;
|
||||
u8 fill115[0x118 - 0x115];
|
||||
/* 0x118 */ struct PokemonMove moves[4];
|
||||
/* 0x118 */ struct PokemonMove moves[MAX_MON_MOVES];
|
||||
/* 0x138 */ u8 struggleMoveFlags;
|
||||
u8 fill139[0x13C - 0x139];
|
||||
/* 0x13C */ u32 belly;
|
||||
|
||||
@@ -72,7 +72,7 @@ struct DungeonGlobalData
|
||||
u8 fill11444[0x1356C - 0x11484];
|
||||
u8 unk1356C;
|
||||
u8 fill1356D[0x1357C - 0x1356D];
|
||||
/* 0x1357C */ struct DungeonEntity *teamPokemon[4];
|
||||
/* 0x1357C */ struct DungeonEntity *teamPokemon[MAX_TEAM_MEMBERS];
|
||||
/* 0x1358C */ struct DungeonEntity *wildPokemon[0x10];
|
||||
/* 0x135CC */ struct DungeonEntity *allPokemon[0x14]; // Contains both team and wild Pokémon
|
||||
/* 0x1361C */ struct DungeonEntity *clientPokemon[2]; // Not sure how large this array is.
|
||||
|
||||
@@ -31,6 +31,7 @@ struct ExclusivePokemonData
|
||||
.in_brt = TRUE, \
|
||||
}
|
||||
|
||||
extern struct ExclusivePokemonData *gUnknown_203B498;
|
||||
|
||||
void LoadExclusivePokemon(void);
|
||||
struct ExclusivePokemonData *GetExclusivePokemon(void);
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
#ifndef GUARD_FRIEND_AREA_ACTION_MENU_H
|
||||
#define GUARD_FRIEND_AREA_ACTION_MENU_H
|
||||
|
||||
struct unkSubStruct_203B2BC
|
||||
{
|
||||
u8 fill0[0x2C];
|
||||
u32 unk2C;
|
||||
};
|
||||
|
||||
|
||||
struct unkStruct_203B2BC
|
||||
{
|
||||
// size: 0x1E0
|
||||
u32 state;
|
||||
u32 unk4;
|
||||
s16 unk8;
|
||||
s16 targetPoke;
|
||||
u16 unkA;
|
||||
u32 unkC;
|
||||
struct HeldItem unk10;
|
||||
u32 itemIndex;
|
||||
struct HeldItem itemToGive;
|
||||
struct ItemSlot unk14;
|
||||
struct unkSubStruct_203B2BC *unk18;
|
||||
struct PokemonStruct *unk18;
|
||||
u32 unk1C;
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
|
||||
@@ -13,7 +13,7 @@ struct unkStruct_203B26C
|
||||
u32 unk0;
|
||||
s32 state;
|
||||
u32 unk8;
|
||||
s16 unkC;
|
||||
s16 speciesNum; // species of chosen Pokemon
|
||||
u8 unkE;
|
||||
struct unkStruct_Gulpin * unk10;
|
||||
u32 unk14;
|
||||
|
||||
@@ -12,6 +12,8 @@ struct Inputs
|
||||
/* 0xC */ s32 repeatTimerDpad;
|
||||
};
|
||||
|
||||
extern struct Inputs gRealInputs;
|
||||
|
||||
struct InputTimers
|
||||
{
|
||||
/* 0x0 */ s16 holdTimerB;
|
||||
|
||||
@@ -67,6 +67,8 @@ void LoadItemParameters(void);
|
||||
struct TeamInventory *GetMoneyItemsInfo(void);
|
||||
void InitializeMoneyItems(void);
|
||||
u8 GetItemType(u8 index);
|
||||
s32 GetStackSellValue(struct ItemSlot *param_1);
|
||||
s32 GetStackSellPrice(struct ItemSlot *param_1);
|
||||
s32 GetItemBuyPrice(u8 itemIndex);
|
||||
s32 GetItemSellPrice(u8 itemIndex);
|
||||
s32 GetItemOrder(u8 itemIndex);
|
||||
@@ -90,6 +92,8 @@ bool8 CanSellItem(u32 id);
|
||||
bool8 IsGummiItem(u8);
|
||||
void xxx_init_unk230_substruct(u8);
|
||||
bool8 xxx_insert_unk230_80919FC(u8);
|
||||
struct HeldItem *xxx_get_inv_unk230_at_809185C(u8);
|
||||
s32 xxx_count_inv_unk230();
|
||||
u32 xxx_count_non_empty_inv_unk250_8091A48();
|
||||
void sub_8091BB4(u8);
|
||||
void sub_8090F58(void*, u8 *, struct ItemSlot *, struct unkStruct_8090F58*);
|
||||
|
||||
@@ -13,14 +13,15 @@ void m4aSongNumStartOrChange(u16 n);
|
||||
void m4aSongNumStop(u16 n);
|
||||
void m4aMPlayAllStop(void);
|
||||
void m4aMPlayContinue(struct MusicPlayerInfo *mplayInfo);
|
||||
void m4aMPlayFadeOut(struct MusicPlayerInfo *mplayInfo, u16 speed);
|
||||
void m4aMPlayFadeOut(struct MusicPlayerInfo *mplayInfo, u32 speed);
|
||||
void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed);
|
||||
void m4aMPlayFadeIn(struct MusicPlayerInfo *mplayInfo, u16 speed);
|
||||
void m4aMPlayImmInit(struct MusicPlayerInfo *mplayInfo);
|
||||
void m4aMPlayStop(struct MusicPlayerInfo *mplayInfo);
|
||||
void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume);
|
||||
void m4aSoundVSync(void);
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM; // BGM??
|
||||
|
||||
extern struct MusicPlayerInfo gUnknown_2000970;
|
||||
|
||||
#endif //GUARD_M4A_H
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
#ifndef GUARD_MAILBOX_H
|
||||
#define GUARD_MAILBOX_H
|
||||
|
||||
#include "menu.h"
|
||||
#include "text.h"
|
||||
#include "constants/mailbox.h"
|
||||
|
||||
struct unkStruct_203B304
|
||||
{
|
||||
// size: 0xB6 << 1
|
||||
u32 state;
|
||||
u32 unk4;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
u8 mailIndex;
|
||||
u8 fillA[0xC - 0xA];
|
||||
u32 unkC;
|
||||
u8 fill10[0x50 - 0x10];
|
||||
@@ -23,5 +27,6 @@ struct unkStruct_203B304
|
||||
};
|
||||
|
||||
extern void SetMailboxState(u32);
|
||||
extern s32 GetNumAcceptedJobs(void);
|
||||
|
||||
#endif // GUARD_MAILBOX_H
|
||||
|
||||
@@ -8,7 +8,7 @@ void StartNewBGM(u16 songIndex);
|
||||
bool8 IsBGSong(u32 songIndex);
|
||||
bool8 sub_800CAAC(u32 songIndex);
|
||||
bool8 sub_800CACC(u32 songIndex);
|
||||
u16 sub_800CAE0(u16 songIndex);
|
||||
u16 GetMusicPlayerIndex(u16 songIndex);
|
||||
bool8 sub_800CAF0(u16 songIndex);
|
||||
void StartNewBGM(u16 songIndex);
|
||||
void FadeInNewBGM(u16 SongIndex, u16 speed);
|
||||
@@ -17,6 +17,7 @@ void sub_800BF48(u16 SongIndex);
|
||||
void sub_800BF80(void);
|
||||
void FadeOutBGM(u16 speed);
|
||||
void sub_800C074(u16 SongIndex, u16 param_2);
|
||||
void sub_800C298(u16 songIndex);
|
||||
|
||||
void nullsub_19(void);
|
||||
void nullsub_20(u16 songIndex);
|
||||
|
||||
@@ -9,6 +9,10 @@ struct PlayTimeStruct
|
||||
u8 frames;
|
||||
};
|
||||
|
||||
|
||||
extern struct PlayTimeStruct *gPlayTimeRef;
|
||||
extern struct PlayTimeStruct gPlayTime;
|
||||
|
||||
void IncrementPlayTime(struct PlayTimeStruct *Time);
|
||||
void ResetPlayTime(struct PlayTimeStruct *Time);
|
||||
struct PlayTimeStruct *GetPlayTime(void);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "file_system.h"
|
||||
#include "item.h"
|
||||
#include "constants/move.h"
|
||||
|
||||
|
||||
#define OFFENSE_NRM 0
|
||||
@@ -24,14 +25,6 @@ struct unkPokeSubStruct_4 {
|
||||
u16 fill6;
|
||||
};
|
||||
|
||||
struct unkPokeSubStruct_2C
|
||||
{
|
||||
u8 unk0;
|
||||
u8 fill1;
|
||||
u16 unk2;
|
||||
u32 fill4;
|
||||
};
|
||||
|
||||
struct unkPokeSubStruct_C
|
||||
{
|
||||
u8 unk0;
|
||||
@@ -46,7 +39,6 @@ struct PokemonStruct
|
||||
u8 unkHasNextStage; // set to a random value?
|
||||
struct unkPokeSubStruct_4 unk4;
|
||||
/* 0x8 */ s16 speciesNum; // species #
|
||||
u8 fillA[0xC - 0xA];
|
||||
struct unkPokeSubStruct_C unkC[2];
|
||||
/* 0x14 */ s16 IQ;
|
||||
/* 0x16 */ u16 pokeHP; // HP
|
||||
@@ -56,8 +48,8 @@ struct PokemonStruct
|
||||
u8 unk24;
|
||||
u8 fill25[3];
|
||||
struct HeldItem heldItem;
|
||||
struct unkPokeSubStruct_2C unk2C[4];
|
||||
/* 0x4C */ u8 name[0xA];
|
||||
struct PokemonMove moves[MAX_MON_MOVES];
|
||||
/* 0x4C */ u8 name[POKEMON_NAME_LENGTH];
|
||||
};
|
||||
|
||||
|
||||
@@ -88,7 +80,7 @@ struct PokemonStruct2
|
||||
u16 unk12; // pokeHP
|
||||
struct Offense offense; // offense (other offset)
|
||||
u32 unk18; // unk1C
|
||||
struct unkPokeSubStruct_2C unk1C[4]; // unk2C
|
||||
struct PokemonMove moves[MAX_MON_MOVES];
|
||||
u8 fill3c[4];
|
||||
/* 40 */ struct ItemSlot itemSlot; // heldItem
|
||||
u32 unk44; // some struct
|
||||
@@ -97,14 +89,14 @@ struct PokemonStruct2
|
||||
u8 unk50; // unk24
|
||||
u8 fill51[3];
|
||||
struct unkStruct_808E6F4 unk54;
|
||||
u8 name[10]; // name (other offset)
|
||||
u8 name[POKEMON_NAME_LENGTH]; // name (other offset)
|
||||
};
|
||||
|
||||
struct unkStruct_203B45C
|
||||
{
|
||||
/* 0x0 */ struct PokemonStruct pokemon[NUM_SPECIES];
|
||||
/* 0x8DF8 */ struct PokemonStruct2 pokemon2[4];
|
||||
/* 0x8F88 */ struct PokemonStruct team[4];
|
||||
/* 0x8F88 */ struct PokemonStruct team[MAX_TEAM_MEMBERS];
|
||||
};
|
||||
|
||||
struct EvolveStruct1
|
||||
@@ -187,6 +179,8 @@ struct unkStruct_808E218
|
||||
struct unkStruct_808E6F4 unk0[3];
|
||||
};
|
||||
|
||||
extern struct unkStruct_203B45C *gRecruitedPokemonRef;
|
||||
|
||||
void LoadMonsterParameters(void);
|
||||
struct unkStruct_203B45C *GetRecruitedPokemon(void);
|
||||
void InitializeRecruitedPokemon(void);
|
||||
|
||||
@@ -20,6 +20,8 @@ struct RescueTeamData
|
||||
u8 unk10;
|
||||
};
|
||||
|
||||
extern struct RescueTeamData *gRescueTeamInfoRef;
|
||||
|
||||
void LoadRescueTeamInfo(void);
|
||||
struct RescueTeamData *GetRescueTeamInfo(void);
|
||||
void InitializeRescueTeamInfo(void);
|
||||
|
||||
@@ -12,4 +12,6 @@ struct TeamInventory
|
||||
/* 0x264 */ u32 teamSavings;
|
||||
};
|
||||
|
||||
extern struct TeamInventory *gTeamInventory_203B460;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "sub_8095228.h"
|
||||
|
||||
#define PASSWORD_BUFFER_SIZE 54
|
||||
#define MAX_ITEM_REWARDS 3
|
||||
#include "constants/wonder_mail.h"
|
||||
|
||||
struct unkStruct_802F204
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user