(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places) Surprisingly this can be done without changing the savegame format
This commit is contained in:
@@ -724,7 +724,7 @@ skip_column:
|
||||
|
||||
// Calculate pointer to pixel and the color
|
||||
ptr = dpi->dst_ptr + y * dpi->pitch + x;
|
||||
color = (type == 1) ? _vehicle_type_colors[v->type-0x10] : 0xF;
|
||||
color = (type == 1) ? _vehicle_type_colors[v->type] : 0xF;
|
||||
|
||||
// And draw either one or two pixels depending on clipping
|
||||
ptr[0] = color;
|
||||
|
Reference in New Issue
Block a user