mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-07-31 15:17:20 -05:00
38 lines
861 B
C
38 lines
861 B
C
#include "location.h"
|
|
|
|
#include "generated/map_headers.h"
|
|
|
|
#include "field_overworld_state.h"
|
|
#include "savedata.h"
|
|
|
|
static const Location sPlayerStartLocation = {
|
|
.mapId = MAP_HEADER_TWINLEAF_TOWN_PLAYER_HOUSE_2F,
|
|
.warpId = WARP_ID_NONE,
|
|
.x = 4,
|
|
.z = 6,
|
|
.faceDirection = FACE_UP,
|
|
};
|
|
|
|
static const Location sPlayerFirstRespawnLocation = {
|
|
.mapId = MAP_HEADER_TWINLEAF_TOWN,
|
|
.warpId = WARP_ID_NONE,
|
|
.x = 116,
|
|
.z = 886,
|
|
.faceDirection = FACE_DOWN,
|
|
};
|
|
|
|
void SetPlayerStartLocation(Location *outLocation)
|
|
{
|
|
*outLocation = sPlayerStartLocation;
|
|
}
|
|
|
|
void SetPlayerFirstRespawnLocation(Location *outLocation)
|
|
{
|
|
*outLocation = sPlayerFirstRespawnLocation;
|
|
}
|
|
|
|
void InitPlayerStartLocation(SaveData *saveData)
|
|
{
|
|
SetPlayerStartLocation(FieldOverworldState_GetPlayerLocation(SaveData_GetFieldOverworldState(saveData)));
|
|
}
|