# HG changeset patch # User Matti Hamalainen # Date 1317033930 -10800 # Node ID 042b44809e6e010a8cd9cf84bce7c463f5fec2d0 # Parent e6175d0a667b7316cde122c2328c9f53e83d33ed Move help printing to separate function. diff -r e6175d0a667b -r 042b44809e6e src/yadex.cc --- 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] --" + " build a new iwad\n"); + printf("c[reate] --" + " create and edit a new (empty) level\n"); + printf("d[ump] [outfile] --" + " dump a directory entry in hex\n"); + printf("e[dit] --" + " edit a game level saving results to\n"); + printf + (" a patch wad file\n"); + printf("g[roup] --" + " group all patch wads in a file\n"); + printf("i[nsert] --" + " insert a raw file in a patch wad file\n"); + printf("l[ist] [outfile] --" + " list the directory of a wadfile\n"); + printf("m[aster] [outfile] --" + " list the master directory\n"); + printf("make_gimp_palette --" + " generate a gimp palette file from\n" + " " + " entry 0 of lump PLAYPAL.\n"); + printf("make_palette_ppm --" + " generate a palette image from\n" + " " + " entry 0 of lump PLAYPAL.\n"); + printf("q[uit] --" " quit\n"); + printf("r[ead] --" + " read a new wad patch file\n"); + printf("s[ave] --" + " save one object to a separate file\n"); + printf("set --" + " list all options and their values\n"); + printf("v[iew] [] --" + " display the sprites\n"); + printf("viewflat [] --" " flat viewer\n"); + printf("viewpal --" + " palette viewer\n"); + printf("viewpat [] --" " patch viewer\n"); + printf("viewtex [] --" + " texture viewer\n"); + printf("w[ads] --" + " display the open wads\n"); + printf("x[tract] --" + " 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] --" - " build a new iwad\n"); - printf("c[reate] --" - " create and edit a new (empty) level\n"); - printf("d[ump] [outfile] --" - " dump a directory entry in hex\n"); - printf("e[dit] --" - " edit a game level saving results to\n"); - printf - (" a patch wad file\n"); - printf("g[roup] --" - " group all patch wads in a file\n"); - printf("i[nsert] --" - " insert a raw file in a patch wad file\n"); - printf("l[ist] [outfile] --" - " list the directory of a wadfile\n"); - printf("m[aster] [outfile] --" - " list the master directory\n"); - printf("make_gimp_palette --" - " generate a gimp palette file from\n" - " " - " entry 0 of lump PLAYPAL.\n"); - printf("make_palette_ppm --" - " generate a palette image from\n" - " " - " entry 0 of lump PLAYPAL.\n"); - printf("q[uit] --" " quit\n"); - printf("r[ead] --" - " read a new wad patch file\n"); - printf("s[ave] --" - " save one object to a separate file\n"); - printf("set --" - " list all options and their values\n"); - printf("v[iew] [] --" - " display the sprites\n"); - printf("viewflat [] --" " flat viewer\n"); - printf("viewpal --" - " palette viewer\n"); - printf("viewpat [] --" " patch viewer\n"); - printf("viewtex [] --" - " texture viewer\n"); - printf("w[ads] --" - " display the open wads\n"); - printf("x[tract] --" - " save (extract) one object to a raw file\n"); + PrintHelp(); } /* user asked for list of open wad files */