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

Method DataInit

tests/parse.cpp:16–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15struct DataInit {
16 DataInit() {
17 for (int i = 0; i < 4; ++i) {
18 lcf::Data::actors.push_back({});
19 lcf::Data::actors.back().ID = i + 1;
20 lcf::Data::actors.back().Setup(true);
21 }
22 lcf::rpg::SaveInventory inventory;
23 inventory.party.push_back(3);
24
25 Main_Data::game_actors = std::make_unique<Game_Actors>();
26 Main_Data::game_party = std::make_unique<Game_Party>();
27 Main_Data::game_party->SetupFromSave(std::move(inventory));
28 Main_Data::game_variables = std::make_unique<Game_Variables>(Game_Variables::min_2k3, Game_Variables::max_2k3);
29 Main_Data::game_variables->SetWarning(0);
30 }
31 ~DataInit() {
32 lcf::Data::actors.clear();
33 Main_Data::game_party.reset();

Callers

nothing calls this directly

Calls 3

SetupMethod · 0.80
SetupFromSaveMethod · 0.45
SetWarningMethod · 0.45

Tested by

no test coverage detected