Maikel de Vries
c4fa92a6d2
Aerobatics: use jet streams, fix item spawn and restart rule
2016-01-24 18:18:12 +01:00
Maikel de Vries
ab9330180f
add an object for jet stream control (fast winds)
2016-01-24 18:17:10 +01:00
Maikel de Vries
e5a9dd934f
add option to respawn rule to keep contents
2016-01-24 18:05:06 +01:00
Günther Brammer
05359179e7
Initialize C4AulParSet from C4Value[] with a function, not constructor
...
This avoids confusion with a variadic template constructor that could take
the same arguments.
2016-01-24 12:27:23 +01:00
Günther Brammer
8425169dd6
Rename C4Script.h to C4GameScript.h
2016-01-24 12:27:23 +01:00
Günther Brammer
234101ddbc
Remove C4Script.h from C4Aul.h
2016-01-24 12:27:23 +01:00
Günther Brammer
c3c402061b
Move struct C4ScriptConstDef to C4AulDefFunc.h
2016-01-24 12:27:23 +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
7cc1334963
Move C4ValueToMatrix helper functions to the file using them most
2016-01-24 12:27:23 +01:00
Günther Brammer
4f620c1537
Parse array expression with fewer lines of code
...
Instead of tracking the status with a variable, simply test the loop-end
condition directly, and reduce code duplication between empty and non-empty
array contents.
2016-01-24 12:27:23 +01:00
Günther Brammer
b7bd48a73f
Unify the various Parse_-Functions to consume the last token they match
2016-01-24 12:27:23 +01:00
Günther Brammer
6a5b571fe3
Drop warning about trailing comma at the end of a parameter list
...
A trailing comma does not change the behaviour of a function call, so it is
totally harmless.
2016-01-24 12:27:23 +01:00
Günther Brammer
4c01592196
Move C4AulScriptFunc into its own source file
2016-01-24 12:27:23 +01:00
Günther Brammer
514c2b8f34
Combine C4String, C4AulFunc, C4ValueArray reference counting
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
93bf8f4779
Script: Allow "new Foo {}" in constant expressions
2016-01-24 12:27:23 +01:00
Günther Brammer
f6c2906660
Script: Constant proplist expressions can contain function definitions
...
Most of the changes are for exception safety. The parser references the
function stored in Fn when the function body contains a syntax error, so
the function has to stay around. In order to avoid memory leaks, store the
function and its containing proplist in their destinations before they get
fully parsed.
This doesn't allow functions directly in static constants or arrays.
Future work: Putting the owning proplist in the scope chain.
2016-01-24 12:27:23 +01:00
Günther Brammer
507b63a55a
Functions store their containing proplist instead of the C4AulScript
...
The C4AulScript containing the source of the function was already mostly
used to get the relevant proplist or available from context. This will
allow more than one proplist plus the global one per scripthost to contain
functions.
2016-01-24 12:27:23 +01:00
Günther Brammer
d0d27d25f1
Merge script branch
2016-01-24 12:25:52 +01:00
Günther Brammer
4d1f5d95c2
Script: Prevent usage of deleted objects via this()
...
Apparently, this wasn't done already because of compatibility concerns. The
beginning of a release cycle is the perfect moment to finally complete the
prevention of using deleted objects from script.
2016-01-24 12:25:15 +01:00
Sven Eberhardt
d9b8de9ea2
Win32: Fix file deletion from scenario selection dialogue
2016-01-24 00:43:09 -05:00
Sven Eberhardt
28e794654c
Add network option to disable UPnP.
...
Also add some more UPnP failure messages to log.
2016-01-24 00:11:14 -05:00
Sven Eberhardt
f2e99ced16
HotIce: Reduce Fire arrow stack count in chests
...
Fire arrows were dominating the game too much. This should put more emphasize on the other weapons.
2016-01-23 23:27:08 -05:00
Sven Eberhardt
79e26a3f64
HotIce: Fix division by zero when starting with one player.
2016-01-23 23:25:48 -05:00
Sven Eberhardt
7b7b791442
Add [Game] Mode to parkour and arena scenarios to fix league evaluation.
2016-01-23 21:26:13 -05:00
Sven Eberhardt
e94c0e38fc
Add scenario core field "Mode" (in [Game]) to allow setting game mode independent of goal objects.
...
To be used by the league so you can properly host race scenarios in the open melee league.
2016-01-23 21:19:22 -05:00
Sven Eberhardt
df6d349166
Add safety to light object creation.
2016-01-23 21:09:12 -05:00
Günther Brammer
7c022085ee
Improve script bytecode dump formatting slightly
2016-01-24 02:09:15 +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
Günther Brammer
5a570b96f1
Remove now unnecessary stubs from C4ScriptStandaloneStubs
2016-01-24 02:09:14 +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
e1a38ee010
Move references to ::Objects and ::MaterialMap from C4AulLink to C4Game
...
This changes the order in which the various parts of the engine are updated
after a definition reload, but they should not interfere with each other.
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
Günther Brammer
9833c1ef2d
Remove never used NeedDefinitionContext
...
Every function that accepts a definition also accepts an object instead, so
NeedNonGlobalContext is the exception to use.
2016-01-24 02:09:13 +01:00
Günther Brammer
b7ecc49a02
Remove a bit of dead code from C4Value
2016-01-24 02:09:13 +01:00
Günther Brammer
d81c93b7d4
Add a few C4Script tests
2016-01-24 02:09:13 +01:00
Tobias Zwick
a7943714c8
update ala's music license (in the installer)
2016-01-24 00:25:33 +01:00
Maikel de Vries
6a3eaa2716
Aerobatics: new game mode and small improvements
2016-01-24 00:20:04 +01:00
Nicolas Hake
03c0933d6f
Merge MSVC cleanup branch
2016-01-23 23:24:50 +01:00
Günther Brammer
78e3457ff7
MSVC: Remove support and workarounds for versions older than 2015
...
We require that version for its C++14 support anyway.
2016-01-23 23:10:02 +01:00
Günther Brammer
a19e7f6ced
Use #elif defined() to check for config.h macros instead of plain #elif
...
This way, the code works with a config.h that does not define those macros.
2016-01-23 23:05:16 +01:00
Günther Brammer
609b64f72b
Remove unused macro from config.h.cmake
...
HAVE_PRECOMPILED_HEADERS is only used internally in CMakeLists.txt.
2016-01-23 23:05:16 +01:00
Günther Brammer
7167459f67
win32: Move PIXELFORMATDESCRIPTOR from C4AbstractApp to CStdGLCtx
...
That is the only user.
2016-01-23 22:02:52 +01:00
Günther Brammer
34a720ca54
win32: Remove unused CreateContext function taking a HWND
2016-01-23 22:02:52 +01:00
Günther Brammer
37fd0a88c6
win32: Rename C4Window::hRenderWindow to renderwnd to match GTK+
2016-01-23 22:02:52 +01:00
Günther Brammer
9210c65e85
gtk: Hide usages of X11 behind #ifdef GDK_WINDOWING_X11
2016-01-23 22:02:51 +01:00
Günther Brammer
aa931ac623
Drop some dead code in C4App.h and C4WindowGTK.cpp
2016-01-23 20:36:34 +01:00
Günther Brammer
1c15b8f661
gtk: Move OpenURL to the other implementations in PlatfromAbstraction
2016-01-23 20:36:34 +01:00
Günther Brammer
8f48f0275d
gtk: Remove unnecessary C4Window::wnd
...
It was only used to specify a screen for randr, which doesn't need a
particular window.
2016-01-23 20:36:34 +01:00