Changeset 276 for Daodan


Ignore:
Timestamp:
Mar 18, 2009, 8:48:30 AM (16 years ago)
Author:
rossy
Message:

DDrMachineTime_Sixtieths

Location:
Daodan
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/BFW_Utility.h

    r275 r276  
    1010int64_t ONICALL UUrMachineTime_High();
    1111double  ONICALL UUrMachineTime_High_Frequency();
     12int64_t ONICALL UUrMachineTime_Sixtieths();
    1213
    1314extern FILE* ONgFileStartup;
  • Daodan/src/Daodan.c

    r275 r276  
    4343       
    4444        // Hackish fix for Konoko not kicking guns
    45         const char kickgun_patch[] = { 0x00, 0x05, 0x00, 0x00, 0x00, 0xC7, 0x05, 0x1C, 0xC9, 0x5E, 0x00, 0x70, 0xB8, 0x43, 0x00, 0xC7, 0x05, 0x20, 0xC9, 0x5E, 0x00, 0x20, 0xBE, 0x43 };
    46         DDrPatch_Const (OniExe + 0x000dc420, kickgun_patch);
     45//      const char kickgun_patch[] = { 0x00, 0x05, 0x00, 0x00, 0x00, 0xC7, 0x05, 0x1C, 0xC9, 0x5E, 0x00, 0x70, 0xB8, 0x43, 0x00, 0xC7, 0x05, 0x20, 0xC9, 0x5E, 0x00, 0x20, 0xBE, 0x43 };
     46//      DDrPatch_Const (OniExe + 0x000dc420, kickgun_patch);
    4747       
    4848        // Cooldown timer exploit fix ^_^
     
    6666        DDrPatch_MakeJump(UUrMachineTime_High, DDrMachineTime_High);
    6767        DDrPatch_MakeJump(UUrMachineTime_High_Frequency, DDrMachineTime_High_Frequency);
     68        DDrPatch_MakeJump(UUrMachineTime_Sixtieths, DDrMachineTime_Sixtieths);
    6869       
    6970        ONiMain(argc, argv);
  • Daodan/src/Daodan_Utility.c

    r275 r276  
    2828}
    2929
     30int64_t DDrMachineTime_Sixtieths()
     31{
     32        static int64_t LastTime, Time;
     33        int64_t Current;
     34
     35        Current = LastTime + GetTickCount();
     36
     37        if (Current > Time)
     38        {
     39                LastTime += 1;
     40                Current += 1;
     41        }
     42
     43        Time = Current;
     44
     45        return (Time * 3) / 50;
     46}
     47
    3048int64_t DDrMachineTime_High()
    3149{
  • Daodan/src/Daodan_Utility.h

    r275 r276  
    99int64_t ONICALL DDrMachineTime_High();
    1010double  ONICALL DDrMachineTime_High_Frequency();
     11int64_t ONICALL DDrMachineTime_Sixtieths();
    1112
    1213#endif
  • Daodan/src/Oni_Symbols.S

    r275 r276  
    1717symbol ( @UUrMachineTime_High@0           , 0x00026480 )
    1818symbol ( @UUrMachineTime_High_Frequency@0 , 0x000264b0 )
     19symbol ( @UUrMachineTime_Sixtieths@0      , 0x000263e0 )
    1920symbol ( _ONgFileStartup                  , 0x001711b8 )
Note: See TracChangeset for help on using the changeset viewer.