mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Remove warnings when calculating banks
getsymbank() is used for more things than just when the code explicitly has a BANK() operator, which causes a lot of noise when building code that has more than one object file and places variables on HRAM or OAM. Signed-off-by: AntonioND <antonio_nd@outlook.com>
This commit is contained in:
@@ -68,14 +68,8 @@ getsymbank(SLONG symid)
|
|||||||
errx(1, "*INTERNAL* UNKNOWN SYMBOL TYPE");
|
errx(1, "*INTERNAL* UNKNOWN SYMBOL TYPE");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nBank == BANK_WRAM0 || nBank == BANK_ROM0) {
|
if (nBank == BANK_WRAM0 || nBank == BANK_ROM0 || nBank == BANK_OAM ||
|
||||||
/* This can have practical uses. */
|
nBank == BANK_HRAM) {
|
||||||
return 0;
|
|
||||||
} else if (nBank == BANK_OAM) {
|
|
||||||
warnx("Trying to calculate BANK() of label in OAM.");
|
|
||||||
return 0;
|
|
||||||
} else if (nBank == BANK_HRAM) {
|
|
||||||
warnx("Trying to calculate BANK() of label in HRAM.");
|
|
||||||
return 0;
|
return 0;
|
||||||
} else if (nBank >= BANK_WRAMX && nBank < (BANK_WRAMX + BANK_COUNT_WRAMX)) {
|
} else if (nBank >= BANK_WRAMX && nBank < (BANK_WRAMX + BANK_COUNT_WRAMX)) {
|
||||||
return nBank - BANK_WRAMX + 1;
|
return nBank - BANK_WRAMX + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user