Several rendering changes have resulted in a non-rendering build that
failed to build from source. Dummy out all of these functions to make it
work again.
Cherry-picked.
Author: Nicolas Hake <isilkor@openclonk.org>
Date: Wed Jun 17 21:30:56 2015 +0200
Conflicts:
src/lib/StdMesh.h
There's no reason to have CMake assemble a version string, then have a
similar (but slightly different) string built by the C preprocessor.
Since CMake already has the values we want, just dump those into the
macros.
Instead of using some arbitrary minor version set to mark pre-release
versions, use C4VERSIONEXTRA, which is already a dedicated marker.
This also complies with semantic versioning.
Version.txt was still adding C4XVER4 to the version string, which was
removed a while ago. This was mostly unproblematic though because
nothing besides the Windows game browser used this string.
ExtractMaterial has been changed to be able to slurp in from the most distant horizontal position rather than the closest to the extraction top center.
Also speed up ExtractMaterial for the common case of no required horizontal shifts.
Deserializing proplists tries to read a boolean variable from the
representation in order to be backwards compatible to old (<6.0)
savegames. Newer savegames do not write this boolean, so StdCompiler
(correctly) throws an exception. This exception uses line numbers, which
StdCompiler used to obtain by scanning through the entire buffer. Having
to scan through the entire buffer for every serialized proplist is
ridiculously slow (and the data isn't used anyway in this instance).
Since line information is still valuable outside of proplist
deserialization, replace the repeated SGetLine calls with an on-demand
cache.
This reduces load times of a 14 MB Game.txt from slightly over 3 minutes
to 7 seconds on my computer.
respondsToSelector isn't properly guarding against calling this method
on unsupported platforms, possibly because it existed as a private
method in OS X before 10.9. For example, attempting to build this on
OS X 10.8 fails with the error:
no visible @interface for 'NSTimer' declares the selector 'setTolerance:'
Since the default tolerance is 0 anyway, this can be removed without
adverse effect.