MCPcopy Create free account
hub / github.com/EasyRPG/Player / OnMapFileReady

Function OnMapFileReady

src/player.cpp:1241–1256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1239}
1240
1241static void OnMapFileReady(FileRequestResult*) {
1242 int map_id = Player::start_map_id == -1 ?
1243 lcf::Data::treemap.start.party_map_id : Player::start_map_id;
1244 int x_pos = Player::party_x_position == -1 ?
1245 lcf::Data::treemap.start.party_x : Player::party_x_position;
1246 int y_pos = Player::party_y_position == -1 ?
1247 lcf::Data::treemap.start.party_y : Player::party_y_position;
1248 if (Player::party_members.size() > 0) {
1249 Main_Data::game_party->Clear();
1250 for (auto& member: Player::party_members) {
1251 Main_Data::game_party->AddActor(member);
1252 }
1253 }
1254
1255 Main_Data::game_player->MoveTo(map_id, x_pos, y_pos);
1256}
1257
1258void Player::SetupNewGame() {
1259 Main_Data::game_system->BgmFade(800, true);

Callers

nothing calls this directly

Calls 4

AddActorMethod · 0.80
sizeMethod · 0.45
ClearMethod · 0.45
MoveToMethod · 0.45

Tested by

no test coverage detected