mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix #4096. Max map elements incorrectly sized
Due to a mistake from 2014 the number of map elements that could be used in a park was mistakenly assumed to be the same size as the s6 data for map elements. It turns out there are 256*256 spare elements for whatever reason. When the map element reorginisation code was refactored to remove magic numbers this incorrect value was used instead. This would cause the map element inserter to allocate a map element that shared the same mememory as a sprite. This would cause issues when the sprite tried to update or the map element tried to draw.
This commit is contained in:
@@ -234,7 +234,7 @@ enum {
|
||||
|
||||
#define MAP_MINIMUM_X_Y -256
|
||||
|
||||
#define MAX_MAP_ELEMENTS 196608
|
||||
#define MAX_MAP_ELEMENTS 196096
|
||||
#define MAX_TILE_MAP_ELEMENT_POINTERS (256 * 256)
|
||||
|
||||
#define MAP_ELEMENT_LARGE_TYPE_MASK 0x3FF
|
||||
|
||||
Reference in New Issue
Block a user