summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/save_failed_screen.s6
-rw-r--r--ld_script.txt1
-rw-r--r--src/save_failed_screen.c38
3 files changed, 33 insertions, 12 deletions
diff --git a/data/save_failed_screen.s b/data/save_failed_screen.s
index 70cc27fa8..5d22810ea 100644
--- a/data/save_failed_screen.s
+++ b/data/save_failed_screen.s
@@ -3,12 +3,6 @@
.section .rodata
-gUnknown_08411940:: @ 8411940
- .incbin "baserom.gba", 0x00411940, 0x8
-
-gUnknown_08411948:: @ 8411948
- .incbin "baserom.gba", 0x00411948, 0x18
-
gSaveFailedClockPal:: @ 8411960
.incbin "graphics/misc/clock_small.gbapal"
diff --git a/ld_script.txt b/ld_script.txt
index 2267ca956..7fadff0a2 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -417,6 +417,7 @@ SECTIONS {
data/diploma.o(.rodata);
data/strings.o(.rodata);
data/berry_tag_screen.o(.rodata);
+ src/save_failed_screen.o(.rodata);
data/save_failed_screen.o(.rodata);
data/pokeblock_feed.o(.rodata);
data/intro_credits_graphics.o(.rodata);
diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c
index 41e61eadb..2396aab15 100644
--- a/src/save_failed_screen.c
+++ b/src/save_failed_screen.c
@@ -33,9 +33,6 @@ extern struct SaveFailedStruct gUnknown_0203933E;
extern u32 gUnknown_03005EA8;
extern u32 gUnknown_03005EBC;
-extern struct OamData gUnknown_08411940;
-extern u8 gUnknown_08411948[][3];
-
extern u8 gBirchHelpGfx[];
extern u8 gSystemText_SaveFailedBackupCheck[];
@@ -52,6 +49,35 @@ extern const u8 gSaveFailedClockGfx[];
extern const u8 gSaveFailedClockPal[];
extern u8 gBirchBagGrassPal[];
+static const struct OamData sClockOamData =
+{
+ 160, // Y
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+static const u8 sClockFrames[8][3] =
+{
+ { 1, 0, 0 },
+ { 5, 0, 0 },
+ { 9, 0, 0 },
+ { 5, 0, 1 },
+ { 1, 0, 1 },
+ { 5, 1, 1 },
+ { 9, 1, 0 },
+ { 5, 1, 0 },
+};
+
static void VBlankCB(void);
static void CB2_SaveFailedScreen(void);
static void CB2_WipeSave(void);
@@ -236,14 +262,14 @@ static void VBlankCB_UpdateClockGraphics(void)
{
unsigned int n = (gMain.vblankCounter2 >> 3) & 7;
- gMain.oamBuffer[0] = gUnknown_08411940;
+ gMain.oamBuffer[0] = sClockOamData;
gMain.oamBuffer[0].x = 112;
gMain.oamBuffer[0].y = (CLOCK_WIN_TOP + 1) * 8;
if (gUnknown_0203933E.unk0)
{
- gMain.oamBuffer[0].tileNum = gUnknown_08411948[n][0];
- gMain.oamBuffer[0].matrixNum = (gUnknown_08411948[n][2] << 4) | (gUnknown_08411948[n][1] << 3);
+ gMain.oamBuffer[0].tileNum = sClockFrames[n][0];
+ gMain.oamBuffer[0].matrixNum = (sClockFrames[n][2] << 4) | (sClockFrames[n][1] << 3);
}
else
{