JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
added constant GAMESPEED
authorJoshua Grams <josh@qualdan.com>
Thu, 7 Apr 2005 13:42:22 +0000 (13:42 +0000)
committerJoshua Grams <josh@qualdan.com>
Thu, 7 Apr 2005 13:42:22 +0000 (13:42 +0000)
config.h
main.c

index 9e2fd94..16ea5fe 100644 (file)
--- a/config.h
+++ b/config.h
@@ -6,6 +6,11 @@
 #define VERSION "0.1"
 #define DATA_PREFIX "/usr/share/vor"
 
+// Speed of the game.  New players may like to try 3/4 or 2/3 speed.
+#define GAMESPEED 1.00
+// #define GAMESPEED (3.0/4.0)
+// #define GAMESPEED (2.0/3.0)
+
 // screen size
 #define XSIZE 640
 #define YSIZE 480
diff --git a/main.c b/main.c
index f2c4114..5341e28 100644 (file)
--- a/main.c
+++ b/main.c
@@ -745,7 +745,7 @@ draw() {
                movementrate = 0;
        }
        else {
-               movementrate = ticks_since_last/50.0;
+               movementrate = GAMESPEED*ticks_since_last/50.0;
                if(state == GAMEPLAY) {
                        score += ticks_since_last;
                }