mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add an assert for getting proper mapElementType
This commit is contained in:
parent
de52321026
commit
79e5bb758d
|
@ -1546,9 +1546,10 @@ static uint16 map_window_get_pixel_colour_peep(int x, int y)
|
||||||
colour = 10 | (colour & 0xFF00);
|
colour = 10 | (colour & 0xFF00);
|
||||||
|
|
||||||
while (!map_element_is_last_for_tile(mapElement++)) {
|
while (!map_element_is_last_for_tile(mapElement++)) {
|
||||||
int mapElementType = map_element_get_type(mapElement);
|
int mapElementType = map_element_get_type(mapElement) >> 2;
|
||||||
colour &= ElementTypeMaskColour[mapElementType >> 2];
|
assert(mapElementType < countof(ElementTypeMaskColour));
|
||||||
colour |= ElementTypeAddColour[mapElementType >> 2];
|
colour &= ElementTypeMaskColour[mapElementType];
|
||||||
|
colour |= ElementTypeAddColour[mapElementType];
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
|
|
Loading…
Reference in New Issue