From 2b2b69ee31f00aa46ab6baa967e12437ce7334d1 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 4 Jul 2025 07:00:08 -0600 Subject: Heightmap, player, and more concepts --- src/utils.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index e3b52ed..e289189 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,13 +1,17 @@ #include #include -#include +#include +#include #include -#include "raylib.h" +#include +#include "raygui.h" #ifndef UTIL_H #define UTIL_H +typedef struct Game Game; + #define FT_NAMEMAX 256 // Memory management. @@ -27,4 +31,11 @@ typedef enum FTError { FTSUCCESS = 0 } FTError; +// Bit shit. +#define SET_BIT(b, n) (b | (0x1 << n)) +#define CLEAR_BIT(b, n) (b & ~(0x1 << n)) +#define IS_BIT_SET(b, n) ((b >> n) & 0x1) +#define TOGGLE_BIT(b, n) (b ^ (0x1 << n)) +#define HAS_FLAG(v, f) ((v & f) == f) + #endif -- cgit v1.2.3