mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-28 22:07:49 +00:00
Replace some #define with constexpr
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
SECTION "test", ROM0[0]
|
||||
ldh [ $ff00 + c ], a
|
||||
; 257 spaces exceeds both LEXER_BUF_SIZE (42) and uint8_t limit (255)
|
||||
; 257 spaces exceeds both LEXER_BUF_SIZE (64) and uint8_t limit (255)
|
||||
ldh [ $ff00 + c ], a
|
||||
ldh [ $ff00 + c ], a
|
||||
|
||||
@@ -217,8 +217,8 @@ static void write_image(
|
||||
}
|
||||
|
||||
static void generate_random_image(char const *filename) {
|
||||
#define MIN_TILES_PER_SIDE 3
|
||||
#define MAX_TILES ((MIN_TILES_PER_SIDE + 7) * (MIN_TILES_PER_SIDE + 7))
|
||||
static constexpr uint8_t MIN_TILES_PER_SIDE = 3;
|
||||
static constexpr uint8_t MAX_TILES = (MIN_TILES_PER_SIDE + 7) * (MIN_TILES_PER_SIDE + 7);
|
||||
Attributes attributes[MAX_TILES];
|
||||
unsigned char tileData[MAX_TILES][8][8];
|
||||
uint8_t width = getRandomBits(3) + MIN_TILES_PER_SIDE,
|
||||
|
||||
Reference in New Issue
Block a user