Commit Graph

72 Commits (stable-8)

Author SHA1 Message Date
Sven Eberhardt ebda8193ef Replace NULL by nullptr in C++ sources
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Julius Michaelis 8d2f2846b5 Fix mac build
Also move some stuff around once again…
2016-10-21 01:25:48 +02:00
Julius Michaelis 5b7c5b48ee Fix mape and mac build
Attempt #1.
2016-10-20 20:36:52 +02:00
Sven Eberhardt 5c965aba2e Fix mape build 2016-06-22 01:47:45 -04:00
Sven Eberhardt b34ae09437 Fix utility builds 2016-06-21 21:48:10 -04:00
Sven Eberhardt a7bd20a927 Fix server and utility build
Adding missing C4DefList::SortByPriority() stub
2016-06-18 10:35:54 -04:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 5134a0a0a4 Fix mape build 2016-04-03 20:24:42 +02:00
Nicolas Hake de1d00eb68 Meshes: Enable reload for custom material shaders 2016-04-03 13:37:03 +02:00
Nicolas Hake 735f9cc06b C4Landscape: Pull everything private out of the header
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.
2016-04-03 13:24:24 +02:00
Günther Brammer 9dadfba5af Move GlobalNamed.SetNameList call after Link() into Link()
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.
2016-01-25 00:00:58 +01:00
Günther Brammer 27cbdb2177 Remove superfluous mape stubs 2016-01-24 02:09:14 +01:00
Günther Brammer e790d2c327 Remove duplicated stubs for the scriptengine from mape 2016-01-24 02:09:14 +01:00
Nicolas Hake 8fc57b69c3 Don't ZeroMem non-POD types
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.
2015-11-14 16:43:19 +01:00
Armin Burgmeier 63bff7914e Fix the mape build 2015-10-09 18:43:02 -04:00
Sven Eberhardt cb25282350 Fix mape again. 2015-10-09 14:55:43 -04:00
Sven Eberhardt 675db52e38 Texture shape coverage fix and mape build fix. 2015-10-09 14:49:31 -04:00
Armin Burgmeier fd285f6656 Create mipmaps only for static textures that are expected to be zoomed
Hopefully fixes #1403.
2015-09-18 21:10:39 -04:00
Armin Burgmeier 20eb0615ee Custom shader for drawing sky
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.
2015-09-12 18:15:34 -04:00
Armin Burgmeier e0d7d44948 Optimize drawing of tiled surfaces
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.
2015-09-12 16:11:50 -04:00
Sven Eberhardt da4a45c8a4 Fix mape build. 2015-08-27 21:57:08 -04:00
Sven Eberhardt cf940d639b Fix memory leak caused by circular prop list chains.
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.
2015-08-20 20:19:38 -04:00
Sven Eberhardt a45c5afe60 Fix mape build. 2015-08-09 19:41:16 -04:00
Armin Burgmeier 56d48f5300 Fix mape 2015-08-04 21:21:24 -04:00
Armin Burgmeier b8343786b6 Make MapScript create a background map
This removes the last occurence of the IFT flag
2015-08-04 21:21:23 -04:00
Nicolas Hake 0fe248692e Fix mismatched mape function stub
21500a8 changed a function prototype inside C4Landscape but neglected to
change the mape stub to match. Fix this so the build stops failing.
2015-05-09 22:14:40 +02:00
Nicolas Hake 2b332f5a74 Adapt mape to C4Group changes 2015-02-13 20:22:41 +01:00
Nicolas Hake fef96eca9c Replace C4Surface::ppTex by a vector
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.
2015-01-18 22:59:44 +01:00
Armin Burgmeier 166b5de519 Fix mape build 2015-01-15 14:42:22 -05:00
Armin Burgmeier b8fa1dd191 Fix the mape build 2015-01-07 12:28:10 +01:00
Armin Burgmeier 45897241f2 Remove debug logs 2014-10-17 18:28:17 -04:00
Armin Burgmeier 45d090ae37 mape: initialize the landscape pixmaps (#1162) 2014-10-17 18:27:31 -04:00
Armin Burgmeier 6d983e5174 mape: use global texture map
Otherwise certain script functions would only access an empty texture map
2014-10-17 13:22:57 -04:00
Armin Burgmeier 7339f7ae8d mape: Re-initialize script engine between renderings
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.
2014-08-04 16:27:06 -04:00
Armin Burgmeier 0c4bbfaf16 mape: Load the Library_Map script 2014-08-04 16:27:06 -04:00
Armin Burgmeier 428046400d mape: Implement minimalist C4DefList 2014-08-04 16:27:06 -04:00
Armin Burgmeier 08cdf0e301 mape: Initialize script engine only once instead of per-rendering 2014-08-04 16:27:05 -04:00
Armin Burgmeier bac7a89ce1 mape: Make sure error messages from the linker are shown 2014-08-04 16:27:05 -04:00
Armin Burgmeier d32eb98ee1 mape: Fix crash when InitializeMap() returns false 2014-08-04 16:27:05 -04:00
Armin Burgmeier ade34f5efe mape: Add interface to run the new script map generator 2014-08-04 13:04:35 -04:00
Armin Burgmeier f25ec83568 Link C4MapScript into mape
Remove the two dependencies to ::Game from C4MapScript, so that ::Game
does not need to be linked into mape, which would basically drag the
whole rest of the engine after itself.
2014-08-04 13:04:35 -04:00
Armin Burgmeier 92720cf490 Allow C4ScriptHost to load a script from memory
This will allow mape to feed the Map.c that is being edited directly to
the map generator.
2014-08-04 13:04:34 -04:00
Günther Brammer 22016e075f Replace some usages of C4ID with C4Def*
In particular those that made the c4script shell depend on C4Id.cpp.
2014-04-19 19:02:22 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Sven Eberhardt 09b46130a1 Fix mape build 2013-12-15 15:59:26 +01:00
Nicolas Hake 77b1da5238 mape: Update StartSoundEffectAt dummy
ceca8b8 changed the signature of StartSoundEffectAt, but didn't update
mape's dummy function.
2013-12-01 13:13:56 +01:00
Martin Plicht b6a01b62aa Fix mape compilation failure due to C4AulDebug changes 2013-10-17 01:23:33 +02:00
Sven Eberhardt 400e8719bb Fix mape build 2013-04-28 19:10:27 +02:00
Sven Eberhardt ec38b4d9e4 Fix some C4MapScript dependencies 2013-03-22 22:24:20 +01:00
Sven Eberhardt ac8e48e85e Added some C4MapScript stubs for mape 2013-03-22 22:05:58 +01:00