2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
14 // File nearly completely rewritten by dph-man
17 #include <mmsystem.h> // DPH: We use timeGetTime from here...
23 static int Installed = 0;
25 static unsigned long old_tv;
27 fix timer_get_fixed_seconds()
32 //Ye bad olde Windows DPH:-)
33 /* DPH: Using timeGetTime will fail approximately 47 days after Windows was
34 started as the timer wraps around to 0. Ever had Windows not crash for 47
35 consecutive days? Thought not. */
37 unsigned long tv_now=timeGetTime()-old_tv;
38 x=i2f(tv_now/1000) | fixdiv(i2f(tv_now % 1000),i2f(1000));
42 void delay(int d_time)
46 total = (F1_0 * d_time) / 1000;
47 t = timer_get_fixed_seconds();
48 while (timer_get_fixed_seconds() - t < total) ;
63 /* DPH: Using timeGetTime will fail approximately 47 days after Windows was
64 started as the timer wraps around to 0. Ever had Windows not crash for 47
65 consecutive days? Thought not. */
70 // NOTE: This C file has been "neutered" by dph-man. If someone wants to work
71 // on this, feel free. I don't use joystick :-)