refactor(log): migra game/scenes i game/ui a Log::
- logo_scene, title_scene, intro_scene, room_fsm: missatges de cicle d'escena com a Log::info amb tag "scene" o "RoomFsm". Eliminats els TODO obsolets sobre el logger pendent. - game_scene (16 logs): events del bus (LEVEL COMPLETE, PLAYER HIT, PLAYER KILLED) com a info; transicions de ROOM com a info; warns als casos d'àudio absent o música no arrencada. - hud (3 logs): init i events com a info. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0b708f1515
commit
5fce52e0ad
6 files changed
+34
-46
No files matched your search
@@ -1,12 +1,12 @@
|
||||
#include "game/scenes/room_fsm.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
#include <string_view>
|
||||
|
||||
#include "core/locale/locale.hpp"
|
||||
#include "core/resources/resource_helper.hpp"
|
||||
#include "external/fkyaml_node.hpp"
|
||||
#include "utils/log.hpp"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace RoomFsm {
|
||||
|
||||
auto bytes = Resource::Helper::loadFile(yaml_path);
|
||||
if (bytes.empty()) {
|
||||
std::cout << "RoomFsm: " << yaml_path << " absent — uso fallbacks compilats\n";
|
||||
Log::warn("RoomFsm", "{} absent — uso fallbacks compilats", yaml_path);
|
||||
return cfg;
|
||||
}
|
||||
const auto* begin = reinterpret_cast<const char*>(bytes.data());
|
||||
@@ -83,9 +83,7 @@ namespace RoomFsm {
|
||||
cfg.text_panel_height_px = readChildInt(n, "height_px", cfg.text_panel_height_px);
|
||||
}
|
||||
|
||||
std::cout << "RoomFsm: timings carregats des de " << yaml_path
|
||||
<< " (intro fade " << cfg.intro_fade_in_ms
|
||||
<< "ms, outro fade " << cfg.outro_fade_out_ms << "ms)\n";
|
||||
Log::info("RoomFsm", "timings carregats des de {} (intro fade {}ms, outro fade {}ms)", yaml_path, cfg.intro_fade_in_ms, cfg.outro_fade_out_ms);
|
||||
return cfg;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user