mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
Build with pedantically standard C++ (#1309)
* Remove array designators (not standard C++) * Build with pedantically standard C++
This commit is contained in:
@@ -205,9 +205,9 @@ struct {
|
||||
char const *name;
|
||||
uint16_t max;
|
||||
} scrambleSpecs[SCRAMBLE_UNK] = {
|
||||
AT(SCRAMBLE_ROMX) { "romx", 65535 },
|
||||
AT(SCRAMBLE_SRAM) { "sram", 255 },
|
||||
AT(SCRAMBLE_WRAMX) { "wramx", 7 },
|
||||
{ "romx", 65535 }, // SCRAMBLE_ROMX
|
||||
{ "sram", 255 }, // SCRAMBLE_SRAM
|
||||
{ "wramx", 7 }, // SCRAMBLE_WRAMX
|
||||
};
|
||||
|
||||
static void parseScrambleSpec(char const *spec)
|
||||
|
||||
@@ -61,15 +61,15 @@ static enum SectionType typeMap[SECTTYPE_INVALID] = {
|
||||
|
||||
void out_AddSection(struct Section const *section)
|
||||
{
|
||||
static const uint32_t maxNbBanks[] = {
|
||||
AT(SECTTYPE_WRAM0) 1,
|
||||
AT(SECTTYPE_VRAM) 2,
|
||||
AT(SECTTYPE_ROMX) UINT32_MAX,
|
||||
AT(SECTTYPE_ROM0) 1,
|
||||
AT(SECTTYPE_HRAM) 1,
|
||||
AT(SECTTYPE_WRAMX) 7,
|
||||
AT(SECTTYPE_SRAM) UINT32_MAX,
|
||||
AT(SECTTYPE_OAM) 1,
|
||||
static const uint32_t maxNbBanks[SECTTYPE_INVALID] = {
|
||||
1, // SECTTYPE_WRAM0
|
||||
2, // SECTTYPE_VRAM
|
||||
UINT32_MAX, // SECTTYPE_ROMX
|
||||
1, // SECTTYPE_ROM0
|
||||
1, // SECTTYPE_HRAM
|
||||
7, // SECTTYPE_WRAMX
|
||||
UINT32_MAX, // SECTTYPE_SRAM
|
||||
1, // SECTTYPE_OAM
|
||||
};
|
||||
|
||||
uint32_t targetBank = section->bank - sectionTypeInfo[section->type].firstBank;
|
||||
|
||||
@@ -534,9 +534,9 @@ static void applyFilePatches(struct Section *section, struct Section *dataSectio
|
||||
int32_t min;
|
||||
int32_t max;
|
||||
} const types[PATCHTYPE_INVALID] = {
|
||||
AT(PATCHTYPE_BYTE) { 1, -128, 255 },
|
||||
AT(PATCHTYPE_WORD) { 2, -32768, 65536 },
|
||||
AT(PATCHTYPE_LONG) { 4, INT32_MIN, INT32_MAX },
|
||||
{ 1, -128, 255 }, // PATCHTYPE_BYTE
|
||||
{ 2, -32768, 65536 }, // PATCHTYPE_WORD
|
||||
{ 4, INT32_MIN, INT32_MAX }, // PATCHTYPE_LONG
|
||||
};
|
||||
|
||||
if (!isError && (value < types[patch->type].min
|
||||
|
||||
Reference in New Issue
Block a user