// https://dataswamp.org/~incal/bad-el/src/bad-sdl.h #pragma once #include #include char* my_strdup (const char*); void logi (const char*); // math typedef struct { float x, y, z; } vector; const float pi = 3.141592653589793f; // thread void thr_init (); void thr_quit (); int thr_loop (void*); int thr_surface (void*); int thr_cache (void*); // font void font_init (); void font_quit (); // video = graphics void clear (); void video_init (); void video_quit (); // webp void webp_init (); void webp_quit (); void webp_draw (); // circle void circle_init (); void circle_quit (); void draw_circle (int, int, int, SDL_FColor); void draw_triangle (vector, vector, vector, SDL_FColor, SDL_FColor, SDL_FColor); // cache void cache_init (); void cache_quit (); void cache_clear (); uint32_t hash_idx (const char*); // emacs emacs_value sdl_draw_circle (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_clear (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_frame (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_grid_toggle (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_init (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_quit (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_text (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_triangle (emacs_env*, ptrdiff_t, emacs_value*, void*); emacs_value sdl_draw_webp (emacs_env*, ptrdiff_t, emacs_value*, void*); // draw void draw_quit (); void draw_init (); void clear_screen (); void draw_frame (); void draw_light (int, int, int); void draw_screen (); void draw_string (const char*); void draw_texture (int); void store_texture (int); // rect void draw_rect (int, int, int, int); void draw_rect_test ();