From bbc42fad1cbcdb4bc1b199a93b94661fbc9b60d7 Mon Sep 17 00:00:00 2001 From: Sara Date: Thu, 18 Sep 2025 15:00:01 +0200 Subject: [PATCH] chore: placed max length macros closer to relevant elements --- src/dice.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/dice.h b/src/dice.h index dd01437..45405ad 100644 --- a/src/dice.h +++ b/src/dice.h @@ -4,14 +4,6 @@ #include "renderer/clay_renderer_SDL3.h" #include -#ifndef MAX_ACTIVE_DICE - #define MAX_ACTIVE_DICE 20 -#endif - -#ifndef MAX_ROLL_STR_LEN - #define MAX_ROLL_STR_LEN 10 -#endif - enum Dice_Die { COIN = 1, D4 = 4, @@ -23,6 +15,9 @@ enum Dice_Die { D100 = 100 }; +#ifndef MAX_ROLL_STR_LEN +#define MAX_ROLL_STR_LEN 10 +#endif struct Dice_ResultType { int roll; size_t string_len; @@ -30,6 +25,10 @@ struct Dice_ResultType { Clay_String clay_string; }; +#ifndef MAX_ACTIVE_DICE +#define MAX_ACTIVE_DICE 20 +#endif + extern int Dice_Roll(enum Dice_Die die); extern enum Dice_Die const *Dice_GetActiveSet(size_t *out_length);