Commit Graph

151 Commits (376ca5a9dfb6b51ad02253a429ef0bd935d85799)

Author SHA1 Message Date
Julius Michaelis 376ca5a9df Prevent using USE_CONSOLE in lib{misc,c4script} 2016-10-22 17:42:23 +02:00
Julius Michaelis 8d2f2846b5 Fix mac build
Also move some stuff around once again…
2016-10-21 01:25:48 +02:00
Julius Michaelis 34a9a1de8d Twiddle with header organization: lib{misc,c4script} do no longer include GL/glew.h
(Yes, it is just that complicated.)
2016-10-20 18:46:32 +02:00
Sven Eberhardt 15d850e4ec Editor: Add effects to property viewer 2016-10-14 10:50:17 -04:00
Sven Eberhardt 30738c760e Fix water splashing particles 2016-08-30 18:56:46 -04:00
Sven Eberhardt 1d566ec6c5 Add VIS_Editor visibility flag 2016-08-02 01:12:08 -04:00
Sven Eberhardt a7aa89f168 Merge branch 'master' into qteditor
Conflicts:
	planet/Objects.ocd/Structures.ocd/StoneDoor.ocd/SpinWheel.ocd/Script.c
	src/platform/C4WindowSDL.cpp
	src/script/C4AulParse.cpp
	src/script/C4Effect.cpp
2016-06-20 22:27:03 -04:00
Sven Eberhardt b6526d2f65 Qt Editor: Always duplicate contents with objects
Even if they are not selected, this is probably what the user expects.
2016-06-20 15:50:35 -04:00
Maikel de Vries 8291298af1 add script callback on completion change 2016-05-21 13:34:34 +02:00
Maikel de Vries 6794b3b630 remove object component functionality from the engine 2016-05-21 13:34:34 +02:00
Maikel de Vries accd897b91 rename NoComponentMass to NoMassFromContents
This had nothing to with components, and risk of backwards compatibility is minor.
2016-05-21 13:34:33 +02:00
Maikel de Vries 183ab4c4a0 remove unused function ComposeContents 2016-05-21 13:34:33 +02:00
Maikel de Vries 5841b55f7e remove unused function GetNeededMatStr 2016-05-21 13:34:33 +02:00
Günther Brammer c0d32f8f4e Remove redundant target parameters from effect implementation 2016-05-15 15:17:17 +02:00
Günther Brammer 6aaf7cd2ef Store a pointer to the effect target in the effect itself 2016-05-15 15:17:17 +02:00
Günther Brammer b00b8554ab Merge branch script 2016-04-28 03:25:44 +02:00
Günther Brammer efd4724084 Script: Add Scenario effects
These work just like global effects, except that effects from CreateEffect
get the scenario as target parameter in the callbacks.
2016-04-28 02:53:21 +02:00
Sven Eberhardt 881534bee0 Qt Editor: Shape properties 2016-04-25 16:17:10 -04:00
Lukas Werling c349254d8b Remove C4Particles.h include from C4Object.h
This reduces the number of files indirectly including PCG from ~50 to 7.
2016-04-25 21:24:27 +02:00
Günther Brammer e8811a7b21 Move global effects from ::Game to ::ScriptEngine
This even enables some simplification in the CompileFuncs, since the global
effects were already put in the same section as the other ScriptEngine
parts. The callback for updates due to relinks also fits nicely.

