From 90560462c4842dccc0288eb408f15539acc0ab83 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 30 May 2005 16:15:34 +0000 Subject: First cut at a game timer. Yet another backend function which indicates whether a particular game state should have the timer going (for Mines the initial indeterminate state does not have this property, and neither does a dead or won state); a midend function that optionally (on request from the game) prepends a timer to the front of the status bar text; some complicated midend timing code. It's not great. It's ugly; it's probably slightly inaccurate; it's got no provision for anyone but the game author decreeing whether a game is timed or not. But Mines can't be taken seriously without a timer, so it's a start. [originally from svn r5866] --- twiddle.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'twiddle.c') diff --git a/twiddle.c b/twiddle.c index 6434c64..2523920 100644 --- a/twiddle.c +++ b/twiddle.c @@ -1111,6 +1111,11 @@ static int game_wants_statusbar(void) return TRUE; } +static int game_timing_state(game_state *state) +{ + return TRUE; +} + #ifdef COMBINED #define thegame twiddle #endif @@ -1144,4 +1149,5 @@ const struct game thegame = { game_anim_length, game_flash_length, game_wants_statusbar, + FALSE, game_timing_state, }; -- cgit v1.1