From a17e7369bfe9cb4a23225084a396ec92823bad2b Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 22 Sep 2025 17:21:30 +0200 Subject: reorganize examples --- examples/example.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 examples/example.h (limited to 'examples/example.h') diff --git a/examples/example.h b/examples/example.h new file mode 100644 index 0000000..29212aa --- /dev/null +++ b/examples/example.h @@ -0,0 +1,26 @@ +#include + +#define PI ((float)3.14159265358979323846) + +void init(); +void draw_frame(sponge_Texture c); +void mouse_move(int32_t x, int32_t y); +void draw_frame_3d(sponge_Texture c, float *depths); + +#ifdef SPONGE_EXAMPLE_IMPLEMENTATION + +#ifndef SPONGE_EXAMPLE_INIT_DEFINED +void init() {} +#endif // SPONGE_EXAMPLE_INIT_DEFINED + +#ifndef SPONGE_EXAMPLE_MOUSE_MOVE_DEFINED +void mouse_move(int32_t x, int32_t y) {} +#endif // SPONGE_EXAMPLE_MOUSE_MOVE_DEFINED + +#ifndef SPONGE_EXAMPLE_DRAW_FRAME_3D_DEFINED +void draw_frame_3d(sponge_Texture c, float *depths) { + draw_frame(c); +} +#endif // SPONGE_EXAMPLE_DRAW_FRAME_3D_DEFINED + +#endif // SPONGE_EXAMPLE_IMPLEMENTATION -- cgit v1.3.1