diff options
author | nathan <nathansmith@disroot.org> | 2025-07-04 13:00:08 +0000 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-07-04 13:00:08 +0000 |
commit | 2b2b69ee31f00aa46ab6baa967e12437ce7334d1 (patch) | |
tree | 1ba7fd19c30bb33ef20f55afc84ccfff30460969 /src/utils.h | |
parent | de3a92fb2bde8cbec688f788c53f7ba52d6a723a (diff) | |
download | FindThings-2b2b69ee31f00aa46ab6baa967e12437ce7334d1.tar.gz FindThings-2b2b69ee31f00aa46ab6baa967e12437ce7334d1.tar.bz2 FindThings-2b2b69ee31f00aa46ab6baa967e12437ce7334d1.zip |
Heightmap, player, and more concepts
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 15 |
1 files changed, 13 insertions, 2 deletions
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 <stdio.h> #include <stdlib.h> -#include <stdlib.h> +#include <stdint.h> +#include <math.h> #include <raylib.h> -#include "raylib.h" +#include <raymath.h> +#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 |