Merge pull request #318 from GriffinRichards/doc-rm

Document region map
This commit is contained in:
PikalaxALT
2020-04-06 06:26:27 -04:00
committed by GitHub
43 changed files with 2296 additions and 2240 deletions
+2 -2
View File
@@ -5791,7 +5791,7 @@ _081375B2:
add r4, sp, 0x1C add r4, sp, 0x1C
adds r0, r4, 0 adds r0, r4, 0
adds r1, r5, 0 adds r1, r5, 0
bl sub_80C4E08 bl GetMapNameGeneric_
b _08137626 b _08137626
.align 2, 0 .align 2, 0
_081375E8: .4byte gUnknown_203B140 _081375E8: .4byte gUnknown_203B140
@@ -6067,7 +6067,7 @@ _08137830:
add r4, sp, 0x1C add r4, sp, 0x1C
adds r0, r4, 0 adds r0, r4, 0
adds r1, r5, 0 adds r1, r5, 0
bl sub_80C4E08 bl GetMapNameGeneric_
b _08137850 b _08137850
_08137846: _08137846:
add r4, sp, 0x1C add r4, sp, 0x1C

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 84 B

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 181 B

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 495 B

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 217 B

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 258 B

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 257 B

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 294 B

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 345 B

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

+5 -5
View File
@@ -3,14 +3,14 @@
#define MAP_TYPE_NONE 0 #define MAP_TYPE_NONE 0
#define MAP_TYPE_TOWN 1 #define MAP_TYPE_TOWN 1
#define MAP_TYPE_CITY 2 // Unused. RSE use this map type to distinguish Town and City. FRLG make no distinction #define MAP_TYPE_CITY 2 // Not used by any map. RSE use this map type to distinguish Town and City. FRLG make no distinction
#define MAP_TYPE_ROUTE 3 #define MAP_TYPE_ROUTE 3
#define MAP_TYPE_UNDERGROUND 4 #define MAP_TYPE_UNDERGROUND 4
#define MAP_TYPE_UNDERWATER 5 // Unused #define MAP_TYPE_UNDERWATER 5 // Not used by any map.
#define MAP_TYPE_OCEAN_ROUTE 6 // Unused #define MAP_TYPE_OCEAN_ROUTE 6 // Not used by any map.
#define MAP_TYPE_UNKNOWN 7 // Unused #define MAP_TYPE_UNKNOWN 7 // Not used by any map.
#define MAP_TYPE_INDOOR 8 #define MAP_TYPE_INDOOR 8
#define MAP_TYPE_SECRET_BASE 9 // Unused #define MAP_TYPE_SECRET_BASE 9 // Not used by any map.
#define MAP_BATTLE_SCENE_NORMAL 0 #define MAP_BATTLE_SCENE_NORMAL 0
#define MAP_BATTLE_SCENE_GYM 1 #define MAP_BATTLE_SCENE_GYM 1
+3 -2
View File
@@ -103,8 +103,8 @@
#define MAPSEC_CINNABAR_ISLAND 0x60 #define MAPSEC_CINNABAR_ISLAND 0x60
#define MAPSEC_INDIGO_PLATEAU 0x61 #define MAPSEC_INDIGO_PLATEAU 0x61
#define MAPSEC_SAFFRON_CITY 0x62 #define MAPSEC_SAFFRON_CITY 0x62
#define MAPSEC_ROUTE_4_FLYDUP 0x63 #define MAPSEC_ROUTE_4_POKECENTER 0x63
#define MAPSEC_ROUTE_10_FLYDUP 0x64 #define MAPSEC_ROUTE_10_POKECENTER 0x64
#define MAPSEC_ROUTE_1 0x65 #define MAPSEC_ROUTE_1 0x65
#define MAPSEC_ROUTE_2 0x66 #define MAPSEC_ROUTE_2 0x66
#define MAPSEC_ROUTE_3 0x67 #define MAPSEC_ROUTE_3 0x67
@@ -205,6 +205,7 @@
#define MAPSEC_EMBER_SPA 0xC3 #define MAPSEC_EMBER_SPA 0xC3
#define MAPSEC_SPECIAL_AREA 0xC4 #define MAPSEC_SPECIAL_AREA 0xC4
#define MAPSEC_NONE 0xC5 #define MAPSEC_NONE 0xC5
#define MAPSEC_COUNT 0xC6
#define METLOC_SPECIAL_EGG 0xFD #define METLOC_SPECIAL_EGG 0xFD
#define METLOC_IN_GAME_TRADE 0xFE #define METLOC_IN_GAME_TRADE 0xFE
+8 -37
View File
@@ -2,48 +2,19 @@
#define GUARD_REGION_MAP_H #define GUARD_REGION_MAP_H
#include "global.h" #include "global.h"
#include "bg.h" #include "bg.h"
// Exported type declarations
enum
{
INPUT_EVENT_NONE,
INPUT_EVENT_MOVE_START,
INPUT_EVENT_MOVE_CONT,
INPUT_EVENT_MOVE_END,
INPUT_EVENT_A_BUTTON,
INPUT_EVENT_B_BUTTON,
};
enum { enum {
MAPSECTYPE_NONE, REGIONMAP_TYPE_NORMAL,
MAPSECTYPE_PLAIN, REGIONMAP_TYPE_WALL,
MAPSECTYPE_CITY_CANFLY, REGIONMAP_TYPE_FLY,
MAPSECTYPE_CITY_CANTFLY, REGIONMAP_TYPE_COUNT
}; };
enum {
MAPPERM_0,
MAPPERM_1,
MAPPERM_2,
MAPPERM_3
};
enum {
REGIONMAP_KANTO,
REGIONMAP_SEVII123,
REGIONMAP_SEVII45,
REGIONMAP_SEVII67
};
// Exported RAM declarations
// Exported ROM declarations
u8 *GetMapName(u8 *dest, u16 mapsec, u16 fill); u8 *GetMapName(u8 *dest, u16 mapsec, u16 fill);
u8 *GetMapNameGeneric(u8 *dest, u16 mapsec); u8 *GetMapNameGeneric(u8 *dest, u16 mapsec);
void sub_80BFF50(u8 a0, void (*a1)(void)); u8 *GetMapNameGeneric_(u8 *dest, u16 mapsec);
void MCB2_FlyMap(void); void InitRegionMapWithExitCB(u8 a0, void (*a1)(void));
void CB2_OpenFlyMap(void);
#endif //GUARD_REGION_MAP_H #endif // GUARD_REGION_MAP_H
+1 -1
View File
@@ -188,7 +188,7 @@ u8 GetLeadMonFriendship(void)
void ShowTownMap(void) void ShowTownMap(void)
{ {
QuestLog_OnInteractionWithSpecialNpc(); QuestLog_OnInteractionWithSpecialNpc();
sub_80BFF50(1, CB2_ReturnToFieldContinueScriptPlayMapMusic); InitRegionMapWithExitCB(REGIONMAP_TYPE_WALL, CB2_ReturnToFieldContinueScriptPlayMapMusic);
} }
bool8 PlayerHasGrassPokemonInParty(void) bool8 PlayerHasGrassPokemonInParty(void)
+2 -2
View File
@@ -668,7 +668,7 @@ void FieldUseFunc_TownMap(u8 taskId)
static void sub_80A1CAC(void) static void sub_80A1CAC(void)
{ {
sub_80BFF50(0, CB2_BagMenuFromStartMenu); InitRegionMapWithExitCB(REGIONMAP_TYPE_NORMAL, CB2_BagMenuFromStartMenu);
} }
static void sub_80A1CC0(u8 taskId) static void sub_80A1CC0(u8 taskId)
@@ -677,7 +677,7 @@ static void sub_80A1CC0(u8 taskId)
{ {
CleanupOverworldWindowsAndTilemaps(); CleanupOverworldWindowsAndTilemaps();
sub_80A1184(); sub_80A1184();
sub_80BFF50(0, CB2_ReturnToField); InitRegionMapWithExitCB(REGIONMAP_TYPE_NORMAL, CB2_ReturnToField);
DestroyTask(taskId); DestroyTask(taskId);
} }
} }
+1 -1
View File
@@ -3970,7 +3970,7 @@ static void CursorCB_FieldMove(u8 taskId)
sPartyMenuInternal->data[0] = fieldMove; sPartyMenuInternal->data[0] = fieldMove;
break; break;
case FIELD_MOVE_FLY: case FIELD_MOVE_FLY:
gPartyMenu.exitCallback = MCB2_FlyMap; gPartyMenu.exitCallback = CB2_OpenFlyMap;
Task_ClosePartyMenu(taskId); Task_ClosePartyMenu(taskId);
break; break;
default: default:
+2140 -2056
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -40,8 +40,8 @@ static const u16 sDexAreas_Kanto[][2] = {
{ MAPSEC_CINNABAR_ISLAND, 9 }, { MAPSEC_CINNABAR_ISLAND, 9 },
{ MAPSEC_INDIGO_PLATEAU, 10 }, { MAPSEC_INDIGO_PLATEAU, 10 },
{ MAPSEC_SAFFRON_CITY, 11 }, { MAPSEC_SAFFRON_CITY, 11 },
{ MAPSEC_ROUTE_4_FLYDUP, 15 }, { MAPSEC_ROUTE_4_POKECENTER, 15 },
{ MAPSEC_ROUTE_10_FLYDUP, 21 }, { MAPSEC_ROUTE_10_POKECENTER, 21 },
{ MAPSEC_ROUTE_1, 12 }, { MAPSEC_ROUTE_1, 12 },
{ MAPSEC_ROUTE_2, 13 }, { MAPSEC_ROUTE_2, 13 },
{ MAPSEC_ROUTE_3, 14 }, { MAPSEC_ROUTE_3, 14 },