The C++ standard library comes with perfectly fine implementations of
these functions, so there's no point in reimplementing them just for the
hell of it.
* There was an off-by-one-error causing a blank line at the screen upper screen border.
* Remove ApplyGamma. It is always applied because Gamma is just part of the drawing shaders now.
* Save by copying rows instead of pixels for whole map screenshots.
Setting it by player filenames in the beginning is not necessery (and wrong for invalid files). Also copying it through C4S.Head didn't serve any purpose because PlayerInfo is synchronized in network and replays and startup player count can be deduced from that.
Tested in standalone, network, savegames, runtime join and replays from standalone, savegames and runtime join (Some replays of network games were bugged but that's an unrelated error).
The Default call from C4Game is issued before construction of all members, which causes a memory leak when TextureMap is actually constructed.
Just merge Default() into Clear(). The separation into two calls serves no other purpose than putting the class into an inconsistent state between them.
It actually does that in almost all other subclasses as well but they don't allocate memory.
In comparison to the old system, this is a downgrade - instead of being
able to set a full color mapping by gamma ramp, we now get just a value
per colour channel.
Upside is that we do not need to play around with the global gamma ramps
any more, which was arguably the wrong way to do it.
This commit will likely break everything that has been using gamma so far.
The shapes library has such pointer chains. The leaks were getting pretty heavy because they included pointers to C4AulFuncs, which kept a lot of parts of the script engine and string tables in memory.
The string table of System.ocg scripts (except the global System.ocg) pointed to nowhere after the initial load phase, but is still required for reload. Added a ref counting option to keep these string tables alive.
Fullscreen GUIs on wide-screen monitors look stupid. This patch tackles this by restricting the maximum size to something that can still be seen with a glance.
For very high-DPI or low-DPI screens, the user would most likely adjust the font size in the options (todo) anyway and thus also change the maximum menu size.
When OC fails while in startup code, resetting the gamma ramp was trying
to use an uninitialized C4Draw, which would result in writes to invalid
memory.
CreateObject() now does not reposition an object after it has been created, but rather grows it around the center of said object.
To that end a new parameter has been added to DoCon() and SetCon() and the documentation has been updated.
Appending and including skeletons works now. Documentation updated.
Skins such as appendto.Clonk.Farmer.skeleton are handled as if the skin name were not included: appendto.Clonk.skeleton
This also changes a bit the structure of how meshes are reloaded in general,
in particular mesh materials are only reloaded once and not once per
C4DefGraphics instance. (Fix crash on reload with included skeletons, cherry picked from commit 2f69aa4850ab7a4b621e5f30cbc537d40f32c0df)
Fix linking of C4Script standalone tool (cherry picked from commit b03a332b73463b378c94e4e92b66d45b923b3b9c)