mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Print "; Next union/fragment" between "pieces" in .map file
Resolves #1099
This commit is contained in:
@@ -460,16 +460,20 @@ static uint16_t writeMapBank(struct SortedSections const *sectList,
|
|||||||
uint16_t org = sect->org;
|
uint16_t org = sect->org;
|
||||||
|
|
||||||
while (sect) {
|
while (sect) {
|
||||||
if (sect->modifier == SECTION_UNION)
|
|
||||||
fprintf(mapFile, "\t\t; New union\n");
|
|
||||||
else if (sect->modifier == SECTION_FRAGMENT)
|
|
||||||
fprintf(mapFile, "\t\t; New fragment\n");
|
|
||||||
for (size_t i = 0; i < sect->nbSymbols; i++)
|
for (size_t i = 0; i < sect->nbSymbols; i++)
|
||||||
// "\tSECTION: $xxxx ..."
|
// Space matches "\tSECTION: $xxxx ..."
|
||||||
fprintf(mapFile, "\t $%04" PRIx32 " = %s\n",
|
fprintf(mapFile, "\t $%04" PRIx32 " = %s\n",
|
||||||
sect->symbols[i]->offset + org,
|
sect->symbols[i]->offset + org,
|
||||||
sect->symbols[i]->name);
|
sect->symbols[i]->name);
|
||||||
|
|
||||||
|
if (sect->nextu) {
|
||||||
|
// Announce the following "piece"
|
||||||
|
if (sect->nextu->modifier == SECTION_UNION)
|
||||||
|
fprintf(mapFile, "\t\t; Next union\n");
|
||||||
|
else if (sect->nextu->modifier == SECTION_FRAGMENT)
|
||||||
|
fprintf(mapFile, "\t\t; Next fragment\n");
|
||||||
|
}
|
||||||
|
|
||||||
sect = sect->nextu; // Also print symbols in the following "pieces"
|
sect = sect->nextu; // Also print symbols in the following "pieces"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user