chore: placed max length macros closer to relevant elements
This commit is contained in:
parent
9dc64ba962
commit
bbc42fad1c
15
src/dice.h
15
src/dice.h
|
|
@ -4,14 +4,6 @@
|
||||||
#include "renderer/clay_renderer_SDL3.h"
|
#include "renderer/clay_renderer_SDL3.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#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 {
|
enum Dice_Die {
|
||||||
COIN = 1,
|
COIN = 1,
|
||||||
D4 = 4,
|
D4 = 4,
|
||||||
|
|
@ -23,6 +15,9 @@ enum Dice_Die {
|
||||||
D100 = 100
|
D100 = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef MAX_ROLL_STR_LEN
|
||||||
|
#define MAX_ROLL_STR_LEN 10
|
||||||
|
#endif
|
||||||
struct Dice_ResultType {
|
struct Dice_ResultType {
|
||||||
int roll;
|
int roll;
|
||||||
size_t string_len;
|
size_t string_len;
|
||||||
|
|
@ -30,6 +25,10 @@ struct Dice_ResultType {
|
||||||
Clay_String clay_string;
|
Clay_String clay_string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef MAX_ACTIVE_DICE
|
||||||
|
#define MAX_ACTIVE_DICE 20
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int Dice_Roll(enum Dice_Die die);
|
extern int Dice_Roll(enum Dice_Die die);
|
||||||
|
|
||||||
extern enum Dice_Die const *Dice_GetActiveSet(size_t *out_length);
|
extern enum Dice_Die const *Dice_GetActiveSet(size_t *out_length);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue