summaryrefslogtreecommitdiff
path: root/src/scene/hall_of_fame.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-01-12 10:15:31 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-01-12 10:15:31 -0500
commitcce4c9e92bfe7e10be3a0cf4940299e84701dba0 (patch)
tree514282760474bf038fb734f87e4f84ac3fb0df12 /src/scene/hall_of_fame.c
parent3b8f6133865af6ede3628f3df8dd71648b43b3bc (diff)
parent6a2e39eb97db47b542eea76c1e45df37184a0705 (diff)
Merge branch 'master' into pokemon_storage_system
Diffstat (limited to 'src/scene/hall_of_fame.c')
-rw-r--r--src/scene/hall_of_fame.c66
1 files changed, 32 insertions, 34 deletions
diff --git a/src/scene/hall_of_fame.c b/src/scene/hall_of_fame.c
index 4740c086d..bfa0d1705 100644
--- a/src/scene/hall_of_fame.c
+++ b/src/scene/hall_of_fame.c
@@ -16,7 +16,10 @@
#include "data2.h"
#include "decompress.h"
#include "random.h"
+#include "scanline_effect.h"
#include "trig.h"
+#include "hof_pc.h"
+#include "credits.h"
#include "pc_screen_effect.h"
#include "ewram.h"
@@ -88,11 +91,6 @@ static u32 HallOfFame_LoadPokemonPic(u16 species, s16 posX, s16 posY, u16 pokeID
static u32 HallOfFame_LoadTrainerPic(u16 trainerPicID, s16 posX, s16 posY, u16 a3);
static bool8 sub_81438C4(void);
-// functions from different files
-void sub_81439D0(void);
-void ReturnFromHallOfFamePC(void);
-void remove_some_task(void);
-
// data and gfx
static const struct CompressedSpriteSheet sHallOfFame_ConfettiSpriteSheet =
@@ -554,8 +552,8 @@ static void sub_814217C(u8 taskID)
lastSavedTeam--;
}
*lastSavedTeam = *fameMons;
- MenuDrawTextWindow(2, 14, 27, 19);
- MenuPrint(gMenuText_HOFSaving, 3, 15);
+ Menu_DrawStdWindowFrame(2, 14, 27, 19);
+ Menu_PrintText(gMenuText_HOFSaving, 3, 15);
gTasks[taskID].func = sub_8142274;
}
@@ -578,8 +576,8 @@ static void sub_81422B8(u8 taskID)
static void sub_81422E8(u8 taskID)
{
- SetUpWindowConfig(&gWindowConfig_81E7198);
- InitMenuWindow(&gWindowConfig_81E7198);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E7198);
+ InitMenuWindow(&gWindowTemplate_81E7198);
gTasks[taskID].func = sub_8142320;
}
@@ -613,7 +611,7 @@ static void sub_8142320(u8 taskID)
gSprites[spriteID].data[0] = 0;
gSprites[spriteID].callback = sub_81435DC;
gTasks[taskID].tMonSpriteID(currPokeID) = spriteID;
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskID].func = sub_8142404;
}
@@ -666,7 +664,7 @@ static void sub_8142570(u8 taskID)
if (gTasks[taskID].tMonSpriteID(i) != 0xFF)
gSprites[gTasks[taskID].tMonSpriteID(i)].oam.priority = 0;
}
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
sub_8143068(0, 15);
PlaySE(SE_DENDOU);
gTasks[taskID].tFrameCount = 400;
@@ -690,7 +688,7 @@ static void sub_8142618(u8 taskID)
gSprites[gTasks[taskID].tMonSpriteID(i)].oam.priority = 1;
}
BeginNormalPaletteFade(sUnknown_0203931C, 0, 12, 12, 0x735F);
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskID].tFrameCount = 7;
gTasks[taskID].func = sub_81426F8;
}
@@ -710,8 +708,8 @@ static void sub_81426F8(u8 taskID)
static void sub_8142738(u8 taskID)
{
REG_DISPCNT = 0x1940;
- SetUpWindowConfig(&gWindowConfig_81E71B4);
- InitMenuWindow(&gWindowConfig_81E71B4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E71B4);
+ InitMenuWindow(&gWindowTemplate_81E71B4);
gTasks[taskID].tPlayerSpriteID = HallOfFame_LoadTrainerPic(gSaveBlock2.playerGender, 120, 72, 6);
gTasks[taskID].tFrameCount = 120;
@@ -728,10 +726,10 @@ static void sub_8142794(u8 taskID)
gSprites[gTasks[taskID].tPlayerSpriteID].pos1.x++;
else
{
- MenuDrawTextWindow(1, 2, 15, 9);
+ Menu_DrawStdWindowFrame(1, 2, 15, 9);
HallOfFame_PrintPlayerInfo(1, 2);
- MenuDrawTextWindow(2, 14, 27, 19);
- MenuPrint(gMenuText_HOFCongratulations, 4, 15);
+ Menu_DrawStdWindowFrame(2, 14, 27, 19);
+ Menu_PrintText(gMenuText_HOFCongratulations, 4, 15);
gTasks[taskID].func = sub_8142818;
}
}
@@ -855,8 +853,8 @@ static void sub_8142A28(u8 taskID)
*(vram1 + i) = i + 3;
*(vram2 + i) = i + 20;
}
- SetUpWindowConfig(&gWindowConfig_81E7198);
- InitMenuWindow(&gWindowConfig_81E7198);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E7198);
+ InitMenuWindow(&gWindowTemplate_81E7198);
gTasks[taskID].func = sub_8142B04;
}
}
@@ -921,7 +919,7 @@ static void sub_8142B04(u8 taskID)
stringPtr[1] = 0x13;
stringPtr[2] = 0xF0;
stringPtr[3] = EOS;
- MenuPrint(gStringVar1, 0, 0);
+ Menu_PrintText(gStringVar1, 0, 0);
gTasks[taskID].func = sub_8142CC8;
}
@@ -1030,14 +1028,14 @@ static void sub_8142FCC(u8 taskID)
static void sub_8142FEC(u8 taskID)
{
- MenuDrawTextWindow(2, 14, 27, 19);
+ Menu_DrawStdWindowFrame(2, 14, 27, 19);
MenuPrintMessage(gMenuText_HOFCorrupt, 3, 15);
gTasks[taskID].func = sub_814302C;
}
static void sub_814302C(u8 taskID)
{
- if (MenuUpdateWindowText() && gMain.newKeys & A_BUTTON)
+ if (Menu_UpdateWindowText() && gMain.newKeys & A_BUTTON)
gTasks[taskID].func = sub_8142F78;
}
@@ -1074,7 +1072,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 a1, u8 a2)
}
}
- MenuPrint(gStringVar1, a1 + 4, a2 + 1);
+ Menu_PrintText(gStringVar1, a1 + 4, a2 + 1);
stringPtr = gStringVar1;
for (i = 0; i < 10 && currMon->nick[i] != EOS; stringPtr[i] = currMon->nick[i], i++) {}
@@ -1087,8 +1085,8 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 a1, u8 a2)
stringPtr[1] = 0x13;
stringPtr[2] = 0xA0;
stringPtr[3] = EOS;
- MenuPrint(gStringVar1, a1 + 9, a2 + 1);
- MenuZeroFillWindowRect(0, a2 + 3, 29, a2 + 4);
+ Menu_PrintText(gStringVar1, a1 + 9, a2 + 1);
+ Menu_EraseWindowRect(0, a2 + 3, 29, a2 + 4);
}
else
{
@@ -1127,7 +1125,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 a1, u8 a2)
stringPtr[2] = 0xA0;
stringPtr[3] = EOS;
- MenuPrint(gStringVar1, a1 + 9, a2 + 1);
+ Menu_PrintText(gStringVar1, a1 + 9, a2 + 1);
monData = currMon->lvl;
@@ -1145,14 +1143,14 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 a1, u8 a2)
stringPtr[2] = 0x30;
stringPtr[3] = EOS;
- MenuPrint(gStringVar1, a1 + 7, a2 + 3);
+ Menu_PrintText(gStringVar1, a1 + 7, a2 + 3);
monData = currMon->tid;
stringPtr = StringCopy(gStringVar1, gOtherText_IDNumber);
ConvertIntToDecimalStringN(stringPtr, monData, 2, 5);
- MenuPrint(gStringVar1, a1 + 13, a2 + 3);
+ Menu_PrintText(gStringVar1, a1 + 13, a2 + 3);
}
}
@@ -1163,15 +1161,15 @@ static void HallOfFame_PrintPlayerInfo(u8 a0, u8 a1)
u8* stringPtr;
u16 visibleTid;
- MenuPrint(gOtherText_Name, a0 + 1, a1 + 1);
+ Menu_PrintText(gOtherText_Name, a0 + 1, a1 + 1);
MenuPrint_RightAligned(gSaveBlock2.playerName, a0 + 14, a1 + 1);
- MenuPrint(gOtherText_IDNumber2, a0 + 1, a1 + 3);
+ Menu_PrintText(gOtherText_IDNumber2, a0 + 1, a1 + 3);
visibleTid = ByteRead16(gSaveBlock2.playerTrainerId);
ConvertIntToDecimalStringN(gStringVar1, visibleTid, 2, 5);
MenuPrint_RightAligned(gStringVar1, a0 + 14, a1 + 3);
- MenuPrint(gMainMenuString_Time, a0 + 1, a1 + 5);
+ Menu_PrintText(gMainMenuString_Time, a0 + 1, a1 + 5);
stringPtr = ConvertIntToDecimalString(gStringVar1, gSaveBlock2.playTimeHours);
stringPtr[0] = CHAR_SPACE;
@@ -1266,15 +1264,15 @@ static void sub_81433E0(void)
static void sub_8143570(void)
{
- remove_some_task();
+ ScanlineEffect_Stop();
ResetTasks();
ResetSpriteData();
FreeAllSpritePalettes();
gReservedSpritePaletteCount = 8;
LoadCompressedObjectPic(&sHallOfFame_ConfettiSpriteSheet);
LoadCompressedObjectPalette(&sHallOfFame_ConfettiSpritePalette);
- SetUpWindowConfig(&gWindowConfig_81E71B4);
- InitMenuWindow(&gWindowConfig_81E71B4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E71B4);
+ InitMenuWindow(&gWindowTemplate_81E71B4);
}
static void sub_81435B8(void)