Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / commits / 2b8183b

sdl_runtime_compiler git · main

SDL3 game for running and compiling code at runtime

sdl3 c++ compiler dlopen cmake · first commit 2026-04-19 · last commit 2026-07-03 (3 months ago) · synced 3 days ago · upstream: git.ide3.de/hsnr/sdl-runtime-compiler

C++ 72.3% C 26.2%
git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gz

Rename AimResult to Result

Christian Immanuel · 2026-06-05 11:59 · 2b8183bdf1042871306465f1dd21a4d863e7cc0d

 src/states/game_state.cpp         | 4 ++--
 src/systems/aim.hpp               | 6 +++---
 src/systems/projectile_system.cpp | 2 +-
 src/systems/projectile_system.hpp | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/states/game_state.cpp b/src/states/game_state.cpp
index a49ac11..a305665 100644
--- a/src/states/game_state.cpp
+++ b/src/states/game_state.cpp
@@ -298,7 +298,7 @@ GameState::on_ShootOne()
     DynArray<Text3dPtr> single;
     single.push_back(std::move(word));
 
-    Aim::AimResult aim = Aim::crosshair_Target(*_ctx.camera, _ctx.words, _ctx.scenery,
+    Aim::Result aim = Aim::crosshair_Target(*_ctx.camera, _ctx.words, _ctx.scenery,
                                                _ctx.wall_texts, _ctx.world->scale());
     _projectiles_sys->launch(_projectiles, std::move(single /* or all_words */),
                              _ctx.camera->fwd, _ctx.camera->pos, aim);
@@ -331,7 +331,7 @@ GameState::on_ShootAll()
 
     _carried = CarriedLine();
     if (!all_words.empty()) {
-        Aim::AimResult aim = Aim::crosshair_Target(*_ctx.camera, _ctx.words, _ctx.scenery,
+        Aim::Result aim = Aim::crosshair_Target(*_ctx.camera, _ctx.words, _ctx.scenery,
                                                    _ctx.wall_texts, _ctx.world->scale());
         _projectiles_sys->launch(_projectiles, std::move(all_words),
                                  _ctx.camera->fwd, _ctx.camera->pos, aim);
diff --git a/src/systems/aim.hpp b/src/systems/aim.hpp
index deb2b59..0543889 100644
--- a/src/systems/aim.hpp
+++ b/src/systems/aim.hpp
@@ -25,13 +25,13 @@
 namespace Aim
 {
 
-struct AimResult {
+struct Result {
     Vec3    point {};
     Text3d* track { nullptr };
     Vec3    local {};
 };
 
-inline AimResult
+inline Result
 crosshair_Target(const Camera& camera,
                  const DynArray<Text3dPtr>&     words,
                  const DynArray<GameObjectPtr>& scenery,
@@ -56,7 +56,7 @@ crosshair_Target(const Camera& camera,
 
     const Vec3 seg { dir.x * wall_t, dir.y * wall_t, dir.z * wall_t };
 
-    AimResult out;
+    Result out;
     out.point   = Vec3{ eye.x + seg.x, eye.y + seg.y, eye.z + seg.z };   // wall point
     double best_t = 1.0;                                                 // seg-fraction
     Text3d* win   = nullptr;                                             // winning word, if any
diff --git a/src/systems/projectile_system.cpp b/src/systems/projectile_system.cpp
index 55d91e3..cc1ebae 100644
--- a/src/systems/projectile_system.cpp
+++ b/src/systems/projectile_system.cpp
@@ -390,7 +390,7 @@ ProjectileSystem::launch(DynArray<Projectile>&   out,
                 DynArray<Text3dPtr> words,
                 const Vec3& fwd,
                 const Vec3& eye,
-                const Aim::AimResult& aim)
+                const Aim::Result& aim)
 {
     if (words.empty()) return;
 
diff --git a/src/systems/projectile_system.hpp b/src/systems/projectile_system.hpp
index 01e54c7..473af94 100644
--- a/src/systems/projectile_system.hpp
+++ b/src/systems/projectile_system.hpp
@@ -69,7 +69,7 @@ public:
                 DynArray<Text3dPtr> words,
                 const Vec3& fwd,
                 const Vec3& eye,
-                const Aim::AimResult& aim);
+                const Aim::Result& aim);
 
     void update(DynArray<Projectile>&        projectiles,
                 DynArray<ProjectileResult>&  results,