ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Utility.c
(Generate patch)

Comparing Daodan/src/Daodan_Utility.c (file contents):
Revision 379 by rossy, Fri Apr 17 13:31:04 2009 UTC vs.
Revision 380 by rossy, Sat Jul 4 03:52:36 2009 UTC

# Line 7 | Line 7
7   #include "Daodan_Utility.h"
8   #include "BFW_Utility.h"
9  
10 + const double fps = 60.0;
11 +
12   void __cdecl DDrStartupMessage(const char* fmt, ...)
13   {
14          va_list ap;
# Line 27 | Line 29 | void __cdecl DDrStartupMessage(const cha
29          return;
30   }
31  
32 + /*
33   int64_t ONICALL DDrMachineTime_Sixtieths()
34   {
35          static int64_t LastTime, Time;
# Line 44 | Line 47 | int64_t ONICALL DDrMachineTime_Sixtieths
47  
48          return (Time * 3) / 50;
49   }
50 + */
51 +
52 + int64_t ONICALL DDrMachineTime_Sixtieths()
53 + {
54 +        static uint32_t startticks = 0;
55 +        double ticks = 0;
56 +        
57 +        if (startticks)
58 +                ticks = GetTickCount() - startticks;
59 +        else
60 +                startticks = GetTickCount();
61 +        
62 +        return (int64_t)(ticks / 1000.0 * fps);
63 + }
64  
65   int64_t ONICALL DDrMachineTime_High()
66   {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)