Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / src/levels/scene.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/levels/scene.hpp 1.2 KB · 69 lines raw
#pragma once

#include <SDL3/SDL.h>
#include <string>

#include "text/token.hpp"
#include "utils/globals.hpp"

namespace
Nimbin
{

namespace Scene
{

    namespace Placed
    {
        struct Word
        {
            std::string text;

            Vec3 pos {};
            SDL_FColor color = Config::Color::floor;
            bool required = false;
        };


        struct Plate
        {
            std::string tag;

            Vec3 pos;
        };


        struct Platform
        {
            Vec3 pos;
            Vec3 half_extents { 1.0, 0.2, 1.0 };

            SDL_FColor fill_color { 0.45f, 0.45f, 0.65f, 1.0f };
            SDL_FColor wire_color { 0.70f, 0.70f, 0.90f, 1.0f };
        };


        struct Ai
        {
            std::string text;

            Vec3   pos;

            Text::Token::Ai::State initial_state = Text::Token::Ai::State::Attack;

            double aggressiveness = 1.0;
        };
    } // namespace Placed::


struct Data
{
    DynArray<Placed::Ai>       ai_seeds {};
    DynArray<Placed::Plate>    plates   {};
    DynArray<Placed::Platform> platforms{};
    DynArray<Placed::Word>     words    {};
};

} // namespace Scene

} // namespace Nimbin