Commit Graph

26 Commits (61962fe70abd22a665446cc09fcef163bf0e3862)

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
Nicolas Hake 7ff8c4f95a Remove references to functions defined in unloading defs (#1776) 2016-07-06 14:41:22 +02:00
Nicolas Hake 5872b5e8ae C4AulFunc::GetFullName: make const 2016-05-11 17:15:47 +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
Günther Brammer 6f98fb2e66 Remove C4AulScript class
It isn't needed to hold engine functions anymore, because those are just
put into C4PropLists.
2016-02-02 02:57:47 +01:00
Günther Brammer 0a8960f969 Reimplement C4AulParSet constructor as a variadic template
This allows the constructor to accept all types there is a C4Value
constructor for.
2016-01-25 00:00:57 +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 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 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 a5af9089a8 Script: Check parameter types of engine callbacks, too
This prevents a crash when an incompatible engine function is used as an
engine callback function.

Unfortunately, this breaks any scripts that have wrong type information in
engine callbacks and only worked because those were ignored.
2016-01-16 18:26:18 +01:00
Günther Brammer b7a022852e Revert "Move C4Aul code into separate subdirectory"
The distinction between the "aul" and "non-aul" parts of
the script engine are mostly historical accident, and the
current organization of the source code does not use
sub-subdirectories. I'd like to keep it that way.

This reverts commit 69ba06b8d0.
2014-05-12 02:24:19 +02:00
Nicolas Hake 69ba06b8d0 Move C4Aul code into separate subdirectory 2014-05-11 16:17:48 +02:00
Günther Brammer 3c5152d3ba Allow Call to call 10-parameter-functions like GameCall again
CheckParTypes now requires that the parameter array passed in is long
enough, just like Exec does. Luckily, FnCall has a ParSet, which is always
long enough.
2014-04-19 19:01:57 +02:00
Julius Michaelis f4e93d13bf Add parameter type check for FnCall 2014-04-17 19:24:36 +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
Nicolas Hake 003f897cbe C4AulFunc: Improve const correctness 2013-11-02 13:40:33 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Günther Brammer c6fe23729b Replace function list from C4AulScript with proplist enumeration
This finally makes the function list in C4AulScript unnecessary.
2012-05-28 00:50:13 +02:00
Günther Brammer 487a0ea38f Store a copy of the proplist the preparser created for include/appendto
The parser now copies the contents of the proplists in the order of their
source scripts into the final proplist. This way, local variable contents
get properly included, and the list of functions has one user less.
2012-05-28 00:31:55 +02:00
Günther Brammer 09a5247e9c Convert the remaining classic FunctionC4V engine functions
The Call functions use the FunctionC4V2 style, the others the templates.
2012-05-20 02:04:46 +02:00
Günther Brammer 6815515a00 Consolidate C4AulFunc::Exec into just one virtual function
Deriving classes only need to implement one variant. The second Exec is a
trivial wrapper that doesn't have to be virtual.
2012-05-27 23:35:23 +02:00
Günther Brammer f245af8972 Rename C4AulParseState to C4AulParse 2012-04-12 21:03:14 +02:00
Günther Brammer 67d8ac47e9 Keep functions across script reloads
For functions that are not appended/included, this is done by reusing them.
Functions that are not in the new script version are left with their code
raising and error. Appended/included functions are handled by a reference count.
2012-02-02 01:16:14 +01:00
Günther Brammer 1e7f32af48 Move C4AulFunc to its own header file
This is necessary since C4Value.h will call a function from C4AulFunc.
2012-02-13 18:00:35 +01:00