summaryrefslogtreecommitdiff
path: root/src/wallclock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallclock.c')
-rw-r--r--src/wallclock.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/wallclock.c b/src/wallclock.c
index 05e30a8cb..147a68d31 100644
--- a/src/wallclock.c
+++ b/src/wallclock.c
@@ -1,33 +1,28 @@
#include "global.h"
+#include "wallclock.h"
+#include "asm.h"
+#include "decompress.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
#include "rtc.h"
#include "songs.h"
-#include "sprite.h"
#include "task.h"
-#include "text.h"
#include "trig.h"
#include "sound.h"
-//Functions that need to be put in headers
-void remove_some_task(void);
-void LoadCompressedObjectPic(void *);
-
extern u16 gSpecialVar_0x8004;
extern u16 gMiscClockMale_Pal[];
extern u16 gMiscClockFemale_Pal[];
extern u8 gMiscClock_Gfx[];
-extern u8 gUnknown_083F7A90[];
+extern struct SpriteSheet gUnknown_083F7A90;
extern struct SpritePalette gUnknown_083F7AA0;
extern u8 gUnknown_08E95774[];
extern u8 gUnknown_08E954B0[];
extern u8 gOtherText_CorrectTimePrompt[];
-extern u8 * const gUnknown_08376D74[][2];
+extern const struct MenuAction gMenuYesNoItems[];
extern s8 gClockHandCoords[][2];
-extern struct WindowConfig gWindowConfig_81E6C3C;
-extern struct WindowConfig gWindowConfig_81E6CE4;
extern struct SpriteTemplate gSpriteTemplate_83F7AD8;
extern struct SpriteTemplate gSpriteTemplate_83F7AF0;
extern struct SpriteTemplate gSpriteTemplate_83F7B28;
@@ -127,7 +122,7 @@ static void LoadWallClockGraphics(void)
ResetSpriteData();
ResetPaletteFade();
FreeAllSpritePalettes();
- LoadCompressedObjectPic(gUnknown_083F7A90);
+ LoadCompressedObjectPic(&gUnknown_083F7A90);
LoadSpritePalettes(&gUnknown_083F7AA0);
SetUpWindowConfig(&gWindowConfig_81E6C3C);
InitMenuWindow(&gWindowConfig_81E6CE4);
@@ -155,7 +150,7 @@ static void WallClockInit(void)
}
//Allow player to set the clock
-void Cb2_StartWallClock(void)
+void CB2_StartWallClock(void)
{
u8 taskId;
u8 spriteId;
@@ -194,7 +189,7 @@ void Cb2_StartWallClock(void)
}
//View, but don't set, the clock
-void Cb2_ViewWallClock(void)
+void CB2_ViewWallClock(void)
{
u8 taskId;
s16 angle1;
@@ -302,7 +297,7 @@ static void Task_SetClock3(u8 taskId)
MenuDrawTextWindow(2, 16, 27, 19);
MenuPrint(gOtherText_CorrectTimePrompt, 3, 17);
MenuDrawTextWindow(23, 8, 29, 13);
- PrintMenuItems(24, 9, 2, gUnknown_08376D74);
+ PrintMenuItems(24, 9, 2, gMenuYesNoItems);
InitMenu(0, 24, 9, 2, 1, 5);
gTasks[taskId].func = Task_SetClock4;
}
@@ -337,7 +332,7 @@ static void Task_SetClock5(u8 taskId)
static void Task_SetClock6(u8 taskId)
{
if(!gPaletteFade.active)
- SetMainCallback2((MainCallback)gMain.field_8);
+ SetMainCallback2((MainCallback)gMain.savedCallback);
}
static void Task_ViewClock1(u8 taskId)
@@ -363,7 +358,7 @@ static void Task_ViewClock3(u8 taskId)
static void Task_ViewClock4(u8 taskId)
{
if(!gPaletteFade.active)
- SetMainCallback2((MainCallback)gMain.field_8);
+ SetMainCallback2((MainCallback)gMain.savedCallback);
}
static u8 CalcMinHandDelta(u16 speed)