summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2018-05-09 05:07:56 -0500
committerDiegoisawesome <diego@domoreaweso.me>2018-05-09 05:07:56 -0500
commitd66c1c642c60191887fc4dda6d33bb5b8e9ff69c (patch)
treef25faf83236480a9827bc74de6455d79da3d054a /include
parent867b496f2e5a525043c9fd82ccaaad9349c89fac (diff)
Port/decompile fieldmap.c
Diffstat (limited to 'include')
-rw-r--r--include/battle_frontier_2.h1
-rw-r--r--include/fieldmap.h23
-rw-r--r--include/fldeff_80F9BCC.h1
-rw-r--r--include/fldeff_cut.h7
-rw-r--r--include/fldeff_groundshake.h6
-rw-r--r--include/overworld.h4
-rw-r--r--include/pokenav.h1
-rw-r--r--include/secret_base.h2
-rw-r--r--include/tv.h1
9 files changed, 37 insertions, 9 deletions
diff --git a/include/battle_frontier_2.h b/include/battle_frontier_2.h
index 638ff692e..3f8f8049d 100644
--- a/include/battle_frontier_2.h
+++ b/include/battle_frontier_2.h
@@ -7,5 +7,6 @@ u16 sub_81A89A0(u8);
void sub_81A8AF8(void);
bool8 InBattlePike(void);
void sub_819FA50(void);
+void sub_81AA078(u16*, u8);
#endif // GUARD_BATTLE_FRONTIER_2_H
diff --git a/include/fieldmap.h b/include/fieldmap.h
index 3128e95ce..6e127ce5d 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -1,22 +1,31 @@
#ifndef GUARD_FIELDMAP_H
#define GUARD_FIELDMAP_H
-extern struct MapCoords {
- int width;
- int height;
-} gUnknown_03005DC0;
+extern struct BackupMapData gUnknown_03005DC0;
u32 MapGridGetMetatileIdAt(int, int);
u32 MapGridGetMetatileBehaviorAt(int, int);
void MapGridSetMetatileIdAt(int, int, u16);
void MapGridSetMetatileEntryAt(int, int, u16);
void GetCameraCoords(u16*, u16*);
-bool8 MapGridIsImpassableAt(s16, s16);
-s32 GetMapBorderIdAt(s16, s16);
-bool32 CanCameraMoveInDirection(u8);
+bool8 MapGridIsImpassableAt(int, int);
+int GetMapBorderIdAt(int x, int y);
+int CanCameraMoveInDirection(int direction);
u16 GetBehaviorByMetatileId(u16 metatileId);
void sav1_camera_get_focus_coords(u16 *x, u16 *y);
u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y);
u8 CameraMove(s32 deltaX, s32 deltaY);
+void mapheader_copy_mapdata_with_padding(struct MapHeader *mapHeader);
+void map_copy_with_padding(u16 *map, u16 width, u16 height);
+void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *);
+void fillSouthConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void fillNorthConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void fillWestConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void fillEastConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void mapdata_from_sav2(void);
+bool8 sub_8088BF0(u16*, u16, u8);
+struct MapConnection *sub_8088950(u8 direction, int x, int y);
+bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection);
+bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset);
#endif //GUARD_FIELDMAP_H
diff --git a/include/fldeff_80F9BCC.h b/include/fldeff_80F9BCC.h
index d57665c68..84015065e 100644
--- a/include/fldeff_80F9BCC.h
+++ b/include/fldeff_80F9BCC.h
@@ -10,5 +10,6 @@
void sub_80FA5E4(s16 id, s16 x, s16 y);
void sub_80FA794(s16 x, s16 y);
void overworld_poison_effect(void);
+bool8 sub_80FADE4(u16, u8);
#endif //GUARD_FLDEFF_80F9BCC_H
diff --git a/include/fldeff_cut.h b/include/fldeff_cut.h
new file mode 100644
index 000000000..f985fd82d
--- /dev/null
+++ b/include/fldeff_cut.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_FLDEFF_CUT_H
+#define GUARD_FLDEFF_CUT_H
+
+void sub_80D423C(s16, s16);
+void sub_80D42B8(s16, s16);
+
+#endif // GUARD_FLDEFF_CUT_H
diff --git a/include/fldeff_groundshake.h b/include/fldeff_groundshake.h
new file mode 100644
index 000000000..c1629f9bd
--- /dev/null
+++ b/include/fldeff_groundshake.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_FLDEFF_GROUNDSHAKE_H
+#define GUARD_FLDEFF_GROUNDSHAKE_H
+
+void sub_81BE72C(void);
+
+#endif // GUARD_FLDEFF_GROUNDSHAKE_H
diff --git a/include/overworld.h b/include/overworld.h
index cd0f4e60f..59d4d6a30 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -44,8 +44,8 @@ void ApplyCurrentWarp(void);
void set_warp2_warp3_to_neg_1(void);
void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
bool32 warp_data_is_not_neg_1(struct WarpData *warp);
-const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
-const struct MapHeader *warp1_get_mapheader(void);
+struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
+struct MapHeader const *const warp1_get_mapheader(void);
void set_current_map_header_from_sav1_save_old_name(void);
void LoadSaveblockMapHeader(void);
void update_camera_pos_from_warpid(void);
diff --git a/include/pokenav.h b/include/pokenav.h
index fabe211ea..42affc938 100644
--- a/include/pokenav.h
+++ b/include/pokenav.h
@@ -20,6 +20,7 @@ void sub_81D1E90(struct PlayerPCItemPageStruct *);
void sub_81D1EC0(void);
void sub_81D1D04(u8);
bool8 sub_81D1C44(u8);
+void sub_81D5FB4(u16*);
#endif //GUARD_POKENAV_H
diff --git a/include/secret_base.h b/include/secret_base.h
index b2502889c..173efef09 100644
--- a/include/secret_base.h
+++ b/include/secret_base.h
@@ -10,5 +10,7 @@ void sub_80E9578(void);
void sub_80E980C(void);
u8 *GetSecretBaseMapName(u8 *dest);
const u8 *GetSecretBaseTrainerLoseText(void);
+void sub_80E8EE0(struct MapEvents const *events);
+void sub_80E9238(u8 flagIn);
#endif //GUARD_SECRET_BASE_H
diff --git a/include/tv.h b/include/tv.h
index 19c900ba8..1e05a680e 100644
--- a/include/tv.h
+++ b/include/tv.h
@@ -45,5 +45,6 @@ void PutPokemonTodayCaughtOnAir(void);
void TV_PutSecretBaseVisitOnTheAir(void);
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language);
void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlayer, u16 speciesOpponent);
+void UpdateTVScreensOnMap(int, int);
#endif //GUARD_TV_H