mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Some RGBLINK refactoring
- Consistently refer to `Section` fragments/unions as "pieces" (renaming `.nextu`) - Remove `Symbol`'s `.label()` accessors (use `std::get<Label>`) - Move some `Label`-related logic into `Symbol` methods
This commit is contained in:
@@ -53,11 +53,10 @@ static void initFreeSpace() {
|
||||
static void assignSection(Section §ion, MemoryLocation const &location) {
|
||||
// Propagate the assigned location to all UNIONs/FRAGMENTs
|
||||
// so `jr` patches in them will have the correct offset
|
||||
for (Section *next = §ion; next != nullptr; next = next->nextu.get()) {
|
||||
next->org = location.address;
|
||||
next->bank = location.bank;
|
||||
for (Section *piece = §ion; piece != nullptr; piece = piece->nextPiece.get()) {
|
||||
piece->org = location.address;
|
||||
piece->bank = location.bank;
|
||||
}
|
||||
|
||||
out_AddSection(section);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user