From 4d2b22a899c11dfcacfec6889968ab01655a3fe3 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 26 May 2017 14:53:51 +0200 Subject: Add headers --- src/fieldmap.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/fieldmap.c') diff --git a/src/fieldmap.c b/src/fieldmap.c index 0301115d5..e138a7c57 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -1,3 +1,7 @@ +#include "script.h" +#include "secret_base.h" +#include "rom4.h" +#include "tv.h" #include "global.h" #include "fieldmap.h" #include "palette.h" @@ -9,14 +13,6 @@ struct BackupMapData u16 *map; }; -extern struct MapHeader * const get_mapheader_by_bank_and_number(u8, u8); -extern void mapheader_run_script_with_tag_x1(void); -extern void sub_80BB970(struct MapEvents *); -extern void sub_80BBCCC(); -extern void sub_8056670(); -extern void UpdateTVScreensOnMap(); -extern void sub_80538F0(u8 mapGroup, u8 mapNum); - struct ConnectionFlags { u8 south:1; @@ -31,7 +27,6 @@ struct Coords32 s32 y; }; -extern const struct Coords32 gUnknown_0821664C[]; extern struct BackupMapData gUnknown_03004870; EWRAM_DATA static u16 gUnknown_02029828[0x2800] = {0}; @@ -41,18 +36,6 @@ EWRAM_DATA static struct ConnectionFlags gUnknown_0202E850 = {0}; static const struct ConnectionFlags sDummyConnectionFlags = {0}; -void mapheader_copy_mapdata_with_padding(struct MapHeader *mapHeader); -void sub_80560AC(struct MapHeader *); -void map_copy_with_padding(u16 *map, u16 width, u16 height); -void fillSouthConnection(struct MapHeader *, struct MapHeader *, s32); -void fillNorthConnection(struct MapHeader *, struct MapHeader *, s32); -void fillWestConnection(struct MapHeader *, struct MapHeader *, s32); -void fillEastConnection(struct MapHeader *, struct MapHeader *, s32); -u32 GetBehaviorByMetatileId(u16 metatile); -struct MapConnection *sub_8056A64(u8 direction, int x, int y); -bool8 sub_8056ABC(u8 direction, int x, int y, struct MapConnection *connection); -bool8 sub_8056B20(int x, int src_width, int dest_width, int offset); - struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection) { return get_mapheader_by_bank_and_number(connection->mapGroup, connection->mapNum); -- cgit v1.2.3 From f26daa3d6954d2db3a7c44b79d319a7a084462c2 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 26 May 2017 15:01:42 +0200 Subject: Sort includes --- src/fieldmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fieldmap.c') diff --git a/src/fieldmap.c b/src/fieldmap.c index e138a7c57..c4e7dde8b 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -1,10 +1,10 @@ -#include "script.h" -#include "secret_base.h" -#include "rom4.h" -#include "tv.h" #include "global.h" #include "fieldmap.h" #include "palette.h" +#include "rom4.h" +#include "script.h" +#include "secret_base.h" +#include "tv.h" struct BackupMapData { -- cgit v1.2.3 From b4aa5dfd4053ed2de5d046f06884376641c6e8b5 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 26 May 2017 16:50:46 +0200 Subject: Make rom match checksum --- src/fieldmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fieldmap.c') diff --git a/src/fieldmap.c b/src/fieldmap.c index c4e7dde8b..4cff47c17 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -344,7 +344,7 @@ union Block u16 value; }; -u16 MapGridGetZCoordAt(int x, int y) +u8 MapGridGetZCoordAt(int x, int y) { u16 block; int i; @@ -370,7 +370,7 @@ u16 MapGridGetZCoordAt(int x, int y) return block >> 12; } -u16 MapGridIsImpassableAt(int x, int y) +u8 MapGridIsImpassableAt(int x, int y) { u16 block; int i; @@ -396,7 +396,7 @@ u16 MapGridIsImpassableAt(int x, int y) return (block & 0xc00) >> 10; } -u16 MapGridGetMetatileIdAt(int x, int y) +u32 MapGridGetMetatileIdAt(int x, int y) { u16 block; int i; @@ -436,7 +436,7 @@ u32 MapGridGetMetatileBehaviorAt(int x, int y) return GetBehaviorByMetatileId(metatile) & 0xff; } -u16 MapGridGetMetatileLayerTypeAt(int x, int y) +u8 MapGridGetMetatileLayerTypeAt(int x, int y) { u16 metatile; metatile = MapGridGetMetatileIdAt(x, y); -- cgit v1.2.3