mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-26 00:45:35 +00:00
Codechange: make VehicleType a scoped enum
This commit is contained in:
committed by
Peter Nelson
parent
b90aefbf49
commit
77403627a8
@@ -609,7 +609,7 @@ uint32_t GetSmallMapOwnerPixels(TileIndex tile, TileType t, IncludeHeightmap inc
|
||||
}
|
||||
|
||||
/** Vehicle colours in #SMT_VEHICLES mode. Indexed by #VehicleType. */
|
||||
static const PixelColour _vehicle_type_colours[6] = {
|
||||
static constexpr VehicleTypeIndexArray<PixelColour, VehicleType::End> _vehicle_type_colours = {
|
||||
PC_RED, PC_YELLOW, PC_LIGHT_BLUE, PC_WHITE, PC_BLACK, PC_RED
|
||||
};
|
||||
|
||||
@@ -953,7 +953,7 @@ protected:
|
||||
void DrawVehicles(const DrawPixelInfo *dpi, Blitter *blitter) const
|
||||
{
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->type == VEH_EFFECT) continue;
|
||||
if (v->type == VehicleType::Effect) continue;
|
||||
if (v->vehstatus.Any({VehState::Hidden, VehState::Unclickable})) continue;
|
||||
|
||||
/* Remap into flat coordinates. */
|
||||
|
||||
Reference in New Issue
Block a user