Merge branch 'master' of https://github.com/pret/pokeemerald into ui-standardize

This commit is contained in:
GriffinR
2023-01-18 11:07:12 -05:00
1149 changed files with 44393 additions and 46317 deletions

View File

@@ -550,8 +550,7 @@ struct PokemonStorageSystemData
u16 *displayMonTilePtr;
struct Sprite *displayMonSprite;
u16 displayMonPalBuffer[0x40];
u8 tileBuffer[0x800];
u8 unusedBuffer[0x1800]; // Unused
u8 tileBuffer[MON_PIC_SIZE * 4]; // 4x the size of a 'Mon sprite to account for Castform
u8 itemIconBuffer[0x800];
u8 wallpaperBgTilemapBuffer[0x1000];
u8 displayMenuTilemapBuffer[0x800];
@@ -946,26 +945,26 @@ static const union AffineAnimCmd *const sAffineAnims_ChooseBoxMenu[] =
static const u8 sChooseBoxMenu_TextColors[] = {TEXT_COLOR_RED, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5};
static const u8 sText_OutOf30[] = _("/30");
static const u16 sChooseBoxMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/box_selection_popup.gbapal");
static const u8 sChooseBoxMenuCenter_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_center.4bpp");
static const u8 sChooseBoxMenuSides_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_sides.4bpp");
static const u32 sScrollingBg_Gfx[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.4bpp.lz");
static const u32 sScrollingBg_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.bin.lz");
static const u16 sDisplayMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/display_menu.gbapal"); // Unused
static const u32 sDisplayMenu_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/display_menu.bin.lz");
static const u16 sPkmnData_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/pkmn_data.bin");
static const u16 sChooseBoxMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/box_selection_popup.gbapal");
static const u8 sChooseBoxMenuCenter_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_center.4bpp");
static const u8 sChooseBoxMenuSides_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_sides.4bpp");
static const u32 sScrollingBg_Gfx[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.4bpp.lz");
static const u32 sScrollingBg_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.bin.lz");
static const u16 sDisplayMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/display_menu.gbapal"); // Unused
static const u32 sDisplayMenu_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/display_menu.bin.lz");
static const u16 sPkmnData_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/pkmn_data.bin");
// sInterface_Pal - parts of the display frame, "PkmnData"'s normal color, Close Box
static const u16 sInterface_Pal[] = INCBIN_U16("graphics/pokemon_storage/interface.gbapal");
static const u16 sPkmnDataGray_Pal[] = INCBIN_U16("graphics/pokemon_storage/pkmn_data_gray.gbapal");
static const u16 sBg_Pal[] = INCBIN_U16("graphics/pokemon_storage/bg.gbapal");
static const u16 sBgMoveItems_Pal[] = INCBIN_U16("graphics/pokemon_storage/bg_move_items.gbapal");
static const u16 sCloseBoxButton_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/close_box_button.bin");
static const u16 sPartySlotFilled_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/party_slot_filled.bin");
static const u16 sPartySlotEmpty_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/party_slot_empty.bin");
static const u16 sWaveform_Pal[] = INCBIN_U16("graphics/pokemon_storage/waveform.gbapal");
static const u32 sWaveform_Gfx[] = INCBIN_U32("graphics/pokemon_storage/waveform.4bpp");
static const u16 sUnused_Pal[] = INCBIN_U16("graphics/pokemon_storage/unused.gbapal");
static const u16 sTextWindows_Pal[] = INCBIN_U16("graphics/pokemon_storage/text_windows.gbapal");
static const u16 sInterface_Pal[] = INCBIN_U16("graphics/pokemon_storage/interface.gbapal");
static const u16 sPkmnDataGray_Pal[] = INCBIN_U16("graphics/pokemon_storage/pkmn_data_gray.gbapal");
static const u16 sScrollingBg_Pal[] = INCBIN_U16("graphics/pokemon_storage/scrolling_bg.gbapal");
static const u16 sScrollingBgMoveItems_Pal[] = INCBIN_U16("graphics/pokemon_storage/scrolling_bg_move_items.gbapal");
static const u16 sCloseBoxButton_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/close_box_button.bin");
static const u16 sPartySlotFilled_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/party_slot_filled.bin");
static const u16 sPartySlotEmpty_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/party_slot_empty.bin");
static const u16 sWaveform_Pal[] = INCBIN_U16("graphics/pokemon_storage/waveform.gbapal");
static const u32 sWaveform_Gfx[] = INCBIN_U32("graphics/pokemon_storage/waveform.4bpp");
static const u16 sUnused_Pal[] = INCBIN_U16("graphics/pokemon_storage/unused.gbapal");
static const u16 sTextWindows_Pal[] = INCBIN_U16("graphics/pokemon_storage/text_windows.gbapal");
static const struct WindowTemplate sWindowTemplates[] =
{
@@ -1764,6 +1763,8 @@ void ResetPokemonStorageSystem(void)
static void LoadChooseBoxMenuGfx(struct ChooseBoxMenu *menu, u16 tileTag, u16 palTag, u8 subpriority, bool32 loadPal)
{
// Because loadPal is always false, the below palette is never used.
// The Choose Box menu instead uses the palette indicated by palTag, which is always PALTAG_MISC_1 (sHandCursor_Pal)
struct SpritePalette palette =
{
sChooseBoxMenu_Pal, palTag
@@ -3755,7 +3756,7 @@ static void Task_ChangeScreen(u8 taskId)
mode = sStorage->summaryScreenMode;
FreePokeStorageData();
if (mode == SUMMARY_MODE_NORMAL && boxMons == &sSavedMovingMon.box)
ShowPokemonSummaryScreenSet40EF(mode, boxMons, monIndex, maxMonIndex, CB2_ReturnToPokeStorage);
ShowPokemonSummaryScreenHandleDeoxys(mode, boxMons, monIndex, maxMonIndex, CB2_ReturnToPokeStorage);
else
ShowPokemonSummaryScreen(mode, boxMons, monIndex, maxMonIndex, CB2_ReturnToPokeStorage);
break;
@@ -3853,9 +3854,9 @@ static void InitPalettesAndSprites(void)
LoadPalette(sPkmnDataGray_Pal, BG_PLTT_ID(2), sizeof(sPkmnDataGray_Pal));
LoadPalette(sTextWindows_Pal, BG_PLTT_ID(15), sizeof(sTextWindows_Pal));
if (sStorage->boxOption != OPTION_MOVE_ITEMS)
LoadPalette(sBg_Pal, BG_PLTT_ID(3), sizeof(sBg_Pal));
LoadPalette(sScrollingBg_Pal, BG_PLTT_ID(3), sizeof(sScrollingBg_Pal));
else
LoadPalette(sBgMoveItems_Pal, BG_PLTT_ID(3), sizeof(sBgMoveItems_Pal));
LoadPalette(sScrollingBgMoveItems_Pal, BG_PLTT_ID(3), sizeof(sScrollingBgMoveItems_Pal));
SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(1) | BGCNT_CHARBASE(1) | BGCNT_16COLOR | BGCNT_SCREENBASE(30));
CreateDisplayMonSprite();
@@ -8826,12 +8827,12 @@ static void TakeItemFromMon(u8 cursorArea, u8 cursorPos)
if (cursorArea == CURSOR_AREA_IN_BOX)
{
SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &itemId);
SetBoxMonIconObjMode(cursorPos, 1);
SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
}
else
{
SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &itemId);
SetPartyMonIconObjMode(cursorPos, 1);
SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
}
sStorage->movingItemId = sStorage->displayMonItemId;
@@ -8892,12 +8893,12 @@ static void GiveItemToMon(u8 cursorArea, u8 cursorPos)
if (cursorArea == CURSOR_AREA_IN_BOX)
{
SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &sStorage->movingItemId);
SetBoxMonIconObjMode(cursorPos, 0);
SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL);
}
else
{
SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &sStorage->movingItemId);
SetPartyMonIconObjMode(cursorPos, 0);
SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL);
}
}
@@ -8916,12 +8917,12 @@ static void MoveItemFromMonToBag(u8 cursorArea, u8 cursorPos)
if (cursorArea == CURSOR_AREA_IN_BOX)
{
SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &itemId);
SetBoxMonIconObjMode(cursorPos, 1);
SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
}
else
{
SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &itemId);
SetPartyMonIconObjMode(cursorPos, 1);
SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
}
}