Add the HEAL_LOCATION_NONE constant
This commit is contained in:
@@ -13,14 +13,14 @@ u32 GetHealLocationIndexByMap(u16 mapGroup, u16 mapNum)
|
||||
if (sHealLocations[i].group == mapGroup && sHealLocations[i].map == mapNum)
|
||||
return i + 1;
|
||||
}
|
||||
return 0;
|
||||
return HEAL_LOCATION_NONE;
|
||||
}
|
||||
|
||||
const struct HealLocation *GetHealLocationByMap(u16 mapGroup, u16 mapNum)
|
||||
{
|
||||
u32 index = GetHealLocationIndexByMap(mapGroup, mapNum);
|
||||
|
||||
if (index == 0)
|
||||
if (index == HEAL_LOCATION_NONE)
|
||||
return NULL;
|
||||
else
|
||||
return &sHealLocations[index - 1];
|
||||
@@ -28,7 +28,7 @@ const struct HealLocation *GetHealLocationByMap(u16 mapGroup, u16 mapNum)
|
||||
|
||||
const struct HealLocation *GetHealLocation(u32 index)
|
||||
{
|
||||
if (index == 0)
|
||||
if (index == HEAL_LOCATION_NONE)
|
||||
return NULL;
|
||||
else if (index > ARRAY_COUNT(sHealLocations))
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user