Since LTCG is enabled now, we don't have to define every function inside
the headers for ~xXx super speed xXx~, which means we can strip the
headers down to their bare minimum and reduce interdependencies and
therefore recompilation times by a lot.
It isn't clear whether that call is necessary since the C4AulScriptEngine
constructor already does this, but it is clear that duplicating the call
all over is a bad idea.
Using memset to initialize non-POD types doesn't work. Or rather, it may
work right now, but will fail when somebody adds a member that relies on
its constructor doing something (like for example any STL container).
Either way it's undefined behavior and needs to go. Furthermore, using
it to reinitialize an object also prevents any dtors from doing their
work when needed.
A new helper function InplaceReconstruct will take an object of nothrow-
default-constructible type, and call the dtor to properly clean up
before placement-new reconstructing the object in the same location.
This is still bad design, but unfortunately removing the Default/Clear
functions from every object currently using them is a herculean task.
The minimum GTK version is now GTK+ 3.4, which is available since 2012.
It's part of Ubuntu LTS 12.04, and so should be available on any halfway
modern linux distribution.
This should allow getting rid of using deprecated GTK+ API much easier.
Add a C4ShaderCall parameter to tho most important drawing functions, and
make C4DrawGL's CreateSpriteShader public with additional parameters to
specify additional defines and shader slices. C4Sky uses this to compile its
own shader with OC_SKY defined.
Instead of one draw call for each tile, do the whole operation with a single
draw call by setting GL_REPEAT on the texture. This affects sky, the upper
board and the background.
This also allows to remove some code that was making sure surfaces are big
enough.
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.
What happens is that mape first loads the TexMap.txt, however adding all the
texmap entries internally fails, because the materials and textures are not
yet loaded. However, mape must first load the TexMap to see if
OverloadMaterials or OverloadTextures are present in it, to know what
materials/textures to actually load.
This should improve cache coherency by having all surface tiles adjacent
instead of strewn across the heap. This will also remove an indirection
in the common case of only using one tile.
Otherwise there are warnings when the user changes the value of a
constant, since it was initialized with a different value at the
time of the previous rendering.