mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 14:27:50 +00:00
Report overlapping sections whenever possible
This commit is contained in:
@@ -78,6 +78,20 @@ void out_AddSection(struct Section const *section)
|
||||
*ptr = newSection;
|
||||
}
|
||||
|
||||
struct Section const *out_OverlappingSection(struct Section const *section)
|
||||
{
|
||||
struct SortedSection *ptr =
|
||||
sections[section->type].banks[section->bank].sections;
|
||||
|
||||
while (ptr) {
|
||||
if (ptr->section->org < section->org + section->size
|
||||
&& section->org < ptr->section->org + ptr->section->size)
|
||||
return ptr->section;
|
||||
ptr = ptr->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs sanity checks on the overlay file.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user