mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
rgbasm: remove option for random fill character
This commit is contained in:
@@ -151,9 +151,6 @@ opt_Parse(char *s)
|
|||||||
break;
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
if (strlen(&s[1]) <= 2) {
|
if (strlen(&s[1]) <= 2) {
|
||||||
if (strcmp(&s[1], "?") == 0) {
|
|
||||||
newopt.fillchar = -1;
|
|
||||||
} else {
|
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = sscanf(&s[1], "%lx", &newopt.fillchar);
|
result = sscanf(&s[1], "%lx", &newopt.fillchar);
|
||||||
@@ -162,7 +159,6 @@ opt_Parse(char *s)
|
|||||||
("*ERROR*\t :\n\tInvalid argument for option 'z'\n");
|
("*ERROR*\t :\n\tInvalid argument for option 'z'\n");
|
||||||
exit(5);
|
exit(5);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
printf
|
printf
|
||||||
("*ERROR*\t :\n\tInvalid argument for option 'z'\n");
|
("*ERROR*\t :\n\tInvalid argument for option 'z'\n");
|
||||||
@@ -280,7 +276,7 @@ main(int argc, char *argv[])
|
|||||||
DefaultOptions.gbgfx[3] = '3';
|
DefaultOptions.gbgfx[3] = '3';
|
||||||
DefaultOptions.binary[0] = '0';
|
DefaultOptions.binary[0] = '0';
|
||||||
DefaultOptions.binary[1] = '1';
|
DefaultOptions.binary[1] = '1';
|
||||||
DefaultOptions.fillchar = 0; // -1 => fill uninitialized data with random values
|
DefaultOptions.fillchar = 0;
|
||||||
opt_SetCurrentOptions(&DefaultOptions);
|
opt_SetCurrentOptions(&DefaultOptions);
|
||||||
|
|
||||||
while (argv[argn][0] == '-' && argc) {
|
while (argv[argn][0] == '-' && argc) {
|
||||||
|
|||||||
@@ -724,8 +724,7 @@ void
|
|||||||
out_Skip(int skip)
|
out_Skip(int skip)
|
||||||
{
|
{
|
||||||
checksection();
|
checksection();
|
||||||
if ((CurrentOptions.fillchar == -1)
|
if (!((pCurrentSection->nType == SECT_HOME)
|
||||||
|| !((pCurrentSection->nType == SECT_HOME)
|
|
||||||
|| (pCurrentSection->nType == SECT_CODE))) {
|
|| (pCurrentSection->nType == SECT_CODE))) {
|
||||||
pCurrentSection->nPC += skip;
|
pCurrentSection->nPC += skip;
|
||||||
nPC += skip;
|
nPC += skip;
|
||||||
|
|||||||
Reference in New Issue
Block a user