Added -v and -h option and changed -flip to -mirror.
authorFlorian Schulze <crow@icculus.org>
Sun, 9 Jun 2002 18:56:22 +0000 (18:56 +0000)
committerFlorian Schulze <crow@icculus.org>
Sun, 9 Jun 2002 18:56:22 +0000 (18:56 +0000)
globals.h
main.c
menu.c

index 3027903..573f1bc 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -65,6 +65,8 @@
 # endif
 #endif
 
+#define JB_VERSION "1.2"
+
 #define JNB_WIDTH 400
 #define JNB_HEIGHT 256
 extern int screen_width;
diff --git a/main.c b/main.c
index 8a69764..0c47426 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1886,7 +1886,7 @@ int init_program(int argc, char *argv[], char *pal)
 #endif
                        else if (stricmp(argv[c1], "-scaleup") == 0)
                                set_scaling(1);
-                       else if (stricmp(argv[c1], "-flip") == 0)
+                       else if (stricmp(argv[c1], "-mirror") == 0)
                                flip = 1;
                        else if (stricmp(argv[c1], "-dat") == 0) {
                                if (c1 < (argc - 1)) {
@@ -1903,6 +1903,28 @@ int init_program(int argc, char *argv[], char *pal)
                                                force3 = 1;
                                }
                        }
+                       else if (strstr(argv[1],"-v")) {
+                               printf("jumpnbump %s compiled %s at %s with",JB_VERSION,__DATE__,__TIME__);
+#ifndef _SDLnet_h
+                               printf("out");
+#endif
+                               printf(" network support.\n");
+                               return 1;
+                       }
+                       else if (strstr(argv[1],"-h")) {
+                               printf("Usage: jumpnbump [OPTION]...\n");
+                               printf("\n");
+                               printf("  -dat level.dat           play a different level\n");
+                               printf("  -port port               define listen port\n");
+                               printf("  -net player host rport   define network players\n");
+                               printf("  -fireworks               screensaver mode\n");
+                               printf("  -fullscreen              run in fullscreen mode\n");
+                               printf("  -nosound                 play without sound\n");
+                               printf("  -nogore                  play without blood\n");
+                               printf("  -mirror                  play with mirrored level\n");
+                               printf("\n");
+                               return 1;
+                       }
                }
        }
 
diff --git a/menu.c b/menu.c
index f969ed9..948cde1 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -35,7 +35,7 @@ char menu_pal[768];
 char menu_cur_pal[768];
 
 char *message[] = {
-       "Jump 'n Bump 1.2",
+       "Jump 'n Bump "JB_VERSION,
        "by Brainchild Design in 1998.",
        "Code by Mattias Brynervall.",
        "Graphics by Martin Magnusson",