diff --git a/src/img.h b/src/img.h index 96539da..432ac19 100644 --- a/src/img.h +++ b/src/img.h @@ -5,7 +5,7 @@ #include "mem_arena.h" #include -#define BUF_TYPE(NAME, TYPE) \ +#define BUF_TYPE(TYPE, NAME) \ typedef struct { \ u64 width; \ u64 height; \ @@ -20,9 +20,9 @@ struct colour { u8 a; }; -BUF_TYPE(Buffer, void); -BUF_TYPE(Image, Colour); -BUF_TYPE(Depth, f32); +BUF_TYPE(void, Buffer); +BUF_TYPE(Colour, Image); +BUF_TYPE(f32, Depth); #define init_buffer(ARENA, BUF) \ _init_buffer(ARENA, (Buffer *)BUF, sizeof(*((BUF)->buf)))