Moved code and assets for the game to a seperate folder. Moved jansson and raylib to third_party.

This commit is contained in:
2025-12-16 11:47:55 +01:00
parent fd2dbf232d
commit 8cdbd5b162
63 changed files with 14 additions and 14 deletions

27
src/game/shared/squeue.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef SQUEUE_H
#define SQUEUE_H
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
// FIFO.
typedef struct {
void *buffer;
uint16_t head;
uint16_t tail;
uint16_t count;
uint16_t capacity;
size_t element_size;
} SQueue;
bool squeue_init(SQueue *q, uint16_t capacity, size_t element_size);
void squeue_free(SQueue *q);
bool squeue_push(SQueue *q, const void *elem);
bool squeue_pop(SQueue *q, void *out);
bool squeue_peek(const SQueue *q, void *out);
#endif