mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Deduplicates and generalises a lot of code in assign.c: - Replace area_AllocAbs*AnyBank() with area_AllocAbsAnyBank() function that accepts a section type parameter - Replace area_Alloc*AnyBank() with area_AllocAnyBank() - Replace FindLargest*() with FindLargestSection() - Replace Assign*Sections() with AssignBankedSections() - Add VerifyAndSetBank(), which enables bank checks (and addition with BANK_*) to be centralised - Refactor the initialisation of AssignSections(), removing some magic numbers and only setting MaxAvail[i] once - Overhaul the duplicated cases throughout AssignSections()