Ability to emulate floating point calculations makes sense only if we
intend to support platforms without native floating point support. Such
platforms haven't been relevant since mid-1990s or so. Besides, supporting
such platforms would require converting the entire codebase to use the
tfloat class instead of native float and double types, which would be
outright Herculean effort.
As a bonus, killing floating_point_emulation.cpp also eliminates two uses
of boost::enable_if_c.
I also removed the nonexistent file SDL_SavePNG/savepng.hpp from the
Visual Studio project, and added #include <string> to
formula/debugger_fwd.hpp because the build failed otherwise
(maybe compilation order changed when I removed
floating_point_emulation.hpp?).
This removes all the custom reference counting code from the
formula variant class, and also removes the WFL refcount() function.
The reference counting base class is also removed, since it is no longer used.
This constitutes drop-in replacements for:
* boost::shared_ptr
* boost::scoped_ptr
* boost::weak_ptr
* boost::enable_shared_from_this
* boost::static_pointer_cast
* boost::dynamic_pointer_cast
This excludes boost::intrusive_ptr, except for stray includes. Refactoring that is more complicated.
The destructor of the context class accidentally incremented the iterator
twice per iteration. If the number of event handlers was odd, the
destructor ended up incrementing the end iterator, which is UB.
I rewrote the whole destructor. It's unnecessary to manually remove event
handlers from the list because the list will do it automatically when it's
destroyed.
This changes the behaviour of victory event so that they are now also fored when there is at least one human that is victorious, for sp and for coop mp scenarios the conditions when victory is fired is the same as before, in non-coop mp games the victory event will now also be fired whenever there is any human side that wins, since such scenarios usually don't use victory events this is not tha much of an issue. For those cases i added the 'local_victory' event (maybe if people want to print congratulation messages in their mp maps or similar)
The reason for this change is that now, since victory events fire on all client the same ,way we can mark them as synced, this specially fixes issues with invalid unit ids of units created suring victory events in sp.