39 lines
952 B
C
39 lines
952 B
C
#pragma once
|
|
|
|
#include <raylib.h>
|
|
#include <raymath.h>
|
|
#include <rlgl.h>
|
|
#include <TracyConfig.h>
|
|
#include <tracy/TracyC.h>
|
|
|
|
#include <sys/param.h>
|
|
#include <stdint.h>
|
|
#include <inttypes.h>
|
|
#include <stdlib.h>
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#define INCBIN_STYLE INCBIN_STYLE_SNAKE
|
|
#define INCBIN_PREFIX
|
|
#include <incbin.h>
|
|
|
|
#define PANIC(message, ...) \
|
|
do { \
|
|
printf("%s:%d "message"\n", __FILE__, __LINE__, ##__VA_ARGS__); \
|
|
exit(EXIT_FAILURE); \
|
|
} while (false)
|
|
|
|
#define ASSERT(condition) if (!(condition)) PANIC("Assertion failed: %s", #condition)
|
|
#define PANIC_OOM() PANIC("Out of memory")
|
|
#define UNREACHABLE() PANIC("Reached unreachable")
|
|
|
|
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
|
|
|
|
#define container_of(ptr, type, member) ((type *)((char *)(ptr) - offsetof(type, member)))
|
|
|
|
extern struct Resources g_resources;
|
|
|
|
Color rgb(uint8_t r, uint8_t g, uint8_t b);
|
|
Color hex(const char *str);
|