mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
rgblink: remove random option for fill character
This commit is contained in:
@@ -29,7 +29,7 @@ enum eBlockType {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SLONG options = 0;
|
SLONG options = 0;
|
||||||
SLONG fillchar = 0;
|
SLONG fillchar;
|
||||||
char smartlinkstartsymbol[256];
|
char smartlinkstartsymbol[256];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -142,15 +142,11 @@ main(int argc, char *argv[])
|
|||||||
options |= OPT_SMALL;
|
options |= OPT_SMALL;
|
||||||
break;
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
if (optarg[0] == '?')
|
|
||||||
fillchar = -1;
|
|
||||||
else {
|
|
||||||
fillchar = strtoul(optarg, &ep, 0);
|
fillchar = strtoul(optarg, &ep, 0);
|
||||||
if (optarg[0] == '\0' || *ep != '\0')
|
if (optarg[0] == '\0' || *ep != '\0')
|
||||||
errx(EX_USAGE, "Invalid argument for option 'z'");
|
errx(EX_USAGE, "Invalid argument for option 'z'");
|
||||||
if (fillchar < 0 || fillchar > 0xFF)
|
if (fillchar < 0 || fillchar > 0xFF)
|
||||||
errx(EX_USAGE, "Argument for option 'z' must be between 0 and 0xFF");
|
errx(EX_USAGE, "Argument for option 'z' must be between 0 and 0xFF");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ writehome(FILE * f)
|
|||||||
if (!mem)
|
if (!mem)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fillchar != -1) {
|
|
||||||
memset(mem, fillchar, MaxAvail[BANK_HOME]);
|
memset(mem, fillchar, MaxAvail[BANK_HOME]);
|
||||||
}
|
|
||||||
MapfileInitBank(0);
|
MapfileInitBank(0);
|
||||||
|
|
||||||
pSect = pSections;
|
pSect = pSections;
|
||||||
@@ -51,9 +49,7 @@ writebank(FILE * f, SLONG bank)
|
|||||||
if (!mem)
|
if (!mem)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fillchar != -1) {
|
|
||||||
memset(mem, fillchar, MaxAvail[bank]);
|
memset(mem, fillchar, MaxAvail[bank]);
|
||||||
}
|
|
||||||
MapfileInitBank(bank);
|
MapfileInitBank(bank);
|
||||||
|
|
||||||
pSect = pSections;
|
pSect = pSections;
|
||||||
|
|||||||
Reference in New Issue
Block a user