From 02e136520e15a04e3d88545adb9a26c77c2433a2 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 13 Jul 2013 16:56:08 +0100 Subject: [PATCH] [Add] -G option to force regeneration of nebulae. --- src/conf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conf.c b/src/conf.c index eb7148c..7ed56b9 100644 --- a/src/conf.c +++ b/src/conf.c @@ -12,6 +12,7 @@ #include "opengl.h" #include "input.h" #include "music.h" +#include "nebulae.h" #include "conf.h" #define conf_loadInt(n,i) \ @@ -70,6 +71,7 @@ static void print_usage(char** argv) { LOG(" -S, --Sound - Forces sound."); LOG(" -m f --mvol f - Set the music volume to f"); LOG(" -s f --svol f - Set the sound volume to f"); + LOG(" -G - Regenerates the nebulae (slow)"); LOG(" -h --help - Display this message and exit."); LOG(" -v - Print the version and exit"); } @@ -224,8 +226,9 @@ void conf_parseCLI(int argc, char** argv) { int option_index = 0; int c = 0; - while((c = getopt_long(argc, argv, "fF:d:j:J:W:H:MSm:s:hv", - long_options, &option_index)) != -1) { + while((c = getopt_long(argc, argv, + "fF:d:j:J:W:H:MSm:s:Ghv", + long_options, &option_index)) != -1) { switch(c) { case 'f': gl_screen.flags |= OPENGL_FULLSCREEN; @@ -260,6 +263,9 @@ void conf_parseCLI(int argc, char** argv) { case 's': sound_volume(atof(optarg)); break; + case 'G': + nebu_generate(SCREEN_W, SCREEN_H); + break; case 'v': /* By now it has already displayed the version. */ /*LOG(APPNAME": version %d.%d.%d", VMAJOR, VMINOR, VREV); */