From 1fbc3a19c26344a33dae19625a5113fe1eada50f Mon Sep 17 00:00:00 2001 From: tgsm Date: Wed, 24 Mar 2021 07:21:07 -0400 Subject: Move the MapHeader struct into map_header.h global.fieldmap.h is no longer used and map.h was never used, so they both can be removed. --- include/global.fieldmap.h | 27 --------------------------- include/global.h | 1 - include/map.h | 22 ---------------------- include/map_header.h | 23 +++++++++++++++++++++++ 4 files changed, 23 insertions(+), 50 deletions(-) delete mode 100644 include/global.fieldmap.h delete mode 100644 include/map.h (limited to 'include') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h deleted file mode 100644 index 4557a2e7..00000000 --- a/include/global.fieldmap.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef POKEDIAMOND_GLOBAL_FIELDMAP_H -#define POKEDIAMOND_GLOBAL_FIELDMAP_H - -struct MapHeader -{ - u8 unk0; - u8 unk1; - u16 unk2; - u16 unk4; - u16 unk6; - u16 unk8; - u16 unkA; - u16 unkC; - u16 unkE; - u16 unk10; - u16 mapsec; - u8 unk14; - u8 unk15; - u8 unk16; - u8 unk17_0:4; - u8 unk17_4:1; - u8 unk17_5:1; - u8 unk17_6:1; - u8 unk17_7:1; -}; - -#endif //POKEDIAMOND_GLOBAL_FIELDMAP_H diff --git a/include/global.h b/include/global.h index e0e8cb22..1c92a1ec 100644 --- a/include/global.h +++ b/include/global.h @@ -6,7 +6,6 @@ #include "MWC_string.h" #include "function_target.h" #include "nitro.h" -#include "global.fieldmap.h" #include "constants/global.h" #include "error_handling.h" diff --git a/include/map.h b/include/map.h deleted file mode 100644 index 18b8c1d1..00000000 --- a/include/map.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef POKEDIAMOND_MAP_H -#define POKEDIAMOND_MAP_H - -typedef struct { - u8 MapAreaData; - u8 field_0x1; - u16 Matrix; - u16 MapScripts; - u16 MapLevelScripts; - u16 MapTexts; - u16 DayMusic; - u16 NightMusic; - u16 WildPokemonData; - u16 MapEvents; - u16 MapName; - u8 WeatherType; - u8 field_0x15; - u8 field_0x16; - u8 field_0x17; -} MapHeader; - -#endif //POKEDIAMOND_MAP_H diff --git a/include/map_header.h b/include/map_header.h index e4e96a59..a28de62d 100644 --- a/include/map_header.h +++ b/include/map_header.h @@ -1,6 +1,29 @@ #ifndef POKEDIAMOND_MAP_HEADER_H #define POKEDIAMOND_MAP_HEADER_H +struct MapHeader +{ + u8 unk0; + u8 unk1; + u16 unk2; + u16 unk4; + u16 unk6; + u16 unk8; + u16 unkA; + u16 unkC; + u16 unkE; + u16 unk10; + u16 mapsec; + u8 unk14; + u8 unk15; + u8 unk16; + u8 unk17_0:4; + u8 unk17_4:1; + u8 unk17_5:1; + u8 unk17_6:1; + u8 unk17_7:1; +}; + u8 FUN_02034724(u32 mapno); u8 FUN_02034738(u32 mapno); u16 FUN_0203474C(u32 mapno); -- cgit v1.2.3 From 08f7471387b63deca732cbf7e972f92187b4b647 Mon Sep 17 00:00:00 2001 From: tgsm Date: Wed, 24 Mar 2021 07:28:25 -0400 Subject: Document some MapHeader functions/members --- include/map_header.h | 64 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'include') diff --git a/include/map_header.h b/include/map_header.h index a28de62d..20677025 100644 --- a/include/map_header.h +++ b/include/map_header.h @@ -3,48 +3,48 @@ struct MapHeader { - u8 unk0; + u8 area_data_bank; u8 unk1; - u16 unk2; - u16 unk4; - u16 unk6; - u16 unk8; - u16 unkA; - u16 unkC; - u16 unkE; - u16 unk10; + u16 matrix_id; + u16 scripts_bank; + u16 level_scripts_bank; + u16 msg_bank; + u16 day_music_id; + u16 night_music_id; + u16 wild_encounter_bank; + u16 events_bank; u16 mapsec; - u8 unk14; - u8 unk15; + u8 weather_type; + u8 camera_type; u8 unk16; u8 unk17_0:4; - u8 unk17_4:1; + u8 is_bike_allowed:1; u8 unk17_5:1; u8 unk17_6:1; - u8 unk17_7:1; + u8 is_fly_allowed:1; }; -u8 FUN_02034724(u32 mapno); -u8 FUN_02034738(u32 mapno); -u16 FUN_0203474C(u32 mapno); +u8 MapHeader_GetAreaDataBank(u32 mapno); +u8 MapHeader_GetField1(u32 mapno); +u16 MapHeader_GetMatrixId(u32 mapno); u16 MapHeader_GetMsgBank(u32 mapno); -u16 MapHeader_GetScrSeqReleaseNo(u32 mapno); -u16 FUN_0203479C(u32 mapno); -u16 FUN_020347B0(u32 mapno); -u16 FUN_020347C4(u32 mapno); -BOOL FUN_020347D8(u32 mapno); -u16 FUN_020347FC(u32 mapno); -u16 FUN_02034810(u32 mapno); -u16 FUN_02034824(u32 mapno); -u8 FUN_02034838(u32 mapno); -u8 FUN_0203484C(u32 mapno); -u8 FUN_02034860(u32 mapno); -u8 FUN_0203487C(u32 mapno); -u8 FUN_02034898(u32 mapno); -u8 FUN_020348B4(u32 mapno); -u8 FUN_020348D0(u32 mapno); +u16 MapHeader_GetScriptsBank(u32 mapno); +u16 MapHeader_GetLevelScriptsBank(u32 mapno); +u16 MapHeader_GetDayMusicId(u32 mapno); +u16 MapHeader_GetNightMusicId(u32 mapno); +BOOL MapHeader_HasWildEncounters(u32 mapno); +u16 MapHeader_GetWildEncounterBank(u32 mapno); +u16 MapHeader_GetEventsBank(u32 mapno); +u16 MapHeader_GetMapSec(u32 mapno); +u8 MapHeader_GetWeatherType(u32 mapno); +u8 MapHeader_GetCameraType(u32 mapno); +u8 MapHeader_GetField17_0(u32 mapno); +u8 MapHeader_GetField17_6(u32 mapno); +u8 MapHeader_IsFlyAllowed(u32 mapno); +u8 MapHeader_IsBikeAllowed(u32 mapno); +u8 MapHeader_GetField16(u32 mapno); BOOL FUN_020348E4(u32 mapno); -BOOL FUN_02034908(u32 mapno); +BOOL MapHeader_MapIsOnOverworldMatrix(u32 mapno); BOOL FUN_0203491C(u32 mapno); BOOL FUN_02034930(u32 mapno); BOOL FUN_02034944(u32 mapno); -- cgit v1.2.3