render: extract color palette; convert floating labels to enum

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I29c5feb6099fe321e227e0313282f1546a6a6964
This commit is contained in:
raf 2026-04-08 14:48:43 +03:00 committed by raf
commit eed5c3aff3
4 changed files with 151 additions and 53 deletions

View file

@ -104,12 +104,14 @@ typedef struct {
} Enemy;
// Floating damage text
typedef enum { LABEL_NONE = 0, LABEL_DODGE, LABEL_BLOCK, LABEL_CRIT, LABEL_SLAIN, LABEL_PROC } FloatingLabel;
typedef struct {
int x, y;
int value;
int lifetime; // frames remaining
int is_critical;
char label[8]; // non-empty -> show label instead of numeric value
FloatingLabel label; // label type instead of string
StatusEffectType effect_type; // used to pick color for proc labels
} FloatingText;