Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / src/wall/label.hpp

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
src/wall/label.hpp 825 B · 34 lines raw
#pragma once
//
// Wall::Label — a per-wall facecam name tag. Lives in its own header (not
// wall.hpp) because it now owns a Text::Handler by value, and handler.hpp
// includes wall.hpp; keeping Label here avoids the include cycle.

#include "text/handler.hpp"
#include "wall/wall.hpp"

namespace
Nimbin
{
class  Camera;
class  GlRenderer;
struct Light;

namespace Wall
{
    struct Label
    {
        Text::Handler label;
        Vec3          anchor;
        float         face_yaw;
        Wall::Role    role;

        static DynArray<Label> generate_All(float world_scale);

        void on_Hit (size_t word_index, const Vec3& projectile_vel);
        void update (double dt, const Camera& camera);
        void draw   (GlRenderer& gl, const Camera& camera, const Light& light) const;
    };
}

} // namespace Nimbin