JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
made cursor blink when entering a high score
authorJason Woofenden <jason283@herkamire.com>
Sat, 31 Jan 2009 03:56:39 +0000 (22:56 -0500)
committerJason Woofenden <jason283@herkamire.com>
Sat, 31 Jan 2009 03:56:39 +0000 (22:56 -0500)
config.h
score.c
todo

index 91b8c3b..203c5ca 100644 (file)
--- a/config.h
+++ b/config.h
@@ -57,4 +57,7 @@
 
 #define MAX_PATH_LEN 1024
 
+// number of milliseconds the blinky cursor stays visible/invisible
+#define CURSOR_BLINK_TIME 300
+
 #endif // VOR_CONFIG_H
diff --git a/score.c b/score.c
index b9c666e..07c52a5 100644 (file)
--- a/score.c
+++ b/score.c
@@ -161,6 +161,8 @@ display_scores(uint32_t x, uint32_t y)
 {
        char t[1024];
        int i,h = font_height();
+       int display_cursor = (SDL_GetTicks() / CURSOR_BLINK_TIME) % 2;
+
 
        font_write(x+30, y, "High scores");
        y += h;
@@ -172,7 +174,7 @@ display_scores(uint32_t x, uint32_t y)
                font_write(x, y, t);
                snprintscore(t, 1024, g_scores[g_easy][i].score);
                font_write(x+50, y, t);
-               if(i == cur_score) snprintf(t, 1024, "%s_", g_scores[g_easy][i].name);
+               if(display_cursor && i == cur_score) snprintf(t, 1024, "%s_", g_scores[g_easy][i].name);
                else snprintf(t, 1024, "%s", g_scores[g_easy][i].name);
                font_write(x+180, y, t);
        }
diff --git a/todo b/todo
index 61fac3b..b43d2cd 100644 (file)
--- a/todo
+++ b/todo
@@ -1,5 +1,3 @@
-****   Finish porting to Windows (should be only file.c and args.c, I think)
-
 ***    Move game logic into a script so we can have "variations".
 *      Then an in-game menu to choose which game:
        Rock Dodger
@@ -9,10 +7,10 @@
        Tag
        Deathmatch
 
-**     Switch to a scalable font and all ray-traced graphics
+**     Switch all ray-traced graphics (only big green messages left)
 *      Then we can run at the native screen size
 
-*      BUG: Rocks can be created touching, causing a high-velocity bounce.
+*      fix rock generation code so they are never created overlapping
 
 *      Deltas on high score display?