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