From 4c89989f6f2ef03e71fc89e33e4e94fa067fda04 Mon Sep 17 00:00:00 2001 From: a Date: Mon, 23 Jun 2025 20:40:16 -0400 Subject: [PATCH] RGFXHUD5 init definitions --- src/game/rgfx_hud.c | 2 ++ src/game/rgfx_hud.h | 52 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 src/game/rgfx_hud.c create mode 100644 src/game/rgfx_hud.h diff --git a/src/game/rgfx_hud.c b/src/game/rgfx_hud.c new file mode 100644 index 00000000..562d6ef7 --- /dev/null +++ b/src/game/rgfx_hud.c @@ -0,0 +1,2 @@ +#include +#include "rgfx_hud.h" diff --git a/src/game/rgfx_hud.h b/src/game/rgfx_hud.h new file mode 100644 index 00000000..4ecff739 --- /dev/null +++ b/src/game/rgfx_hud.h @@ -0,0 +1,52 @@ +#pragma once + +typedef enum { + RGFX_BOX, + RGFX_TEXT, + RGFX_SPRITE, + RGFX_SCISSOR, + RGFX_GFX +} RgfxType; + +typedef enum { + RGFX_FONT_CLOWNFONT, + RGFX_FONT_CURSIVE, + RGFX_FONT_FASTTEXT, + RGFX_FONT_HELVETICA +} RgfxFont; + +typedef struct { + s16 sX, sY; + u8 color[4]; +} RgfxBox; + +typedef struct { + char *c; + u8 color[4]; + RgfxFont font; + u16 fontProperties; +} RgfxText; + +typedef struct { + void *t; +} RgfxSprite; + +typedef struct { + Gfx *d; +} RgfxGfx; + +typedef union { + RgfxBox box; + RgfxText txt; + RgfxSprite spt; + RgfxGfx gfx; +} RgfxHudData; + +typedef struct { + RgfxType type; // type + s16 x, y, z; // position + s16 pitch, yaw, roll; // pitch yaw roll + f32 scale; // size + void *parent; // parent + RgfxHudData d; +} RgfxHud;