refactor(core/rendering): desacoplar RenderInfo d'Options i UiColor (COUP-01b)
core/rendering/render_info ja no inclou game/options.hpp ni
game/ui/ui_palette.hpp. S'introdueix RenderInfo::Frame amb tot l'estat
extern (posició, show_time, shader_enabled, shader_name, shader_preset,
colors) que el caller injecta a cada init()/update(). La lògica de
persistència (cyclePosition/toggleShowTime) surt de RenderInfo i passa
a global_inputs.cpp, que muta Options i crida saveToFile() directament.
Options::buildRenderInfoFrame(text_color, shadow_color) centralitza la
construcció del Frame seguint el mateix patró que buildScreenConfig /
buildPostFXParams. Director i GameScene criden aquest builder quan
necessiten un Frame (amb UiColor::RENDER_INFO_{TEXT,SHADOW} com a
colors actius).
Amb aquest canvi queda tancada COUP-01: core/rendering/ no té cap
include de game/*.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9434e4e87d
commit
9395520a23
8 files changed
+77
-59
No files matched your search
@@ -18,7 +18,7 @@ Los IDs se mantienen estables una vez asignados. Cada entrada apunta al(los) fic
|
||||
|
||||
| ID | Título | Estado |
|
||||
|----|--------|--------|
|
||||
| COUP-01 | Inversión de dependencia `core/rendering → game/*` | WIP (a: DONE, b: PENDING) |
|
||||
| COUP-01 | Inversión de dependencia `core/rendering → game/*` | DONE |
|
||||
| DUP-02 | `Surface::render` / `renderWithColorReplace` duplicados | PENDING |
|
||||
| CONV-03 | Shaders MSL como raw strings en `.cpp` + helpers duplicados | PENDING |
|
||||
| DUP-03 | Familia `Text::write*` con bucle UTF-8 repetido 5 veces | PENDING |
|
||||
@@ -71,7 +71,7 @@ Los IDs se mantienen estables una vez asignados. Cada entrada apunta al(los) fic
|
||||
| ID | Fichero:línea | Hallazgo | Severidad | Estado | Notas |
|
||||
|----|---------------|----------|-----------|--------|-------|
|
||||
| COUP-01a | `notifier.hpp:9` | `core/rendering/notifier.hpp` incluye `game/ui/notification_presets.hpp` | Crítico | DONE | helper `Notification::notify()` en `game/ui` |
|
||||
| COUP-01b | `render_info.cpp:12-13` | `core/rendering/render_info.cpp` incluye `game/options.hpp` + `game/ui/ui_palette.hpp` | Crítico | PENDING | `RenderInfo::State` inyectada pel Director |
|
||||
| COUP-01b | `render_info.cpp:12-13` | `core/rendering/render_info.cpp` incluye `game/options.hpp` + `game/ui/ui_palette.hpp` | Crítico | DONE | `RenderInfo::Frame` injectada; Options.buildRenderInfoFrame() |
|
||||
| COUP-02 | `screen.cpp:13-14,109` | `Screen` instancia `SDL3GPUShader` concreto | Importante | PENDING | factory/registry |
|
||||
| COUP-03 | `surface.cpp:81-83,110-112` | `Surface::render` usa `Screen::get()` global | Importante | PENDING | pasar destino por parámetro |
|
||||
| COUP-04 | `notifier.cpp:19`, `render_info.cpp:52` | `Resource::Cache::get().getSurface("8bithud.gif")` con string literal | Importante | PENDING | inyectar la surface |
|
||||
@@ -120,4 +120,5 @@ Los IDs se mantienen estables una vez asignados. Cada entrada apunta al(los) fic
|
||||
## Registro de commits
|
||||
|
||||
- `9243db1` — docs: full de treball inicial (aquest fitxer)
|
||||
- `<pendent>` — COUP-01a: `Notifier` desacoblat de `game/ui/notification_presets`
|
||||
- `9434e4e` — COUP-01a: `Notifier` desacoblat de `game/ui/notification_presets`
|
||||
- `<pendent>` — COUP-01b: `RenderInfo` desacoblat de `game/options` + `game/ui/ui_palette`
|
||||
Reference in new issue
Block a user