Change: Increase object/station/roadstop class limit. (#12094)

The class limit is arbitrary and not stored in game state.

This change prevents all entities in classes after the 255th class from being dumped into the first class.
This commit is contained in:
2024-04-09 23:16:20 +01:00
committed by GitHub
parent df8eeb1b10
commit 1773c5b810
6 changed files with 18 additions and 18 deletions

View File

@@ -45,10 +45,10 @@ static const uint8_t OBJECT_SIZE_1X1 = 0x11; ///< The value of a NewGRF's size p
void ResetObjects();
/** Class IDs for objects. */
enum ObjectClassID : uint8_t {
OBJECT_CLASS_BEGIN = 0, ///< The lowest valid value
OBJECT_CLASS_MAX = 0xFF, ///< Maximum number of classes.
INVALID_OBJECT_CLASS = 0xFF, ///< Class for the less fortunate.
enum ObjectClassID : uint16_t {
OBJECT_CLASS_BEGIN = 0, ///< The lowest valid value
OBJECT_CLASS_MAX = UINT16_MAX, ///< Maximum number of classes.
INVALID_OBJECT_CLASS = UINT16_MAX, ///< Class for the less fortunate.
};
/** Allow incrementing of ObjectClassID variables */
DECLARE_POSTFIX_INCREMENT(ObjectClassID)