diff options
author | Dave Chapman <dave@dchapman.com> | 2006-04-03 17:32:46 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2006-04-03 17:32:46 +0000 |
commit | 1d51dce70b4ec2928a9c8ecf9722962c223459f7 (patch) | |
tree | 978cddcab3ede80eb925ff1b301a666673eae2b7 /apps/plugins/doom | |
parent | 6e3371110e6606b38b79ea96d73c487c00659e27 (diff) | |
download | rockbox-1d51dce70b4ec2928a9c8ecf9722962c223459f7.tar.gz rockbox-1d51dce70b4ec2928a9c8ecf9722962c223459f7.zip |
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
Diffstat (limited to 'apps/plugins/doom')
-rw-r--r-- | apps/plugins/doom/i_system.c | 19 |
1 files 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 @@ | |||
16 | // GNU General Public License for more details. | 16 | // GNU General Public License for more details. |
17 | // | 17 | // |
18 | // $Log$ | 18 | // $Log$ |
19 | // Revision 1.5 2006/04/03 17:11:42 kkurbjun | 19 | // Revision 1.6 2006/04/03 17:32:46 dave |
20 | // Clean up the (incorrect) #ifdef spaghetti for the timer. We now have a user timer on the ipods, so we use it. | ||
21 | // | ||
22 | // Revision 1.5 2006-04-03 17:11:42 kkurbjun | ||
20 | // Finishing touches | 23 | // Finishing touches |
21 | // | 24 | // |
22 | // Revision 1.4 2006-04-03 17:00:56 dave | 25 | // Revision 1.4 2006-04-03 17:00:56 dave |
@@ -56,7 +59,7 @@ | |||
56 | // I_GetTime | 59 | // I_GetTime |
57 | // returns time in 1/35th second tics | 60 | // returns time in 1/35th second tics |
58 | // | 61 | // |
59 | #if (CONFIG_CPU != PP5020) && !defined(HAVE_LCD_COLOR) | 62 | #if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) |
60 | volatile unsigned int doomtimer=0; | 63 | volatile unsigned int doomtimer=0; |
61 | 64 | ||
62 | void doomtime(void) | 65 | void doomtime(void) |
@@ -67,18 +70,14 @@ void doomtime(void) | |||
67 | 70 | ||
68 | int I_GetTime (void) | 71 | int I_GetTime (void) |
69 | { | 72 | { |
70 | #if defined(SIMULATOR) || !defined (HAVE_LCD_COLOR) | 73 | #if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) |
74 | return doomtimer; | ||
75 | #else | ||
71 | #if HZ==100 | 76 | #if HZ==100 |
72 | return ((7*(*rb->current_tick))/20); | 77 | return ((7*(*rb->current_tick))/20); |
73 | #else | 78 | #else |
74 | #error FIX - I assumed HZ was 100 | 79 | #error FIX - I assumed HZ was 100 |
75 | #endif | 80 | #endif |
76 | #else | ||
77 | #if (CONFIG_CPU == PP5020) | ||
78 | return (USEC_TIMER * 7)/200000; | ||
79 | #else | ||
80 | return doomtimer; | ||
81 | #endif | ||
82 | #endif | 81 | #endif |
83 | } | 82 | } |
84 | 83 | ||
@@ -92,7 +91,7 @@ int I_GetTime (void) | |||
92 | // The game is much slower now (in terms of game speed). | 91 | // The game is much slower now (in terms of game speed). |
93 | void I_Init (void) | 92 | void I_Init (void) |
94 | { | 93 | { |
95 | #if (CONFIG_CPU != PP5020) && !defined(SIMULATOR) && defined(HAVE_LCD_COLOR) | 94 | #if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) |
96 | rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, 1, doomtime); | 95 | rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, 1, doomtime); |
97 | #endif | 96 | #endif |
98 | I_InitSound(); | 97 | I_InitSound(); |