This commit fixes the game command set_land_ownership missing a land
rights recount call. This would cause problems when the user changes
land ownership with the sandbox mode tools.
Issue is being caused by deleting the station track without removing the station track entry in the ride struct. This will prevent the crash but this should not happen in practice.
Issue caused by switching between tabs when half way through tab animation. The frame number would not be reset until the next frame and this would cause a split second glitch when moving from a long animation tab to a short animation tab. Issue fixed by reseting the frame number when switching tabs.
The bins were incorrectly displaying their filled status on some
rotations. This was caused by two mistakes. The first mistake was only
rotating the status by 1 place when it was 2 bit the second was due to
rotating it the wrong direction. This was likely caused by the implementor
not realising that there were two 'rol' commands but due to the inverted
nature of this it would end up being two 'ror's.
Use Intel-standardized _mm_popcnt_u32 instead of Microsoft-specific
__popcnt, replace assert with openrct2_assert, replace bitcount's argument
with uint32.
This commit changes the land rights button in the park window to be
disabled if there are no more land rights and construction rights for
sale. It also disables the individual land rights and construction
rights buttons in the land rights window itself if that specific type of
tile is no longer for sale.
This is implemented by introducing two new global variables called
gLandRemainingOwnershipSales and gLandRemainingConstructionSales. These
are updated by map_count_remaining_land_rights() to contain the number
of land rights and construction rights that remain for sale. This
function is called when a scenario is loaded and whenever the game
command to buy land rights or construction rights is invoked.
It also introduces three new tooltip strings that explain why the
buttons are disabled.
This now means that building openrct2.sln after openrct2.proj does not trigger a rebuild as the compile options will be the same. They are now only different if the BUILD_SERVER environment variable / msbuild property is set.
In order to avoid the overhead of checking whether the function pointer
to bitcount's actual implementation has been initialised every time
bitcount is called, initialise it at application startup.
Replace the current implementation of bitcount() with a one that uses the
POPCNT instruction available in most newer CPUs. Also, replace the basic
implementation with a one based on a lookup table, which has much better
performance than the old one.