Skip to content

Commit

Permalink
remove freespace finder hack that was needed for incbin
Browse files Browse the repository at this point in the history
  • Loading branch information
randomdude999 committed Jan 19, 2024
1 parent 7e459d2 commit c4ee46b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/asar/assembleblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ struct freespace_data {
bool write_rats;
// should rework this...
bool flag_align;
// hack for incbin -> label
bool dont_find;
// pinned freespaces: how much space is actually needed for this freespace
int total_len;
// pinned freespaces: how much of this block we've already used
Expand Down Expand Up @@ -803,7 +801,6 @@ void allocate_freespaces() {

for(int i = 1; i < freespaces.count; i++) {
freespace_data& fs = freespaces[i];
if(fs.dont_find) continue;
if(fs.is_static && fs.orgpos > 0) {
fs.pos = fs.orgpos;
continue;
Expand All @@ -825,7 +822,7 @@ void allocate_freespaces() {

// relocate all labels that were in freespace to point them to their real location
labels.each([](const char * key, snes_label & val) {
if(val.freespace_id != 0 && !freespaces[val.freespace_id].dont_find) {
if(val.freespace_id != 0) {
val.pos += freespaces[val.freespace_id].pos;
}
});
Expand Down

0 comments on commit c4ee46b

Please sign in to comment.