mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
More touches to pokemon summary screen document
This commit is contained in:
parent
79a1127122
commit
5eeecb56c1
@ -9,10 +9,10 @@ extern const u8 *const gMoveDescriptionPointers[];
|
|||||||
extern const u8 *const gNatureNamePointers[];
|
extern const u8 *const gNatureNamePointers[];
|
||||||
|
|
||||||
void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
||||||
void ShowSelectMovePokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u16);
|
void ShowSelectMovePokemonSummaryScreen(struct Pokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void), u16 newMove);
|
||||||
void ShowPokemonSummaryScreenSet40EF(u8 mode, struct BoxPokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
void ShowPokemonSummaryScreenSet40EF(u8 mode, struct BoxPokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
||||||
u8 GetMoveSlotToReplace(void);
|
u8 GetMoveSlotToReplace(void);
|
||||||
void SummaryScreen_SetUnknownTaskId(u8 a0);
|
void SummaryScreen_SetUnknownTaskId(u8 taskId);
|
||||||
void SummaryScreen_DestroyUnknownTask(void);
|
void SummaryScreen_DestroyUnknownTask(void);
|
||||||
|
|
||||||
// The Pokemon Summary Screen can operate in different modes. Certain features,
|
// The Pokemon Summary Screen can operate in different modes. Certain features,
|
||||||
|
@ -296,7 +296,7 @@ static void CreateMoveSelectorSprites(u8 idArrayStart);
|
|||||||
static void SpriteCb_MoveSelector(struct Sprite *sprite);
|
static void SpriteCb_MoveSelector(struct Sprite *sprite);
|
||||||
static void DestroyMoveSelectorSprites(u8 firstArrayId);
|
static void DestroyMoveSelectorSprites(u8 firstArrayId);
|
||||||
static void SetMainMoveSelectorColor(u8 whichColor);
|
static void SetMainMoveSelectorColor(u8 whichColor);
|
||||||
static void MakeMoveSelectorVisible(u8 a);
|
static void KeepMoveSelectorVisible(u8 firstSpriteId);
|
||||||
|
|
||||||
// const rom data
|
// const rom data
|
||||||
#include "data/text/move_descriptions.h"
|
#include "data/text/move_descriptions.h"
|
||||||
@ -1095,7 +1095,7 @@ void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
sMonSummaryScreen->currPageIndex = sMonSummaryScreen->minPageIndex;
|
sMonSummaryScreen->currPageIndex = sMonSummaryScreen->minPageIndex;
|
||||||
SummaryScreen_SetUnknownTaskId(-1);
|
SummaryScreen_SetUnknownTaskId(0xFF);
|
||||||
|
|
||||||
if (gMonSpritesGfxPtr == NULL)
|
if (gMonSpritesGfxPtr == NULL)
|
||||||
sub_806F2AC(0, 0);
|
sub_806F2AC(0, 0);
|
||||||
@ -1975,16 +1975,16 @@ static void ChangeSelectedMove(s16 *taskData, s8 direction, u8 *moveIndexPtr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
*moveIndexPtr = newMoveIndex;
|
*moveIndexPtr = newMoveIndex;
|
||||||
// Not sure what the purpose of this function is, seems to have no effect whatsoever.
|
// Get rid of the 'flicker' effect(while idle) when scrolling.
|
||||||
if (moveIndexPtr == &sMonSummaryScreen->firstMoveIndex)
|
if (moveIndexPtr == &sMonSummaryScreen->firstMoveIndex)
|
||||||
MakeMoveSelectorVisible(SPRITE_ARR_ID_MOVE_SELECTOR1);
|
KeepMoveSelectorVisible(SPRITE_ARR_ID_MOVE_SELECTOR1);
|
||||||
else
|
else
|
||||||
MakeMoveSelectorVisible(SPRITE_ARR_ID_MOVE_SELECTOR2);
|
KeepMoveSelectorVisible(SPRITE_ARR_ID_MOVE_SELECTOR2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CloseMoveSelectMode(u8 taskId)
|
static void CloseMoveSelectMode(u8 taskId)
|
||||||
{
|
{
|
||||||
DestroyMoveSelectorSprites(8);
|
DestroyMoveSelectorSprites(SPRITE_ARR_ID_MOVE_SELECTOR1);
|
||||||
ClearWindowTilemap(PSS_LABEL_WINDOW_PROMPT_SWITCH);
|
ClearWindowTilemap(PSS_LABEL_WINDOW_PROMPT_SWITCH);
|
||||||
PutWindowTilemap(PSS_LABEL_WINDOW_PROMPT_INFO);
|
PutWindowTilemap(PSS_LABEL_WINDOW_PROMPT_INFO);
|
||||||
PrintMoveDetails(0);
|
PrintMoveDetails(0);
|
||||||
@ -2678,14 +2678,10 @@ static void ResetWindows(void)
|
|||||||
|
|
||||||
InitWindows(sSummaryTemplate);
|
InitWindows(sSummaryTemplate);
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
for (i = 0; i < 20; i++)
|
for (i = 0; i < PSS_LABEL_WINDOW_END; i++)
|
||||||
{
|
|
||||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||||
}
|
|
||||||
for (i = 0; i < ARRAY_COUNT(sMonSummaryScreen->windowIds); i++)
|
for (i = 0; i < ARRAY_COUNT(sMonSummaryScreen->windowIds); i++)
|
||||||
{
|
|
||||||
sMonSummaryScreen->windowIds[i] = 0xFF;
|
sMonSummaryScreen->windowIds[i] = 0xFF;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, u8 y, u8 lineSpacing, u8 colorId)
|
static void PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, u8 y, u8 lineSpacing, u8 colorId)
|
||||||
@ -3299,7 +3295,7 @@ static void Task_PrintSkillsPage(u8 taskId)
|
|||||||
static void PrintHeldItemName(void)
|
static void PrintHeldItemName(void)
|
||||||
{
|
{
|
||||||
const u8 *text;
|
const u8 *text;
|
||||||
int offset;
|
int x;
|
||||||
|
|
||||||
if (sMonSummaryScreen->summary.item == ITEM_ENIGMA_BERRY
|
if (sMonSummaryScreen->summary.item == ITEM_ENIGMA_BERRY
|
||||||
&& IsMultiBattle() == TRUE
|
&& IsMultiBattle() == TRUE
|
||||||
@ -3317,14 +3313,14 @@ static void PrintHeldItemName(void)
|
|||||||
text = gStringVar1;
|
text = gStringVar1;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = GetStringCenterAlignXOffset(1, text, 72) + 6;
|
x = GetStringCenterAlignXOffset(1, text, 72) + 6;
|
||||||
PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_HELD_ITEM), text, offset, 1, 0, 0);
|
PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_HELD_ITEM), text, x, 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintRibbonCount(void)
|
static void PrintRibbonCount(void)
|
||||||
{
|
{
|
||||||
const u8 *text;
|
const u8 *text;
|
||||||
int offset;
|
int x;
|
||||||
|
|
||||||
if (sMonSummaryScreen->summary.ribbonCount == 0)
|
if (sMonSummaryScreen->summary.ribbonCount == 0)
|
||||||
{
|
{
|
||||||
@ -3337,8 +3333,8 @@ static void PrintRibbonCount(void)
|
|||||||
text = gStringVar4;
|
text = gStringVar4;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = GetStringCenterAlignXOffset(1, text, 70) + 6;
|
x = GetStringCenterAlignXOffset(1, text, 70) + 6;
|
||||||
PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_RIBBON_COUNT), text, offset, 1, 0, 0);
|
PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_RIBBON_COUNT), text, x, 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BufferLeftColumnStats(void)
|
static void BufferLeftColumnStats(void)
|
||||||
@ -3799,7 +3795,7 @@ static void SetMoveTypeIcons(void)
|
|||||||
if (summary->moves[i] != MOVE_NONE)
|
if (summary->moves[i] != MOVE_NONE)
|
||||||
SetTypeSpritePosAndPal(gBattleMoves[summary->moves[i]].type, 85, 32 + (i * 16), i + SPRITE_ARR_ID_TYPE);
|
SetTypeSpritePosAndPal(gBattleMoves[summary->moves[i]].type, 85, 32 + (i * 16), i + SPRITE_ARR_ID_TYPE);
|
||||||
else
|
else
|
||||||
SetSpriteInvisibility(i + 3, TRUE);
|
SetSpriteInvisibility(i + SPRITE_ARR_ID_TYPE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3812,7 +3808,7 @@ static void SetContestMoveTypeIcons(void)
|
|||||||
if (summary->moves[i] != MOVE_NONE)
|
if (summary->moves[i] != MOVE_NONE)
|
||||||
SetTypeSpritePosAndPal(NUMBER_OF_MON_TYPES + gContestMoves[summary->moves[i]].contestCategory, 85, 32 + (i * 16), i + SPRITE_ARR_ID_TYPE);
|
SetTypeSpritePosAndPal(NUMBER_OF_MON_TYPES + gContestMoves[summary->moves[i]].contestCategory, 85, 32 + (i * 16), i + SPRITE_ARR_ID_TYPE);
|
||||||
else
|
else
|
||||||
SetSpriteInvisibility(i + 3, TRUE);
|
SetSpriteInvisibility(i + SPRITE_ARR_ID_TYPE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3938,9 +3934,9 @@ static void SpriteCB_Pokemon(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummaryScreen_SetUnknownTaskId(u8 a0)
|
void SummaryScreen_SetUnknownTaskId(u8 taskId)
|
||||||
{
|
{
|
||||||
sUnknownTaskId = a0;
|
sUnknownTaskId = taskId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummaryScreen_DestroyUnknownTask(void)
|
void SummaryScreen_DestroyUnknownTask(void)
|
||||||
@ -4041,7 +4037,7 @@ static void CreateMoveSelectorSprites(u8 idArrayStart)
|
|||||||
if (idArrayStart == SPRITE_ARR_ID_MOVE_SELECTOR1)
|
if (idArrayStart == SPRITE_ARR_ID_MOVE_SELECTOR1)
|
||||||
subpriority = 1;
|
subpriority = 1;
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < MOVE_SELECTOR_SPRITES_COUNT; i++)
|
||||||
{
|
{
|
||||||
spriteIds[i] = CreateSprite(&sMoveSelectorSpriteTemplate, i * 16 + 89, 40, subpriority);
|
spriteIds[i] = CreateSprite(&sMoveSelectorSpriteTemplate, i * 16 + 89, 40, subpriority);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
@ -4104,7 +4100,7 @@ static void SetMainMoveSelectorColor(u8 which)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MakeMoveSelectorVisible(u8 firstSpriteId)
|
static void KeepMoveSelectorVisible(u8 firstSpriteId)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
u8 *spriteIds = &sMonSummaryScreen->spriteIds[firstSpriteId];
|
u8 *spriteIds = &sMonSummaryScreen->spriteIds[firstSpriteId];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user