summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/text_window_graphics.s30
-rw-r--r--data/data_8468C98.s14
-rw-r--r--graphics/text_window/stdpal_0.pal19
-rw-r--r--graphics/text_window/stdpal_1.pal19
-rw-r--r--graphics/text_window/stdpal_2.pal19
-rw-r--r--graphics/text_window/stdpal_3.pal19
-rw-r--r--graphics/text_window/stdpal_4.pal19
-rw-r--r--graphics/text_window/unk_8470D6C.pngbin0 -> 190 bytes
-rw-r--r--graphics/text_window/unk_8470E8C.pngbin0 -> 183 bytes
-rw-r--r--graphics/text_window/unk_8470FCC.pngbin0 -> 190 bytes
-rw-r--r--graphics/text_window/unk_84710EC.pngbin0 -> 190 bytes
-rw-r--r--graphics/text_window/unk_847120C.pngbin0 -> 190 bytes
-rw-r--r--graphics/text_window/unk_847132C.pngbin0 -> 231 bytes
-rw-r--r--graphics/text_window/unk_847144C.pngbin0 -> 231 bytes
-rw-r--r--graphics/text_window/unk_847156C.pngbin0 -> 215 bytes
-rw-r--r--graphics/text_window/unk_84716AC.pngbin0 -> 203 bytes
-rw-r--r--graphics/text_window/unk_84717CC.pngbin0 -> 212 bytes
-rw-r--r--graphics/text_window/unk_8471A4C.pngbin0 -> 160 bytes
-rw-r--r--graphics/text_window/unk_8471B6C.pngbin0 -> 175 bytes
-rw-r--r--include/text_window_graphics.h18
-rw-r--r--ld_script.txt3
-rw-r--r--src/text_window_graphics.c58
22 files changed, 174 insertions, 44 deletions
diff --git a/asm/text_window_graphics.s b/asm/text_window_graphics.s
deleted file mode 100644
index 6c725a553..000000000
--- a/asm/text_window_graphics.s
+++ /dev/null
@@ -1,30 +0,0 @@
- .include "constants/gba_constants.inc"
- .include "asm/macros.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_8069788
-sub_8069788: @ 8069788
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x13
- bhi _080697A0
- lsls r0, 3
- ldr r1, _0806979C @ =gUnknown_8471E8C
- adds r0, r1
- b _080697A2
- .align 2, 0
-_0806979C: .4byte gUnknown_8471E8C
-_080697A0:
- ldr r0, _080697A8 @ =gUnknown_8471E8C
-_080697A2:
- pop {r1}
- bx r1
- .align 2, 0
-_080697A8: .4byte gUnknown_8471E8C
- thumb_func_end sub_8069788
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/data/data_8468C98.s b/data/data_8468C98.s
index 0f3b039c1..629dcaf02 100644
--- a/data/data_8468C98.s
+++ b/data/data_8468C98.s
@@ -321,16 +321,4 @@ gUnknown_846FB0C:: @ 846FB0C
.incbin "baserom.gba", 0x46FB0C, 0x1000
gUnknown_8470B0C:: @ 8470B0C
- .incbin "baserom.gba", 0x470B0C, 0xF40
-
-gUnknown_8471A4C:: @ 8471A4C
- .incbin "baserom.gba", 0x471A4C, 0x120
-
-gUnknown_8471B6C:: @ 8471B6C
- .incbin "baserom.gba", 0x471B6C, 0x280
-
-gUnknown_8471DEC:: @ 8471DEC
- .incbin "baserom.gba", 0x471DEC, 0xA0
-
-gUnknown_8471E8C:: @ 8471E8C
- .incbin "baserom.gba", 0x471E8C, 0x50
+ .incbin "baserom.gba", 0x470B0C, 0x260
diff --git a/graphics/text_window/stdpal_0.pal b/graphics/text_window/stdpal_0.pal
new file mode 100644
index 000000000..c64668073
--- /dev/null
+++ b/graphics/text_window/stdpal_0.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 205 164
+255 255 255
+98 98 98
+213 213 205
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+255 255 255
+213 230 246
+164 213 230
+230 246 255
+115 164 197
+74 115 164
diff --git a/graphics/text_window/stdpal_1.pal b/graphics/text_window/stdpal_1.pal
new file mode 100644
index 000000000..df5d3c337
--- /dev/null
+++ b/graphics/text_window/stdpal_1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 205 164
+255 255 255
+98 98 98
+213 213 205
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+255 255 255
+205 205 222
+205 205 222
+230 246 255
+205 205 222
+106 115 123
diff --git a/graphics/text_window/stdpal_2.pal b/graphics/text_window/stdpal_2.pal
new file mode 100644
index 000000000..6a14d67f0
--- /dev/null
+++ b/graphics/text_window/stdpal_2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 205 164
+255 255 255
+98 98 98
+213 213 205
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+255 255 255
+74 205 238
+16 172 222
+0 82 115
+0 115 139
+0 123 197
diff --git a/graphics/text_window/stdpal_3.pal b/graphics/text_window/stdpal_3.pal
new file mode 100644
index 000000000..9cbcdad4c
--- /dev/null
+++ b/graphics/text_window/stdpal_3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 205 164
+255 255 255
+98 98 98
+213 213 205
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+255 0 255
+205 213 213
+156 205 222
+98 115 123
+65 172 230
+131 164 180
diff --git a/graphics/text_window/stdpal_4.pal b/graphics/text_window/stdpal_4.pal
new file mode 100644
index 000000000..a004a081a
--- /dev/null
+++ b/graphics/text_window/stdpal_4.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 205 164
+255 255 255
+98 98 98
+213 213 205
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+57 98 115
+131 131 131
+164 164 164
+197 197 205
+230 230 238
+65 90 106
diff --git a/graphics/text_window/unk_8470D6C.png b/graphics/text_window/unk_8470D6C.png
new file mode 100644
index 000000000..d14130f9a
--- /dev/null
+++ b/graphics/text_window/unk_8470D6C.png
Binary files differ
diff --git a/graphics/text_window/unk_8470E8C.png b/graphics/text_window/unk_8470E8C.png
new file mode 100644
index 000000000..747e243eb
--- /dev/null
+++ b/graphics/text_window/unk_8470E8C.png
Binary files differ
diff --git a/graphics/text_window/unk_8470FCC.png b/graphics/text_window/unk_8470FCC.png
new file mode 100644
index 000000000..c8b21542d
--- /dev/null
+++ b/graphics/text_window/unk_8470FCC.png
Binary files differ
diff --git a/graphics/text_window/unk_84710EC.png b/graphics/text_window/unk_84710EC.png
new file mode 100644
index 000000000..cb7e5383d
--- /dev/null
+++ b/graphics/text_window/unk_84710EC.png
Binary files differ
diff --git a/graphics/text_window/unk_847120C.png b/graphics/text_window/unk_847120C.png
new file mode 100644
index 000000000..dc7e1951c
--- /dev/null
+++ b/graphics/text_window/unk_847120C.png
Binary files differ
diff --git a/graphics/text_window/unk_847132C.png b/graphics/text_window/unk_847132C.png
new file mode 100644
index 000000000..ec72b2756
--- /dev/null
+++ b/graphics/text_window/unk_847132C.png
Binary files differ
diff --git a/graphics/text_window/unk_847144C.png b/graphics/text_window/unk_847144C.png
new file mode 100644
index 000000000..804df1a8b
--- /dev/null
+++ b/graphics/text_window/unk_847144C.png
Binary files differ
diff --git a/graphics/text_window/unk_847156C.png b/graphics/text_window/unk_847156C.png
new file mode 100644
index 000000000..b1292016f
--- /dev/null
+++ b/graphics/text_window/unk_847156C.png
Binary files differ
diff --git a/graphics/text_window/unk_84716AC.png b/graphics/text_window/unk_84716AC.png
new file mode 100644
index 000000000..94ec70d6e
--- /dev/null
+++ b/graphics/text_window/unk_84716AC.png
Binary files differ
diff --git a/graphics/text_window/unk_84717CC.png b/graphics/text_window/unk_84717CC.png
new file mode 100644
index 000000000..0ea4b9a45
--- /dev/null
+++ b/graphics/text_window/unk_84717CC.png
Binary files differ
diff --git a/graphics/text_window/unk_8471A4C.png b/graphics/text_window/unk_8471A4C.png
new file mode 100644
index 000000000..ed43f0c4a
--- /dev/null
+++ b/graphics/text_window/unk_8471A4C.png
Binary files differ
diff --git a/graphics/text_window/unk_8471B6C.png b/graphics/text_window/unk_8471B6C.png
new file mode 100644
index 000000000..c1fba5919
--- /dev/null
+++ b/graphics/text_window/unk_8471B6C.png
Binary files differ
diff --git a/include/text_window_graphics.h b/include/text_window_graphics.h
new file mode 100644
index 000000000..1d7b2b7c9
--- /dev/null
+++ b/include/text_window_graphics.h
@@ -0,0 +1,18 @@
+#ifndef GUARD_TEXT_WINDOW_GRAPHICS_H
+#define GUARD_TEXT_WINDOW_GRAPHICS_H
+
+struct TextWindowGraphics
+{
+ const void * tiles;
+ const void * palette;
+};
+
+extern const u16 gUnknown_8471A4C[];
+extern const u16 gUnknown_8471B6C[];
+extern const u16 gUnknown_8471DEC[][16];
+
+extern const struct TextWindowGraphics gUnknown_8471E8C[];
+
+const struct TextWindowGraphics * sub_8069788(u8 idx);
+
+#endif //GUARD_TEXT_WINDOW_GRAPHICS_H
diff --git a/ld_script.txt b/ld_script.txt
index b68b285cc..5ff29f104 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -100,7 +100,7 @@ SECTIONS {
asm/map_obj_80688E4.o(.text);
asm/field_message_box.o(.text);
asm/map_obj_lock.o(.text);
- asm/text_window_graphics.o(.text);
+ src/text_window_graphics.o(.text);
src/script.o(.text);
src/scrcmd.o(.text);
asm/field_control_avatar.o(.text);
@@ -428,6 +428,7 @@ SECTIONS {
. = ALIGN(4);
src/seagallop.o(.rodata);
data/data_8468C98.o(.rodata);
+ src/text_window_graphics.o(.rodata);
src/quest_log_8150454.o(.rodata);
data/data_8471F00.o(.rodata);
src/unk_815C980.o(.rodata);
diff --git a/src/text_window_graphics.c b/src/text_window_graphics.c
new file mode 100644
index 000000000..1133abbdb
--- /dev/null
+++ b/src/text_window_graphics.c
@@ -0,0 +1,58 @@
+#include "global.h"
+#include "text_window_graphics.h"
+
+static const u16 gUnknown_8470D6C[] = INCBIN_U16("graphics/text_window/unk_8470D6C.4bpp");
+static const u16 gUnknown_8470E8C[] = INCBIN_U16("graphics/text_window/unk_8470E8C.4bpp");
+static const u16 gUnk_Empty_Space_8470FAC[16] = {0};
+static const u16 gUnknown_8470FCC[] = INCBIN_U16("graphics/text_window/unk_8470FCC.4bpp");
+static const u16 gUnknown_84710EC[] = INCBIN_U16("graphics/text_window/unk_84710EC.4bpp");
+static const u16 gUnknown_847120C[] = INCBIN_U16("graphics/text_window/unk_847120C.4bpp");
+static const u16 gUnknown_847132C[] = INCBIN_U16("graphics/text_window/unk_847132C.4bpp");
+static const u16 gUnknown_847144C[] = INCBIN_U16("graphics/text_window/unk_847144C.4bpp");
+static const u16 gUnknown_847156C[] = INCBIN_U16("graphics/text_window/unk_847156C.4bpp");
+static const u16 gUnk_Empty_Space_847168C[16] = {0};
+static const u16 gUnknown_84716AC[] = INCBIN_U16("graphics/text_window/unk_84716AC.4bpp");
+static const u16 gUnknown_84717CC[] = INCBIN_U16("graphics/text_window/unk_84717CC.4bpp");
+static const u16 gUnk_Empty_Space_84718EC[16] = {0};
+static const u16 gUnknown_847190C[] = INCBIN_U16("graphics/text_window/unk_8470D6C.gbapal");
+static const u16 gUnknown_847192C[] = INCBIN_U16("graphics/text_window/unk_8470E8C.gbapal");
+static const u16 gUnknown_847194C[] = INCBIN_U16("graphics/text_window/unk_8470FCC.gbapal");
+static const u16 gUnknown_847196C[] = INCBIN_U16("graphics/text_window/unk_84710EC.gbapal");
+static const u16 gUnknown_847198C[] = INCBIN_U16("graphics/text_window/unk_847120C.gbapal");
+static const u16 gUnknown_84719AC[] = INCBIN_U16("graphics/text_window/unk_847132C.gbapal");
+static const u16 gUnknown_84719CC[] = INCBIN_U16("graphics/text_window/unk_847144C.gbapal");
+static const u16 gUnknown_84719EC[] = INCBIN_U16("graphics/text_window/unk_847156C.gbapal");
+static const u16 gUnknown_8471A0C[] = INCBIN_U16("graphics/text_window/unk_84716AC.gbapal");
+static const u16 gUnknown_8471A2C[] = INCBIN_U16("graphics/text_window/unk_84717CC.gbapal");
+
+const u16 gUnknown_8471A4C[] = INCBIN_U16("graphics/text_window/unk_8471A4C.4bpp");
+const u16 gUnknown_8471B6C[] = INCBIN_U16("graphics/text_window/unk_8471B6C.4bpp");
+
+const u16 gUnknown_8471DEC[][16] = {
+ INCBIN_U16("graphics/text_window/stdpal_0.gbapal"),
+ INCBIN_U16("graphics/text_window/stdpal_1.gbapal"),
+ INCBIN_U16("graphics/text_window/stdpal_2.gbapal"),
+ INCBIN_U16("graphics/text_window/stdpal_3.gbapal"),
+ INCBIN_U16("graphics/text_window/stdpal_4.gbapal")
+};
+
+const struct TextWindowGraphics gUnknown_8471E8C[] = {
+ {gUnknown_8470D6C, gUnknown_847190C},
+ {gUnknown_8470E8C, gUnknown_847192C},
+ {gUnknown_8470FCC, gUnknown_847194C},
+ {gUnknown_84710EC, gUnknown_847196C},
+ {gUnknown_847120C, gUnknown_847198C},
+ {gUnknown_847132C, gUnknown_84719AC},
+ {gUnknown_847144C, gUnknown_84719CC},
+ {gUnknown_847156C, gUnknown_84719EC},
+ {gUnknown_84716AC, gUnknown_8471A0C},
+ {gUnknown_84717CC, gUnknown_8471A2C}
+}; // NELEMS = 10
+
+const struct TextWindowGraphics * sub_8069788(u8 idx)
+{
+ if (idx >= 20) // if (idx >= NELEMS(gUnknown_8471E8C))
+ return &gUnknown_8471E8C[0];
+ else
+ return &gUnknown_8471E8C[idx];
+}