Merge pull request #454 from golemgalvanize/decompile_party_menu

Decompile party menu
This commit is contained in:
Diegoisawesome
2018-12-19 19:57:31 -06:00
committed by GitHub
29 changed files with 7324 additions and 18101 deletions

View File

@@ -4,6 +4,7 @@
#include "battle_arena.h"
#include "battle_controllers.h"
#include "battle_interface.h"
#include "battle_main.h"
#include "battle_message.h"
#include "battle_pyramid.h"
#include "battle_scripts.h"
@@ -55,20 +56,6 @@
#include "constants/species.h"
#include "constants/trainers.h"
struct UnknownPokemonStruct4
{
/*0x00*/ u16 species;
/*0x02*/ u16 heldItem;
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
/*0x0F*/ u8 level;
/*0x10*/ u16 hp;
/*0x12*/ u16 maxhp;
/*0x14*/ u32 status;
/*0x18*/ u32 personality;
/*0x1C*/ u8 gender;
/*0x1D*/ u8 language;
};
extern struct MusicPlayerInfo gMPlayInfo_SE1;
extern struct MusicPlayerInfo gMPlayInfo_SE2;
extern u8 gUnknown_0203CF00[];

View File

@@ -55,11 +55,11 @@ extern const u8* const gBattleScriptsForMoveEffects[];
extern void ShowSelectMovePokemonSummaryScreen(struct Pokemon* party, u8 monPartyId, u8 monCount, void (*callback)(void), u16 move); // pokemon summary screen
extern u8 sub_81C1B94(void); // pokemon summary screen
extern void sub_81D388C(struct Pokemon* mon, void* statStoreLocation); // pokenav.s
extern void sub_81D3640(u8 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s
extern void sub_81D3784(u8 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s
extern void sub_81D3640(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s
extern void sub_81D3784(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s
extern u8* GetMonNickname(struct Pokemon* mon, u8* dst); // party_menu
extern void sub_81B8E80(u8 battlerId, u8, u8); // party menu
extern bool8 sub_81B1250(void); // ?
extern bool8 IsMultiBattle(void); // ?
extern u8 sub_813B21C(void);
extern u16 get_unknown_box_id(void);
@@ -7609,7 +7609,7 @@ static void atk8F_forcerandomswitch(void)
}
*(gBattleStruct->monToSwitchIntoId + gBattlerTarget) = i;
if (!sub_81B1250())
if (!IsMultiBattle())
sub_803BDA0(gBattlerTarget);
if ((gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)

View File

@@ -103,7 +103,7 @@ static void sub_8161784(u8 taskId)
static void sub_81617B8(u8 taskId)
{
PlaySE(SE_SELECT);
sub_81B1B5C(&gText_CantBeUsedOnPkmn, 0);
sub_81B1B5C(gText_CantBeUsedOnPkmn, 0);
schedule_bg_copy_tilemap_to_vram(2);
gTasks[taskId].func = sub_8161784;
}

View File

@@ -38,7 +38,7 @@
#include "constants/vars.h"
extern void(*gUnknown_0203A0F4)(u8 taskId);
extern void (*gUnknown_03006328)(u8, u16, TaskFunc);
extern void (*gUnknown_03006328)(u8, TaskFunc);
extern void unknown_ItemMenu_Confirm(u8 taskId);
extern void sub_81C5B14(u8 taskId);
extern void ScriptUnfreezeEventObjects(void);
@@ -52,7 +52,7 @@ extern u8 BattleFrontier_OutsideEast_EventScript_242CFC[];
extern int sub_80247BC(void);
extern struct MapHeader* mapconnection_get_mapheader(struct MapConnection *connection);
extern void SetUpItemUseCallback(u8 taskId);
extern void ItemUseCB_Medicine(u8, u16, TaskFunc);
extern void ItemUseCB_Medicine(u8, TaskFunc);
extern void bag_menu_yes_no(u8, u8, const struct YesNoFuncTable*);
extern void sub_81C5924(void);
extern void sub_81C59BC(void);

7164
src/party_menu.c Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -129,7 +129,7 @@ struct UnkStruct_61CC04
};
// forward declarations
bool8 sub_81B1250(void);
bool8 IsMultiBattle(void);
static bool8 SummaryScreen_LoadGraphics(void);
static void SummaryScreen_LoadingCB2(void);
static void InitBGs(void);
@@ -1500,7 +1500,7 @@ static void sub_81C0604(u8 taskId, s8 a)
}
r4_2 = sub_80D214C(pssData->monList.boxMons, pssData->curMonIndex, pssData->maxMonIndex, a);
}
else if (sub_81B1250() == 1)
else if (IsMultiBattle() == TRUE)
{
r4_2 = sub_81C09B4(a);
}
@@ -3254,7 +3254,7 @@ static void PrintHeldItemName(void)
const u8 *text;
int offset;
if (pssData->summary.item == ITEM_ENIGMA_BERRY && sub_81B1250() == TRUE && (pssData->curMonIndex == 1 || pssData->curMonIndex == 4 || pssData->curMonIndex == 5))
if (pssData->summary.item == ITEM_ENIGMA_BERRY && IsMultiBattle() == TRUE && (pssData->curMonIndex == 1 || pssData->curMonIndex == 4 || pssData->curMonIndex == 5))
{
text = ItemId_GetName(ITEM_ENIGMA_BERRY);
}