Merge pull request #318 from GriffinRichards/doc-rm
Document region map
@@ -5791,7 +5791,7 @@ _081375B2:
|
||||
add r4, sp, 0x1C
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_80C4E08
|
||||
bl GetMapNameGeneric_
|
||||
b _08137626
|
||||
.align 2, 0
|
||||
_081375E8: .4byte gUnknown_203B140
|
||||
@@ -6067,7 +6067,7 @@ _08137830:
|
||||
add r4, sp, 0x1C
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_80C4E08
|
||||
bl GetMapNameGeneric_
|
||||
b _08137850
|
||||
_08137846:
|
||||
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 |
@@ -3,14 +3,14 @@
|
||||
|
||||
#define MAP_TYPE_NONE 0
|
||||
#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_UNDERGROUND 4
|
||||
#define MAP_TYPE_UNDERWATER 5 // Unused
|
||||
#define MAP_TYPE_OCEAN_ROUTE 6 // Unused
|
||||
#define MAP_TYPE_UNKNOWN 7 // Unused
|
||||
#define MAP_TYPE_UNDERWATER 5 // Not used by any map.
|
||||
#define MAP_TYPE_OCEAN_ROUTE 6 // Not used by any map.
|
||||
#define MAP_TYPE_UNKNOWN 7 // Not used by any map.
|
||||
#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_GYM 1
|
||||
|
||||
@@ -103,8 +103,8 @@
|
||||
#define MAPSEC_CINNABAR_ISLAND 0x60
|
||||
#define MAPSEC_INDIGO_PLATEAU 0x61
|
||||
#define MAPSEC_SAFFRON_CITY 0x62
|
||||
#define MAPSEC_ROUTE_4_FLYDUP 0x63
|
||||
#define MAPSEC_ROUTE_10_FLYDUP 0x64
|
||||
#define MAPSEC_ROUTE_4_POKECENTER 0x63
|
||||
#define MAPSEC_ROUTE_10_POKECENTER 0x64
|
||||
#define MAPSEC_ROUTE_1 0x65
|
||||
#define MAPSEC_ROUTE_2 0x66
|
||||
#define MAPSEC_ROUTE_3 0x67
|
||||
@@ -205,6 +205,7 @@
|
||||
#define MAPSEC_EMBER_SPA 0xC3
|
||||
#define MAPSEC_SPECIAL_AREA 0xC4
|
||||
#define MAPSEC_NONE 0xC5
|
||||
#define MAPSEC_COUNT 0xC6
|
||||
|
||||
#define METLOC_SPECIAL_EGG 0xFD
|
||||
#define METLOC_IN_GAME_TRADE 0xFE
|
||||
|
||||
@@ -2,48 +2,19 @@
|
||||
#define GUARD_REGION_MAP_H
|
||||
|
||||
#include "global.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 {
|
||||
MAPSECTYPE_NONE,
|
||||
MAPSECTYPE_PLAIN,
|
||||
MAPSECTYPE_CITY_CANFLY,
|
||||
MAPSECTYPE_CITY_CANTFLY,
|
||||
REGIONMAP_TYPE_NORMAL,
|
||||
REGIONMAP_TYPE_WALL,
|
||||
REGIONMAP_TYPE_FLY,
|
||||
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 *GetMapNameGeneric(u8 *dest, u16 mapsec);
|
||||
void sub_80BFF50(u8 a0, void (*a1)(void));
|
||||
void MCB2_FlyMap(void);
|
||||
u8 *GetMapNameGeneric_(u8 *dest, u16 mapsec);
|
||||
void InitRegionMapWithExitCB(u8 a0, void (*a1)(void));
|
||||
void CB2_OpenFlyMap(void);
|
||||
|
||||
#endif //GUARD_REGION_MAP_H
|
||||
#endif // GUARD_REGION_MAP_H
|
||||
|
||||
@@ -188,7 +188,7 @@ u8 GetLeadMonFriendship(void)
|
||||
void ShowTownMap(void)
|
||||
{
|
||||
QuestLog_OnInteractionWithSpecialNpc();
|
||||
sub_80BFF50(1, CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
InitRegionMapWithExitCB(REGIONMAP_TYPE_WALL, CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
|
||||
bool8 PlayerHasGrassPokemonInParty(void)
|
||||
|
||||
@@ -668,7 +668,7 @@ void FieldUseFunc_TownMap(u8 taskId)
|
||||
|
||||
static void sub_80A1CAC(void)
|
||||
{
|
||||
sub_80BFF50(0, CB2_BagMenuFromStartMenu);
|
||||
InitRegionMapWithExitCB(REGIONMAP_TYPE_NORMAL, CB2_BagMenuFromStartMenu);
|
||||
}
|
||||
|
||||
static void sub_80A1CC0(u8 taskId)
|
||||
@@ -677,7 +677,7 @@ static void sub_80A1CC0(u8 taskId)
|
||||
{
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
sub_80A1184();
|
||||
sub_80BFF50(0, CB2_ReturnToField);
|
||||
InitRegionMapWithExitCB(REGIONMAP_TYPE_NORMAL, CB2_ReturnToField);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3970,7 +3970,7 @@ static void CursorCB_FieldMove(u8 taskId)
|
||||
sPartyMenuInternal->data[0] = fieldMove;
|
||||
break;
|
||||
case FIELD_MOVE_FLY:
|
||||
gPartyMenu.exitCallback = MCB2_FlyMap;
|
||||
gPartyMenu.exitCallback = CB2_OpenFlyMap;
|
||||
Task_ClosePartyMenu(taskId);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -40,8 +40,8 @@ static const u16 sDexAreas_Kanto[][2] = {
|
||||
{ MAPSEC_CINNABAR_ISLAND, 9 },
|
||||
{ MAPSEC_INDIGO_PLATEAU, 10 },
|
||||
{ MAPSEC_SAFFRON_CITY, 11 },
|
||||
{ MAPSEC_ROUTE_4_FLYDUP, 15 },
|
||||
{ MAPSEC_ROUTE_10_FLYDUP, 21 },
|
||||
{ MAPSEC_ROUTE_4_POKECENTER, 15 },
|
||||
{ MAPSEC_ROUTE_10_POKECENTER, 21 },
|
||||
{ MAPSEC_ROUTE_1, 12 },
|
||||
{ MAPSEC_ROUTE_2, 13 },
|
||||
{ MAPSEC_ROUTE_3, 14 },
|
||||
|
||||