X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FTickCountObject.c;h=9c8ba48adc3141b9d41ee2691d5fbde0bf900c6a;hb=8d3d7d213a9691455a49544624bf380e85f43461;hp=ed9c50efb15c70216226a7c821470f357073977f;hpb=b15916f3e0650dc610705ea662bfbcd25099cce8;p=rocksndiamonds.git diff --git a/src/game_sp/TickCountObject.c b/src/game_sp/TickCountObject.c index ed9c50ef..9c8ba48a 100644 --- a/src/game_sp/TickCountObject.c +++ b/src/game_sp/TickCountObject.c @@ -20,8 +20,8 @@ // static boolean VB_Exposed = False; // --- Option Explicit -#define LongMin (-(double)2147483648) // the "#" sign is a bug of the VB environment AutoFormat function but causes no real problems; don't worry 'bout it! -#define LongMax (2147483647) +#define LongMin (-(double)2147483648UL) // the "#" sign is a bug of the VB environment AutoFormat function but causes no real problems; don't worry 'bout it! +#define LongMax (2147483647UL) long GetTickCount(); long QueryPerformanceCounter(currency lpPerformanceCount); @@ -60,14 +60,14 @@ void TickCountObject_DelayMS(long MSInterval, boolean DoEventsFlag) // in ms { currency Start; - Start = TickNow(); + Start = TickCountObject_Get_TickNow(); DelayLoopActive = True; do { if (DoEventsFlag) DoEvents(); - if (MSInterval <= TickDiffMS(Start) && ! MPause) + if (MSInterval <= TickCountObject_TickDiffMS(Start) && ! MPause) break; } while (1); @@ -130,7 +130,7 @@ long TickCountObject_TickDiffS(currency TickStart) TickDiffS = NewTick - TickStart; } - TickDiffS = Int(TickDiffS / 1000); + TickDiffS = (int)(TickDiffS / 1000); } return TickDiffS;