mirror of https://github.com/OpenRCT2/OpenRCT2.git
Document RIDE_RATING macro
This commit is contained in:
parent
b40d92f359
commit
1df8b061d8
|
@ -64,7 +64,7 @@ typedef unsigned long long uint64;
|
|||
#define OPENRCT2_PLATFORM "Windows"
|
||||
#define OPENRCT2_TIMESTAMP __DATE__ " " __TIME__
|
||||
|
||||
// Represent fixed point numbers
|
||||
// Represent fixed point numbers. dp = decimal point
|
||||
typedef sint16 fixed16_1dp;
|
||||
typedef sint16 fixed16_2dp;
|
||||
typedef sint32 fixed32_1dp;
|
||||
|
@ -74,7 +74,8 @@ typedef sint32 fixed32_2dp;
|
|||
typedef fixed16_1dp money16;
|
||||
typedef fixed32_1dp money32;
|
||||
|
||||
// Construct a fixed point number.
|
||||
// Construct a fixed point number. For example, to create the value 3.65 you
|
||||
// would write FIXED_2DP(3,65)
|
||||
#define FIXED_XDP(x, whole, fraction) ((whole) * (10 * x) + (fraction))
|
||||
#define FIXED_1DP(whole, fraction) FIXED_XDP(1, whole, fraction)
|
||||
#define FIXED_2DP(whole, fraction) FIXED_XDP(2, whole, fraction)
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
typedef fixed16_2dp ride_rating;
|
||||
|
||||
// Convenience function for writing ride ratings. The result is a 16 bit signed
|
||||
// integer. To create the ride rating 3.65 type RIDE_RATING(3,65)
|
||||
#define RIDE_RATING(whole, fraction) FIXED_2DP(whole, fraction)
|
||||
|
||||
// Used for return values, for functions that modify all three.
|
||||
|
|
Loading…
Reference in New Issue