Implement M9.5 biology-derived organism rendering and inspector

Add OrganismPresentation cells derived via biology::derive_phenotype with
no controller, owner or level fields (pinned by test), so identical
biology renders identically for players and NPCs. OrganismLayer reuses
the ADR-0080 ordering/freshness semantics; death is a remnant state and
removal is absence. Rendering takes an explicit rectangle budget, falls
back to body-only detail and marks truncation instead of dropping data.
An opt-in rectangle-only hover inspector shows phenotype gauges; ImGui is
not adopted. ADR-0081 records the decision; evidence in VALIDATION.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-01 18:21:53 -04:00
co-authored by Claude Opus 5.5
parent feca07f791
commit 9bb147de82
21 changed files with 1169 additions and 33 deletions
+15 -3
View File
@@ -53,18 +53,25 @@ if(EVO_BUILD_CLIENT)
target_include_directories(evo_render_frame PUBLIC "${PROJECT_SOURCE_DIR}/include")
evo_owned_target(evo_render_frame)
# SDL-free environment presentation (M9.4): copies read-only world views, never the reverse.
add_library(evo_client_views STATIC src/client/views/environment_view.cpp)
target_link_libraries(evo_client_views PUBLIC evo::world)
add_library(evo_client_views STATIC src/client/views/environment_view.cpp src/client/views/organism_view.cpp)
target_link_libraries(evo_client_views PUBLIC evo::world evo::biology)
evo_owned_target(evo_client_views)
add_library(evo_render_environment STATIC src/render/environment/environment.cpp)
target_link_libraries(evo_render_environment PUBLIC evo_client_views evo_client_controls evo_render_frame)
evo_owned_target(evo_render_environment)
# M9.5 organism projection and the engineering inspector (no text/ImGui dependency).
add_library(evo_render_organism STATIC src/render/organism/organism.cpp)
target_link_libraries(evo_render_organism PUBLIC evo_render_environment)
evo_owned_target(evo_render_organism)
add_library(evo_client_ui STATIC src/client/ui/organism_inspector.cpp)
target_link_libraries(evo_client_ui PUBLIC evo_render_organism)
evo_owned_target(evo_client_ui)
add_library(evo_client_platform STATIC src/client/platform/application.cpp src/render/sdl_renderer.cpp)
target_include_directories(evo_client_platform PRIVATE "${PROJECT_SOURCE_DIR}/src")
target_link_libraries(evo_client_platform PUBLIC evo_render_frame evo_client_controls PRIVATE SDL3::SDL3)
evo_owned_target(evo_client_platform)
add_executable(evo-client apps/evo-client/main.cpp)
target_link_libraries(evo-client PRIVATE evo_client_platform evo_render_environment)
target_link_libraries(evo-client PRIVATE evo_client_platform evo_client_ui)
evo_owned_target(evo-client)
evo_client_runtime(evo-client)
if(BUILD_TESTING)
@@ -77,6 +84,11 @@ if(EVO_BUILD_CLIENT)
target_link_libraries(evo-client-environment-tests PRIVATE evo_render_environment)
evo_owned_target(evo-client-environment-tests)
add_test(NAME client-environment COMMAND evo-client-environment-tests)
add_executable(evo-client-organism-tests tests/client_organisms.cpp)
target_link_libraries(evo-client-organism-tests PRIVATE evo_client_ui)
evo_owned_target(evo-client-organism-tests)
add_test(NAME client-organisms COMMAND evo-client-organism-tests)
set_tests_properties(client-organisms PROPERTIES TIMEOUT 60 LABELS "client")
set_tests_properties(client-environment PROPERTIES TIMEOUT 60 LABELS "client")
add_test(NAME client-lifecycle COMMAND evo-client-lifecycle-tests)
add_test(NAME client-smoke COMMAND evo-client --renderer software --frames 3)