summaryrefslogtreecommitdiff
path: root/src/fieldmap.c
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-06-16 23:59:58 -0400
committeryenatch <yenatch@gmail.com>2017-06-16 23:59:58 -0400
commit8b97aa28047d5bbc24448b47cbda901a3adb9d0e (patch)
tree9e9a793c7dc9a4af7992e6b65c0418d16b25a400 /src/fieldmap.c
parentdda361afb7e2abafc15a498968580be6d1a83cfe (diff)
parentf568060cae85a1e8c70a0216ea5d1c6e79d6a528 (diff)
Merge remote-tracking branch 'marijn/clean/headers'
Diffstat (limited to 'src/fieldmap.c')
-rw-r--r--src/fieldmap.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/fieldmap.c b/src/fieldmap.c
index 2ed2266f5..e573ec13a 100644
--- a/src/fieldmap.c
+++ b/src/fieldmap.c
@@ -1,14 +1,10 @@
#include "global.h"
#include "fieldmap.h"
#include "palette.h"
-
-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);
+#include "rom4.h"
+#include "script.h"
+#include "secret_base.h"
+#include "tv.h"
struct ConnectionFlags
{
@@ -24,8 +20,6 @@ struct Coords32
s32 y;
};
-extern const struct Coords32 gUnknown_0821664C[];
-
EWRAM_DATA static u16 gUnknown_02029828[0x2800] = {0};
EWRAM_DATA struct MapHeader gMapHeader = {0};
EWRAM_DATA struct Camera gUnknown_0202E844 = {0};
@@ -33,17 +27,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);
-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);
@@ -352,7 +335,7 @@ union Block
u16 value;
};
-u16 MapGridGetZCoordAt(int x, int y)
+u8 MapGridGetZCoordAt(int x, int y)
{
u16 block;
int i;
@@ -378,7 +361,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;
@@ -404,7 +387,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;
@@ -444,7 +427,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);