summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-10-28 20:43:33 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-10-28 20:43:33 -0400
commit6fcde15bb671db34dd1f17406ee20f319595b6a5 (patch)
tree1e6530fdeddb2aa4e51171fa6880b1da5673f18a
parent5ea2f463d71d0bc2663e70a553557de0ccf40eef (diff)
Decompile heal location data
-rw-r--r--data/heal_location.s11
-rw-r--r--graphics/unknown/unk_859f5ec.pal19
-rw-r--r--include/heal_location.h18
-rw-r--r--ld_script.txt3
-rw-r--r--src/heal_location.c53
5 files changed, 92 insertions, 12 deletions
diff --git a/data/heal_location.s b/data/heal_location.s
deleted file mode 100644
index 31aa1a351..000000000
--- a/data/heal_location.s
+++ /dev/null
@@ -1,11 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gUnknown_0859F534:: @ 859F534
- .incbin "baserom.gba", 0x59f534, 0x8
-
-gUnknown_0859F53C:: @ 859F53C
- .incbin "baserom.gba", 0x59f53c, 0xd0
diff --git a/graphics/unknown/unk_859f5ec.pal b/graphics/unknown/unk_859f5ec.pal
new file mode 100644
index 000000000..b35568acf
--- /dev/null
+++ b/graphics/unknown/unk_859f5ec.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 156 0
+255 255 255
+255 255 255
+230 230 246
+205 205 230
+180 180 222
+156 156 205
+131 131 197
+98 98 180
+74 74 164
+49 49 156
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/include/heal_location.h b/include/heal_location.h
new file mode 100644
index 000000000..c365d6a45
--- /dev/null
+++ b/include/heal_location.h
@@ -0,0 +1,18 @@
+#ifndef GUARD_HEAL_LOCATION_H
+#define GUARD_HEAL_LOCATION_H
+
+// Exported type declarations
+
+struct HealLocation
+{
+ s8 group;
+ s8 map;
+ u16 x;
+ u16 y;
+};
+
+// Exported RAM declarations
+
+// Exported ROM declarations
+
+#endif //GUARD_HEAL_LOCATION_H
diff --git a/ld_script.txt b/ld_script.txt
index f655711dd..2b8d7da20 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -167,6 +167,7 @@ SECTIONS {
src/mail.o(.text);
asm/menu_helpers.o(.text);
asm/dewford_trend.o(.text);
+ src/heal_location.o(.text);
asm/heal_location.o(.text);
asm/region_map.o(.text);
asm/cute_sketch.o(.text);
@@ -410,7 +411,7 @@ SECTIONS {
data/mauville_old_man.o(.rodata);
src/mail.o(.rodata);
data/menu_helpers.o(.rodata);
- data/heal_location.o(.rodata);
+ src/heal_location.o(.rodata);
data/region_map.o(.rodata);
data/cute_sketch.o(.rodata);
src/decoration.o(.rodata);
diff --git a/src/heal_location.c b/src/heal_location.c
new file mode 100644
index 000000000..39d9a423d
--- /dev/null
+++ b/src/heal_location.c
@@ -0,0 +1,53 @@
+
+// Includes
+#include "global.h"
+#include "map_constants.h"
+#include "sprite.h"
+#include "heal_location.h"
+
+#define HEAL_LOCATION(map, x, y) {MAP_GROUP_##map, MAP_ID_##map, x, y}
+
+// Static type declarations
+
+// Static RAM declarations
+
+// Static ROM declarations
+
+// .rodata
+
+const struct {
+ const union AffineAnimCmd *const *const affineAnims;
+ void (* callback)(struct Sprite *sprite);
+} gUnknown_0859F534 = {
+ gDummySpriteAffineAnimTable,
+ SpriteCallbackDummy
+};
+
+const struct HealLocation gUnknown_0859F53C[] = {
+ HEAL_LOCATION(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 4, 2),
+ HEAL_LOCATION(LITTLEROOT_TOWN_MAYS_HOUSE_2F, 4, 2),
+ HEAL_LOCATION(PETALBURG_CITY, 20, 17),
+ HEAL_LOCATION(SLATEPORT_CITY, 19, 20),
+ HEAL_LOCATION(MAUVILLE_CITY, 22, 6),
+ HEAL_LOCATION(RUSTBORO_CITY, 16, 39),
+ HEAL_LOCATION(FORTREE_CITY, 5, 7),
+ HEAL_LOCATION(LILYCOVE_CITY, 24, 15),
+ HEAL_LOCATION(MOSSDEEP_CITY, 28, 17),
+ HEAL_LOCATION(SOOTOPOLIS_CITY, 43, 32),
+ HEAL_LOCATION(EVER_GRANDE_CITY, 27, 49),
+ HEAL_LOCATION(LITTLEROOT_TOWN, 5, 9),
+ HEAL_LOCATION(LITTLEROOT_TOWN, 14, 9),
+ HEAL_LOCATION(OLDALE_TOWN, 6, 17),
+ HEAL_LOCATION(DEWFORD_TOWN, 2, 11),
+ HEAL_LOCATION(LAVARIDGE_TOWN, 9, 7),
+ HEAL_LOCATION(FALLARBOR_TOWN, 14, 8),
+ HEAL_LOCATION(VERDANTURF_TOWN, 16, 4),
+ HEAL_LOCATION(PACIFIDLOG_TOWN, 8, 16),
+ HEAL_LOCATION(EVER_GRANDE_CITY, 18, 6),
+ HEAL_LOCATION(SOUTHERN_ISLAND_EXTERIOR, 15, 20),
+ HEAL_LOCATION(BATTLE_FRONTIER_OUTSIDE_EAST, 3, 52)
+};
+
+const u16 gUnknown_0859F5EC[] = INCBIN_U16("graphics/unknown/unk_859f5ec.gbapal");
+
+// .text