mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
xlink: fix usage printing to match new options (and rgbfix format)
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "link/types.h"
|
#include "link/types.h"
|
||||||
|
|
||||||
extern void PrintUsage(void);
|
extern void usage(void);
|
||||||
extern SLONG fillchar;
|
extern SLONG fillchar;
|
||||||
extern char smartlinkstartsymbol[256];
|
extern char smartlinkstartsymbol[256];
|
||||||
|
|
||||||
|
|||||||
@@ -37,20 +37,14 @@ char smartlinkstartsymbol[256];
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
static void
|
||||||
PrintUsage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
printf("xLink v" LINK_VERSION " (part of ASMotor " ASMOTOR_VERSION
|
printf("xLink v" LINK_VERSION " (part of ASMotor " ASMOTOR_VERSION
|
||||||
")\n\n" "Usage: xlink [options] linkfile\n"
|
")\n\n");
|
||||||
"Options:\n\t-h\t\tThis text\n"
|
printf("usage: xlink [m mapfile] [-n symfile] [-s symbol] [-tg | -ts | -tp]\n");
|
||||||
"\t-m<mapfile>\tWrite a mapfile\n"
|
printf("\t [-z pad_value] linkfile\n");
|
||||||
"\t-n<symfile>\tWrite a NO$GMB compatible symfile\n"
|
|
||||||
"\t-z<hx>\t\tSet the byte value (hex format) used for uninitialised\n"
|
|
||||||
"\t\t\tdata (? for random, default is 0x00)\n"
|
|
||||||
"\t-s<symbol>\tPerform smart linking starting with <symbol>\n"
|
|
||||||
"\t-t\t\tOutput target\n" "\t\t-tg\tGameboy ROM image(default)\n"
|
|
||||||
"\t\t-ts\tGameboy small mode (32kB)\n"
|
|
||||||
"\t\t-tp\tPsion2 reloc module\n");
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -126,7 +120,7 @@ main(int argc, char *argv[])
|
|||||||
SLONG argn = 0;
|
SLONG argn = 0;
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
PrintUsage();
|
usage();
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "m:n:s:t:z:")) != -1) {
|
while ((ch = getopt(argc, argv, "m:n:s:t:z:")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
@@ -169,7 +163,7 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PrintUsage();
|
usage();
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -185,7 +179,7 @@ main(int argc, char *argv[])
|
|||||||
Output();
|
Output();
|
||||||
CloseMapfile();
|
CloseMapfile();
|
||||||
} else
|
} else
|
||||||
PrintUsage();
|
usage();
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user