mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Improve error messages
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -336,7 +336,7 @@ AssignFloatingBankSections(enum eSectionType type)
|
|||||||
|
|
||||||
if ((org = area_AllocAnyBank(pSection->nByteSize, pSection->nAlign, type)) != -1) {
|
if ((org = area_AllocAnyBank(pSection->nByteSize, pSection->nAlign, type)) != -1) {
|
||||||
if (options & OPT_OVERLAY) {
|
if (options & OPT_OVERLAY) {
|
||||||
errx(1, "All sections must be fixed when using overlay");
|
errx(1, "All sections must be fixed when using an overlay file.");
|
||||||
}
|
}
|
||||||
pSection->nOrg = org & 0xFFFF;
|
pSection->nOrg = org & 0xFFFF;
|
||||||
pSection->nBank = org >> 16;
|
pSection->nBank = org >> 16;
|
||||||
@@ -512,7 +512,7 @@ AssignSections(void)
|
|||||||
if (pSection->oAssigned == 0
|
if (pSection->oAssigned == 0
|
||||||
&& pSection->nOrg != -1 && pSection->nBank == -1) {
|
&& pSection->nOrg != -1 && pSection->nBank == -1) {
|
||||||
if (options & OPT_OVERLAY) {
|
if (options & OPT_OVERLAY) {
|
||||||
errx(1, "All sections must be fixed when using overlay");
|
errx(1, "All sections must be fixed when using an overlay file.");
|
||||||
}
|
}
|
||||||
switch (pSection->Type) {
|
switch (pSection->Type) {
|
||||||
case SECT_ROMX:
|
case SECT_ROMX:
|
||||||
|
|||||||
@@ -115,11 +115,11 @@ Output(void)
|
|||||||
}
|
}
|
||||||
fseek(f_overlay, 0, SEEK_END);
|
fseek(f_overlay, 0, SEEK_END);
|
||||||
if (ftell(f_overlay) % 0x4000 != 0) {
|
if (ftell(f_overlay) % 0x4000 != 0) {
|
||||||
errx(1, "Overlay file must be aligned to 0x4000 bytes\n");
|
errx(1, "Overlay file must be aligned to 0x4000 bytes.");
|
||||||
}
|
}
|
||||||
MaxOverlayBank = (ftell(f_overlay) / 0x4000) - 1;
|
MaxOverlayBank = (ftell(f_overlay) / 0x4000) - 1;
|
||||||
if (MaxOverlayBank < 1) {
|
if (MaxOverlayBank < 1) {
|
||||||
errx(1, "Overlay file must be at least 0x8000 bytes\n");
|
errx(1, "Overlay file must be at least 0x8000 bytes.");
|
||||||
}
|
}
|
||||||
if (MaxOverlayBank > MaxBankUsed) {
|
if (MaxOverlayBank > MaxBankUsed) {
|
||||||
MaxBankUsed = MaxOverlayBank;
|
MaxBankUsed = MaxOverlayBank;
|
||||||
|
|||||||
Reference in New Issue
Block a user