Use bankless symbols for VC constants
This is valid according to the .sym file spec: <https://rgbds.gbdev.io/sym/>
This commit is contained in:
@@ -103,12 +103,14 @@ int parse_number(const char *input, int base) {
|
||||
|
||||
void parse_symbol_value(char *input, int *restrict bank, int *restrict address) {
|
||||
char *colon = strchr(input, ':');
|
||||
if (!colon) {
|
||||
error_exit("Error: Cannot parse bank+address: \"%s\"\n", input);
|
||||
if (colon) {
|
||||
*colon++ = '\0';
|
||||
*bank = parse_number(input, 16);
|
||||
*address = parse_number(colon, 16);
|
||||
} else {
|
||||
*bank = 0;
|
||||
*address = parse_number(input, 16);
|
||||
}
|
||||
*colon++ = '\0';
|
||||
*bank = parse_number(input, 16);
|
||||
*address = parse_number(colon, 16);
|
||||
}
|
||||
|
||||
void parse_symbols(const char *filename, struct Symbol **symbols) {
|
||||
|
Reference in New Issue
Block a user