mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-25 15:49:02 -05:00
Summary screen PR feedback 2
This commit is contained in:
parent
72db45ff31
commit
683cfc3a26
|
|
@ -154,6 +154,11 @@ enum PSSPoffinFeedMsg {
|
|||
#define EMPTY_HEART_BASE_TILE 0x12E
|
||||
#define FILLED_HEART_BASE_TILE 0x12C
|
||||
|
||||
#define GREEN_HEALTHBAR_BASE_TILE 0xC0
|
||||
#define YELLOW_HEALTHBAR_BASE_TILE 0xE0
|
||||
#define RED_HEALTHBAR_BASE_TILE 0x100
|
||||
#define PALETTE_SLOT_10_MASK 0xA000
|
||||
|
||||
#define RIBBONS_PER_ROW 4
|
||||
|
||||
typedef struct PokemonSummary {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define POKEPLATINUM_TOUCH_SCREEN_H
|
||||
|
||||
#define TOUCHSCREEN_USE_CIRCLE 0xfe
|
||||
#define TOUCHSCREEN_INPUT_NONE 0xFFFFFFFF
|
||||
|
||||
/**
|
||||
* These two structs represent regions that can be checked on the touch screen.
|
||||
|
|
|
|||
|
|
@ -602,11 +602,11 @@
|
|||
<attribute name="window_context_name">used</attribute>
|
||||
<language name="English">CATEGORY</language>
|
||||
</row>
|
||||
<row id="pl_msg_00000455_00150" index="150">
|
||||
<row id="pss_move_power_template" index="150">
|
||||
<attribute name="window_context_name">used</attribute>
|
||||
<language name="English">{STRVAR_1 52, 0, 0}</language>
|
||||
</row>
|
||||
<row id="pl_msg_00000455_00151" index="151">
|
||||
<row id="pss_move_accuracy_template" index="151">
|
||||
<attribute name="window_context_name">used</attribute>
|
||||
<language name="English">{STRVAR_1 52, 0, 0}</language>
|
||||
</row>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "move_table.h"
|
||||
#include "narc.h"
|
||||
#include "overlay_manager.h"
|
||||
#include "palette.h"
|
||||
#include "party.h"
|
||||
#include "pokemon.h"
|
||||
#include "render_window.h"
|
||||
|
|
@ -529,33 +530,33 @@ static int HandleInput_Main(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_TRANSITION_OUT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_LEFT) {
|
||||
if (JOY_REPEAT(PAD_KEY_LEFT)) {
|
||||
ChangePage(summaryScreen, -1);
|
||||
return PSS_STATE_HANDLE_INPUT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_RIGHT) {
|
||||
if (JOY_REPEAT(PAD_KEY_RIGHT)) {
|
||||
ChangePage(summaryScreen, 1);
|
||||
return PSS_STATE_HANDLE_INPUT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_UP) {
|
||||
if (JOY_REPEAT(PAD_KEY_UP)) {
|
||||
ChangeSummaryMon(summaryScreen, -1);
|
||||
return PSS_STATE_HANDLE_INPUT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_DOWN) {
|
||||
if (JOY_REPEAT(PAD_KEY_DOWN)) {
|
||||
ChangeSummaryMon(summaryScreen, 1);
|
||||
return PSS_STATE_HANDLE_INPUT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_B) {
|
||||
if (JOY_NEW(PAD_BUTTON_B)) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_DECIDE);
|
||||
summaryScreen->data->returnMode = 1;
|
||||
return PSS_STATE_TRANSITION_OUT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_A) {
|
||||
if (JOY_NEW(PAD_BUTTON_A)) {
|
||||
if (summaryScreen->data->mode == PSS_MODE_POFFIN && summaryScreen->page == PSS_MODE_CONDITION) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_DECIDE);
|
||||
return TryFeedPoffin(summaryScreen);
|
||||
|
|
@ -628,7 +629,7 @@ static int WaitHideContestMoveInfo(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int HandleInput_MoveSelect(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_UP) {
|
||||
if (JOY_NEW(PAD_KEY_UP)) {
|
||||
if (TryChangeSelectedMove(summaryScreen, -1) == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UpdateMoveInfo(summaryScreen);
|
||||
|
|
@ -637,7 +638,7 @@ static int HandleInput_MoveSelect(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_MOVE_SELECT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_DOWN) {
|
||||
if (JOY_NEW(PAD_KEY_DOWN)) {
|
||||
if (TryChangeSelectedMove(summaryScreen, 1) == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UpdateMoveInfo(summaryScreen);
|
||||
|
|
@ -646,7 +647,7 @@ static int HandleInput_MoveSelect(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_MOVE_SELECT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_A) {
|
||||
if (JOY_NEW(PAD_BUTTON_A)) {
|
||||
if (summaryScreen->cursor == LEARNED_MOVES_MAX) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_SYU01);
|
||||
summaryScreen->subscreen = 0;
|
||||
|
|
@ -664,7 +665,7 @@ static int HandleInput_MoveSelect(PokemonSummaryScreen *summaryScreen)
|
|||
}
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_B) {
|
||||
if (JOY_NEW(PAD_BUTTON_B)) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_SYU01);
|
||||
summaryScreen->subscreen = 0;
|
||||
|
||||
|
|
@ -680,7 +681,7 @@ static int HandleInput_MoveSelect(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int HandleInput_MoveSwap(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_UP) {
|
||||
if (JOY_NEW(PAD_KEY_UP)) {
|
||||
if (TryChangeSelectedMove(summaryScreen, -1) == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UpdateMoveInfo(summaryScreen);
|
||||
|
|
@ -689,7 +690,7 @@ static int HandleInput_MoveSwap(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_MOVE_SWAP;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_DOWN) {
|
||||
if (JOY_NEW(PAD_KEY_DOWN)) {
|
||||
if (TryChangeSelectedMove(summaryScreen, 1) == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UpdateMoveInfo(summaryScreen);
|
||||
|
|
@ -698,7 +699,7 @@ static int HandleInput_MoveSwap(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_MOVE_SWAP;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_A) {
|
||||
if (JOY_NEW(PAD_BUTTON_A)) {
|
||||
CellActor_SetDrawFlag(summaryScreen->unk_41C[10], FALSE);
|
||||
|
||||
if (summaryScreen->cursor != LEARNED_MOVES_MAX && summaryScreen->cursor != summaryScreen->cursorTmp) {
|
||||
|
|
@ -714,7 +715,7 @@ static int HandleInput_MoveSwap(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_MOVE_SELECT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_B) {
|
||||
if (JOY_NEW(PAD_BUTTON_B)) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_DECIDE);
|
||||
CellActor_SetDrawFlag(summaryScreen->unk_41C[10], FALSE);
|
||||
return PSS_STATE_MOVE_SELECT;
|
||||
|
|
@ -725,17 +726,17 @@ static int HandleInput_MoveSwap(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int HandleInput_LearnMove(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_LEFT) {
|
||||
if (JOY_NEW(PAD_KEY_LEFT)) {
|
||||
ChangePage(summaryScreen, -1);
|
||||
return PSS_STATE_LEARN_MOVE;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_RIGHT) {
|
||||
if (JOY_NEW(PAD_KEY_RIGHT)) {
|
||||
ChangePage(summaryScreen, 1);
|
||||
return PSS_STATE_LEARN_MOVE;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_UP) {
|
||||
if (JOY_NEW(PAD_KEY_UP)) {
|
||||
if (TryChangeSelectedMove(summaryScreen, -1) == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UpdateMoveInfo(summaryScreen);
|
||||
|
|
@ -744,7 +745,7 @@ static int HandleInput_LearnMove(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_LEARN_MOVE;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_KEY_DOWN) {
|
||||
if (JOY_NEW(PAD_KEY_DOWN)) {
|
||||
if (TryChangeSelectedMove(summaryScreen, 1) == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UpdateMoveInfo(summaryScreen);
|
||||
|
|
@ -753,7 +754,7 @@ static int HandleInput_LearnMove(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_LEARN_MOVE;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_A) {
|
||||
if (JOY_NEW(PAD_BUTTON_A)) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_DECIDE);
|
||||
|
||||
if (summaryScreen->cursor != LEARNED_MOVES_MAX) {
|
||||
|
|
@ -770,7 +771,7 @@ static int HandleInput_LearnMove(PokemonSummaryScreen *summaryScreen)
|
|||
return PSS_STATE_TRANSITION_OUT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & PAD_BUTTON_B) {
|
||||
if (JOY_NEW(PAD_BUTTON_B)) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_DECIDE);
|
||||
summaryScreen->data->selectedSlot = 4;
|
||||
summaryScreen->data->returnMode = 1;
|
||||
|
|
@ -782,7 +783,7 @@ static int HandleInput_LearnMove(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int WaitForHMMsgInput(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
if (JOY_NEW(PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
UpdateMoveInfo(summaryScreen);
|
||||
return PSS_STATE_LEARN_MOVE;
|
||||
}
|
||||
|
|
@ -810,27 +811,27 @@ static int WaitHideRibbonInfo(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int HandleInput_RibbonSelect(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_LEFT) {
|
||||
if (JOY_REPEAT(PAD_KEY_LEFT)) {
|
||||
ChangeSelectedRibbon(summaryScreen, -1);
|
||||
return PSS_STATE_RIBBON_SELECT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_RIGHT) {
|
||||
if (JOY_REPEAT(PAD_KEY_RIGHT)) {
|
||||
ChangeSelectedRibbon(summaryScreen, 1);
|
||||
return PSS_STATE_RIBBON_SELECT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_UP) {
|
||||
if (JOY_REPEAT(PAD_KEY_UP)) {
|
||||
ChangeSelectedRibbon(summaryScreen, -1 * RIBBONS_PER_ROW);
|
||||
return PSS_STATE_RIBBON_SELECT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeysRepeatable & PAD_KEY_DOWN) {
|
||||
if (JOY_REPEAT(PAD_KEY_DOWN)) {
|
||||
ChangeSelectedRibbon(summaryScreen, RIBBONS_PER_ROW);
|
||||
return PSS_STATE_RIBBON_SELECT;
|
||||
}
|
||||
|
||||
if (gCoreSys.pressedKeys & (PAD_BUTTON_B | PAD_BUTTON_A)) {
|
||||
if (JOY_NEW(PAD_BUTTON_B | PAD_BUTTON_A)) {
|
||||
Sound_PlayEffect(SEQ_SE_DP_DECIDE);
|
||||
summaryScreen->subscreen = 0;
|
||||
return PSS_STATE_HIDE_RIBBON_INFO;
|
||||
|
|
@ -866,7 +867,7 @@ static int HandleInput_Subscreen(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int SetupPoffinFeedConditionPage(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
if (JOY_NEW(PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
BoxPokemon *boxMon;
|
||||
Pokemon *mon;
|
||||
|
||||
|
|
@ -923,7 +924,7 @@ static int SetupPoffinFeedConditionPage(PokemonSummaryScreen *summaryScreen)
|
|||
Heap_FreeToHeap(mon);
|
||||
}
|
||||
|
||||
Font_LoadScreenIndicatorsPalette(0, 14 * 32, HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
||||
Font_LoadScreenIndicatorsPalette(0, PLTT_OFFSET(14), HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
||||
LoadMessageBoxGraphics(summaryScreen->bgConfig, BG_LAYER_MAIN_1, (1024 - (18 + 12)), 13, Options_Frame(summaryScreen->data->options), HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
||||
|
||||
if (summaryScreen->subscreen == 0) {
|
||||
|
|
@ -942,7 +943,7 @@ static int SetupPoffinFeedConditionPage(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int PrintContestStatChangeMsgs(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
if (JOY_NEW(PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
for (u8 i = 0; i < CONTEST_TYPE_MAX; i++) {
|
||||
if (summaryScreen->subscreen & (1 << i)) {
|
||||
PokemonSummaryScreen_PrintPoffinFeedMsg(summaryScreen, i);
|
||||
|
|
@ -961,7 +962,7 @@ static int PrintContestStatChangeMsgs(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static int WaitForPoffinFeedMsgInput(PokemonSummaryScreen *dummy)
|
||||
{
|
||||
if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
if (JOY_NEW(PAD_BUTTON_A | PAD_BUTTON_B)) {
|
||||
return PSS_STATE_TRANSITION_OUT;
|
||||
}
|
||||
|
||||
|
|
@ -1002,7 +1003,7 @@ static void SetMonDataFromBoxMon(PokemonSummaryScreen *summaryScreen, BoxPokemon
|
|||
static void SetMonDataFromMon(PokemonSummaryScreen *summaryScreen, Pokemon *mon, PokemonSummaryMonData *monData)
|
||||
{
|
||||
BOOL reencrypt = Pokemon_EnterDecryptionContext(mon);
|
||||
monData->species = (u16)Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL);
|
||||
monData->species = Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL);
|
||||
BoxPokemon *boxMon = Pokemon_GetBoxPokemon(mon);
|
||||
|
||||
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_species_name_template, summaryScreen->strbuf);
|
||||
|
|
@ -1104,7 +1105,7 @@ static void SetMonDataFromMon(PokemonSummaryScreen *summaryScreen, Pokemon *mon,
|
|||
monData->ribbons[3] = 0;
|
||||
summaryScreen->ribbonMax = 0;
|
||||
|
||||
for (i = 0; i < 80; i++) {
|
||||
for (i = 0; i < RIBBON_MAX; i++) {
|
||||
if (Pokemon_GetValue(mon, Ribbon_GetData(i, RIBBON_DATA_RIBBON_ID), NULL) != 0) {
|
||||
monData->ribbons[i / 32] |= (1 << (i & 0x1f));
|
||||
summaryScreen->ribbonMax++;
|
||||
|
|
@ -1338,33 +1339,33 @@ static void LoadCurrentPageTilemap(PokemonSummaryScreen *summaryScreen)
|
|||
|
||||
static void DrawHealthBar(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
u16 v0;
|
||||
u16 baseTile;
|
||||
|
||||
switch (HealthBar_Color(summaryScreen->monData.curHP, summaryScreen->monData.maxHP, 48)) {
|
||||
case BARCOLOR_MAX:
|
||||
case BARCOLOR_GREEN:
|
||||
case BARCOLOR_EMPTY:
|
||||
v0 = 0xc0 | 0xa000;
|
||||
baseTile = GREEN_HEALTHBAR_BASE_TILE | PALETTE_SLOT_10_MASK;
|
||||
break;
|
||||
case BARCOLOR_YELLOW:
|
||||
v0 = 0xe0 | 0xa000;
|
||||
baseTile = YELLOW_HEALTHBAR_BASE_TILE | PALETTE_SLOT_10_MASK;
|
||||
break;
|
||||
case BARCOLOR_RED:
|
||||
v0 = 0x100 | 0xa000;
|
||||
baseTile = RED_HEALTHBAR_BASE_TILE | PALETTE_SLOT_10_MASK;
|
||||
break;
|
||||
}
|
||||
|
||||
u8 pixelCount = App_PixelCount(summaryScreen->monData.curHP, summaryScreen->monData.maxHP, 48);
|
||||
u16 v1;
|
||||
u16 tile;
|
||||
|
||||
for (u8 i = 0; i < 6; i++) {
|
||||
if (pixelCount >= 8) {
|
||||
v1 = v0 + 8;
|
||||
tile = baseTile + 8;
|
||||
} else {
|
||||
v1 = v0 + pixelCount;
|
||||
tile = baseTile + pixelCount;
|
||||
}
|
||||
|
||||
Bg_FillTilemapRect(summaryScreen->bgConfig, BG_LAYER_MAIN_3, v1, 24 + i, 6, 1, 1, 17);
|
||||
Bg_FillTilemapRect(summaryScreen->bgConfig, BG_LAYER_MAIN_3, tile, 24 + i, 6, 1, 1, TILEMAP_FILL_VAL_INCLUDES_PALETTE);
|
||||
|
||||
if (pixelCount < 8) {
|
||||
pixelCount = 0;
|
||||
|
|
@ -1564,11 +1565,11 @@ void *PokemonSummaryScreen_MonData(PokemonSummaryScreen *summaryScreen)
|
|||
{
|
||||
switch (summaryScreen->data->dataType) {
|
||||
case PSS_DATA_MON:
|
||||
return (void *)((u32)summaryScreen->data->monData + (Pokemon_GetStructSize() * summaryScreen->data->pos));
|
||||
return summaryScreen->data->monData + (Pokemon_GetStructSize() * summaryScreen->data->pos);
|
||||
case PSS_DATA_PARTY_MON:
|
||||
return (void *)Party_GetPokemonBySlotIndex(summaryScreen->data->monData, summaryScreen->data->pos);
|
||||
return Party_GetPokemonBySlotIndex(summaryScreen->data->monData, summaryScreen->data->pos);
|
||||
case PSS_DATA_BOX_MON:
|
||||
return (void *)((u32)summaryScreen->data->monData + (BoxPokemon_GetStructSize() * summaryScreen->data->pos));
|
||||
return summaryScreen->data->monData + (BoxPokemon_GetStructSize() * summaryScreen->data->pos);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
@ -2113,7 +2114,7 @@ u8 PokemonSummaryScreen_RibbonNumAt(PokemonSummaryScreen *summaryScreen, u8 col)
|
|||
static int TryFeedPoffin(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (summaryScreen->monData.sheen == MAX_POKEMON_SHEEN) {
|
||||
Font_LoadScreenIndicatorsPalette(0, 14 * 32, HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
||||
Font_LoadScreenIndicatorsPalette(0, PLTT_OFFSET(14), HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
||||
LoadMessageBoxGraphics(summaryScreen->bgConfig, BG_LAYER_MAIN_1, (1024 - (18 + 12)), 13, Options_Frame(summaryScreen->data->options), HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
||||
PokemonSummaryScreen_PrintPoffinFeedMsg(summaryScreen, PSS_MSG_MON_WONT_EAT_MORE);
|
||||
summaryScreen->data->returnMode = 1;
|
||||
|
|
|
|||
|
|
@ -24,30 +24,30 @@ static void sub_0223D0BC(PokemonSummaryScreen *summaryScreen);
|
|||
static int CheckSubscreenRectanglePress(PokemonSummaryScreen *summaryScreen);
|
||||
|
||||
static const PSSSubscreenButton sSubscreenButtons_Normal[] = {
|
||||
{ PSS_PAGE_INFO, 0x1, 0x1, 0x4 },
|
||||
{ PSS_PAGE_MEMO, 0x1, 0x2, 0xA },
|
||||
{ PSS_PAGE_SKILLS, 0x2, 0x5, 0xF },
|
||||
{ PSS_PAGE_BATTLE_MOVES, 0x3, 0xA, 0x12 },
|
||||
{ PSS_PAGE_CONDITION, 0x2, 0x11, 0x12 },
|
||||
{ PSS_PAGE_CONTEST_MOVES, 0x3, 0x16, 0xF },
|
||||
{ PSS_PAGE_RIBBONS, 0x4, 0x19, 0xA },
|
||||
{ PSS_PAGE_EXIT, 0x4, 0x1A, 0x4 },
|
||||
{ PSS_PAGE_NONE, 0xFF, 0xFF, 0xFF }
|
||||
{ PSS_PAGE_INFO, 1, 1, 4 },
|
||||
{ PSS_PAGE_MEMO, 1, 2, 10 },
|
||||
{ PSS_PAGE_SKILLS, 2, 5, 15 },
|
||||
{ PSS_PAGE_BATTLE_MOVES, 3, 10, 18 },
|
||||
{ PSS_PAGE_CONDITION, 2, 17, 18 },
|
||||
{ PSS_PAGE_CONTEST_MOVES, 3, 22, 15 },
|
||||
{ PSS_PAGE_RIBBONS, 4, 25, 10 },
|
||||
{ PSS_PAGE_EXIT, 4, 26, 4 },
|
||||
{ PSS_PAGE_NONE, 255, 255, 255 }
|
||||
};
|
||||
|
||||
static const PSSSubscreenButton sSubscreenButtons_NoContestInfo[] = {
|
||||
{ PSS_PAGE_INFO, 0x1, 0x2, 0x9 },
|
||||
{ PSS_PAGE_MEMO, 0x1, 0x6, 0xF },
|
||||
{ PSS_PAGE_SKILLS, 0x2, 0xE, 0x12 },
|
||||
{ PSS_PAGE_BATTLE_MOVES, 0x3, 0x16, 0xF },
|
||||
{ PSS_PAGE_EXIT, 0x4, 0x1A, 0x9 },
|
||||
{ PSS_PAGE_NONE, 0xFF, 0xFF, 0xFF }
|
||||
{ PSS_PAGE_INFO, 1, 2, 9 },
|
||||
{ PSS_PAGE_MEMO, 1, 6, 15 },
|
||||
{ PSS_PAGE_SKILLS, 2, 14, 18 },
|
||||
{ PSS_PAGE_BATTLE_MOVES, 3, 22, 15 },
|
||||
{ PSS_PAGE_EXIT, 4, 26, 9 },
|
||||
{ PSS_PAGE_NONE, 255, 255, 255 }
|
||||
};
|
||||
|
||||
static const PSSSubscreenButton sSubscreenButtons_UnusedMovesOnly[] = {
|
||||
{ PSS_PAGE_BATTLE_MOVES, 0x3, 0xA, 0x12 },
|
||||
{ PSS_PAGE_CONTEST_MOVES, 0x3, 0x11, 0x12 },
|
||||
{ PSS_PAGE_NONE, 0xFF, 0xFF, 0xFF }
|
||||
{ PSS_PAGE_BATTLE_MOVES, 3, 10, 18 },
|
||||
{ PSS_PAGE_CONTEST_MOVES, 3, 17, 18 },
|
||||
{ PSS_PAGE_NONE, 255, 255, 255 }
|
||||
};
|
||||
|
||||
static const PSSSubscreenButton *sSubscreenButtonTypes[] = {
|
||||
|
|
@ -57,30 +57,30 @@ static const PSSSubscreenButton *sSubscreenButtonTypes[] = {
|
|||
};
|
||||
|
||||
static const TouchScreenRect sSubscreenRectangles_Normal[] = {
|
||||
{ 0x20, 0x47, 0x8, 0x2F },
|
||||
{ 0x50, 0x77, 0x10, 0x37 },
|
||||
{ 0x78, 0x9F, 0x28, 0x4F },
|
||||
{ 0x90, 0xB7, 0x50, 0x77 },
|
||||
{ 0x90, 0xB7, 0x88, 0xAF },
|
||||
{ 0x78, 0x9F, 0xB0, 0xD7 },
|
||||
{ 0x50, 0x77, 0xC8, 0xEF },
|
||||
{ 0x20, 0x47, 0xD0, 0xF7 },
|
||||
{ 0xFF, 0x0, 0x0, 0x0 }
|
||||
{ 32, 71, 8, 47 },
|
||||
{ 80, 119, 16, 55 },
|
||||
{ 120, 159, 40, 79 },
|
||||
{ 144, 183, 80, 119 },
|
||||
{ 144, 183, 136, 175 },
|
||||
{ 120, 159, 176, 215 },
|
||||
{ 80, 119, 200, 239 },
|
||||
{ 32, 71, 208, 247 },
|
||||
{ 255, 0, 0, 0 }
|
||||
};
|
||||
|
||||
static const TouchScreenRect sSubscreenRectangles_NoContestInfo[] = {
|
||||
{ 0x48, 0x6F, 0xC, 0x33 },
|
||||
{ 0x78, 0x9F, 0x2C, 0x53 },
|
||||
{ 0x90, 0xB7, 0x6C, 0x93 },
|
||||
{ 0x78, 0x9F, 0xAC, 0xD3 },
|
||||
{ 0x48, 0x6F, 0xCC, 0xF3 },
|
||||
{ 0xFF, 0x0, 0x0, 0x0 }
|
||||
{ 72, 111, 12, 51 },
|
||||
{ 120, 159, 44, 83 },
|
||||
{ 144, 183, 108, 147 },
|
||||
{ 120, 159, 172, 211 },
|
||||
{ 72, 111, 204, 243 },
|
||||
{ 255, 0, 0, 0 }
|
||||
};
|
||||
|
||||
static const TouchScreenRect sSubscreenRectangles_UnusedMovesOnly[] = {
|
||||
{ 0x90, 0xB7, 0x50, 0x77 },
|
||||
{ 0x90, 0xB7, 0x88, 0xAF },
|
||||
{ 0xFF, 0x0, 0x0, 0x0 }
|
||||
{ 144, 183, 80, 119 },
|
||||
{ 144, 183, 136, 175 },
|
||||
{ 255, 0, 0, 0 }
|
||||
};
|
||||
|
||||
static const TouchScreenRect *sSubscreenRectangles[] = {
|
||||
|
|
@ -148,7 +148,7 @@ u8 PokemonSummaryScreen_CheckSubscreenButtonPress(PokemonSummaryScreen *summaryS
|
|||
{
|
||||
int button = CheckSubscreenRectanglePress(summaryScreen);
|
||||
|
||||
if (button != 0xffffffff) {
|
||||
if (button != TOUCHSCREEN_INPUT_NONE) {
|
||||
return button;
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ u8 PokemonSummaryScreen_CheckSubscreenButtonPress(PokemonSummaryScreen *summaryS
|
|||
static int CheckSubscreenRectanglePress(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (summaryScreen->subscreenType == PSS_SUBSCREEN_TYPE_NO_BUTTONS) {
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
return sub_02022664(sSubscreenRectangles[summaryScreen->subscreenType]);
|
||||
|
|
@ -169,16 +169,16 @@ static int sub_02092224(PokemonSummaryScreen *summaryScreen)
|
|||
int v0;
|
||||
|
||||
if (summaryScreen->subscreenType == PSS_SUBSCREEN_TYPE_NO_BUTTONS) {
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
v0 = sub_02022644(sSubscreenRectangles[summaryScreen->subscreenType]);
|
||||
|
||||
if (v0 != 0xffffffff) {
|
||||
if (v0 != TOUCHSCREEN_INPUT_NONE) {
|
||||
u16 v1 = 0xfffe;
|
||||
|
||||
if (Bg_DoesPixelAtXYMatchVal(summaryScreen->bgConfig, 4, gCoreSys.touchX, gCoreSys.touchY, &v1) == 0) {
|
||||
return 0xffffffff;
|
||||
if (Bg_DoesPixelAtXYMatchVal(summaryScreen->bgConfig, BG_LAYER_SUB_0, gCoreSys.touchX, gCoreSys.touchY, &v1) == 0) {
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ u8 PokemonSummaryScreen_DrawSubscreenButtonAnim(PokemonSummaryScreen *summaryScr
|
|||
Sound_PlayEffect(SEQ_SE_DP_BUTTON9);
|
||||
PokemonSummaryScreen_UpdateSubscreenButtonGfx(summaryScreen);
|
||||
UpdateSubscreenButtonTilemap(summaryScreen, &buttonList[summaryScreen->buttonCurrent], 2);
|
||||
Bg_ScheduleTilemapTransfer(summaryScreen->bgConfig, 4);
|
||||
Bg_ScheduleTilemapTransfer(summaryScreen->bgConfig, BG_LAYER_SUB_0);
|
||||
sub_0208F600(summaryScreen);
|
||||
summaryScreen->buttonCount = 0;
|
||||
summaryScreen->buttonState = 1;
|
||||
|
|
@ -221,7 +221,7 @@ u8 PokemonSummaryScreen_DrawSubscreenButtonAnim(PokemonSummaryScreen *summaryScr
|
|||
UpdateSubscreenButtonTilemap(summaryScreen, &buttonList[summaryScreen->buttonCurrent], 1);
|
||||
}
|
||||
|
||||
Bg_ScheduleTilemapTransfer(summaryScreen->bgConfig, 4);
|
||||
Bg_ScheduleTilemapTransfer(summaryScreen->bgConfig, BG_LAYER_SUB_0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -847,22 +847,22 @@ void PokemonSummaryScreen_PrintBattleMoveInfo(PokemonSummaryScreen *summaryScree
|
|||
Window_FillTilemap(&summaryScreen->extraWindows[6], 0);
|
||||
Window_FillTilemap(&summaryScreen->extraWindows[7], 0);
|
||||
|
||||
u32 power = MoveTable_LoadParam(move, MOVEATTRIBUTE_POWER);
|
||||
u32 moveAttribute = MoveTable_LoadParam(move, MOVEATTRIBUTE_POWER);
|
||||
|
||||
if (power <= 1) {
|
||||
if (moveAttribute <= 1) {
|
||||
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_three_dashes, summaryScreen->strbuf);
|
||||
} else {
|
||||
SetAndFormatNumberBuf(summaryScreen, 150, power, 3, PADDING_MODE_SPACES);
|
||||
SetAndFormatNumberBuf(summaryScreen, pss_move_power_template, moveAttribute, 3, PADDING_MODE_SPACES);
|
||||
}
|
||||
|
||||
PrintTextToWindow(summaryScreen, &summaryScreen->extraWindows[5], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
||||
|
||||
power = MoveTable_LoadParam(move, MOVEATTRIBUTE_ACCURACY);
|
||||
moveAttribute = MoveTable_LoadParam(move, MOVEATTRIBUTE_ACCURACY);
|
||||
|
||||
if (power == 0) {
|
||||
if (moveAttribute == 0) {
|
||||
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_three_dashes, summaryScreen->strbuf);
|
||||
} else {
|
||||
SetAndFormatNumberBuf(summaryScreen, 151, power, 3, PADDING_MODE_SPACES);
|
||||
SetAndFormatNumberBuf(summaryScreen, pss_move_accuracy_template, moveAttribute, 3, PADDING_MODE_SPACES);
|
||||
}
|
||||
|
||||
PrintTextToWindow(summaryScreen, &summaryScreen->extraWindows[6], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ static int sub_02022594(const TouchScreenRect *rect, u32 param1, u32 param2)
|
|||
}
|
||||
}
|
||||
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
static BOOL sub_020225E0(const TouchScreenHitTable *hitTable, u32 param1, u32 param2)
|
||||
|
|
@ -49,7 +49,7 @@ int sub_02022644(const TouchScreenRect *rect)
|
|||
return sub_02022594(rect, gCoreSys.touchX, gCoreSys.touchY);
|
||||
}
|
||||
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
int sub_02022664(const TouchScreenRect *rect)
|
||||
|
|
@ -58,7 +58,7 @@ int sub_02022664(const TouchScreenRect *rect)
|
|||
return sub_02022594(rect, gCoreSys.touchX, gCoreSys.touchY);
|
||||
}
|
||||
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
int sub_02022684(const TouchScreenHitTable *hitTable)
|
||||
|
|
@ -79,7 +79,7 @@ int sub_02022684(const TouchScreenHitTable *hitTable)
|
|||
}
|
||||
}
|
||||
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
int sub_020226DC(const TouchScreenHitTable *hitTable)
|
||||
|
|
@ -100,7 +100,7 @@ int sub_020226DC(const TouchScreenHitTable *hitTable)
|
|||
}
|
||||
}
|
||||
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
BOOL TouchScreen_LocationHeld(const TouchScreenHitTable *hitTable)
|
||||
|
|
@ -177,7 +177,7 @@ int sub_020227DC(const TouchScreenHitTable *hitTable, u32 param1, u32 param2)
|
|||
}
|
||||
}
|
||||
|
||||
return 0xffffffff;
|
||||
return TOUCHSCREEN_INPUT_NONE;
|
||||
}
|
||||
|
||||
BOOL sub_02022830(const TouchScreenHitTable *hitTable, u32 param1, u32 param2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user