Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / assets/sandbox.c.orig

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
assets/sandbox.c.orig 870 B · 27 lines raw
# include "game_mod_abi.h"
static int n ;
static DynObject * o ;
static void box ( double x , double y , double z , double hx , double hy , double hz ) {
o [ n ] .kind = DYN_BOX ;
o [ n ] .x = x ; o [ n ] .y = y ; o [ n ] .z = z ;
o [ n ] .hx = hx ; o [ n ] .hy = hy ; o [ n ] .hz = hz ;
o [ n ] .r = 0.6 ; o [ n ] .g = 0.6 ; o [ n ] .b = 0.8 ;
n = n + 1 ;
}
static void text ( double x , double y , double z , char * t ) {
o [ n ] .kind = DYN_TEXT ;
o [ n ] .x = x ; o [ n ] .y = y ; o [ n ] .z = z ;
o [ n ] .r = 1 ; o [ n ] .g = 1 ; o [ n ] .b = 1 ;
int i = 0 ;
while ( t [ i ] != 0 ) { o [ n ] .text [ i ] = t [ i ] ; i = i + 1 ; }
o [ n ] .text [ i ] = 0 ;
n = n + 1 ;
}
int game_build ( DynObject * out , int max ) {
( void ) max ;
o = out ; n = 0 ;
box ( 0 , - 16 , 5 , 1 , 1 , 1 ) ;
text ( 0 , - 15 , 5 , "hi" ) ;
box ( 3 , - 16 , 5 , 1 , 6 , 1 ) ;
return n ;
}