Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / src/systems/word_anim_system.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/systems/word_anim_system.hpp 758 B · 45 lines raw
#pragma once

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

namespace
Nimbin
{

struct WordAnim_Add
{
    Vec3 start_pos;
    Vec3 target_pos;

    double yaw_start;
    double yaw_target;
    double pitch_start  {0.0};
    double pitch_target {0.0};
    double t            {0.0};

    Text::TokenPtr word;

    bool   complete     {false};
};


struct WordAnim_Drop
{
    Text::TokenPtr word;

    bool complete{false};
};


struct WordAnimSystem
{
    void update(DynArray<WordAnim_Add>&   anims_add,
                DynArray<WordAnim_Drop>&  anims_drop,
                CarriedLine&              carried,
                DynArray<Text::TokenPtr>& words,
                double dt);
};

} // namespace Nimbin