pokefirered/include/regions.h
2025-11-15 14:32:49 +01:00

21 lines
478 B
C

#ifndef GUARD_REGIONS_H
#define GUARD_REGIONS_H
#include "constants/regions.h"
enum KantoSubRegion GetKantoSubregion(u32 mapSecId);
static inline enum Region GetRegionForSectionId(u32 sectionId)
{
if (sectionId >= KANTO_MAPSEC_START && sectionId < MAPSEC_SPECIAL_AREA)
return REGION_KANTO;
return REGION_HOENN;
}
static inline enum Region GetCurrentRegion(void)
{
return GetRegionForSectionId(gMapHeader.regionMapSectionId);
}
#endif // GUARD_REGIONS_H