Fixing logger and windows version - remove terminal
This commit is contained in:
1 parent
76287dda46
commit
a7d17d9afd
27 files changed
+349
-243
No files matched your search
@@ -73,7 +73,7 @@ namespace ZL {
|
||||
objects.push_back(std::move(data));
|
||||
}
|
||||
|
||||
std::cout << "Loaded " << objects.size() << " static objects from " << jsonPath << std::endl;
|
||||
logger() << "Loaded " << objects.size() << " static objects from " << jsonPath << std::endl;
|
||||
return objects;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace ZL {
|
||||
objects.push_back(std::move(data));
|
||||
}
|
||||
|
||||
std::cout << "Loaded " << objects.size() << " interactive objects from " << jsonPath << std::endl;
|
||||
logger() << "Loaded " << objects.size() << " interactive objects from " << jsonPath << std::endl;
|
||||
return objects;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace ZL {
|
||||
// Service the OS message queue between loads so the window doesn't
|
||||
// get flagged as "not responding" during long location loads.
|
||||
SDL_PumpEvents();
|
||||
std::cout << "Loading game object: " << data.name << std::endl;
|
||||
logger() << "Loading game object: " << data.name << std::endl;
|
||||
try {
|
||||
LoadedGameObject obj = buildLoadedObject(data, renderer, zipPath);
|
||||
|
||||
@@ -208,13 +208,13 @@ namespace ZL {
|
||||
|
||||
obj.mesh.RefreshVBO();
|
||||
gameObjects[data.name] = std::move(obj);
|
||||
std::cout << "Successfully loaded: " << data.name << std::endl;
|
||||
logger() << "Successfully loaded: " << data.name << std::endl;
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "GameObjectLoader: Failed to load '" << data.name << "': " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Total game objects loaded: " << gameObjects.size() << std::endl;
|
||||
logger() << "Total game objects loaded: " << gameObjects.size() << std::endl;
|
||||
return gameObjects;
|
||||
}
|
||||
|
||||
@@ -230,17 +230,17 @@ namespace ZL {
|
||||
|
||||
for (const auto& data : loadInteractiveFromJson(jsonPath, zipPath)) {
|
||||
SDL_PumpEvents();
|
||||
std::cout << "Loading interactive object: " << data.base.name << std::endl;
|
||||
logger() << "Loading interactive object: " << data.base.name << std::endl;
|
||||
try {
|
||||
InteractiveObject intObj = InteractiveObject::createFromState(
|
||||
data.toInteractiveObjectState(), renderer, zipPath);
|
||||
intObj.loadedObject.name = data.base.name;
|
||||
|
||||
if (!data.activateFunctionName.empty())
|
||||
std::cout << "Successfully loaded interactive: " << data.base.name
|
||||
logger() << "Successfully loaded interactive: " << data.base.name
|
||||
<< " (function: " << data.activateFunctionName << ")" << std::endl;
|
||||
else
|
||||
std::cout << "Successfully loaded interactive: " << data.base.name << std::endl;
|
||||
logger() << "Successfully loaded interactive: " << data.base.name << std::endl;
|
||||
|
||||
interactiveObjects.push_back(std::move(intObj));
|
||||
} catch (const std::exception& e) {
|
||||
@@ -248,7 +248,7 @@ namespace ZL {
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Total interactive objects loaded: " << interactiveObjects.size() << std::endl;
|
||||
logger() << "Total interactive objects loaded: " << interactiveObjects.size() << std::endl;
|
||||
return interactiveObjects;
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace ZL {
|
||||
|
||||
npcs.push_back(std::move(data));
|
||||
}
|
||||
std::cout << "Successfully loaded " << npcs.size() << " NPCs from " << jsonPath << std::endl;
|
||||
logger() << "Successfully loaded " << npcs.size() << " NPCs from " << jsonPath << std::endl;
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "Error loading NPCs from JSON: " << e.what() << std::endl;
|
||||
}
|
||||
@@ -369,11 +369,11 @@ namespace ZL {
|
||||
|
||||
for (const auto& npcData : loadNpcsFromJson(jsonPath, zipPath)) {
|
||||
SDL_PumpEvents();
|
||||
std::cout << "Loading NPC: " << npcData.name << std::endl;
|
||||
logger() << "Loading NPC: " << npcData.name << std::endl;
|
||||
try {
|
||||
auto npc = Character::createFromState(npcData.toCharacterState(), renderer, zipPath.c_str());
|
||||
if (npc) {
|
||||
std::cout << "Successfully loaded NPC: " << npcData.name << " at ("
|
||||
logger() << "Successfully loaded NPC: " << npcData.name << " at ("
|
||||
<< npcData.positionX << ", " << npcData.positionY << ", " << npcData.positionZ << ")" << std::endl;
|
||||
npc->index = index;
|
||||
npcs.push_back(std::move(npc));
|
||||
@@ -384,7 +384,7 @@ namespace ZL {
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Total NPCs loaded: " << npcs.size() << std::endl;
|
||||
logger() << "Total NPCs loaded: " << npcs.size() << std::endl;
|
||||
return npcs;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user