mirror of
https://github.com/pret/pokeruby.git
synced 2024-11-23 13:09:40 +00:00
Label move_tutor_menu.c
This commit is contained in:
parent
c5bcb67bb8
commit
2e80477ea1
@ -896,7 +896,7 @@ sub_809CDEC: @ 809CDEC
|
||||
ldr r0, [r0]
|
||||
str r0, [r1]
|
||||
str r3, [r1, 0x4]
|
||||
bl sub_8072CA4
|
||||
bl GetStringWidthInMenuWindow
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r1, r0, 0x7
|
||||
|
@ -1026,7 +1026,7 @@ _080F0E42:
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x88
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
lsls r2, r5, 3
|
||||
adds r0, r4, 0
|
||||
_080F0E54:
|
||||
@ -1049,7 +1049,7 @@ _080F0E6C:
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x88
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
lsls r2, r5, 3
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x61
|
||||
@ -1270,7 +1270,7 @@ sub_80F0FFC: @ 80F0FFC
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x58
|
||||
movs r3, 0x2
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
movs r2, 0x5
|
||||
@ -1880,7 +1880,7 @@ _080F152E:
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x80
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
ldrh r0, [r5]
|
||||
lsls r0, 3
|
||||
adds r4, 0x4
|
||||
@ -1889,7 +1889,7 @@ _080F152E:
|
||||
adds r0, r7, 0
|
||||
movs r2, 0x80
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
b _080F158A
|
||||
.align 2, 0
|
||||
_080F1558: .4byte gUnknown_020388B4
|
||||
@ -1904,12 +1904,12 @@ _080F1570:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x80
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
adds r0, r7, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x80
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
_080F158A:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0xC
|
||||
@ -2398,7 +2398,7 @@ sub_80F1934: @ 80F1934
|
||||
adds r0, r5, 0
|
||||
movs r2, 0x57
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
b _080F19B8
|
||||
.align 2, 0
|
||||
_080F1990: .4byte gUnknown_083DFEC4
|
||||
@ -2413,7 +2413,7 @@ _080F19AC:
|
||||
adds r0, r5, 0
|
||||
movs r2, 0x57
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
_080F19B8:
|
||||
ldr r0, _080F19D4 @ =gUnknown_083DFEC4
|
||||
ldr r0, [r0]
|
||||
@ -7975,7 +7975,7 @@ sub_80F443C: @ 80F443C
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x38
|
||||
movs r3, 0x1
|
||||
bl sub_8072C14
|
||||
bl AlignInt1InMenuWindow
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -7990,7 +7990,7 @@ sub_80F445C: @ 80F445C
|
||||
lsrs r1, 16
|
||||
movs r2, 0x17
|
||||
movs r3, 0x1
|
||||
bl sub_8072C14
|
||||
bl AlignInt1InMenuWindow
|
||||
adds r4, r0, 0
|
||||
movs r3, 0xFC
|
||||
strb r3, [r4]
|
||||
@ -8016,7 +8016,7 @@ sub_80F445C: @ 80F445C
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x32
|
||||
movs r3, 0x1
|
||||
bl sub_8072C14
|
||||
bl AlignInt1InMenuWindow
|
||||
adds r4, r0, 0
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
@ -8190,7 +8190,7 @@ sub_80F45A0: @ 80F45A0
|
||||
ldr r1, _080F4604 @ =gOtherText_InParty
|
||||
movs r2, 0x40
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
b _080F4624
|
||||
.align 2, 0
|
||||
_080F45F0: .4byte gUnknown_083DFEC4
|
||||
@ -8212,7 +8212,7 @@ _080F4608:
|
||||
adds r1, r2
|
||||
movs r2, 0x40
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
_080F4624:
|
||||
ldr r0, _080F463C @ =gUnknown_083DFEC4
|
||||
ldr r0, [r0]
|
||||
@ -8236,7 +8236,7 @@ _080F4644:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x68
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
lsls r0, r6, 1
|
||||
adds r0, r6
|
||||
lsls r0, 3
|
||||
@ -8246,7 +8246,7 @@ _080F4644:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x40
|
||||
movs r3, 0
|
||||
bl sub_8072C74
|
||||
bl AlignStringInMenuWindow
|
||||
ldr r1, _080F4688 @ =0x00008937
|
||||
adds r0, r5, r1
|
||||
adds r0, r6
|
||||
@ -12397,7 +12397,7 @@ _080F6656:
|
||||
adds r0, r5, 0
|
||||
movs r2, 0x80
|
||||
movs r3, 0x1
|
||||
bl sub_8072C14
|
||||
bl AlignInt1InMenuWindow
|
||||
adds r5, r0, 0
|
||||
b _080F66CE
|
||||
.align 2, 0
|
||||
|
@ -253,7 +253,7 @@ ContestString_Tough:
|
||||
.string "STÄRKE$"
|
||||
|
||||
.align 2
|
||||
gUnknown_083CAF70:: @ 83CAF70
|
||||
gContestCategoryNames:: @ 83CAF70
|
||||
.4byte ContestString_Cool
|
||||
.4byte ContestString_Beauty
|
||||
.4byte ContestString_Cute
|
||||
|
2
data/scripts/maps/FallarborTown_House2.inc
vendored
2
data/scripts/maps/FallarborTown_House2.inc
vendored
@ -37,7 +37,7 @@ FallarborTown_House2_EventScript_153CE4:: @ 8153CE4
|
||||
|
||||
FallarborTown_House2_EventScript_153D1A:: @ 8153D1A
|
||||
msgbox FallarborTown_House2_Text_177C5D, 4
|
||||
special TeachMoveTutorMove
|
||||
special DisplayMoveTutorMenu
|
||||
waitstate
|
||||
compare VAR_SPECIAL_4, 0
|
||||
goto_if_eq FallarborTown_House2_EventScript_153CE4
|
||||
|
@ -232,7 +232,7 @@ gSpecials::
|
||||
def_special DeleteMonMove
|
||||
def_special ScrSpecial_GetPokemonNicknameAndMoveName
|
||||
def_special ScrSpecial_CountPokemonMoves
|
||||
def_special TeachMoveTutorMove
|
||||
def_special DisplayMoveTutorMenu
|
||||
def_special GetRecordedCyclingRoadResults
|
||||
def_special ScrSpecial_BeginCyclingRoadChallenge
|
||||
def_special GetPlayerAvatarBike
|
||||
|
@ -201,7 +201,7 @@ ContestString_Tough:
|
||||
.string "TOUGH$"
|
||||
|
||||
.align 2
|
||||
gUnknown_083CAF70:: @ 83CAF70
|
||||
gContestCategoryNames:: @ 83CAF70
|
||||
.4byte ContestString_Cool
|
||||
.4byte ContestString_Beauty
|
||||
.4byte ContestString_Cute
|
||||
|
0
graphics/pokedex/arrows.png → graphics/move_tutor_menu/arrows.png
Normal file → Executable file
0
graphics/pokedex/arrows.png → graphics/move_tutor_menu/arrows.png
Normal file → Executable file
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 303 B |
@ -191,7 +191,7 @@ extern u8 gSharedMem[];
|
||||
#define AI_ARRAY_160CC(i) (gSharedMem[0x160CC + i * 2])
|
||||
#define ewram16800 (&gSharedMem[0x16800])
|
||||
#define ewram17000 (&gSharedMem[0x17000])
|
||||
#define eLearnMoveStruct (struct LearnMoveStruct *)(gSharedMem + 0x17000)
|
||||
#define eMoveTutorMenu (struct MoveTutorMenu *)(gSharedMem + 0x17000)
|
||||
#define eSecretBaseRecord ((struct SecretBaseRecord *)(gSharedMem + 0x17000))
|
||||
#define eCableCar1 ((struct CableCarEwramStruct1 *)(gSharedMem + 0x17000))
|
||||
#define ewram17002 (&gSharedMem[0x17002])
|
||||
|
@ -71,10 +71,10 @@ int sub_8072AB0(const u8 *, u8, u16, u8, u8, u32);
|
||||
void MenuPrint_RightAligned(const u8 *, u8, u8);
|
||||
void sub_8072B80(const u8 *, u8, u8, const u8 *);
|
||||
void sub_8072BD8(const u8 *, u8, u8, u16);
|
||||
u8 *sub_8072C14(u8 *, s32, u8, u8);
|
||||
u8 *sub_8072C44(u8 *, s32, u8, u8);
|
||||
u8 *sub_8072C74(u8 *, const u8 *, u8, u8);
|
||||
u8 sub_8072CA4(const u8 *s);
|
||||
u8 *AlignInt1InMenuWindow(u8 *, s32, u8, u8);
|
||||
u8 *AlignInt2InMenuWindow(u8 *, s32, u8, u8);
|
||||
u8 *AlignStringInMenuWindow(u8 *, const u8 *, u8, u8);
|
||||
u8 GetStringWidthInMenuWindow(const u8 *s);
|
||||
u8 Menu_GetTextWindowPaletteNum(void);
|
||||
void Menu_GetTextColors(u8 *, u8 *, u8 *);
|
||||
u32 Menu_UpdateWindowTextOverrideLineLength(u8);
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef GUARD_LEARN_MOVE_H
|
||||
#define GUARD_LEARN_MOVE_H
|
||||
|
||||
void TeachMoveTutorMove(void);
|
||||
#define MAX_MOVE_TUTOR_MOVES 20
|
||||
|
||||
void DisplayMoveTutorMenu(void);
|
||||
|
||||
#endif // GUARD_LEARN_MOVE_H
|
@ -616,7 +616,7 @@ void AdjustFriendship(struct Pokemon *, u8);
|
||||
u8 CheckPartyHasHadPokerus(struct Pokemon *, u8);
|
||||
void UpdatePartyPokerusTime(u16);
|
||||
u32 CanMonLearnTMHM(struct Pokemon *, u8);
|
||||
u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves);
|
||||
u8 GetMoveTutorMoves(struct Pokemon *mon, u16 *moves);
|
||||
u8 sub_8040574(struct Pokemon *party);
|
||||
void ClearBattleMonForms(void);
|
||||
void sub_80408BC();
|
||||
|
@ -150,7 +150,7 @@ extern const u8 OtherText_CheckTag[];
|
||||
extern const u8 OtherText_Confirm[];
|
||||
extern const u8 gOtherText_Walk[];
|
||||
|
||||
extern const u8 gUnknownText_Exit[];
|
||||
extern const u8 gOtherText_Exit[];
|
||||
extern const u8 gOtherText_CancelNoTerminator[];
|
||||
extern const u8 gOtherText_CancelWithTerminator[];
|
||||
|
||||
|
@ -186,7 +186,7 @@ extern const u8 gEggNickname[];
|
||||
extern const u8 gOtherText_HatchedFromEgg[];
|
||||
extern const u8 gOtherText_NickHatchPrompt[];
|
||||
|
||||
// learn_move
|
||||
// move_tutor_menu
|
||||
extern const u8 OtherText_Battle[];
|
||||
extern const u8 OtherText_Contest[];
|
||||
|
||||
@ -194,7 +194,7 @@ extern const u8 OtherText_Contest[];
|
||||
extern const u8 OtherText_Type[];
|
||||
extern const u8 OtherText_PP[];
|
||||
|
||||
// learn_move
|
||||
// move_tutor_menu
|
||||
extern const u8 OtherText_Power[];
|
||||
extern const u8 OtherText_Accuracy[];
|
||||
extern const u8 OtherText_Appeal[];
|
||||
|
@ -143,7 +143,7 @@ extern const struct WindowTemplate gWindowTemplate_81E6C74;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E6C90;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E6CAC;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E6CC8;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E6CE4;
|
||||
extern const struct WindowTemplate gMenuTextWindowTemplate;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E6D00;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E6D1C;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E6D38;
|
||||
@ -192,7 +192,7 @@ extern const struct WindowTemplate gWindowTemplate_81E71D0;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E71EC;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7208;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7224;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7240;
|
||||
extern const struct WindowTemplate gMenuTextWindowTemplate;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E725C;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7278;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7294;
|
||||
|
@ -356,7 +356,7 @@ SECTIONS {
|
||||
src/fldeff_sweetscent.o(.text);
|
||||
src/battle/battle_anim_812C144.o(.text);
|
||||
asm/battle_anim_812C144.o(.text);
|
||||
src/learn_move.o(.text);
|
||||
src/move_tutor_menu.o(.text);
|
||||
src/fldeff_softboiled.o(.text);
|
||||
src/decoration_inventory.o(.text);
|
||||
src/roamer.o(.text);
|
||||
@ -742,7 +742,7 @@ SECTIONS {
|
||||
src/contest_ai.o(.rodata);
|
||||
src/battle/battle_controller_safari.o(.rodata);
|
||||
data/battle_anim_812C144.o(.rodata);
|
||||
src/learn_move.o(.rodata);
|
||||
src/move_tutor_menu.o(.rodata);
|
||||
src/decoration_inventory.o(.rodata);
|
||||
src/roamer.o(.rodata);
|
||||
src/battle_tower.o(.rodata);
|
||||
|
@ -335,7 +335,7 @@ static void PrintWinStreak(const u8 *str, u16 streak, u8 left, u8 top)
|
||||
Menu_PrintText(str, left, top);
|
||||
if (streak > 9999)
|
||||
streak = 9999;
|
||||
sub_8072C14(gStringVar1, streak, 24, 1);
|
||||
AlignInt1InMenuWindow(gStringVar1, streak, 24, 1);
|
||||
Menu_PrintText(gOtherText_WinStreak, left + 7, top);
|
||||
}
|
||||
|
||||
|
@ -3014,24 +3014,24 @@ bool8 Blender_PrintBlendingResults(void)
|
||||
textPtr[1] = CHAR_PERIOD;
|
||||
textPtr[2] = CHAR_SPACE;
|
||||
textPtr += 3;
|
||||
textPtr = sub_8072C74(textPtr, gLinkPlayers[place].name, 88, 0);
|
||||
sub_8072C74(textPtr, text[0], 157, 0);
|
||||
textPtr = AlignStringInMenuWindow(textPtr, gLinkPlayers[place].name, 88, 0);
|
||||
AlignStringInMenuWindow(textPtr, text[0], 157, 0);
|
||||
Menu_PrintText(gBerryBlenderData->stringVar, 5, gUnknown_082165E9[gBerryBlenderData->playersNo] + (i * gUnknown_082165EE[gBerryBlenderData->playersNo]));
|
||||
}
|
||||
ConvertIntToDecimalStringN(text[0], gBerryBlenderData->max_RPM % 100, 2, 2);
|
||||
textPtr = gBerryBlenderData->stringVar;
|
||||
textPtr = StringCopy(textPtr, gOtherText_MaxSpeed);
|
||||
textPtr = sub_8072C14(textPtr, gBerryBlenderData->max_RPM / 100, 121, 1);
|
||||
textPtr = AlignInt1InMenuWindow(textPtr, gBerryBlenderData->max_RPM / 100, 121, 1);
|
||||
|
||||
#ifdef ENGLISH
|
||||
textPtr[0] = CHAR_SPACE;
|
||||
textPtr[1] = CHAR_PERIOD;
|
||||
textPtr[2] = CHAR_SPACE;
|
||||
textPtr += 3;
|
||||
textPtr = sub_8072C74(textPtr, text[0], 142, 1);
|
||||
textPtr = AlignStringInMenuWindow(textPtr, text[0], 142, 1);
|
||||
#else
|
||||
*textPtr++ = CHAR_COMMA;
|
||||
textPtr = sub_8072C74(textPtr, text[0], 136, 1);
|
||||
textPtr = AlignStringInMenuWindow(textPtr, text[0], 136, 1);
|
||||
#endif
|
||||
StringCopy(textPtr, gOtherText_RPM);
|
||||
Menu_PrintText(gBerryBlenderData->stringVar, 5, 13);
|
||||
@ -3045,13 +3045,13 @@ bool8 Blender_PrintBlendingResults(void)
|
||||
textPtr = StringCopy(textPtr, gOtherText_RequiredTime);
|
||||
|
||||
#ifdef ENGLISH
|
||||
textPtr = sub_8072C74(textPtr, text[0], 102, 1);
|
||||
textPtr = AlignStringInMenuWindow(textPtr, text[0], 102, 1);
|
||||
#else
|
||||
textPtr = sub_8072C74(textPtr, text[0], 99, 1);
|
||||
textPtr = AlignStringInMenuWindow(textPtr, text[0], 99, 1);
|
||||
#endif
|
||||
textPtr = StringAppend(textPtr, gOtherText_Min);
|
||||
|
||||
textPtr = sub_8072C74(textPtr, text[1], 136, 1);
|
||||
textPtr = AlignStringInMenuWindow(textPtr, text[1], 136, 1);
|
||||
StringCopy(textPtr, gOtherText_Sec);
|
||||
|
||||
Menu_PrintText(gBerryBlenderData->stringVar, 5, 15);
|
||||
@ -3222,9 +3222,9 @@ static bool8 Blender_PrintBlendingRanking(void)
|
||||
|
||||
txtPtr = StringCopy(txtPtr, gLinkPlayers[place].name);
|
||||
|
||||
txtPtr = sub_8072C14(txtPtr, gBerryBlenderData->scores[place][BLENDER_SCORE_BEST], 108, 1);
|
||||
txtPtr = sub_8072C14(txtPtr, gBerryBlenderData->scores[place][BLENDER_SCORE_GOOD], 132, 1);
|
||||
txtPtr = sub_8072C14(txtPtr, gBerryBlenderData->scores[place][BLENDER_SCORE_MISS], 156, 1);
|
||||
txtPtr = AlignInt1InMenuWindow(txtPtr, gBerryBlenderData->scores[place][BLENDER_SCORE_BEST], 108, 1);
|
||||
txtPtr = AlignInt1InMenuWindow(txtPtr, gBerryBlenderData->scores[place][BLENDER_SCORE_GOOD], 132, 1);
|
||||
txtPtr = AlignInt1InMenuWindow(txtPtr, gBerryBlenderData->scores[place][BLENDER_SCORE_MISS], 156, 1);
|
||||
|
||||
Menu_PrintText(gBerryBlenderData->stringVar, 5, i * gUnknown_082165F3[gBerryBlenderData->playersNo] + 8);
|
||||
}
|
||||
@ -3257,8 +3257,8 @@ void debug_sub_80524BC(void)
|
||||
FreeAllSpritePalettes();
|
||||
ResetTasks();
|
||||
SetVBlankCallback(VBlankCB1_BerryBlender);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
SeedRng(gMain.vblankCounter1);
|
||||
REG_DISPCNT = 0x1540;
|
||||
RunTasks();
|
||||
@ -3503,7 +3503,7 @@ void ShowBerryBlenderRecordWindow(void)
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
u32 record = gSaveBlock1.berryBlenderRecords[i];
|
||||
u8* txtPtr = sub_8072C14(text, record / 100, 18, 1);
|
||||
u8* txtPtr = AlignInt1InMenuWindow(text, record / 100, 18, 1);
|
||||
|
||||
#ifdef ENGLISH
|
||||
txtPtr[0] = CHAR_SPACE;
|
||||
|
@ -230,7 +230,7 @@ static const struct MenuAction2 sBattleTowerEntryMenuItems[] =
|
||||
{OtherText_Summary, BattleTowerEntryMenuCallback_Summary},
|
||||
{OtherText_Enter2, BattleTowerEntryMenuCallback_Enter},
|
||||
{OtherText_NoEntry, BattleTowerEntryMenuCallback_NoEntry},
|
||||
{gUnknownText_Exit, BattleTowerEntryMenuCallback_Exit},
|
||||
{gOtherText_Exit, BattleTowerEntryMenuCallback_Exit},
|
||||
};
|
||||
|
||||
static const u8 gUnknown_084017D0[] = {1, 0, 3};
|
||||
@ -780,7 +780,7 @@ static const struct MenuAction2 sDaycareStorageMenuItems[] =
|
||||
{
|
||||
{OtherText_Store, DaycareStorageMenuCallback_Store},
|
||||
{OtherText_Summary, DaycareStorageMenuCallback_Summary},
|
||||
{gUnknownText_Exit, DaycareStorageMenuCallback_Exit},
|
||||
{gOtherText_Exit, DaycareStorageMenuCallback_Exit},
|
||||
};
|
||||
|
||||
static const u8 gUnknown_08401808[] = {0, 1, 2};
|
||||
|
@ -134,7 +134,7 @@ static u8 InitClearSaveDataScreen(void)
|
||||
ResetSpriteData();
|
||||
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, FADE_COLOR_WHITE);
|
||||
|
||||
ime = REG_IME;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "mori_debug_menu.h"
|
||||
#include "data2.h"
|
||||
#include "daycare.h"
|
||||
#include "learn_move.h"
|
||||
#include "move_tutor_menu.h"
|
||||
#include "link.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
@ -136,7 +136,7 @@ u8 MoriDebugMenu_10000Steps(void)
|
||||
|
||||
u8 MoriDebugMenu_MoveTutor(void)
|
||||
{
|
||||
TeachMoveTutorMove();
|
||||
DisplayMoveTutorMenu();
|
||||
CloseMenu();
|
||||
return 1;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ void CB2_StartSoundCheckMenu(void)
|
||||
ResetTasks();
|
||||
ResetSpriteData();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
REG_WIN0H = WIN_RANGE(0, 0);
|
||||
REG_WIN0V = WIN_RANGE(0, 0);
|
||||
@ -1218,7 +1218,7 @@ void Task_InitCryTest(u8 taskId)
|
||||
u8 zero;
|
||||
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
gSoundTestCryNum = 1;
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
|
@ -685,7 +685,7 @@ void DebugMenu_8077048(void)
|
||||
|
||||
u8 DebugMenu_807706C(void)
|
||||
{
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
DebugMenu_8077004();
|
||||
DebugMenu_807719C();
|
||||
DebugMenu_80771EC();
|
||||
|
@ -210,7 +210,7 @@ void debug_80C35DC(void)
|
||||
LoadSpriteSheet(stru_83F8828);
|
||||
LoadSpritePalette(stru_83F8838);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
}
|
||||
|
||||
void debug_80C36F4(void)
|
||||
|
@ -1411,7 +1411,7 @@ const struct MenuAction2 gUnknown_083EC604[] = {
|
||||
{SecretBaseText_Decorate, sub_80FF160},
|
||||
{SecretBaseText_PutAway, sub_8100A0C},
|
||||
{SecretBaseText_Toss, sub_8101700},
|
||||
{gUnknownText_Exit, gpu_pal_decompress_alloc_tag_and_upload}
|
||||
{gOtherText_Exit, gpu_pal_decompress_alloc_tag_and_upload}
|
||||
};
|
||||
|
||||
const u8 *const gUnknown_083EC624[] = {
|
||||
@ -1556,9 +1556,9 @@ void sub_80FE470(u8 decoCat, u8 left, u8 top, u8 palIdx) // PrintDecorationCateg
|
||||
strptr[2] = palIdx;
|
||||
strptr += 3;
|
||||
strptr = StringCopy(strptr, gUnknown_083EC5E4[decoCat]);
|
||||
strptr = sub_8072C14(strptr, GetNumDecorationsInInventoryCategory(decoCat), 0x56, 1);
|
||||
strptr = AlignInt1InMenuWindow(strptr, GetNumDecorationsInInventoryCategory(decoCat), 0x56, 1);
|
||||
*strptr++ = 0xba;
|
||||
strptr = sub_8072C14(strptr, gDecorationInventories[decoCat].size, 0x68, 1);
|
||||
strptr = AlignInt1InMenuWindow(strptr, gDecorationInventories[decoCat].size, 0x68, 1);
|
||||
strptr[0] = EXT_CTRL_CODE_BEGIN;
|
||||
strptr[1] = 5;
|
||||
strptr[2] = v0;
|
||||
@ -1580,7 +1580,7 @@ void sub_80FE528(u8 taskId) // PrintDecorationCategorySelectionMenuStrings
|
||||
sub_80FE470(decoCat, 1, 2 * decoCat + 1, 255); // Unselectable
|
||||
}
|
||||
}
|
||||
Menu_PrintText(gUnknownText_Exit, 1, 17);
|
||||
Menu_PrintText(gOtherText_Exit, 1, 17);
|
||||
}
|
||||
|
||||
void sub_80FE5AC(u8 taskId)
|
||||
@ -1806,7 +1806,7 @@ void sub_80FEABC(u8 taskId, u8 dummy1)
|
||||
}
|
||||
if (i == gUnknown_020388D5)
|
||||
{
|
||||
sub_8072A18(gUnknownText_Exit, 0x08, 8 * ni, 0x68, 1);
|
||||
sub_8072A18(gOtherText_Exit, 0x08, 8 * ni, 0x68, 1);
|
||||
break;
|
||||
}
|
||||
if (gUnknown_020388D0[i])
|
||||
|
@ -69,7 +69,7 @@ void CB2_ShowDiploma(void)
|
||||
FreeAllSpritePalettes();
|
||||
LoadPalette(gDiplomaPalettes, 0, 64);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
DisplayDiplomaText();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
|
||||
|
@ -1182,7 +1182,7 @@ void sub_80E9368(u8 a)
|
||||
gEasyChatStruct->unk9F8E[2] = 1;
|
||||
if (r4 != NULL)
|
||||
{
|
||||
sub_8072C74(gEasyChatStruct->unk9F8E + 3, r4, 240, 2);
|
||||
AlignStringInMenuWindow(gEasyChatStruct->unk9F8E + 3, r4, 240, 2);
|
||||
Menu_PrintText(gEasyChatStruct->unk9F8E, 0, 0);
|
||||
}
|
||||
else
|
||||
|
@ -2438,8 +2438,8 @@ void sub_8088380(struct Task *task)
|
||||
IntrCallback callback;
|
||||
LoadWordFromTwoHalfwords((u16 *)&task->data[13], (u32 *)&callback);
|
||||
SetVBlankCallback(callback);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
FreeResourcesAndDestroySprite(&gSprites[task->data[15]]);
|
||||
FieldEffectActiveListRemove(FLDEFF_FIELD_MOVE_SHOW_MON);
|
||||
DestroyTask(FindTaskIdByFunc(sub_8088120));
|
||||
@ -2561,8 +2561,8 @@ void sub_808862C(struct Task *task)
|
||||
CpuFill32(0, (void *)VRAM + bg0cnt, 0x800);
|
||||
LoadWordFromTwoHalfwords((u16 *)&task->data[13], (u32 *)&intrCallback);
|
||||
SetVBlankCallback(intrCallback);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
FreeResourcesAndDestroySprite(&gSprites[task->data[15]]);
|
||||
FieldEffectActiveListRemove(FLDEFF_FIELD_MOVE_SHOW_MON);
|
||||
DestroyTask(FindTaskIdByFunc(sub_808847C));
|
||||
|
@ -20,7 +20,7 @@ void InitFieldMessageBox(void)
|
||||
{
|
||||
sMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN;
|
||||
TextWindow_SetDlgFrameBaseTileNum(gMenuTextWindowContentTileOffset);
|
||||
Text_InitWindowWithTemplate(&gFieldMessageBoxWindow, &gWindowTemplate_81E6CE4);
|
||||
Text_InitWindowWithTemplate(&gFieldMessageBoxWindow, &gMenuTextWindowTemplate);
|
||||
}
|
||||
|
||||
static void Task_FieldMessageBox(u8 taskId)
|
||||
|
@ -265,7 +265,7 @@ static void sub_80816A8(u8 taskId)
|
||||
break;
|
||||
case 5:
|
||||
Menu_EraseWindowRect(0, 0, 29, 19);
|
||||
LoadFontDefaultPalette(&gWindowTemplate_81E6CE4);
|
||||
LoadFontDefaultPalette(&gMenuTextWindowTemplate);
|
||||
REG_WIN0H = 255;
|
||||
REG_DISPCNT = data[6];
|
||||
REG_BLDCNT = data[7];
|
||||
|
@ -1115,9 +1115,9 @@ static void sub_80A41E0(u8 *a, u16 b, const u8 *c, u16 d, u8 e)
|
||||
a[1] = 0x13;
|
||||
a[2] = 0x18;
|
||||
a += 3;
|
||||
a = sub_8072C74(a, c, 0x78 - (e + 1) * 6, 0);
|
||||
a = AlignStringInMenuWindow(a, c, 0x78 - (e + 1) * 6, 0);
|
||||
*a++ = CHAR_MULT_SIGN;
|
||||
sub_8072C14(a, d, 0x78, 1);
|
||||
AlignInt1InMenuWindow(a, d, 0x78, 1);
|
||||
}
|
||||
|
||||
static u8 *sub_80A425C(u8 taskId, u8 *text, u8 c)
|
||||
@ -1145,7 +1145,7 @@ static bool8 sub_80A42B0(u8 itemPos, int b)
|
||||
if (sReturnLocation == RETURN_TO_FIELD_5)
|
||||
return TRUE;
|
||||
r5 = itemPos * 2 + 2;
|
||||
sub_8072C74(gStringVar1, gOtherText_CloseBag, 0x78, 0);
|
||||
AlignStringInMenuWindow(gStringVar1, gOtherText_CloseBag, 0x78, 0);
|
||||
Menu_PrintText(gStringVar1, 14, r5);
|
||||
ptr = gBGTilemapBuffers[2] + 14 + r5 * 32;
|
||||
ptr[0] = 0x4F;
|
||||
@ -1179,9 +1179,9 @@ static void sub_80A4380(u16 a, int b, int c, int d)
|
||||
r5 = i * 2 + 2;
|
||||
text = gStringVar1;
|
||||
text = sub_80A425C(a, text, i);
|
||||
text = sub_8072C74(text, ItemId_GetName(gCurrentBagPocketItemSlots[r4].itemId), 0x66, 0);
|
||||
text = AlignStringInMenuWindow(text, ItemId_GetName(gCurrentBagPocketItemSlots[r4].itemId), 0x66, 0);
|
||||
*text++ = CHAR_MULT_SIGN;
|
||||
sub_8072C14(text, gCurrentBagPocketItemSlots[r4].quantity, 0x78, 1);
|
||||
AlignInt1InMenuWindow(text, gCurrentBagPocketItemSlots[r4].quantity, 0x78, 1);
|
||||
Menu_PrintText(gStringVar1, 14, r5);
|
||||
}
|
||||
}
|
||||
@ -1203,9 +1203,9 @@ static void sub_80A444C(u16 a, int b, int c, int d)
|
||||
text = gStringVar1;
|
||||
text = sub_80A425C(a, text, i);
|
||||
#if ENGLISH
|
||||
sub_8072C74(text, ItemId_GetName(gCurrentBagPocketItemSlots[slot].itemId), 0x60, 0);
|
||||
AlignStringInMenuWindow(text, ItemId_GetName(gCurrentBagPocketItemSlots[slot].itemId), 0x60, 0);
|
||||
#else
|
||||
sub_8072C74(text, ItemId_GetName(gCurrentBagPocketItemSlots[slot].itemId), 0x63, 0);
|
||||
AlignStringInMenuWindow(text, ItemId_GetName(gCurrentBagPocketItemSlots[slot].itemId), 0x63, 0);
|
||||
#endif
|
||||
Menu_PrintText(gStringVar1, 14, r5);
|
||||
if (gUnknown_02038558)
|
||||
@ -1272,7 +1272,7 @@ static void sub_80A4548(u16 a, int b, int c, int d)
|
||||
text[2] = 0x18;
|
||||
text += 3;
|
||||
moveName = gMoveNames[ItemIdToBattleMoveId(gCurrentBagPocketItemSlots[r4].itemId)];
|
||||
sub_8072C74(text, moveName, 0x78, 0);
|
||||
AlignStringInMenuWindow(text, moveName, 0x78, 0);
|
||||
}
|
||||
Menu_PrintText(gStringVar1, 14, sp10);
|
||||
}
|
||||
@ -1450,7 +1450,7 @@ _080A4634:\n\
|
||||
adds r0, r6, 0\n\
|
||||
movs r2, 0x78\n\
|
||||
movs r3, 0\n\
|
||||
bl sub_8072C74\n\
|
||||
bl AlignStringInMenuWindow\n\
|
||||
_080A46AE:\n\
|
||||
ldr r0, _080A46F8 @ =gStringVar1\n\
|
||||
movs r1, 0xE\n\
|
||||
|
1066
src/learn_move.c
1066
src/learn_move.c
File diff suppressed because it is too large
Load Diff
@ -241,8 +241,8 @@ void LinkTestScreen(void)
|
||||
FreeAllSpritePalettes();
|
||||
ResetTasks();
|
||||
SetVBlankCallback(VBlankCB_LinkTest);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow((struct WindowTemplate *)&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow((struct WindowTemplate *)&gMenuTextWindowTemplate);
|
||||
ResetBlockSend();
|
||||
gLinkType = 0x1111;
|
||||
OpenLink();
|
||||
|
@ -1124,8 +1124,8 @@ void debug_sub_810D388(void)
|
||||
FreeAllSpritePalettes();
|
||||
break;
|
||||
case 4:
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
Menu_EraseScreen();
|
||||
break;
|
||||
case 5:
|
||||
|
@ -233,7 +233,7 @@ u32 InitMainMenu(u8 a1)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow((struct WindowTemplate *)&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow((struct WindowTemplate *)&gMenuTextWindowTemplate);
|
||||
|
||||
if (a1)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
@ -704,12 +704,12 @@ void PrintPlayTime(void)
|
||||
#if defined(ENGLISH)
|
||||
Menu_PrintText(gMainMenuString_Time, 16, 3);
|
||||
FormatPlayTime(playTime, gSaveBlock2.playTimeHours, gSaveBlock2.playTimeMinutes, 1);
|
||||
sub_8072C74(alignedPlayTime, playTime, 48, 1);
|
||||
AlignStringInMenuWindow(alignedPlayTime, playTime, 48, 1);
|
||||
Menu_PrintText(alignedPlayTime, 22, 3);
|
||||
#elif defined(GERMAN)
|
||||
Menu_PrintTextPixelCoords(gMainMenuString_Time, 124, 24, TRUE);
|
||||
FormatPlayTime(playTime, gSaveBlock2.playTimeHours, gSaveBlock2.playTimeMinutes, 1);
|
||||
sub_8072C74(alignedPlayTime, playTime, 40, 1);
|
||||
AlignStringInMenuWindow(alignedPlayTime, playTime, 40, 1);
|
||||
Menu_PrintText(alignedPlayTime, 23, 3);
|
||||
#endif
|
||||
}
|
||||
@ -719,7 +719,7 @@ void PrintPokedexCount(void)
|
||||
u8 buffer[16];
|
||||
|
||||
Menu_PrintText(gMainMenuString_Pokedex, 2, 5);
|
||||
sub_8072C14(buffer, GetPokedexSeenCount(), 18, 0);
|
||||
AlignInt1InMenuWindow(buffer, GetPokedexSeenCount(), 18, 0);
|
||||
Menu_PrintText(buffer, 9, 5);
|
||||
}
|
||||
|
||||
@ -749,7 +749,7 @@ void PrintBadgeCount(void)
|
||||
static void Task_NewGameSpeech1(u8 taskId)
|
||||
{
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow((struct WindowTemplate *)&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow((struct WindowTemplate *)&gMenuTextWindowTemplate);
|
||||
REG_WIN0H = 0;
|
||||
REG_WIN0V = 0;
|
||||
REG_WININ = 0;
|
||||
@ -1372,7 +1372,7 @@ void CB_ContinueNewGameSpeechPart2()
|
||||
AddBirchSpeechObjects(taskId);
|
||||
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow((struct WindowTemplate *)&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow((struct WindowTemplate *)&gMenuTextWindowTemplate);
|
||||
|
||||
if (gSaveBlock2.playerGender != MALE)
|
||||
{
|
||||
|
@ -689,7 +689,7 @@ static void Task_BardSong(u8 taskId)
|
||||
{
|
||||
case 0: // Initialize song
|
||||
PrepareSongText();
|
||||
Text_InitWindowWithTemplate(gMenuWindowPtr, &gWindowTemplate_81E6CE4);
|
||||
Text_InitWindowWithTemplate(gMenuWindowPtr, &gMenuTextWindowTemplate);
|
||||
Text_InitWindow8002EB0(gMenuWindowPtr, gStringVar4, 2, 4, 15);
|
||||
task->data[1] = 0;
|
||||
task->data[2] = 0;
|
||||
|
22
src/menu.c
22
src/menu.c
@ -441,7 +441,7 @@ static u8 sub_80724F4(u8 left, u8 top, u8 menuItemCount, const struct MenuAction
|
||||
maxWidth = 0;
|
||||
for (i = 0; i < menuItemCount; i++)
|
||||
{
|
||||
u8 width = (sub_8072CA4(menuItems[i].text) + 7) / 8;
|
||||
u8 width = (GetStringWidthInMenuWindow(menuItems[i].text) + 7) / 8;
|
||||
|
||||
if (width > maxWidth)
|
||||
maxWidth = width;
|
||||
@ -498,7 +498,7 @@ static void sub_8072620(u8 left, u8 top, u8 menuItemCount, const struct MenuActi
|
||||
maxWidth = 0;
|
||||
for (i = 0; i < menuItemCount; i++)
|
||||
{
|
||||
u8 width = (sub_8072CA4(menuItems[i].text) + 7) / 8;
|
||||
u8 width = (GetStringWidthInMenuWindow(menuItems[i].text) + 7) / 8;
|
||||
|
||||
if (width > maxWidth)
|
||||
maxWidth = width;
|
||||
@ -733,11 +733,11 @@ void MenuPrint_RightAligned(const u8 *str, u8 left, u8 top)
|
||||
Text_InitWindow8004D38(gMenuWindowPtr, str, gMenuTextTileOffset, left, top);
|
||||
}
|
||||
|
||||
void sub_8072B80(const u8 *a1, u8 a2, u8 a3, const u8 *a4)
|
||||
void sub_8072B80(const u8 *src, u8 a2, u8 a3, const u8 *a4)
|
||||
{
|
||||
u8 buffer[64];
|
||||
u8 width = GetStringWidth(gMenuWindowPtr, a4);
|
||||
AlignString(gMenuWindowPtr, buffer, a1, width, 1);
|
||||
AlignString(gMenuWindowPtr, buffer, src, width, 1);
|
||||
Text_InitWindowAndPrintText(gMenuWindowPtr, buffer, gMenuTextTileOffset, a2, a3);
|
||||
}
|
||||
|
||||
@ -746,22 +746,22 @@ void sub_8072BD8(const u8 *a1, u8 a2, u8 a3, u16 a4)
|
||||
Text_InitWindow8004DB0(gMenuWindowPtr, a1, gMenuTextTileOffset, a2, a3, a4);
|
||||
}
|
||||
|
||||
u8 *sub_8072C14(u8 *a1, s32 a2, u8 a3, u8 a4)
|
||||
u8 *AlignInt1InMenuWindow(u8 *dest, s32 value, u8 alignAmount, u8 alignType)
|
||||
{
|
||||
return AlignInt1(gMenuWindowPtr, a1, a2, a3, a4);
|
||||
return AlignInt1(gMenuWindowPtr, dest, value, alignAmount, alignType);
|
||||
}
|
||||
|
||||
u8 *sub_8072C44(u8 *a1, s32 a2, u8 a3, u8 a4)
|
||||
u8 *AlignInt2InMenuWindow(u8 *dest, s32 value, u8 alignAmount, u8 alignType)
|
||||
{
|
||||
return AlignInt2(gMenuWindowPtr, a1, a2, a3, a4);
|
||||
return AlignInt2(gMenuWindowPtr, dest, value, alignAmount, alignType);
|
||||
}
|
||||
|
||||
u8 *sub_8072C74(u8 *a1, const u8 *a2, u8 a3, u8 a4)
|
||||
u8 *AlignStringInMenuWindow(u8 *dest, const u8 *src, u8 alignAmount, u8 alignType)
|
||||
{
|
||||
return AlignString(gMenuWindowPtr, a1, a2, a3, a4);
|
||||
return AlignString(gMenuWindowPtr, dest, src, alignAmount, alignType);
|
||||
}
|
||||
|
||||
u8 sub_8072CA4(const u8 *str)
|
||||
u8 GetStringWidthInMenuWindow(const u8 *str)
|
||||
{
|
||||
return GetStringWidth(gMenuWindowPtr, str);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ void PrintMoneyAmount(u32 amount, u8 size, u8 x, u8 y)
|
||||
u8 stringWidth;
|
||||
|
||||
GetMoneyAmountText(buffer, amount, size);
|
||||
stringWidth = sub_8072CA4(buffer);
|
||||
stringWidth = GetStringWidthInMenuWindow(buffer);
|
||||
|
||||
if (stringWidth >= (size + 1) * 8)
|
||||
{
|
||||
|
1063
src/move_tutor_menu.c
Normal file
1063
src/move_tutor_menu.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -47,8 +47,8 @@ void CB2_InitMysteryEventMenu(void)
|
||||
FreeAllSpritePalettes();
|
||||
ResetTasks();
|
||||
SetVBlankCallback(VBlankCB);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
Menu_EraseScreen();
|
||||
REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON;
|
||||
REG_BLDCNT = 0;
|
||||
@ -394,8 +394,8 @@ void debug_sub_815D15C(void)
|
||||
FreeAllSpritePalettes();
|
||||
ResetTasks();
|
||||
SetVBlankCallback(VBlankCB);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
Menu_EraseScreen();
|
||||
REG_DISPCNT = DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP | DISPCNT_MODE_0;
|
||||
REG_BLDCNT = 0;
|
||||
|
@ -1124,8 +1124,8 @@ void CB2_InitTestMenu(void)
|
||||
ResetSpriteData();
|
||||
ResetTasks();
|
||||
ScanlineEffect_Stop();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
debug_sub_8076B68();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
REG_IE |= 1;
|
||||
@ -1550,7 +1550,7 @@ bool32 sub_805483C(u8 *a1)
|
||||
sub_8054814();
|
||||
sub_8054C54();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
(*a1)++;
|
||||
break;
|
||||
case 5:
|
||||
@ -1616,7 +1616,7 @@ bool32 sub_805493C(u8 *a1, u32 a2)
|
||||
sub_8054814();
|
||||
sub_8054C54();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
(*a1)++;
|
||||
break;
|
||||
case 5:
|
||||
@ -1706,7 +1706,7 @@ bool32 sub_8054A9C(u8 *a1)
|
||||
sub_8054814();
|
||||
sub_8054C54();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
(*a1)++;
|
||||
break;
|
||||
case 4:
|
||||
@ -1772,7 +1772,7 @@ void sub_8054C2C(void)
|
||||
sub_8054814();
|
||||
sub_8054C54();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
mapdata_load_assets_to_gpu_and_full_redraw();
|
||||
}
|
||||
|
||||
|
@ -3427,10 +3427,10 @@ void PartyMenuDoPrintHP(u8 monIndex, u8 b, u16 currentHP, u16 maxHP)
|
||||
{
|
||||
u32 *var;
|
||||
register u8 *stringVar1 asm("r2") = gStringVar1;
|
||||
register u8 *textPtr asm("r2") = sub_8072C14(stringVar1, currentHP, 15, 1);
|
||||
register u8 *textPtr asm("r2") = AlignInt1InMenuWindow(stringVar1, currentHP, 15, 1);
|
||||
textPtr[0] = CHAR_SLASH;
|
||||
|
||||
sub_8072C14(++textPtr, maxHP, 35, 1);
|
||||
AlignInt1InMenuWindow(++textPtr, maxHP, 35, 1);
|
||||
var = 0;
|
||||
|
||||
CpuFastSet(&var, gUnknown_02039460, 0x1000040);
|
||||
|
@ -135,7 +135,7 @@ static const struct MenuAction2 gPCText_ItemPCOptionsText[] =
|
||||
{ PCText_WithdrawItem, ItemStorage_Withdraw },
|
||||
{ PCText_DepositItem, ItemStorage_Deposit },
|
||||
{ PCText_TossItem, ItemStorage_Toss },
|
||||
{ gUnknownText_Exit, ItemStorage_Exit }
|
||||
{ gOtherText_Exit, ItemStorage_Exit }
|
||||
};
|
||||
|
||||
static const struct YesNoFuncTable ResumeFromTossYesNoFuncList[] = // ResumeFromTossYesNoFuncList
|
||||
|
@ -486,7 +486,7 @@ static void sub_810BB88(u8 a0)
|
||||
y = (i - a0) << 1;
|
||||
if (i == gUnknown_02039248.unk2)
|
||||
{
|
||||
buf = sub_8072C74(gStringVar1, gContestStatsText_StowCase, 0x78, 0);
|
||||
buf = AlignStringInMenuWindow(gStringVar1, gContestStatsText_StowCase, 0x78, 0);
|
||||
Menu_PrintText(gStringVar1, 15, y + 1);
|
||||
if (i != a0 + 8)
|
||||
{
|
||||
@ -494,7 +494,7 @@ static void sub_810BB88(u8 a0)
|
||||
}
|
||||
break;
|
||||
}
|
||||
buf = sub_8072C74(gStringVar1, gPokeblockNames[gSaveBlock1.pokeblocks[i].color], 0x5e, 0);
|
||||
buf = AlignStringInMenuWindow(gStringVar1, gPokeblockNames[gSaveBlock1.pokeblocks[i].color], 0x5e, 0);
|
||||
buf[0] = EXT_CTRL_CODE_BEGIN;
|
||||
buf[1] = 0x14;
|
||||
buf[2] = 0x06;
|
||||
@ -615,7 +615,7 @@ static void sub_810BDAC(bool8 flag)
|
||||
BasicInitMenuWindow(&gWindowTemplate_81E6E34);
|
||||
if (gUnknown_02039248.unk0 + gUnknown_02039248.unk1 != gUnknown_02039248.unk2)
|
||||
{
|
||||
sub_8072C14(gStringVar1, sub_810C9E8(&gSaveBlock1.pokeblocks[gUnknown_02039248.unk0 + gUnknown_02039248.unk1]), 16, 1);
|
||||
AlignInt1InMenuWindow(gStringVar1, sub_810C9E8(&gSaveBlock1.pokeblocks[gUnknown_02039248.unk0 + gUnknown_02039248.unk1]), 16, 1);
|
||||
Menu_PrintText(gStringVar1, 11, 17);
|
||||
}
|
||||
else
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "link.h"
|
||||
#include "m4a.h"
|
||||
#include "main.h"
|
||||
#include "move_tutor_menu.h"
|
||||
#include "pokemon.h"
|
||||
#include "random.h"
|
||||
#include "overworld.h"
|
||||
@ -993,18 +994,18 @@ u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm)
|
||||
}
|
||||
}
|
||||
|
||||
u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves)
|
||||
u8 GetMoveTutorMoves(struct Pokemon *mon, u16 *moves)
|
||||
{
|
||||
u16 learnedMoves[4];
|
||||
u16 knownMoves[4];
|
||||
u8 numMoves = 0;
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES, 0);
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL, 0);
|
||||
int i, j, k;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0);
|
||||
knownMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0);
|
||||
|
||||
for (i = 0; i < 20; i++)
|
||||
for (i = 0; i < MAX_MOVE_TUTOR_MOVES; i++)
|
||||
{
|
||||
u16 moveLevel;
|
||||
|
||||
@ -1012,10 +1013,9 @@ u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves)
|
||||
break;
|
||||
|
||||
moveLevel = gLevelUpLearnsets[species][i] & 0xFE00;
|
||||
|
||||
if (moveLevel <= (level << 9))
|
||||
{
|
||||
for (j = 0; j < 4 && learnedMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++)
|
||||
for (j = 0; j < 4 && knownMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++)
|
||||
;
|
||||
|
||||
if (j == 4)
|
||||
|
@ -912,7 +912,7 @@ void sub_809A23C(u8 boxId)
|
||||
gPokemonStorageSystemPtr->unk_0d08 |= 0x10000 << tagIdx;
|
||||
sub_809A1BC(gPokemonStorageSystemPtr->unk_08ca, gPokemonStorage.boxNames[boxId]);
|
||||
LoadSpriteSheet(&spriteSheet);
|
||||
r6 = sub_809A6D0(sub_8072CA4(gPokemonStorage.boxNames[boxId]));
|
||||
r6 = sub_809A6D0(GetStringWidthInMenuWindow(gPokemonStorage.boxNames[boxId]));
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gSpriteTemplate_83BB2B8, r6 + i * 32, 0x1c, 23);
|
||||
@ -947,7 +947,7 @@ void sub_809A3D0(u8 boxId, s8 a1)
|
||||
sub_809A1BC(gPokemonStorageSystemPtr->unk_08ca, gPokemonStorage.boxNames[boxId]);
|
||||
LoadSpriteSheet(&spriteSheet);
|
||||
LoadPalette(gUnknown_083BB0A8[gPokemonStorage.wallpaper[boxId]], r8, 0x04);
|
||||
x = sub_809A6D0(sub_8072CA4(gPokemonStorage.boxNames[boxId]));
|
||||
x = sub_809A6D0(GetStringWidthInMenuWindow(gPokemonStorage.boxNames[boxId]));
|
||||
x2 = x + a1 * 192;
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
@ -2061,7 +2061,7 @@ void sub_809C04C(void *pokemon, u8 a1)
|
||||
buf = gPokemonStorageSystemPtr->unk_1259 + 8;
|
||||
buf[0] = 0x34; // LV
|
||||
buf = gPokemonStorageSystemPtr->unk_1259 + 9;
|
||||
buf = sub_8072C14(buf, gPokemonStorageSystemPtr->unk_11f8, 0x22, STR_CONV_MODE_RIGHT_ALIGN);
|
||||
buf = AlignInt1InMenuWindow(buf, gPokemonStorageSystemPtr->unk_11f8, 0x22, STR_CONV_MODE_RIGHT_ALIGN);
|
||||
buf[0] = EXT_CTRL_CODE_BEGIN;
|
||||
buf[1] = 0x11; // CLEAR
|
||||
buf[2] = 8;
|
||||
|
@ -9,12 +9,12 @@
|
||||
#include "event_data.h"
|
||||
#include "ewram.h"
|
||||
#include "item.h"
|
||||
#include "learn_move.h"
|
||||
#include "link.h"
|
||||
#include "m4a.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
#include "menu_helpers.h"
|
||||
#include "move_tutor_menu.h"
|
||||
#include "overworld.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
@ -2577,9 +2577,9 @@ static void sub_809FF64(struct Pokemon *mon)
|
||||
ConvertIntToDecimalString(buffer, GetMonData(mon, MON_DATA_SPEED));
|
||||
sub_8072BD8(buffer, 27, 11, 18);
|
||||
|
||||
buffer = sub_8072C14(buffer, GetMonData(mon, MON_DATA_HP), 24, 1);
|
||||
buffer = AlignInt1InMenuWindow(buffer, GetMonData(mon, MON_DATA_HP), 24, 1);
|
||||
*buffer++ = CHAR_SLASH;
|
||||
buffer = sub_8072C14(buffer, GetMonData(mon, MON_DATA_MAX_HP), 48, 1);
|
||||
buffer = AlignInt1InMenuWindow(buffer, GetMonData(mon, MON_DATA_MAX_HP), 48, 1);
|
||||
|
||||
Menu_PrintTextPixelCoords(gStringVar1, 126, 56, 1);
|
||||
}
|
||||
@ -2651,9 +2651,9 @@ static void sub_80A015C(struct Pokemon *mon)
|
||||
maxPP = CalculatePPWithBonus(move, ppBonuses, i);
|
||||
|
||||
buffer = gStringVar1;
|
||||
buffer = sub_8072C14(buffer, curPP, 14, 1);
|
||||
buffer = AlignInt1InMenuWindow(buffer, curPP, 14, 1);
|
||||
*buffer++ = CHAR_SLASH;
|
||||
sub_8072C14(buffer, maxPP, 32, 1);
|
||||
AlignInt1InMenuWindow(buffer, maxPP, 32, 1);
|
||||
Menu_PrintText(gStringVar1, 25, (2 * i) + 4);
|
||||
}
|
||||
}
|
||||
@ -2687,9 +2687,9 @@ static void sub_80A029C(struct Pokemon *mon)
|
||||
|
||||
buffer = gStringVar1;
|
||||
pp = gBattleMoves[move].pp;
|
||||
buffer = sub_8072C14(buffer, pp, 14, 1);
|
||||
buffer = AlignInt1InMenuWindow(buffer, pp, 14, 1);
|
||||
*buffer++ = CHAR_SLASH;
|
||||
buffer = sub_8072C14(buffer, pp, 32, 1);
|
||||
buffer = AlignInt1InMenuWindow(buffer, pp, 32, 1);
|
||||
Menu_PrintText(gStringVar1, 25, 12);
|
||||
}
|
||||
|
||||
@ -2769,26 +2769,26 @@ static void sub_80A04CC(u16 move)
|
||||
if (gBattleMoves[move].power <= 1)
|
||||
{
|
||||
buffer = gStringVar1;
|
||||
buffer = sub_8072C74(buffer, gOtherText_ThreeDashes2, 21, 1);
|
||||
buffer = AlignStringInMenuWindow(buffer, gOtherText_ThreeDashes2, 21, 1);
|
||||
Menu_PrintText(gStringVar1, 7, 15);
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer = gStringVar1;
|
||||
buffer = sub_8072C14(buffer, gBattleMoves[move].power, 21, 1);
|
||||
buffer = AlignInt1InMenuWindow(buffer, gBattleMoves[move].power, 21, 1);
|
||||
Menu_PrintText(gStringVar1, 7, 15);
|
||||
}
|
||||
|
||||
if (gBattleMoves[move].accuracy == 0)
|
||||
{
|
||||
buffer = gStringVar1;
|
||||
buffer = sub_8072C74(buffer, gOtherText_ThreeDashes2, 21, 1);
|
||||
buffer = AlignStringInMenuWindow(buffer, gOtherText_ThreeDashes2, 21, 1);
|
||||
Menu_PrintText(gStringVar1, 7, 17);
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer = gStringVar1;
|
||||
buffer = sub_8072C14(buffer, gBattleMoves[move].accuracy, 21, 1);
|
||||
buffer = AlignInt1InMenuWindow(buffer, gBattleMoves[move].accuracy, 21, 1);
|
||||
Menu_PrintText(gStringVar1, 7, 17);
|
||||
}
|
||||
}
|
||||
|
@ -3851,7 +3851,7 @@ void sub_80EF428(u8 a, u8 b)
|
||||
}
|
||||
|
||||
tileBuffer = gUnknown_083DFEC8;
|
||||
sub_8072C74(&tileBuffer[0x800], pcText, 0xC0, 2);
|
||||
AlignStringInMenuWindow(&tileBuffer[0x800], pcText, 0xC0, 2);
|
||||
Menu_PrintText(&tileBuffer[0x800], 3, 17);
|
||||
}
|
||||
|
||||
|
@ -278,10 +278,10 @@ void ResetRtcScreen_PrintTime(u8 x, u8 y, u16 days, u8 hours, u8 minutes, u8 sec
|
||||
hours %= 24;
|
||||
minutes %= 60;
|
||||
seconds %= 60;
|
||||
sub_8072C44(gStringVar1, days, 24, 1);
|
||||
AlignInt2InMenuWindow(gStringVar1, days, 24, 1);
|
||||
dest = StringCopy(dest, gStringVar1);
|
||||
dest = StringCopy(dest, gOtherText_Day);
|
||||
sub_8072C44(gStringVar1, hours, 18, 1);
|
||||
AlignInt2InMenuWindow(gStringVar1, hours, 18, 1);
|
||||
dest = StringCopy(dest, gStringVar1);
|
||||
dest = StringCopy(dest, gUnknown_08376500);
|
||||
dest = ConvertIntToDecimalStringN(dest, minutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
@ -426,8 +426,8 @@ void CB2_InitResetRtcScreen(void)
|
||||
ResetSpriteData();
|
||||
ResetTasks();
|
||||
ResetPaletteFade();
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
REG_DISPCNT = 4352;
|
||||
SetVBlankCallback(VBlankCB_ResetRtcScreen);
|
||||
SetMainCallback2(CB2_ResetRtcScreen);
|
||||
|
@ -436,7 +436,7 @@ void sub_8115384(void)
|
||||
break;
|
||||
case 0x2:
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
LoadPalette(&gUnknown_083F86BC, 0x0, 0x1C0);
|
||||
gMain.state++;
|
||||
break;
|
||||
|
@ -122,7 +122,7 @@ static void CB2_SaveFailedScreen(void)
|
||||
LoadPalette(&gBirchBagGrassPal, 0, sizeof(gBirchBagGrassPal));
|
||||
LoadPalette(&gSaveFailedClockPal, 0x100, sizeof(gSaveFailedClockPal));
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
Menu_DrawStdWindowFrame(13, CLOCK_WIN_TOP, 16, CLOCK_WIN_TOP + 3); // clock window
|
||||
Menu_DrawStdWindowFrame(1, MSG_WIN_TOP, 28, 19); // message window
|
||||
Menu_PrintText(gSystemText_SaveFailedBackupCheck, 2, MSG_WIN_TOP + 1);
|
||||
|
@ -622,7 +622,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, u8 ig
|
||||
static u16 GetStringWidthInTilesForScriptMenu(const u8 *str)
|
||||
{
|
||||
// each tile on screen is 8x8, so it needs the number of tiles and not pixels, hence the division by 8.
|
||||
return (Text_GetStringWidthFromWindowTemplate((struct WindowTemplate *)&gWindowTemplate_81E6CE4, str) + 7) / 8;
|
||||
return (Text_GetStringWidthFromWindowTemplate((struct WindowTemplate *)&gMenuTextWindowTemplate, str) + 7) / 8;
|
||||
}
|
||||
|
||||
static void DrawMultichoiceMenu(u8 left, u8 top, u8 count, const struct MenuAction *list, u8 ignoreBPress, u8 cursorPos)
|
||||
|
@ -98,7 +98,7 @@ const u8 gUnknown_083D1374[] = {
|
||||
|
||||
const struct MenuAction2 gUnknown_083D13D4[] = {
|
||||
{SecretBaseText_DelRegist, sub_80BCA84},
|
||||
{gUnknownText_Exit, sub_80BCBF8}
|
||||
{gOtherText_Exit, sub_80BCBF8}
|
||||
};
|
||||
|
||||
const struct YesNoFuncTable gUnknown_083D13E4 = {
|
||||
@ -1011,7 +1011,7 @@ void sub_80BC6B0(u8 taskId)
|
||||
if (n < 8)
|
||||
{
|
||||
Menu_BlankWindowRect(18, 2 * n + 2, 28, 2 * n + 3);
|
||||
Menu_PrintText(gUnknownText_Exit, 18, 2 * n + 2);
|
||||
Menu_PrintText(gOtherText_Exit, 18, 2 * n + 2);
|
||||
DestroyVerticalScrollIndicator(BOTTOM_ARROW);
|
||||
if (n != 7)
|
||||
Menu_BlankWindowRect(18, ((n << 25) + (1 << 26)) >> 24, 28, 18); // the shifts are needed to match
|
||||
|
@ -300,7 +300,7 @@ static void BuildStartMenuActions_Link(void)
|
||||
//Show number of safari balls left
|
||||
static void DisplaySafariBallsWindow(void)
|
||||
{
|
||||
sub_8072C44(gStringVar1, gNumSafariBalls, 12, 1);
|
||||
AlignInt2InMenuWindow(gStringVar1, gNumSafariBalls, 12, 1);
|
||||
Menu_DrawStdWindowFrame(0, 0, 10, 5);
|
||||
Menu_PrintText(gOtherText_SafariStock, 1, 1);
|
||||
}
|
||||
@ -379,7 +379,7 @@ void CreateStartMenuTask(void (*func)(u8))
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
taskId = CreateTask(Task_StartMenu, 0x50);
|
||||
SetTaskFuncWithFollowupFunc(taskId, Task_StartMenu, func);
|
||||
}
|
||||
@ -865,8 +865,8 @@ static bool32 sub_80719FC(u8 *step)
|
||||
ScanlineEffect_Clear();
|
||||
break;
|
||||
case 2:
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
Text_LoadWindowTemplate(&gMenuTextWindowTemplate);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_BG0_ON;
|
||||
break;
|
||||
case 3:
|
||||
|
@ -295,7 +295,7 @@ void CB2_ChooseStarter(void)
|
||||
LoadCompressedObjectPic(&gUnknown_083F77A4[0]);
|
||||
LoadSpritePalettes(gUnknown_083F77B4);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
|
||||
savedIme = REG_IME;
|
||||
@ -534,7 +534,7 @@ static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
|
||||
AddTextColorCtrlCode(labelText, 0, 15, 8);
|
||||
|
||||
//Copy Pokemon name to label
|
||||
sub_8072C74(labelText + 5, gSpeciesNames[species], 0x6B, 1);
|
||||
AlignStringInMenuWindow(labelText + 5, gSpeciesNames[species], 0x6B, 1);
|
||||
Menu_PrintText(
|
||||
labelText,
|
||||
gStarterChoose_LabelCoords[selection][0],
|
||||
@ -663,7 +663,7 @@ _0810A8CA:\n\
|
||||
adds r0, r7, 0\n\
|
||||
movs r2, 0x70\n\
|
||||
movs r3, 0x2\n\
|
||||
bl sub_8072C74\n\
|
||||
bl AlignStringInMenuWindow\n\
|
||||
adds r2, r5, 0x2\n\
|
||||
lsls r2, 24\n\
|
||||
lsrs r2, 24\n\
|
||||
|
@ -159,7 +159,7 @@ const u8 OtherText_CheckTag[] = _("CHECK TAG");
|
||||
const u8 OtherText_Confirm[] = _("CONFIRM");
|
||||
const u8 gOtherText_Walk[] = _("WALK");
|
||||
|
||||
const u8 gUnknownText_Exit[] = _("EXIT");
|
||||
const u8 gOtherText_Exit[] = _("EXIT");
|
||||
const u8 gOtherText_CancelNoTerminator[] = _("CANCEL");
|
||||
const u8 gOtherText_CancelWithTerminator[] = _("$CANCEL"); // with terminator at beginning?
|
||||
|
||||
@ -1085,7 +1085,7 @@ const u8 OtherText_CheckTag[] = _("PRÜFEN");
|
||||
const u8 OtherText_Confirm[] = _("O.K.");
|
||||
const u8 gOtherText_Walk[] = _("LAUFEN");
|
||||
|
||||
const u8 gUnknownText_Exit[] = _("BEENDEN");
|
||||
const u8 gOtherText_Exit[] = _("BEENDEN");
|
||||
const u8 gOtherText_CancelNoTerminator[] = _("ZURÜCK");
|
||||
const u8 gOtherText_CancelWithTerminator[] = _("$ZURÜCK");
|
||||
|
||||
|
12
src/text.c
12
src/text.c
@ -618,7 +618,7 @@ const struct WindowTemplate gWindowTemplate_81E6CC8 =
|
||||
BG_SCREEN_ADDR(15), // tilemap
|
||||
};
|
||||
|
||||
const struct WindowTemplate gWindowTemplate_81E6CE4 =
|
||||
const struct WindowTemplate gMenuTextWindowTemplate =
|
||||
{
|
||||
0, // BG number
|
||||
2, // BG character base block
|
||||
@ -1647,7 +1647,7 @@ const struct WindowTemplate gWindowTemplate_81E7224 =
|
||||
BG_SCREEN_ADDR(31), // tilemap
|
||||
};
|
||||
|
||||
const struct WindowTemplate gWindowTemplate_81E7240 =
|
||||
const struct WindowTemplate gMoveTutorMenuFramesWindowTemplate =
|
||||
{
|
||||
1, // BG number
|
||||
2, // BG character base block
|
||||
@ -3458,7 +3458,7 @@ u8 *AlignInt1(struct Window *win, u8 *dest, s32 value, u8 alignAmount, u8 alignT
|
||||
case 0:
|
||||
ConvertIntToDecimalString(temp, value);
|
||||
dest = StringCopy(dest, temp);
|
||||
dest[0] = 0xFC;
|
||||
dest[0] = EXT_CTRL_CODE_BEGIN;
|
||||
dest[1] = 19;
|
||||
dest[2] = alignAmount;
|
||||
dest += 3;
|
||||
@ -3469,7 +3469,7 @@ u8 *AlignInt1(struct Window *win, u8 *dest, s32 value, u8 alignAmount, u8 alignT
|
||||
width = GetStringWidth(win, temp);
|
||||
if (alignAmount > width)
|
||||
{
|
||||
dest[0] = 0xFC;
|
||||
dest[0] = EXT_CTRL_CODE_BEGIN;
|
||||
dest[1] = 19;
|
||||
dest[2] = alignAmount - width;
|
||||
dest += 3;
|
||||
@ -3481,7 +3481,7 @@ u8 *AlignInt1(struct Window *win, u8 *dest, s32 value, u8 alignAmount, u8 alignT
|
||||
width = GetStringWidth(win, temp);
|
||||
if (alignAmount > width)
|
||||
{
|
||||
dest[0] = 0xFC;
|
||||
dest[0] = EXT_CTRL_CODE_BEGIN;
|
||||
dest[1] = 19;
|
||||
dest[2] = (alignAmount - width) / 2;
|
||||
dest += 3;
|
||||
@ -3489,7 +3489,7 @@ u8 *AlignInt1(struct Window *win, u8 *dest, s32 value, u8 alignAmount, u8 alignT
|
||||
dest = StringCopy(dest, temp);
|
||||
if (alignAmount > width)
|
||||
{
|
||||
dest[0] = 0xFC;
|
||||
dest[0] = EXT_CTRL_CODE_BEGIN;
|
||||
dest[1] = 19;
|
||||
dest[2] = alignAmount;
|
||||
dest += 3;
|
||||
|
@ -1089,7 +1089,7 @@ static void sub_8047EC0(void)
|
||||
ResetTasks();
|
||||
sub_804A964(&gUnknown_03004824->unk_00c8, BG_SCREEN_ADDR(5));
|
||||
SetVBlankCallback(sub_80489F4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6F84);
|
||||
Text_InitWindowWithTemplate(&gUnknown_03004824->window, &gWindowTemplate_81E6F84);
|
||||
gUnknown_03004824->unk_007a = TextWindow_SetBaseTileNum(20);
|
||||
@ -1269,7 +1269,7 @@ static void sub_80484F4(void)
|
||||
ResetTasks();
|
||||
sub_804A964(&gUnknown_03004824->unk_00c8, BG_SCREEN_ADDR(5));
|
||||
SetVBlankCallback(sub_80489F4);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6F84);
|
||||
Text_InitWindowWithTemplate(&gUnknown_03004824->window, &gWindowTemplate_81E6F84);
|
||||
gUnknown_03004824->unk_007a = TextWindow_SetBaseTileNum(20);
|
||||
|
@ -1452,7 +1452,7 @@ static void TrainerCard_Front_GetPlayTimeString(u8 *arg1, s16 colon)
|
||||
playTimeMinutes = ewram0_2.displayedCard.playTimeMinutes;
|
||||
}
|
||||
FormatPlayTime(buffer, playTimeHours, playTimeMinutes, colon);
|
||||
sub_8072C74(arg1, buffer, 48, 1);
|
||||
AlignStringInMenuWindow(arg1, buffer, 48, 1);
|
||||
}
|
||||
|
||||
static void TrainerCard_PrintEasyChatPhrase(void)
|
||||
@ -1548,10 +1548,10 @@ static void TrainerCard_Back_PrintBattleTower(void)
|
||||
|
||||
if (ewram0_2.showBattleTowerStatus != 0)
|
||||
{
|
||||
sub_8072C44(buffer, ewram0_2.displayedCard.battleTowerWins, 24, 1);
|
||||
AlignInt2InMenuWindow(buffer, ewram0_2.displayedCard.battleTowerWins, 24, 1);
|
||||
Menu_PrintTextPixelCoords(buffer, 112, 120, 0);
|
||||
|
||||
sub_8072C44(buffer, ewram0_2.displayedCard.battleTowerLosses, 24, 1);
|
||||
AlignInt2InMenuWindow(buffer, ewram0_2.displayedCard.battleTowerLosses, 24, 1);
|
||||
Menu_PrintTextPixelCoords(buffer, 149, 120, 0);
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ static void LoadWallClockGraphics(void)
|
||||
LoadCompressedObjectPic(&gUnknown_083F7A90[0]);
|
||||
LoadSpritePalettes(gUnknown_083F7AA0);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
|
||||
InitMenuWindow(&gWindowTemplate_81E6CE4);
|
||||
InitMenuWindow(&gMenuTextWindowTemplate);
|
||||
}
|
||||
|
||||
static void WallClockInit(void)
|
||||
|
@ -42,7 +42,7 @@ unk_debug_bss_3 = .;
|
||||
. = ALIGN(4); src/contest_painting.o(.bss);
|
||||
. = ALIGN(4); src/pokeblock.o(.bss);
|
||||
. = ALIGN(4); src/field_specials.o(.bss);
|
||||
. = ALIGN(4); src/learn_move.o(.bss);
|
||||
. = ALIGN(4); src/move_tutor_menu.o(.bss);
|
||||
. = ALIGN(4); src/player_pc.o(.bss);
|
||||
. = ALIGN(4); src/debug/nakamura_debug_menu.o(.bss);
|
||||
. = ALIGN(4); src/libs/m4a_1.o(.bss);
|
||||
|
Loading…
Reference in New Issue
Block a user