aboutsummaryrefslogtreecommitdiff
path: root/source/all.h
diff options
context:
space:
mode:
authorEmil Williams2026-02-01 11:18:13 +0000
committerEmil Williams2026-02-01 11:18:13 +0000
commitf7973d58b2eb298bffe0ad3f88897e02e0497de8 (patch)
treeee5c874a2169d5637b7ee9322607c7aed4469428 /source/all.h
parenta1a82802c8abb4ec296cd271cc87df1b6a67ebea (diff)
downloadEUROPAXI-f7973d58b2eb298bffe0ad3f88897e02e0497de8.tar.xz
EUROPAXI-f7973d58b2eb298bffe0ad3f88897e02e0497de8.tar.zst
game_t and example rendering functions
Diffstat (limited to 'source/all.h')
-rw-r--r--source/all.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/source/all.h b/source/all.h
new file mode 100644
index 0000000..b8f13bd
--- /dev/null
+++ b/source/all.h
@@ -0,0 +1,39 @@
+#ifndef EVERYTHING_ALWAYS_H_
+#define EVERYTHING_ALWAYS_H_
+
+#include <stdio.h>
+#include <stdint.h>
+#include <math.h>
+#include <raylib.h>
+
+#define TEXT_BUFFER_LIMIT (1<<12)
+#define FRAME_LIMIT (1<<4)
+
+typedef struct {
+ Font font;
+ float frame_x[FRAME_LIMIT];
+ float frame_y[FRAME_LIMIT];
+ int horizontal, vertical;
+} game_t;
+
+/* render.c */
+
+/* Everything here assumes White On Black = OK. for now. */
+/* Things should be textured and have backgrounds which is a lot of extra params,
+ which are not important right now. */
+
+/* I would prefer that things remain CENTERED as that makes preportional to WINDOW SIZE shit easier */
+/* The Window is resizable, by the way. */
+
+void draw_square_grid (game_t * game, size_t frame, int size, Texture * texture, int * array, size_t length);
+void draw_vertical_bargraph (game_t * game, size_t frame, int size, Color color, int * arr, size_t length);
+void draw_centered_text (game_t * game, size_t frame, int font_size, Color color, char * format, ...);
+
+/* game.c */
+
+void game_frame(game_t * game, size_t frame, float x, float y);
+Vector2 game_frame_vector(game_t * game, size_t frame);
+
+/* ... */
+
+#endif /* EVERYTHING_ALWAYS_H_ */