Bunch of fixes for Windows.
This commit is contained in:
parent
4e11fdddb3
commit
85b80f4be7
|
@ -54,10 +54,10 @@ PkmnLib::Library::ItemLibrary* BuildItems::Build(const std::string& path) {
|
|||
GET(val, flingPower, i);
|
||||
auto itemTypeStr = _itemType.get<std::string>();
|
||||
CreatureLib::Library::ItemCategory itemType = ParseItemCategory(itemTypeStr);
|
||||
if (static_cast<int>(itemType) == 255)
|
||||
if (static_cast<i32>(itemType) == 255)
|
||||
return nullptr;
|
||||
|
||||
auto flags = std::unordered_set<uint>();
|
||||
auto flags = std::unordered_set<u32>();
|
||||
for (auto& flagIndex : _flags.items()) {
|
||||
flags.insert(ArbUt::StringView(flagIndex.value().get<std::string>().c_str()));
|
||||
}
|
||||
|
|
|
@ -21,38 +21,38 @@ void BuildLibrary::LogBuildTimes() {
|
|||
std::cout << "\tScripts Time: " << ScriptsTimeMs << "ms" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
BattleLibrary* BuildLibrary::Build(const std::string& pathString,
|
||||
std::function<void(ScriptResolver*)> onScriptInitialize) {
|
||||
auto path = std::filesystem::path(pathString);
|
||||
|
||||
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
|
||||
auto* typesLibrary = BuildTypes::Build(path / "Types.csv");
|
||||
auto* typesLibrary = BuildTypes::Build((path / "Types.csv").generic_string());
|
||||
TypeTimeMs =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - begin).count();
|
||||
begin = std::chrono::steady_clock::now();
|
||||
|
||||
auto* natureLibrary = BuildNatures::Build(path / "Natures.csv");
|
||||
auto* natureLibrary = BuildNatures::Build((path / "Natures.csv").generic_string());
|
||||
NaturesTimeMs =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - begin).count();
|
||||
begin = std::chrono::steady_clock::now();
|
||||
|
||||
auto* movesLibrary = BuildMoves::Build(path / "Moves.json", typesLibrary);
|
||||
auto* movesLibrary = BuildMoves::Build((path / "Moves.json").generic_string(), typesLibrary);
|
||||
MovesTimeMs =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - begin).count();
|
||||
begin = std::chrono::steady_clock::now();
|
||||
|
||||
auto* speciesLibrary = BuildSpecies::BuildLibrary(path / "Pokemon.json", typesLibrary, movesLibrary);
|
||||
auto* speciesLibrary =
|
||||
BuildSpecies::BuildLibrary((path / "Pokemon.json").generic_string(), typesLibrary, movesLibrary);
|
||||
SpeciesTimeMs =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - begin).count();
|
||||
begin = std::chrono::steady_clock::now();
|
||||
|
||||
auto* itemsLibrary = BuildItems::Build(path / "Items.json");
|
||||
auto* itemsLibrary = BuildItems::Build((path / "Items.json").generic_string());
|
||||
ItemsTimeMs =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - begin).count();
|
||||
begin = std::chrono::steady_clock::now();
|
||||
|
||||
auto* growthRates = GrowthRatesBuilder::Build(path / "GrowthRates.json");
|
||||
auto* growthRates = GrowthRatesBuilder::Build((path / "GrowthRates.json").generic_string());
|
||||
GrowthRateTimeMs =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - begin).count();
|
||||
|
||||
|
@ -89,7 +89,7 @@ BattleLibrary* BuildLibrary::Build(const std::string& pathString,
|
|||
continue;
|
||||
std::ifstream in(dirEntry.path());
|
||||
std::string contents((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());
|
||||
asScriptResolver->CreateScript(dirEntry.path().c_str(), contents.c_str());
|
||||
asScriptResolver->CreateScript((const char*)dirEntry.path().c_str(), contents.c_str());
|
||||
}
|
||||
asScriptResolver->FinalizeModule();
|
||||
ScriptsTimeMs =
|
||||
|
|
Loading…
Reference in New Issue