diff --git a/src/rct2.h b/src/rct2.h index b95864f69c..f5b765b206 100644 --- a/src/rct2.h +++ b/src/rct2.h @@ -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) diff --git a/src/ride.h b/src/ride.h index 157cd72baf..5c1101e310 100644 --- a/src/ride.h +++ b/src/ride.h @@ -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.