forked from tTh/FloatImg
more expicit help
This commit is contained in:
@@ -55,7 +55,11 @@ static void help(int lvl)
|
||||
{
|
||||
Fx *fx;
|
||||
|
||||
puts("--- fimg special effects ---");
|
||||
puts("------ fimg special effects ------");
|
||||
puts("usage:");
|
||||
puts("\tfimgfix [options] <effect> source.fimg resultat.fimg");
|
||||
|
||||
puts("effects:");
|
||||
printf("\t");
|
||||
for (fx=fx_list; fx->name; fx++) {
|
||||
printf("%s ", fx->name);
|
||||
|
||||
@@ -12,6 +12,9 @@ int verbosity;
|
||||
#define T_BLACK 1
|
||||
#define T_DRAND48 2
|
||||
#define T_GRAY 3
|
||||
#define T_HDEG_A 4
|
||||
#define T_VDEG_A 5
|
||||
|
||||
typedef struct {
|
||||
int code;
|
||||
char *name;
|
||||
@@ -21,7 +24,11 @@ Type types[] = {
|
||||
{ T_BLACK, "black" },
|
||||
{ T_DRAND48, "drand48" },
|
||||
{ T_GRAY, "gray" },
|
||||
{ T_GRAY, "grey" }
|
||||
{ T_GRAY, "grey" },
|
||||
{ T_HDEG_A, "hdeg" },
|
||||
{ T_VDEG_A, "vdeg" },
|
||||
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static int get_type(char *name)
|
||||
@@ -35,7 +42,6 @@ fprintf(stderr, ">>> %s ( '%s' )\n", __func__, name);
|
||||
// #define TEST(str) ( ! strcmp(name, str) )
|
||||
|
||||
for (type = types; type->code; type++) {
|
||||
// printf("\t%-15s %d\n", type->name, type->code);
|
||||
if (!strcmp(name, type->name)) {
|
||||
return type->code;
|
||||
}
|
||||
@@ -46,13 +52,16 @@ return -1;
|
||||
/* --------------------------------------------------------------------- */
|
||||
static void help(int lj)
|
||||
{
|
||||
int foo;
|
||||
|
||||
puts("Usage:\tmkfimg [options] quux.fimg width height");
|
||||
|
||||
puts("\t-k N.N\tgive a float parameter");
|
||||
puts("\t-t bla\t\thowto make the pic");
|
||||
puts("\t\t\tblack, drand48...");
|
||||
puts("\t-v\tincrease verbosity");
|
||||
fputs("\t-t bla\thowto make the pic\n\t\t", stdout);
|
||||
for (foo=0; types[foo].code; foo++) {
|
||||
printf("%s ", types[foo].name);
|
||||
}
|
||||
puts("\n\t-v\tincrease verbosity");
|
||||
|
||||
if (verbosity) fimg_print_version(1);
|
||||
|
||||
@@ -114,6 +123,8 @@ switch(type) {
|
||||
case T_DRAND48: fimg_drand48(&fimg, fvalue); break;
|
||||
case T_GRAY: fimg_rgb_constant(&fimg, fvalue, fvalue, fvalue);
|
||||
break;
|
||||
case T_HDEG_A: fimg_hdeg_a(&fimg, 1.0); break;
|
||||
case T_VDEG_A: fimg_vdeg_a(&fimg, 1.0); break;
|
||||
}
|
||||
|
||||
foo = fimg_dump_to_file(&fimg, fname, 0);
|
||||
|
||||
Reference in New Issue
Block a user