GRF: Initial support for > 255 road stop specs per GRF

Add new variable for road stop info of nearby tiles
Bump roadstops version
This commit is contained in:
Jonathan G Rennison
2023-02-12 12:14:48 +00:00
parent cfbd6406e1
commit dceafaf2db
16 changed files with 133 additions and 53 deletions

View File

@@ -20,7 +20,7 @@
#include "road.h"
/** The maximum amount of roadstops a single GRF is allowed to add */
static const int NUM_ROADSTOPS_PER_GRF = 255;
static const int NUM_ROADSTOPS_PER_GRF = 64000;
enum RoadStopClassID : byte {
ROADSTOP_CLASS_BEGIN = 0, ///< The lowest valid value
@@ -98,6 +98,9 @@ struct RoadStopScopeResolver : public ScopeResolver {
uint32 GetTriggers() const override;
uint32 GetVariable(uint16 variable, uint32 parameter, GetVariableExtra *extra) const override;
private:
uint32 GetNearbyRoadStopsInfo(uint32 parameter, bool v2) const;
};
/** Road stop resolver. */