Mercurial > hg > forks > yadex
changeset 76:042b44809e6e
Move help printing to separate function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 26 Sep 2011 13:45:30 +0300 |
parents | e6175d0a667b |
children | 9b8da7c7219e |
files | src/yadex.cc |
diffstat | 1 files changed, 51 insertions(+), 47 deletions(-) [+] |
line wrap: on
line diff
--- a/src/yadex.cc Mon Sep 26 13:44:40 2011 +0300 +++ b/src/yadex.cc Mon Sep 26 13:45:30 2011 +0300 @@ -568,6 +568,56 @@ } +void PrintHelp() +{ + printf("? | h | help --" + " display this text\n"); + printf("b[uild] <WadFile> --" + " build a new iwad\n"); + printf("c[reate] <levelname> --" + " create and edit a new (empty) level\n"); + printf("d[ump] <DirEntry> [outfile] --" + " dump a directory entry in hex\n"); + printf("e[dit] <levelname> --" + " edit a game level saving results to\n"); + printf + (" a patch wad file\n"); + printf("g[roup] <WadFile> --" + " group all patch wads in a file\n"); + printf("i[nsert] <RawFile> <DirEntry> --" + " insert a raw file in a patch wad file\n"); + printf("l[ist] <WadFile> [outfile] --" + " list the directory of a wadfile\n"); + printf("m[aster] [outfile] --" + " list the master directory\n"); + printf("make_gimp_palette <outfile> --" + " generate a gimp palette file from\n" + " " + " entry 0 of lump PLAYPAL.\n"); + printf("make_palette_ppm <outfile> --" + " generate a palette image from\n" + " " + " entry 0 of lump PLAYPAL.\n"); + printf("q[uit] --" " quit\n"); + printf("r[ead] <WadFile> --" + " read a new wad patch file\n"); + printf("s[ave] <DirEntry> <WadFile> --" + " save one object to a separate file\n"); + printf("set --" + " list all options and their values\n"); + printf("v[iew] [<spritename>] --" + " display the sprites\n"); + printf("viewflat [<flatname>] --" " flat viewer\n"); + printf("viewpal --" + " palette viewer\n"); + printf("viewpat [<patchname>] --" " patch viewer\n"); + printf("viewtex [<texname>] --" + " texture viewer\n"); + printf("w[ads] --" + " display the open wads\n"); + printf("x[tract] <DirEntry> <RawFile> --" + " save (extract) one object to a raw file\n"); +} /* the main program menu loop @@ -613,53 +663,7 @@ else if (strcmp(com, "?") == 0 || strcmp(com, "h") == 0 || strcmp(com, "help") == 0) { - printf("? | h | help --" - " display this text\n"); - printf("b[uild] <WadFile> --" - " build a new iwad\n"); - printf("c[reate] <levelname> --" - " create and edit a new (empty) level\n"); - printf("d[ump] <DirEntry> [outfile] --" - " dump a directory entry in hex\n"); - printf("e[dit] <levelname> --" - " edit a game level saving results to\n"); - printf - (" a patch wad file\n"); - printf("g[roup] <WadFile> --" - " group all patch wads in a file\n"); - printf("i[nsert] <RawFile> <DirEntry> --" - " insert a raw file in a patch wad file\n"); - printf("l[ist] <WadFile> [outfile] --" - " list the directory of a wadfile\n"); - printf("m[aster] [outfile] --" - " list the master directory\n"); - printf("make_gimp_palette <outfile> --" - " generate a gimp palette file from\n" - " " - " entry 0 of lump PLAYPAL.\n"); - printf("make_palette_ppm <outfile> --" - " generate a palette image from\n" - " " - " entry 0 of lump PLAYPAL.\n"); - printf("q[uit] --" " quit\n"); - printf("r[ead] <WadFile> --" - " read a new wad patch file\n"); - printf("s[ave] <DirEntry> <WadFile> --" - " save one object to a separate file\n"); - printf("set --" - " list all options and their values\n"); - printf("v[iew] [<spritename>] --" - " display the sprites\n"); - printf("viewflat [<flatname>] --" " flat viewer\n"); - printf("viewpal --" - " palette viewer\n"); - printf("viewpat [<patchname>] --" " patch viewer\n"); - printf("viewtex [<texname>] --" - " texture viewer\n"); - printf("w[ads] --" - " display the open wads\n"); - printf("x[tract] <DirEntry> <RawFile> --" - " save (extract) one object to a raw file\n"); + PrintHelp(); } /* user asked for list of open wad files */