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.
The light effects mod branch #3798 by @JeroenDStout has become quite out of date. I plan to properly implement it, but first I want to merge in what we have already, so that I can branch off develop again and rebase (currently rebasing this branch is too difficult, far too many commits).
Most code that this is merging is protected by the __ENABLE_LIGHTFX__ directive, so it should not make any difference until its time to enable it via a new pull request.
I have isolated it as much as possible to lightfx.c.
The heuristic search currently only inludes detection of loops in the current search path - i.e. from where the peep is now.
The peep->pathfind_history includes (limited) junctions that the peep has already passed through for the current search goal to get to their current location. Consider search paths through these junctions as loops as well.
This will prevent peeps getting stuck in some path layouts where looping back through a junction they already walked through and then proceeding via an alternative path (such that there is no loop in the current search path) hits the search limits on a continuing path that is closer to the goal than simply continuing on along the path which then turns (temporarily) away from the goal.
This prevents _some_ cases of alternate, longer routes to nearer tiles being returned as a better result than a route that goes through that same tile (with less steps) and then continues on to end overall further from the goal though closer to getting to the goal (as was previously documented in PR #4527).
The network version is incremented in this PR.
Fixes#4572: Don't create .sv6 autosaves in track designs manager, roller coaster designer and scenario editor
Fixes#4573: "Save this before quitting?" in scenario editor saves to .sv6, not .sc6
Windows subsystem does not work like console subsystem which makes it almost impossible to obtain `stdout` until the application has finished. This adds a `--console` switch to make the game either attach to an existing console or show a new one and redirect the C streams to it.