Günther Brammer
18038f45d3
Implement the function overload tree using the proplists
...
Instead of carefully inserting functions at the start or end of the list,
build the list just before the parser runs, at the same time as filling
the proplist where the functions are looked up.
This way, the overloaded function is simply the one that was previously in
the proplist, is not needed outside of the overloading function, and can thus
be replaced in the proplist.
2012-01-27 00:20:55 +01:00
Günther Brammer
f61ebfc453
Replace C4AulScript tree structure with a list
2012-01-25 04:15:39 +01:00
Günther Brammer
4a3e692962
System.ocg scripts have a proplist for parsing purposes
2011-10-24 17:02:27 +02:00
Günther Brammer
db926e3f53
Replace C4AulScript::GetSFunc with C4PropList::GetFunc/Call
2011-10-15 02:05:10 +02:00
Günther Brammer
f7b3642bc6
Replace C4DefScriptHost::Call with C4PropList::Call
2011-10-15 02:03:04 +02:00
Günther Brammer
a01bb2cf9c
Remove function cache from C4DefScriptHost
2011-10-15 01:59:15 +02:00
Günther Brammer
bb3861d4f1
Replace C4AulScript::GetSFuncWarn with C4PropList::GetFunc
2011-10-15 02:11:57 +02:00
Günther Brammer
0403bed306
Put functions into their proplists
2011-10-15 01:38:59 +02:00
Günther Brammer
bf86e81aa7
Clean category code up a tiny bit
2011-12-29 15:56:51 +01:00
Günther Brammer
b3aff643f3
Script reloading does not clear local variable defaults
...
The defaults are filled in by the preparser, which is only invoked for
changed scripts.
2011-10-04 22:16:27 +02:00
Günther Brammer
8185d318bf
Script: Add a proplist representing the global scope, named "Global"
2011-10-04 22:12:45 +02:00
Günther Brammer
f166fdaed7
Move Parser from C4AulScript to C4ScriptHost
2011-10-13 18:01:02 +02:00
Günther Brammer
843642271d
Script: local variables work for the Scenario and definition calls
...
This requires replacing C4AulScript::Def with C4AulScript::GetPropList() and
C4DefScriptHost::Def, and making C4GameScriptHost::GetPropList return the
scenario proplist prototype.
Definition calls won't be able to change the local variables, of course.
Other proplists will be able to use local variables once they can have
functions.
2011-09-29 03:49:21 +02:00
Günther Brammer
ca4da88137
Script: Scenario functions get the Scenario proplist in "this"
2011-09-25 23:25:13 +02:00
Günther Brammer
a24ebc4936
Script: Add a proplist representing the scenario, named "Scenario"
...
The proplist is accessible from script via a global constant.
2011-09-25 23:24:29 +02:00
Günther Brammer
9f180dffee
Script: Remove ScriptGo, ScriptCounter, goto and the ScriptN callbacks
...
No scenario uses them, and ScheduleCall provides an alternative.
2011-09-19 21:33:05 +02:00
Günther Brammer
9bc61db360
copyright notices update 2011
2011-09-01 16:58:52 +02:00
Tobias Zwick
92069bb2f8
removed undocumented ~GetCustomComponents callback and the involved hackery
2011-07-31 02:22:29 +02:00
Günther Brammer
4ae204e2fb
Remove unnecessary includes pulling C4GUI into the script engine
2011-04-13 15:37:12 +02:00
Günther Brammer
89413fcd6e
Move some code out of C4ScriptHost.cpp
2011-03-05 17:36:16 +01:00
Günther Brammer
f4ee636072
Remove some redundant Default methods
...
Using the same method for the constructing and clearing an instance just
leads to leaks and subtle bugs.
2011-03-05 03:24:11 +01:00
Günther Brammer
28a154dcdf
Drop unused third C4LangStringTable::ReplaceStrings parameter
2011-03-05 01:05:36 +01:00
Günther Brammer
609b9bbe93
Fold C4ComponentHost::Default() into C4ComponentHost::C4ComponentHost()
2011-03-05 01:03:09 +01:00
Günther Brammer
6eebaeaac8
Fold C4AulScript::Default() into C4AulScript::C4AulScript()
2011-03-04 15:20:21 +01:00
Günther Brammer
264009060c
Script: Remove Method from function descs
2011-03-03 02:25:01 +01:00
Günther Brammer
45fa20617c
Load definition stringtable before definition script
...
This allows for a slight simplification of the ScriptHost API, as only the
definitions made the ScriptHost load the stringtable for them.
This changes the sortorder of definitions, but C4Update should be able
to make the necessary changes to the release groups.
2011-02-07 02:18:24 +01:00
Günther Brammer
7be90977bf
Make C4ScriptHost have a C4ComponentHost member instead of inheriting
...
Previously, C4ScriptHost needlessly derived from two classes.
2011-02-06 21:37:19 +01:00
Günther Brammer
489ae8c5b3
Remove unused C4ComponentHost::Name and LoadAppend
2011-02-06 21:31:33 +01:00
Günther Brammer
d3ddc171ee
editor/win32: Remove Components menu in favour of external editors
2011-01-19 02:14:59 +01:00
Günther Brammer
6d3feabe69
Reduce #includes so that C4Include.h doesn't include C4Value.h
...
This should avoid many complete rebuilds.
2011-01-08 17:04:20 +01:00
Günther Brammer
be342d4a51
copyright notices update 2010
...
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Peter Wortmann
cc3795ef4f
Removed ObjectsInt and FindInternal, it has been a NOP for long enough. If we really want to find rules faster, we should consider having (bounded?) per-definition object lists. That way, FindObjects() & co would benefit as well.
2010-08-05 19:48:22 +01:00
Benjamin Herr
4378de147c
Rerun astyle with missing \ added
2010-03-28 20:58:01 +02:00
Günther Brammer
b4e37b070b
Change all indentation with spaces to use tabs instead
...
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Benjamin Herr
f3b35227ea
avoid lots of gcc warnings
2010-01-25 05:00:59 +01:00
Nicolas Hake
ed6f9424d7
Allow IDs longer than 4 characters
...
All C4IDs are now stored in auto-created global constants with the same name
as the ID itself. There is no special parsing of IDs anymore; this means that
you need to use the C4Id function if you aren't sure whether an ID exists.
IDs in portrait strings aren't working, since I expect portrait support to be
removed from the engine.
2010-01-25 16:57:57 +01:00
Tobias Zwick
edec15d64f
merge
2009-11-30 17:24:14 +01:00
Nicolas Hake
9ef7fc0d96
Script: Expose string tables at runtime
...
Use Translate(string) to access the translation
2009-11-12 16:57:37 +01:00
Nicolas Hake
52bde5a579
Remove BIG_C4INCLUDE define
2009-10-20 06:21:12 +02:00
Sven Eberhardt
af8a4d56b7
silenced some msvc warnings
2009-10-13 20:41:57 +02:00
Günther Brammer
9a8b5dd739
Replace BOOL by bool, TRUE by true, FALSE by false
2009-08-15 20:50:32 +02:00
Günther Brammer
572d00c32e
Move all source files
...
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00