Codechange: Add GetParamMaxDigits/Value() functions.

Similar to SetDParamMaxDigits/Value(), except the value is returned instead of being set into a parameter.
This commit is contained in:
Peter Nelson
2025-02-21 23:38:33 +00:00
committed by Peter Nelson
parent 4c99b5b368
commit 04a16a6b68
2 changed files with 43 additions and 16 deletions

View File

@@ -80,6 +80,9 @@ inline int64_t PackVelocity(uint speed, VehicleType type)
return speed | (static_cast<uint64_t>(type) << 56);
}
uint64_t GetParamMaxValue(uint64_t max_value, uint min_count = 0, FontSize size = FS_NORMAL);
uint64_t GetParamMaxDigits(uint count, FontSize size = FS_NORMAL);
void SetDParam(size_t n, uint64_t v);
void SetDParamMaxValue(size_t n, uint64_t max_value, uint min_count = 0, FontSize size = FS_NORMAL);
void SetDParamMaxDigits(size_t n, uint count, FontSize size = FS_NORMAL);