static */
| 269 | } |
| 270 | |
| 271 | /* static */ ScriptStoryPage::StoryPageButtonFormatting ScriptStoryPage::MakeVehicleButtonReference(StoryPageButtonColour colour, StoryPageButtonFlags flags, StoryPageButtonCursor cursor, ScriptVehicle::VehicleType vehtype) |
| 272 | { |
| 273 | EnforcePrecondition(UINT32_MAX, IsValidStoryPageButtonColour(colour)); |
| 274 | EnforcePrecondition(UINT32_MAX, IsValidStoryPageButtonFlags(flags)); |
| 275 | EnforcePrecondition(UINT32_MAX, IsValidStoryPageButtonCursor(cursor)); |
| 276 | EnforcePrecondition(UINT32_MAX, vehtype == ScriptVehicle::VT_INVALID || vehtype == ScriptVehicle::VT_RAIL || vehtype == ScriptVehicle::VT_ROAD || vehtype == ScriptVehicle::VT_WATER || vehtype == ScriptVehicle::VT_AIR); |
| 277 | |
| 278 | StoryPageButtonData data; |
| 279 | data.SetColour((::Colours)colour); |
| 280 | data.SetFlags((::StoryPageButtonFlags)flags); |
| 281 | data.SetCursor((::StoryPageButtonCursor)cursor); |
| 282 | data.SetVehicleType((::VehicleType)vehtype); |
| 283 | if (!data.ValidateColour()) return UINT32_MAX; |
| 284 | if (!data.ValidateFlags()) return UINT32_MAX; |
| 285 | if (!data.ValidateCursor()) return UINT32_MAX; |
| 286 | if (!data.ValidateVehicleType()) return UINT32_MAX; |
| 287 | return data.referenced_id; |
| 288 | } |
nothing calls this directly
no test coverage detected