mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 12:02:08 +00:00
Significantly overhaul OPT code
Simplify the mess that was option setting (2 redundant variables !?) Move options to a separate file Have "modules" own their options, and OPT only access them (less redundancy) Simplify code, respect naming conventions better
This commit is contained in:
@@ -30,17 +30,21 @@ static inline void lexer_SetStateAtEOL(struct LexerState *state)
|
||||
lexerStateEOL = state;
|
||||
}
|
||||
|
||||
extern char const *binDigits;
|
||||
extern char const *gfxDigits;
|
||||
extern char binDigits[2];
|
||||
extern char gfxDigits[4];
|
||||
|
||||
static inline void lexer_SetBinDigits(char const *digits)
|
||||
static inline void lexer_SetBinDigits(char const digits[2])
|
||||
{
|
||||
binDigits = digits;
|
||||
binDigits[0] = digits[0];
|
||||
binDigits[1] = digits[1];
|
||||
}
|
||||
|
||||
static inline void lexer_SetGfxDigits(char const *digits)
|
||||
static inline void lexer_SetGfxDigits(char const digits[4])
|
||||
{
|
||||
gfxDigits = digits;
|
||||
gfxDigits[0] = digits[0];
|
||||
gfxDigits[1] = digits[1];
|
||||
gfxDigits[2] = digits[2];
|
||||
gfxDigits[3] = digits[3];
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user