Changeset 380


Ignore:
Timestamp:
Jul 4, 2009, 5:52:36 AM (11 years ago)
Author:
rossy
Message:

Update to one of Oni's timing functions. It might fix timing on Linux and on buggy Windows machines. It could also break animation and make Oni run slower that usual.

Location:
Daodan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Daodan_Utility.c

    r297 r380  
    77#include "Daodan_Utility.h"
    88#include "BFW_Utility.h"
     9
     10const double fps = 60.0;
    911
    1012void __cdecl DDrStartupMessage(const char* fmt, ...)
     
    2830}
    2931
     32/*
    3033int64_t ONICALL DDrMachineTime_Sixtieths()
    3134{
     
    4447
    4548        return (Time * 3) / 50;
     49}
     50*/
     51
     52int64_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);
    4663}
    4764
Note: See TracChangeset for help on using the changeset viewer.