From 1d51dce70b4ec2928a9c8ecf9722962c223459f7 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Mon, 3 Apr 2006 17:32:46 +0000 Subject: [PATCH] Clean up the (incorrect) #ifdef spaghetti for the timer. We now have a user timer on the ipods, so we use it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9461 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/i_system.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/plugins/doom/i_system.c b/apps/plugins/doom/i_system.c index ffed416109..b3c61a2d29 100644 --- a/apps/plugins/doom/i_system.c +++ b/apps/plugins/doom/i_system.c @@ -16,7 +16,10 @@ // GNU General Public License for more details. // // $Log$ -// Revision 1.5 2006/04/03 17:11:42 kkurbjun +// Revision 1.6 2006/04/03 17:32:46 dave +// Clean up the (incorrect) #ifdef spaghetti for the timer. We now have a user timer on the ipods, so we use it. +// +// Revision 1.5 2006-04-03 17:11:42 kkurbjun // Finishing touches // // Revision 1.4 2006-04-03 17:00:56 dave @@ -56,7 +59,7 @@ // I_GetTime // returns time in 1/35th second tics // -#if (CONFIG_CPU != PP5020) && !defined(HAVE_LCD_COLOR) +#if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) volatile unsigned int doomtimer=0; void doomtime(void) @@ -67,18 +70,14 @@ void doomtime(void) int I_GetTime (void) { -#if defined(SIMULATOR) || !defined (HAVE_LCD_COLOR) +#if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) + return doomtimer; +#else #if HZ==100 return ((7*(*rb->current_tick))/20); #else #error FIX - I assumed HZ was 100 #endif -#else -#if (CONFIG_CPU == PP5020) - return (USEC_TIMER * 7)/200000; -#else - return doomtimer; -#endif #endif } @@ -92,7 +91,7 @@ int I_GetTime (void) // The game is much slower now (in terms of game speed). void I_Init (void) { -#if (CONFIG_CPU != PP5020) && !defined(SIMULATOR) && defined(HAVE_LCD_COLOR) +#if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, 1, doomtime); #endif I_InitSound();