mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Start match call menu doc
This commit is contained in:
parent
ffe2970e30
commit
da5752fd0d
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
@ -276,7 +276,7 @@ enum
|
||||
POKENAV_MC_FUNC_CANCEL,
|
||||
POKENAV_MC_FUNC_CALL_MSG,
|
||||
POKENAV_MC_FUNC_NEARBY_MSG,
|
||||
POKENAV_MC_FUNC_10,
|
||||
POKENAV_MC_FUNC_EXIT_CALL,
|
||||
POKENAV_MC_FUNC_SHOW_CHECK_PAGE,
|
||||
POKENAV_MC_FUNC_CHECK_PAGE_UP,
|
||||
POKENAV_MC_FUNC_CHECK_PAGE_DOWN,
|
||||
@ -293,6 +293,14 @@ enum
|
||||
POKENAV_MAP_FUNC_EXIT,
|
||||
};
|
||||
|
||||
// Modes for PokenavFadeScreen
|
||||
enum {
|
||||
POKENAV_FADE_TO_BLACK,
|
||||
POKENAV_FADE_FROM_BLACK,
|
||||
POKENAV_FADE_TO_BLACK_ALL,
|
||||
POKENAV_FADE_FROM_BLACK_ALL,
|
||||
};
|
||||
|
||||
// pokenav.c
|
||||
void SetSelectedConditionSearch(u32);
|
||||
u32 GetSelectedConditionSearch(void);
|
||||
@ -359,8 +367,8 @@ bool32 MainMenuLoopedTaskIsBusy(void);
|
||||
void SetLeftHeaderSpritesInvisibility(void);
|
||||
void PokenavCopyPalette(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *palette);
|
||||
void FadeToBlackExceptPrimary(void);
|
||||
struct Sprite *PauseSpinningPokenavSprite(void);
|
||||
void ResumeSpinningPokenavSprite(void);
|
||||
struct Sprite *GetSpinningPokenavSprite(void);
|
||||
void HideSpinningPokenavSprite(void);
|
||||
void UpdateRegionMapRightHeaderTiles(u32 arg0);
|
||||
void HideMainOrSubMenuLeftHeader(u32 id, bool32 onRightSide);
|
||||
void SlideMenuHeaderUp(void);
|
||||
|
@ -295,7 +295,7 @@ static u32 LoopedTask_OpenConditionGraphMenu(s32 state)
|
||||
PrintHelpBarText(HELPBAR_CONDITION_MON_STATUS);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 15:
|
||||
PokenavFadeScreen(1);
|
||||
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
|
||||
if (!IsConditionMenuSearchMode())
|
||||
{
|
||||
LoadLeftHeaderGfxForIndex(POKENAV_GFX_PARTY_MENU);
|
||||
@ -352,7 +352,7 @@ static u32 LoopedTask_ExitConditionGraphMenu(s32 state)
|
||||
ToggleGraphData(FALSE);
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 2:
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
if (!IsConditionMenuSearchMode())
|
||||
SlideMenuHeaderDown();
|
||||
return LT_INC_AND_PAUSE;
|
||||
|
@ -467,7 +467,7 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state)
|
||||
ShowLeftHeaderGfx(searchGfxId, 1, 0);
|
||||
ShowLeftHeaderGfx(POKENAV_GFX_CONDITION_MENU, 1, 0);
|
||||
}
|
||||
PokenavFadeScreen(1);
|
||||
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 5:
|
||||
if (IsPaletteFadeActive())
|
||||
@ -617,7 +617,7 @@ static u32 LoopedTask_ExitConditionSearchMenu(s32 state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
SlideMenuHeaderDown();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
@ -637,7 +637,7 @@ static u32 LoopedTask_SelectSearchResult(s32 state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsPaletteFadeActive())
|
||||
|
@ -473,7 +473,6 @@ void PokenavFillPalette(u32 palIndex, u16 fillValue)
|
||||
|
||||
void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a4, u16 *palette)
|
||||
{
|
||||
|
||||
if (a4 == 0)
|
||||
{
|
||||
CpuCopy16(src, palette, size * 2);
|
||||
@ -496,11 +495,11 @@ void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a
|
||||
g1 = ((((GET_G(*dest) << 8) - (g << 8)) / a3) * a4) >> 8;
|
||||
b1 = ((((GET_B(*dest) << 8) - (b << 8)) / a3) * a4) >> 8;
|
||||
|
||||
r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match; I have to assign the value of ((r + r1) & 0x1F) to r
|
||||
g = (g + g1) & 0x1F; //See above
|
||||
b = (b + b1) & 0x1F; //See above
|
||||
r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match
|
||||
g = (g + g1) & 0x1F;
|
||||
b = (b + b1) & 0x1F;
|
||||
|
||||
*palette = RGB2(r, g, b); //See above comment
|
||||
*palette = RGB2(r, g, b);
|
||||
|
||||
src++, dest++;
|
||||
palette++;
|
||||
@ -514,16 +513,16 @@ void PokenavFadeScreen(s32 fadeType)
|
||||
|
||||
switch (fadeType)
|
||||
{
|
||||
case 0:
|
||||
case POKENAV_FADE_TO_BLACK:
|
||||
BeginNormalPaletteFade(menu->palettes, -2, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
case POKENAV_FADE_FROM_BLACK:
|
||||
BeginNormalPaletteFade(menu->palettes, -2, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
case 2:
|
||||
case POKENAV_FADE_TO_BLACK_ALL:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 3:
|
||||
case POKENAV_FADE_FROM_BLACK_ALL:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -2, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
}
|
||||
@ -608,7 +607,7 @@ static void SpriteCB_SpinningPokenav(struct Sprite *sprite)
|
||||
sprite->y2 = (GetBgY(0) / 256u) * -1;
|
||||
}
|
||||
|
||||
struct Sprite *PauseSpinningPokenavSprite(void)
|
||||
struct Sprite *GetSpinningPokenavSprite(void)
|
||||
{
|
||||
struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
@ -616,10 +615,11 @@ struct Sprite *PauseSpinningPokenavSprite(void)
|
||||
return menu->spinningPokenav;
|
||||
}
|
||||
|
||||
void ResumeSpinningPokenavSprite(void)
|
||||
void HideSpinningPokenavSprite(void)
|
||||
{
|
||||
struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
// Move sprite so it's no longer visible
|
||||
menu->spinningPokenav->x = 220;
|
||||
menu->spinningPokenav->y = 12;
|
||||
menu->spinningPokenav->callback = SpriteCB_SpinningPokenav;
|
||||
|
@ -32,9 +32,9 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *);
|
||||
static u32 GetExitMatchCallMenuId(struct Pokenav3Struct *);
|
||||
static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *);
|
||||
static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *);
|
||||
static u32 CB2_HandleCallInput(struct Pokenav3Struct *);
|
||||
static u32 CB2_HandleCallExitInput(struct Pokenav3Struct *);
|
||||
static u32 sub_81CAD20(s32);
|
||||
static bool32 sub_81CB1D0(void);
|
||||
static bool32 ShouldDoNearbyMessage(void);
|
||||
|
||||
#include "data/text/match_call_messages.h"
|
||||
|
||||
@ -155,8 +155,8 @@ static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state)
|
||||
if (GetPokenavMode() == POKENAV_MODE_FORCE_CALL_READY)
|
||||
SetPokenavMode(POKENAV_MODE_FORCE_CALL_EXIT);
|
||||
|
||||
state->callback = CB2_HandleCallInput;
|
||||
if (sub_81CB1D0())
|
||||
state->callback = CB2_HandleCallExitInput;
|
||||
if (ShouldDoNearbyMessage())
|
||||
return POKENAV_MC_FUNC_NEARBY_MSG;
|
||||
|
||||
return POKENAV_MC_FUNC_CALL_MSG;
|
||||
@ -191,12 +191,12 @@ static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *state)
|
||||
return POKENAV_MC_FUNC_NONE;
|
||||
}
|
||||
|
||||
static u32 CB2_HandleCallInput(struct Pokenav3Struct *state)
|
||||
static u32 CB2_HandleCallExitInput(struct Pokenav3Struct *state)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
state->callback = CB2_HandleMatchCallInput;
|
||||
return POKENAV_MC_FUNC_10;
|
||||
return POKENAV_MC_FUNC_EXIT_CALL;
|
||||
}
|
||||
|
||||
return POKENAV_MC_FUNC_NONE;
|
||||
@ -486,7 +486,7 @@ bool32 unref_sub_81CB16C(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 sub_81CB1D0(void)
|
||||
static bool32 ShouldDoNearbyMessage(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
int selection = GetSelectedPokenavListIndex();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -468,10 +468,10 @@ void sub_81C877C(void)
|
||||
structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8870, 6);
|
||||
}
|
||||
|
||||
void PrintCheckPageInfo(s16 a0)
|
||||
void PrintCheckPageInfo(s16 delta)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
structPtr->unk888.windowTopIndex += a0;
|
||||
structPtr->unk888.windowTopIndex += delta;
|
||||
structPtr->unk89C = 0;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6);
|
||||
}
|
||||
|
@ -505,11 +505,11 @@ static u32 LoopedTask_OpenMenu(s32 state)
|
||||
ShowBg(2);
|
||||
ShowBg(3);
|
||||
if (gfx->pokenavAlreadyOpen)
|
||||
PokenavFadeScreen(1);
|
||||
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
|
||||
else
|
||||
{
|
||||
PlaySE(SE_POKENAV_ON);
|
||||
PokenavFadeScreen(3);
|
||||
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK_ALL);
|
||||
}
|
||||
switch (GetPokenavMenuType())
|
||||
{
|
||||
@ -779,7 +779,7 @@ static u32 LoopedTask_OpenPokenavFeature(s32 state)
|
||||
return LT_PAUSE;
|
||||
if (AreLeftHeaderSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsPaletteFadeActive())
|
||||
|
@ -364,7 +364,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState)
|
||||
|
||||
LoadLeftHeaderGfxForIndex(menuGfxId);
|
||||
ShowLeftHeaderGfx(menuGfxId, 1, 1);
|
||||
PokenavFadeScreen(1);
|
||||
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 7:
|
||||
if (IsPaletteFadeActive() || AreLeftHeaderSpritesMoving())
|
||||
@ -457,7 +457,7 @@ static u32 LoopedTask_ExitRegionMap(s32 taskState)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsPaletteFadeActive())
|
||||
|
@ -460,7 +460,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state)
|
||||
ShowBg(2);
|
||||
HideBg(3);
|
||||
PrintHelpBarText(HELPBAR_RIBBONS_MON_LIST);
|
||||
PokenavFadeScreen(1);
|
||||
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
|
||||
if (!menu->fromSummary)
|
||||
{
|
||||
LoadLeftHeaderGfxForIndex(POKENAV_GFX_RIBBONS_MENU);
|
||||
@ -615,7 +615,7 @@ static u32 LoopedTask_RibbonsListReturnToMainMenu(s32 state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
SlideMenuHeaderDown();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
@ -635,7 +635,7 @@ static u32 LoopedTask_RibbonsListOpenSummary(s32 state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsPaletteFadeActive())
|
||||
|
@ -638,7 +638,7 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state)
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
HideBg(3);
|
||||
PokenavFadeScreen(1);
|
||||
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
@ -655,7 +655,7 @@ static u32 LoopedTask_ExitRibbonsSummaryMenu(s32 state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
PokenavFadeScreen(POKENAV_FADE_TO_BLACK);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsPaletteFadeActive())
|
||||
|
Loading…
Reference in New Issue
Block a user