pokeemerald/include/pokemon_storage_system.h

169 lines
3.6 KiB
C
Raw Normal View History

2017-09-28 13:34:21 +00:00
#ifndef GUARD_POKEMON_STORAGE_SYSTEM_H
#define GUARD_POKEMON_STORAGE_SYSTEM_H
2017-11-11 13:45:08 +00:00
#define TOTAL_BOXES_COUNT 14
#define IN_BOX_COUNT 30
#include "pc_screen_effect.h"
#include "mon_markings.h"
struct PokemonStorageSystemFunc
{
u8 (*func)(void);
s8 unk4;
};
struct StorageAction
{
const u8 *text;
u8 format;
};
struct StorageText
{
const u8 *text;
int textId;
};
struct PSS_MenuStringPtrs
{
const u8 *text;
const u8 *desc;
};
struct UnkStruct_2000028
{
const u8 *unk_00;
u8 *unk_04;
u16 unk_08;
u16 unk_0a;
void (*unk_0c)(struct UnkStruct_2000028 *data);
};
struct UnkStruct_2000020
{
struct UnkStruct_2000028 *unk_00;
u8 unk_04;
u8 unk_05;
};
struct UnkPSSStruct_2002370
{
struct Sprite *unk_0000;
struct Sprite *unk_0004[4];
u32 unk_0014[3];
struct Sprite *unk_0020[2];
u8 filler_0028[0x214];
u32 unk_023c;
u16 unk_0240;
u16 unk_0242;
u8 curBox;
u8 unk_0245;
u8 unk_0246;
};
struct PokemonStorageSystemData
{
u8 state;
u8 boxOption;
2018-12-10 20:36:52 +00:00
u8 screenChangeType;
2018-12-10 22:42:44 +00:00
bool8 isReshowingPSS;
u8 taskId;
2018-12-09 15:44:01 +00:00
u8 unk_0005;
struct UnkStruct_2000020 unk_0020;
struct UnkStruct_2000028 unk_0028[8];
2018-12-12 22:19:50 +00:00
u16 field_90[16];
u16 field_B0[528 / 2];
u16 field_2C0;
u16 field_2C2;
u8 field_2C4;
u8 field_2C5;
u8 showPartyMenuState;
2018-12-09 15:44:01 +00:00
u8 unk_02C7;
u8 unk_02C8;
2018-12-12 22:19:50 +00:00
bool8 unk_02C9;
2018-12-09 20:06:43 +00:00
s16 newCurrBoxId;
u16 bg2_X;
2018-12-09 15:44:01 +00:00
u8 field_2CE;
2018-12-12 22:19:50 +00:00
u8 field_2CF[1213];
u16 field_78C;
2018-12-09 20:06:43 +00:00
s16 wallpaperSetId;
s16 wallpaperId;
2018-12-09 15:44:01 +00:00
u8 wallpaperTilemap[180 * 4];
u8 wallpaperChangeState;
u8 field_A63;
u8 field_A64;
u8 field_A65;
u8 field_A66;
u8 field_A67;
u8 *wallpaperTilemapPtr;
2018-12-12 22:19:50 +00:00
struct Sprite *field_A6C;
struct Sprite *partySprites[PARTY_SIZE];
struct Sprite *boxMonsSprites[IN_BOX_COUNT];
u8 field_B00[8];
u16 field_B08[40];
u16 field_B58[40];
u8 field_BA8[308];
2018-12-11 22:09:12 +00:00
u32 *field_CDC;
u32 cursorMonPersonality;
u16 cursorMonSpecies;
2018-12-09 20:06:43 +00:00
u16 selectedItem;
u16 field_CE8;
u8 field_CEA;
u8 field_CEB;
u8 field_CEC;
u8 field_CED;
2018-12-12 22:19:50 +00:00
u8 field_CEE[POKEMON_NAME_LENGTH + 1];
2018-12-11 22:09:12 +00:00
u8 cursorMonNick[36];
u8 cursorMonSpeciesName[36];
u8 cursorMonGenderLvlText[36];
u8 cursorMonItemName[47];
2018-12-10 22:42:44 +00:00
struct Sprite *field_D94;
struct Sprite *field_D98[2];
u16 *field_DA0;
2018-12-09 15:44:01 +00:00
struct PokemonMarkMenu field_DA4;
2018-12-09 20:06:43 +00:00
struct UnkPSSStruct_2002370 field_1E5C;
2018-12-10 20:36:52 +00:00
u8 field_20A4[220];
u8 field_2180;
u8 field_2181;
u8 field_2182;
u8 field_2183;
u8 field_2184;
u8 field_2185;
u8 field_2186;
u8 field_2187;
u8 field_2188;
struct BoxPokemon *field_218C;
2018-12-12 22:19:50 +00:00
u8 field_2190[80];
u8 field_21E0[POKEMON_NAME_LENGTH + 1];
u8 field_21EB[15]; // TODO: ITEM NAME LENGTH + 1
u8 field_21FA[58];
2018-12-10 20:36:52 +00:00
u16 movingItem;
2018-12-11 22:09:12 +00:00
u8 field_2236;
u8 field_2237;
u8 field_2238;
u8 field_2239;
u16 field_223A;
u16 *field_223C;
struct Sprite *cursorMonSprite;
u16 field_2244[16];
u8 field_2264[96];
u8 field_22C4[0x800];
u8 field_2AC4[12288];
2018-12-10 22:42:44 +00:00
u8 field_5AC4[0x800];
};
extern struct UnkPSSStruct_2002370 *gUnknown_02039D04;
extern struct PokemonStorageSystemData *gUnknown_02039D08;
2017-09-28 13:34:21 +00:00
u8* GetBoxNamePtr(u8 boxNumber);
Decompile TV (#80) * ClearTVShowData * special_0x44 * DoTVShow (nonmatching because align) * DoTVShowBravoTrainerPokemonProfile * Update field names * DoTVShowBravoTrainerBattleTower * Renaming of struct fields * sub_80EBFF4 and UpdateTVScreensOnMap * SetTVMetatilesOnMap * Power buttons for the TV screens on the map * special_0x45 * sub_80EC18C * special_0x4a * ResetGabbyAndTy * GabbyAndTyBeforeInterview * GabbyAndTyAfterInterview * Through IsTVShowInSearchOfTrainersAiring * GabbyAndTyGetLastQuote * GabbyAndTyGetLastBattleTrivia * GabbyAndTySetScriptVarsToFieldObjectLocalIds * InterviewAfter; use TVShow as a precursor for making the individual show structs anonymous * Make TV structs anonymous within the union * Move the TV union to its own subheader * Move TV show enums to the global.tv.h subheader * Funcion renaming * Apply static attributes where able * PutPokemonTodayCaughtOnAir * sub_80EC8A4 * PutPokemonTodayFailedOnTheAir * sub_80EC9E8, sub_80ECA10 * sub_80ECA38 * sub_80ECB00 * Put3CheersForPokeblocksOnTheAir * PutFanClubSpecialOnTheAir * ContestLiveUpdates_BeforeInterview * Other before-interview Contest Live Updates functions * ContestLiveUpdates_BeforeInterview_5 * InterviewAfter_BravoTrainerPokemonProfile * BravoTrainerPokemonProfile_BeforeInterview1 * BravoTrainerPokemonProfile_BeforeInterview2 * Disassemble TV data * Decompile TV data * InterviewAfter_BravoTrainerBattleTowerProfile * SaveRecordedItemPurchasesForTVShow * PutNameRaterShowOnTheAir * StartMassOutbreak * PutLilycoveContestLadyShowOnTheAir * InterviewAfter_FanClubLetter * Rip TV strings * InterviewAfter_RecentHappenings * InterviewAfter_PkmnFanClubOpinions * sub_80ED718 * EndMassOutbreak * sub_80ED888 * sub_80ED8B4 * UpdateMassOutbreakTimeLeft * sub_80ED950 * PutFishingAdviceShowOnTheAir * through sub_80EDA80 * ewram and common syms are now fetched from the object files * BSS symbols are taken from the tv.o file * through sub_80EDC60 * sub_80EDCE8 * sub_80EDD78 * through sub_80EDE84 * nomatching sub_80EDE98 * sub_80EDFB4 * sub_80EE104 * sub_80EE104 * sub_80EE184 * sub_80EE2CC * sub_80EE35C * sub_80EE44C * sub_80EE4DC * sub_80EE5A4 * sub_80EE69C * sub_80EE72C * sub_80EE7C0 * sub_80EE818 * sub_80EE8C8 * sub_80EEA70 * sub_80EEB98 * sub_80EEBF4 * through sub_80EED60 * Functions relating to Pokemon News * sub_80EEF6C * GetPriceReduction * IsPriceDiscounted * sub_80EF120 * through sub_80EF370 * sub_80EF40C * HasMixableShowAlreadyBeenSpawnedWithPlayerID * TV_SortPurchasesByQuantity * FindActiveBroadcastByShowType_SetScriptResult * InterviewBefore * through sub_80EF88C * through sub_80EF93C * through sub_80EFA24 * through TV_BernoulliTrial * sub_80EFB58 * sub_80EFBA4 * sub_80EFBDC * through sub_80EFD98 * ChangePokemonNickname * ChangeBoxPokemonNickname * sub_80EFF9C * through player_id_to_dword * CheckForBigMovieOrEmergencyNewsOnTV * GetMomOrDadStringForTVMessage * sub_80F01E8 * sub_80F0358 * sub_80F049C * TV record mixing functions * sub_80F06D0 * sub_80F0708 nonmatching * through sub_80F0B24 * sub_80F0B64 * through sub_80F0C04 * sub_80F0C7C * sub_80F0D60 * sub_80F0E58 * sub_80F0E84 * through sub_80F0F24 * sub_80F0F64 * sub_80F1208 * sub_80F1254 * sub_80F1290 * sub_80F12A4 * sub_80F14F8 * DoTVShowTodaysSmartShopper * DoTVShowTheNameRaterShow * DoTVShowPokemonTodaySuccessfulCapture * DoTVShowPokemonTodayFailedCapture * DoTVShowPokemonFanClubLetter * DoTVShowRecentHappenings * DoTVShowPokemonFanClubOpinions * DoTVShowPokemonNewsMassOutbreak * DoTVShowPokemonContestLiveUpdates * DoTVShowPokemonBattleUpdate * DoTVShow3CheersForPokeblocks * DoTVShowInSearchOfTrainers * Label GabbyAndTyData fields; remove ddump comments from data/text/tv.inc * DoTVShowPokemonAngler * DoTVShowTheWorldOfMasters; update RAM symbols and field names * Decorate static functions * DoTVShowTodaysRivalTrainer; region map enums * TVDewfordTrendWatcherNetworkTextGroup * DoTVShowHoennTreasureInvestigators * DoTVShowFindThatGamer * DoTVShowBreakingNewsTV * DoTVShowSecretBaseVisit * DoTVShowPokemonLotterWinnerFlashReport * DoTVShowThePokemonBattleSeminar * DoTVShowTrainerFanClubSpecial, DoTVShowTrainerFanClub * DoTVShowSpotTheCuties * DoTVShowPokemonNewsBattleFrontier * DoTVShowWhatsNo1InHoennToday * Helpers for DoTVShowSecretBaseSecrets * DoTVShowSecretBaseSecrets * DoTVShowSafariFanClub * Finish decompilation of tv.s * Some renaming * Rename text group pointers * revoke statis; pokenews enums * Labels are number one * Label all TV struct fields * Make data/text/tv.inc more readable * Split data/text/tv.inc * Rename pokenews text pointers * Frontier Symbol constants; indicate static rodata objects with 's' prefix * Fix leading spaces/tabs F*** CLion sometimes * Fix inconsequential warning
2017-10-13 15:09:36 +00:00
struct BoxPokemon *GetBoxedMonPtr(u8, u8);
void SetBoxMonNickFromAnyBox(u8, u8, u8 *);
2017-11-14 19:23:25 +00:00
void CompactPartySlots(void);
2017-11-11 13:45:08 +00:00
u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request);
bool8 CheckFreePokemonStorageSpace(void);
2018-08-10 21:07:23 +00:00
u8 StorageGetCurrentBox(void);
u8 sub_80D214C(struct BoxPokemon *a, u8 b, u8 c, u8 d);
2017-09-28 13:34:21 +00:00
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H