mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Make bank of "bank 0" sections known to RGBASM
This allows `BANK("Some ROM0 section")` to be used in a constant expression
This commit is contained in:
@@ -639,6 +639,15 @@ struct Section *out_FindSection(char *pzName, uint32_t secttype, int32_t org,
|
|||||||
if (pSect->pzName == NULL)
|
if (pSect->pzName == NULL)
|
||||||
fatalerror("Not enough memory for sectionname");
|
fatalerror("Not enough memory for sectionname");
|
||||||
|
|
||||||
|
// Force the bank to be 0 if that's the only possibility
|
||||||
|
switch (secttype) {
|
||||||
|
case SECTTYPE_ROM0:
|
||||||
|
case SECTTYPE_WRAM0:
|
||||||
|
case SECTTYPE_OAM:
|
||||||
|
case SECTTYPE_HRAM:
|
||||||
|
bank = 0;
|
||||||
|
}
|
||||||
|
|
||||||
pSect->nType = secttype;
|
pSect->nType = secttype;
|
||||||
pSect->nPC = 0;
|
pSect->nPC = 0;
|
||||||
pSect->nOrg = org;
|
pSect->nOrg = org;
|
||||||
|
|||||||
Reference in New Issue
Block a user