mirror of https://github.com/pret/pokeemerald.git
Merge pull request #1044 from DizzyEggg/sss
Document pokemon summary screen
This commit is contained in:
commit
3c4b9dfacc
|
@ -4048,11 +4048,11 @@ extern const u32 gMoveTypes_Pal[];
|
|||
extern const u32 gStatusScreenBitmap[];
|
||||
|
||||
extern const u16 gSummaryScreenPowAcc_Tilemap[];
|
||||
extern const u16 gUnknown_08DC3C34[];
|
||||
extern const u16 gSummaryScreenAppealJam_Tilemap[];
|
||||
|
||||
extern const u32 gMoveTypes_Gfx[];
|
||||
extern const u32 gMoveSelectorBitmap[];
|
||||
extern const u32 gUnknown_08D97CF4[];
|
||||
extern const u32 gSummaryMoveSelect_Gfx[];
|
||||
extern const u32 gSummaryMoveSelect_Pal[];
|
||||
extern const u32 gStatusGfx_Icons[];
|
||||
extern const u32 gStatusPal_Icons[];
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ void SummaryScreen_DestroyUnknownTask(void);
|
|||
enum PokemonSummaryScreenMode
|
||||
{
|
||||
PSS_MODE_NORMAL,
|
||||
PSS_MODE_UNK1,
|
||||
PSS_MODE_LOCK_MOVES,
|
||||
PSS_MODE_BOX,
|
||||
PSS_MODE_SELECT_MOVE,
|
||||
};
|
||||
|
@ -31,6 +31,7 @@ enum PokemonSummaryScreenPage
|
|||
PSS_PAGE_SKILLS,
|
||||
PSS_PAGE_BATTLE_MOVES,
|
||||
PSS_PAGE_CONTEST_MOVES,
|
||||
PSS_PAGE_COUNT,
|
||||
};
|
||||
|
||||
#endif // GUARD_POKEMON_SUMMARY_SCREEN_H
|
||||
|
|
|
@ -1144,13 +1144,12 @@ const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapa
|
|||
const u32 gMoveTypes_Gfx[] = INCBIN_U32("graphics/types/move_types.4bpp.lz");
|
||||
const u32 gMoveTypes_Pal[] = INCBIN_U32("graphics/types/move_types.gbapal.lz");
|
||||
|
||||
const u32 gMoveSelectorBitmap[] = INCBIN_U32("graphics/interface/summary_frames.4bpp.lz");
|
||||
const u32 gUnknown_08D97CF4[] = INCBIN_U32("graphics/interface/summary_frames.gbapal.lz");
|
||||
const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/interface/summary_frames.4bpp.lz");
|
||||
const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/interface/summary_frames.gbapal.lz");
|
||||
|
||||
const u32 gStatusScreenBitmap[] = INCBIN_U32("graphics/interface/status_screen.4bpp.lz");
|
||||
const u32 gStatusScreenPalette[] = INCBIN_U32("graphics/interface/status_screen.gbapal.lz");
|
||||
const u32 gPageInfoTilemap[] = INCBIN_U32("graphics/interface/status_screen.bin.lz");
|
||||
|
||||
const u32 gPageSkillsTilemap[] = INCBIN_U32("graphics/interface/status_tilemap1.bin.lz");
|
||||
const u32 gPageBattleMovesTilemap[] = INCBIN_U32("graphics/interface/status_tilemap2.bin.lz");
|
||||
const u32 gPageContestMovesTilemap[] = INCBIN_U32("graphics/interface/status_tilemap3.bin.lz");
|
||||
|
@ -1280,9 +1279,7 @@ const u32 gPokedexSearchMenuNational_Tilemap[] = INCBIN_U32("graphics/pokedex/se
|
|||
const u32 gPokedexSearchMenuHoenn_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_hoenn.bin.lz");
|
||||
|
||||
const u16 gSummaryScreenPowAcc_Tilemap[] = INCBIN_U16("graphics/interface/powacc_tilemap.bin");
|
||||
|
||||
const u16 gUnknown_08DC3C34[] = INCBIN_U16("graphics/interface/unk_tilemap.bin"); // probably trade summary screen related?
|
||||
|
||||
const u16 gSummaryScreenAppealJam_Tilemap[] = INCBIN_U16("graphics/interface/appealjam_tilemap.bin");
|
||||
const u16 gSummaryScreenWindow_Tilemap[] = INCBIN_U16("graphics/interface/summary.bin");
|
||||
|
||||
const u16 gIntroCopyright_Pal[] = INCBIN_U16("graphics/intro/copyright.gbapal");
|
||||
|
|
|
@ -2129,7 +2129,7 @@ static void DrawEmptySlot(u8 windowId)
|
|||
LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[0]), paletteOffsets[0] + palNum, 2); \
|
||||
LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[1]), paletteOffsets[1] + palNum, 2); \
|
||||
LoadPalette(GetPartyMenuPalBufferPtr(paletteIds[2]), paletteOffsets[2] + palNum, 2); \
|
||||
}
|
||||
}
|
||||
|
||||
static void LoadPartyBoxPalette(struct PartyMenuBox *menuBox, u8 palFlags)
|
||||
{
|
||||
|
@ -2708,7 +2708,7 @@ static void CB2_ShowPokemonSummaryScreen(void)
|
|||
if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE)
|
||||
{
|
||||
UpdatePartyToBattleOrder();
|
||||
ShowPokemonSummaryScreen(PSS_MODE_UNK1, gPlayerParty, gPartyMenu.slotId, gPlayerPartyCount - 1, CB2_ReturnToPartyMenuFromSummaryScreen);
|
||||
ShowPokemonSummaryScreen(PSS_MODE_LOCK_MOVES, gPlayerParty, gPartyMenu.slotId, gPlayerPartyCount - 1, CB2_ReturnToPartyMenuFromSummaryScreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2899,7 +2899,7 @@ static void Task_SlideSelectedSlotsOnscreen(u8 taskId)
|
|||
|
||||
SlidePartyMenuBoxOneStep(taskId);
|
||||
SlidePartyMenuBoxSpritesOneStep(taskId);
|
||||
|
||||
|
||||
// Both slots have slid back onscreen
|
||||
if (tSlot1SlideDir == 0 && tSlot2SlideDir == 0)
|
||||
{
|
||||
|
@ -3096,7 +3096,7 @@ static void Task_HandleSwitchItemsYesNoInput(u8 taskId)
|
|||
{
|
||||
case 0: // Yes, switch items
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
|
||||
|
||||
// No room to return held item to bag
|
||||
if (AddBagItem(sPartyMenuItemId, 1) == FALSE)
|
||||
{
|
||||
|
@ -5456,7 +5456,7 @@ static void RemoveItemToGiveFromBag(u16 item)
|
|||
// but there always should be, and the return is ignored in all uses
|
||||
static bool8 ReturnGiveItemToBagOrPC(u16 item)
|
||||
{
|
||||
if (gPartyMenu.action == PARTY_ACTION_GIVE_ITEM)
|
||||
if (gPartyMenu.action == PARTY_ACTION_GIVE_ITEM)
|
||||
return AddBagItem(item, 1);
|
||||
else
|
||||
return AddPCItem(item, 1);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
32
src/trade.c
32
src/trade.c
|
@ -1199,7 +1199,7 @@ static void QueueLinkTradeData(void)
|
|||
{
|
||||
if (sTradeMenuData->playerLinkFlagChoseAction && sTradeMenuData->partnerLinkFlagChoseAction)
|
||||
{
|
||||
if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE
|
||||
if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE
|
||||
&& sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_TRADE)
|
||||
{
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_BOTH_MONS_SELECTED;
|
||||
|
@ -1208,7 +1208,7 @@ static void QueueLinkTradeData(void)
|
|||
QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA);
|
||||
sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0;
|
||||
}
|
||||
else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE
|
||||
else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE
|
||||
&& sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_CANCEL)
|
||||
{
|
||||
PrintTradeMessage(TRADE_MSG_CANCELED);
|
||||
|
@ -1219,7 +1219,7 @@ static void QueueLinkTradeData(void)
|
|||
sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0;
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU;
|
||||
}
|
||||
else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL
|
||||
else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL
|
||||
&& sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_TRADE)
|
||||
{
|
||||
PrintTradeMessage(TRADE_MSG_FRIEND_WANTS_TO_TRADE);
|
||||
|
@ -1230,7 +1230,7 @@ static void QueueLinkTradeData(void)
|
|||
sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0;
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU;
|
||||
}
|
||||
else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL
|
||||
else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL
|
||||
&& sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_CANCEL)
|
||||
{
|
||||
sTradeMenuData->linkData[0] = LINKCMD_CANCEL_TRADE;
|
||||
|
@ -1244,7 +1244,7 @@ static void QueueLinkTradeData(void)
|
|||
|
||||
if (sTradeMenuData->playerLinkFlagStatus && sTradeMenuData->partnerLinkFlagStatus)
|
||||
{
|
||||
if (sTradeMenuData->playerLinkFlagStatus == INITIATE_TRADE
|
||||
if (sTradeMenuData->playerLinkFlagStatus == INITIATE_TRADE
|
||||
&& sTradeMenuData->partnerLinkFlagStatus == INITIATE_TRADE)
|
||||
{
|
||||
sTradeMenuData->linkData[0] = LINKCMD_START_TRADE;
|
||||
|
@ -1255,7 +1255,7 @@ static void QueueLinkTradeData(void)
|
|||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_FADE_OUT;
|
||||
}
|
||||
|
||||
if (sTradeMenuData->playerLinkFlagStatus == CANCEL_TRADE
|
||||
if (sTradeMenuData->playerLinkFlagStatus == CANCEL_TRADE
|
||||
|| sTradeMenuData->partnerLinkFlagStatus == CANCEL_TRADE)
|
||||
{
|
||||
PrintTradeMessage(TRADE_MSG_CANCELED);
|
||||
|
@ -1464,10 +1464,10 @@ static void TradeMenuShowMonSummaryScreen(void)
|
|||
{
|
||||
// Player's party
|
||||
if (sTradeMenuData->cursorPosition < PARTY_SIZE)
|
||||
ShowPokemonSummaryScreen(PSS_MODE_UNK1, gPlayerParty, sTradeMenuData->cursorPosition, sTradeMenuData->partyCounts[TRADE_PLAYER] - 1, CB2_ReturnToTradeMenu);
|
||||
ShowPokemonSummaryScreen(PSS_MODE_LOCK_MOVES, gPlayerParty, sTradeMenuData->cursorPosition, sTradeMenuData->partyCounts[TRADE_PLAYER] - 1, CB2_ReturnToTradeMenu);
|
||||
// Partner's party
|
||||
else
|
||||
ShowPokemonSummaryScreen(PSS_MODE_UNK1, gEnemyParty, sTradeMenuData->cursorPosition - PARTY_SIZE, sTradeMenuData->partyCounts[TRADE_PARTNER] - 1, CB2_ReturnToTradeMenu);
|
||||
ShowPokemonSummaryScreen(PSS_MODE_LOCK_MOVES, gEnemyParty, sTradeMenuData->cursorPosition - PARTY_SIZE, sTradeMenuData->partyCounts[TRADE_PARTNER] - 1, CB2_ReturnToTradeMenu);
|
||||
FreeAllWindowBuffers();
|
||||
}
|
||||
}
|
||||
|
@ -1504,7 +1504,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 player
|
|||
if (hasLiveMon)
|
||||
hasLiveMon = BOTH_MONS_VALID;
|
||||
|
||||
return hasLiveMon; //PLAYER_MON_INVALID or BOTH_MONS_VALID
|
||||
return hasLiveMon; //PLAYER_MON_INVALID or BOTH_MONS_VALID
|
||||
}
|
||||
|
||||
// Returns TRUE if the partner's selected mon is invalid, FALSE otherwise
|
||||
|
@ -1841,10 +1841,10 @@ static void DrawTradeMenuParty(u8 whichParty)
|
|||
sTradeMenuData->drawPartyState[whichParty]++;
|
||||
break;
|
||||
case 4:
|
||||
DrawTradeMenuPartyMonInfo(whichParty, partyIdx,
|
||||
sTradeMenuPartyMonBoxDimensions[whichParty][0] + 4,
|
||||
sTradeMenuPartyMonBoxDimensions[whichParty][1] + 1,
|
||||
sTradeMenuPartyMonBoxDimensions[whichParty][0],
|
||||
DrawTradeMenuPartyMonInfo(whichParty, partyIdx,
|
||||
sTradeMenuPartyMonBoxDimensions[whichParty][0] + 4,
|
||||
sTradeMenuPartyMonBoxDimensions[whichParty][1] + 1,
|
||||
sTradeMenuPartyMonBoxDimensions[whichParty][0],
|
||||
sTradeMenuPartyMonBoxDimensions[whichParty][1]);
|
||||
sTradeMenuData->drawPartyState[whichParty]++;
|
||||
break;
|
||||
|
@ -2028,7 +2028,7 @@ static void ResetTradeMenuPartyPositions(u8 whichParty)
|
|||
static void PrintNicknamesForTradeMenu(void)
|
||||
{
|
||||
rbox_fill_rectangle(1);
|
||||
//PrintPartyNicknamesForTradeMenu(TRADE_PLAYER); ?
|
||||
//PrintPartyNicknamesForTradeMenu(TRADE_PLAYER); ?
|
||||
PrintPartyNicknamesForTradeMenu(TRADE_PARTNER);
|
||||
}
|
||||
|
||||
|
@ -4539,8 +4539,8 @@ static void CB2_TryFinishTrade(void)
|
|||
else
|
||||
{
|
||||
UpdateTradeFinishFlags();
|
||||
if (mpId == 0
|
||||
&& sTradeData->playerLinkFlagFinishTrade == READY_FINISH_TRADE
|
||||
if (mpId == 0
|
||||
&& sTradeData->playerLinkFlagFinishTrade == READY_FINISH_TRADE
|
||||
&& sTradeData->partnerLinkFlagFinishTrade == READY_FINISH_TRADE)
|
||||
{
|
||||
sTradeData->linkData[0] = LINKCMD_CONFIRM_FINISH_TRADE;
|
||||
|
|
Loading…
Reference in New Issue