X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPlatform%2FPlatform.hpp;h=4004cef25b75285ab048f4170da6cfa5d2e2616c;hb=6a8cb464330e92163c8feaf101b8b5837c973bba;hp=1610744c8c1ccc4a933a3f44f67733c02d4535d4;hpb=72217fbefd03881048287da8345925e1b89b5b9b;p=lugaru.git diff --git a/Source/Platform/Platform.hpp b/Source/Platform/Platform.hpp index 1610744..4004cef 100644 --- a/Source/Platform/Platform.hpp +++ b/Source/Platform/Platform.hpp @@ -1,6 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games -Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) +Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -28,11 +28,11 @@ along with Lugaru. If not, see . #include #if defined(WIN32) && !defined(strcasecmp) -#define strcasecmp(a,b) stricmp(a,b) +#define strcasecmp(a, b) stricmp(a, b) #endif - -struct Point { +struct Point +{ short v; short h; }; @@ -40,9 +40,10 @@ struct Point { typedef signed char SInt8; typedef unsigned int UInt32; -typedef struct AbsoluteTime { - unsigned long hi; - unsigned long lo; +typedef struct AbsoluteTime +{ + unsigned long hi; + unsigned long lo; } AbsoluteTime; /* Returns time since the app started, not system start. */ @@ -50,27 +51,27 @@ AbsoluteTime UpTime(); typedef long Duration; -enum { +enum +{ durationMicrosecond = -1, durationMillisecond = 1, - durationSecond = 1000, - durationMinute = 1000 * 60, - durationHour = 1000 * 60 * 60, - durationDay = 1000 * 60 * 60 * 24, - durationForever = 0x7FFFFFFF, - durationImmediate = 0, + durationSecond = 1000, + durationMinute = 1000 * 60, + durationHour = 1000 * 60 * 60, + durationDay = 1000 * 60 * 60 * 24, + durationForever = 0x7FFFFFFF, + durationImmediate = 0, }; Duration AbsoluteDeltaToDuration(AbsoluteTime& a, AbsoluteTime& b); - /* Workaround missing math stuff on MSVC * FIXME: Check that it is still necessary nowadays. */ #ifdef _MSC_VER -inline bool isnormal( double x) +inline bool isnormal(double x) { - int ret = _fpclass( x); + int ret = _fpclass(x); return (ret == _FPCLASS_NN || ret == _FPCLASS_PN); }