From e38fd8347d2519551648c351d528cc3fee3924d4 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 6 Oct 2017 21:59:47 -0400 Subject: [PATCH] use rodata for save_failed_screen --- data/save_failed_screen.s | 28 -------- graphics/misc/clock_small.pal | 19 +++++ graphics/misc/clock_small.png | Bin 0 -> 221 bytes include/window.h | 2 +- ld_script.txt | 2 +- src/save_failed_screen.c | 127 +++++++++++++++++++++++++++++----- src/window.c | 2 +- 7 files changed, 131 insertions(+), 49 deletions(-) delete mode 100644 data/save_failed_screen.s create mode 100755 graphics/misc/clock_small.pal create mode 100755 graphics/misc/clock_small.png diff --git a/data/save_failed_screen.s b/data/save_failed_screen.s deleted file mode 100644 index 1b9fb7ed1..000000000 --- a/data/save_failed_screen.s +++ /dev/null @@ -1,28 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gClockOamData:: @ 85EFD80 - .incbin "baserom.gba", 0x5efd80, 0x8 - -gUnknown_085EFD88:: @ 85EFD88 - .incbin "baserom.gba", 0x5efd88, 0xc - -gUnknown_085EFD94:: @ 85EFD94 - .incbin "baserom.gba", 0x5efd94, 0x8 - -gUnknown_085EFD9C:: @ 85EFD9C - .incbin "baserom.gba", 0x5efd9c, 0x8 - -gUnknown_085EFDA4:: @ 85EFDA4 - .incbin "baserom.gba", 0x5efda4, 0x8 - -gClockFrames:: @ 85EFDAC - .incbin "baserom.gba", 0x5efdac, 0x18 - -gSaveFailedClockPal:: @ 85EFDC4 - .incbin "baserom.gba", 0x5efdc4, 0x20 - -gSaveFailedClockGfx:: @ 85EFDE4 - .incbin "baserom.gba", 0x5efde4, 0x90 diff --git a/graphics/misc/clock_small.pal b/graphics/misc/clock_small.pal new file mode 100755 index 000000000..3398fcbe3 --- /dev/null +++ b/graphics/misc/clock_small.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +98 139 90 +0 0 0 +57 57 57 +123 123 123 +189 189 189 +255 255 255 +255 65 41 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/misc/clock_small.png b/graphics/misc/clock_small.png new file mode 100755 index 0000000000000000000000000000000000000000..6b9f6c1f7730f24185477b95df18914f96c69791 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT$8$^fJ{qE%j)Xty?gim z2LeY;pa?FoQ?Nl1D3{^s;us<^H8~+6As{G;fmu~tT$MvsiYskpOWV>mD?Cop`l@FO oVxO-Qv)8zF-%tokl> 3) & 7; - gMain.oamBuffer[0] = gClockOamData; + gMain.oamBuffer[0] = sClockOamData; gMain.oamBuffer[0].x = 112; gMain.oamBuffer[0].y = (CLOCK_WIN_TOP + 1) * 8;; if (gSaveFailedClockInfo[CLOCK_RUNNING] != FALSE) { - gMain.oamBuffer[0].tileNum = gClockFrames[n][0]; - gMain.oamBuffer[0].matrixNum = (gClockFrames[n][2] << 4) | (gClockFrames[n][1] << 3); + gMain.oamBuffer[0].tileNum = sClockFrames[n][0]; + gMain.oamBuffer[0].matrixNum = (sClockFrames[n][2] << 4) | (sClockFrames[n][1] << 3); } else { diff --git a/src/window.c b/src/window.c index 704060b9d..f4cb48ec0 100644 --- a/src/window.c +++ b/src/window.c @@ -190,7 +190,7 @@ u16 AddWindow(const struct WindowTemplate *template) return win; } -int AddWindowWithoutTileMap(struct WindowTemplate *template) +int AddWindowWithoutTileMap(const struct WindowTemplate *template) { u16 win; u8 bgLayer;