Skip to content

Commit 3ace518

Browse files
Replace unusual heal location member names
1 parent ecf27f4 commit 3ace518

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

include/heal_location.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
struct HealLocation
77
{
8-
s8 group;
9-
s8 map;
8+
s8 mapGroup;
9+
s8 mapNum;
1010
s16 x;
1111
s16 y;
1212
};

src/field_screen_effect.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ static void Task_RushInjuredPokemonToCenter(u8 taskId)
401401

402402
// Scene changes if last heal location was the player's house
403403
loc = GetHealLocation(SPAWN_PALLET_TOWN);
404-
if (gSaveBlock1Ptr->lastHealLocation.mapGroup == loc->group
405-
&& gSaveBlock1Ptr->lastHealLocation.mapNum == loc->map
404+
if (gSaveBlock1Ptr->lastHealLocation.mapGroup == loc->mapGroup
405+
&& gSaveBlock1Ptr->lastHealLocation.mapNum == loc->mapNum
406406
&& gSaveBlock1Ptr->lastHealLocation.warpId == WARP_ID_NONE
407407
&& gSaveBlock1Ptr->lastHealLocation.x == loc->x
408408
&& gSaveBlock1Ptr->lastHealLocation.y == loc->y)

src/heal_location.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static u32 GetHealLocationIndexFromMapGroupAndNum(u16 mapGroup, u16 mapNum)
3131
u32 i;
3232

3333
for (i = 0; i < NELEMS(sSpawnPoints); i++) {
34-
if (sSpawnPoints[i].group == mapGroup && sSpawnPoints[i].map == mapNum)
34+
if (sSpawnPoints[i].mapGroup == mapGroup && sSpawnPoints[i].mapNum == mapNum)
3535
{
3636
return i + 1;
3737
}

src/overworld.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ void SetWarpDestinationToHealLocation(u8 healLocationId)
611611
{
612612
const struct HealLocation *warp = GetHealLocation(healLocationId);
613613
if (warp)
614-
SetWarpDestination(warp->group, warp->map, -1, warp->x, warp->y);
614+
SetWarpDestination(warp->mapGroup, warp->mapNum, -1, warp->x, warp->y);
615615
}
616616

617617
void SetWarpDestinationToLastHealLocation(void)
@@ -628,7 +628,7 @@ void SetLastHealLocationWarp(u8 healLocationId)
628628
{
629629
const struct HealLocation *healLocation = GetHealLocation(healLocationId);
630630
if (healLocation)
631-
SetWarpData(&gSaveBlock1Ptr->lastHealLocation, healLocation->group, healLocation->map, -1, healLocation->x, healLocation->y);
631+
SetWarpData(&gSaveBlock1Ptr->lastHealLocation, healLocation->mapGroup, healLocation->mapNum, -1, healLocation->x, healLocation->y);
632632
}
633633

634634
void UpdateEscapeWarp(s16 x, s16 y)
@@ -690,7 +690,7 @@ void SetContinueGameWarpToHealLocation(u8 healLocationId)
690690
{
691691
const struct HealLocation *warp = GetHealLocation(healLocationId);
692692
if (warp)
693-
SetWarpData(&gSaveBlock1Ptr->continueGameWarp, warp->group, warp->map, -1, warp->x, warp->y);
693+
SetWarpData(&gSaveBlock1Ptr->continueGameWarp, warp->mapGroup, warp->mapNum, -1, warp->x, warp->y);
694694
}
695695

696696
void SetContinueGameWarpToDynamicWarp(int unused)

tools/mapjson/mapjson.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,10 @@ void process_heal_locations(const vector<string> &map_filepaths, string output_f
395395

396396
// Add element to main heal locations array
397397
heal_locations_text << index_text << "\n\t{\n"
398-
<< "\t\tMAP_GROUP(" << map_id << "),\n"
399-
<< "\t\tMAP_NUM(" << map_id << "),\n"
400-
<< "\t\t" << json_to_string(heal_location, "x") << ",\n"
401-
<< "\t\t" << json_to_string(heal_location, "y") << ",\n"
398+
<< "\t\t.mapGroup = MAP_GROUP(" << map_id << "),\n"
399+
<< "\t\t.mapNum = MAP_NUM(" << map_id << "),\n"
400+
<< "\t\t.x = " << json_to_string(heal_location, "x") << ",\n"
401+
<< "\t\t.y = " << json_to_string(heal_location, "y") << ",\n"
402402
<< "\t},\n";
403403

404404
// Add element to respawn map array (if field is present)

0 commit comments

Comments
 (0)