The reset in C4Game::Default was redundant with C4Game::Clear already.
2016-04-24 19:40:28 +02:00
Günther Brammer e2c6c2a841 Do not use C4Object in C4Effect
Instead, the pointer to the effect list is passed to the functions that
previously used the object to determine it.
2016-04-24 19:40:28 +02:00
Nicolas Hake 8ffc1ab8cb Apply DrawTransform to meshes too
This will make lighting look weird again for meshes flipped via FlipDir.
Avoid doing that until we implement FlipDir for meshes via an internal
MeshTransform.
2016-04-17 17:56:56 +02:00
Nicolas Hake 9dddf289db Merge branch 'master' into qteditor 2016-04-03 21:06:32 +02:00
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 3641509462 Mesh rotation: Keep rendered mesh inside shape 2016-04-03 13:37:04 +02:00
Nicolas Hake 0537df5f23 C4Object: Move C4Def.h dep out of header
C4Def is only ever used as a pointer inside C4Object.h, so we don't need
to include C4Def.h from it.
2016-04-03 13:24:26 +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
Nicolas Hake cd0032ccf0 Do mesh rotation outside of DrawTransform
Mesh rotation needs to happen as part of the MeshTransform so lighting
is applied correctly. DrawTransform applies after lighting which made
rotated meshes look weird.
2016-03-31 01:19:58 +02:00
Maikel de Vries d6b963d321 remove unused LineMaxDistance property 2016-03-22 22:26:46 +01:00
Maikel de Vries dc1e828cfb add callback OnLineChange when line changes its vertices or vertex positions 2016-03-22 21:53:32 +01:00
Maikel de Vries fc008241cd rename LineBreak callback to OnLineBreak 2016-03-22 18:58:55 +01:00
Sven Eberhardt 771a333e21 Qt Editor: Add effects to object list view + fixes
Also remove cache of C4Values and use callbacks on object and effect deletion instead.
2016-02-21 22:23:42 -05:00
Nicolas Hake 5f895c14fc Materials: Fix misspelling of "Incendiary" (#1680)
The wrong spelling will still be accepted as a material value, as long
as no value with the correct spelling exists.
2016-02-09 23:45:02 +01:00
Günther Brammer 03d11cd596 Merge script branch 2016-01-31 21:51:58 +01:00
Sven Eberhardt 1f81b87c33 PlayAnimation: Delete previous animations in same slot if no weight is given.
This will simplify fixing several animation leaks.
2016-01-28 22:02:27 -05:00
Günther Brammer 68c436576e Simplify construction of C4AulParSets 2016-01-25 00:00:57 +01:00
Günther Brammer 20c22582ec Move DirectExec from C4AulScript to C4AulExec
In the long term, there is no reason DirectExec should be concerned with
C4AulScript/C4ScriptHost. In the meantime, the lookup code from Fneval can
be moved into the function.

This allows eval in scenario script to access scenario script locals, but
that seems harmless.
2016-01-24 12:27:23 +01:00
Günther Brammer ca9d95b25f Replace various C4AulFunc::Exec with C4PropList::Call
In C4Control.cpp, this improves correctness by selecting the right global
function instead of a random function.
2016-01-24 12:27:23 +01:00
Günther Brammer 6b6dd96719 Move GameScript.GRBroadCast to Game.GRBroadCast
This avoids a dependency on ::Objects from C4ScriptHost.
2016-01-24 02:09:14 +01:00
Günther Brammer a5f797f96b Move miscellaneous global functions from C4Effect.cpp to their users 2016-01-24 02:09:14 +01:00
Sven Eberhardt fcf870672c Fix overflow when calling DoEnergy with large values #1646 2016-01-22 22:52:09 -05:00
Sven Eberhardt 26084af502 Fix crash when grab target is lost. 2016-01-15 08:54:03 -05:00
Sven Eberhardt cc613c01f4 Fix action target reset on same procedure only. 2016-01-15 08:14:46 -05:00
Sven Eberhardt 579cb7e66c Reset action targets on procedure change #1552 2016-01-14 21:40:42 -05:00
Sven Eberhardt e2acb8b9bb Add missing sounds for Grab/UnGrab #1585 2016-01-10 21:17:06 -05:00
Maikel de Vries a6efefaecc fix float physics for objects moving out of a liquid surface (#1523)
This also fixes objects which previously jumped out of the water continuously, by adding an extra check to also capture faster moving objects. It could be made speed dependent, but that seems to be overkill for the situation.
2015-12-30 12:54:04 +01:00
David Dormagen a8c57ea5b9 fix assertion failure when changing C4Object.Touchable at runtime
Which would cause Boomshire to trigger an assertion on startup.
2015-12-16 23:01:28 +01:00
David Dormagen dcfb986e34 moved sounds into subfolders
This completes http://forum.openclonk.org/topic_show.pl?tid=3215
2015-12-13 22:14:55 +01:00
Nicolas Hake 617a0828fb Aul: Throw exceptions by value, not by pointer
Throwing values instead of pointers simplifies memory management at the
catch site.
2015-12-08 13:17:40 +01:00