Günther Brammer
32e7eb2904
Only use C4V_C4Object as typecheck target, tag the values with C4V_Proplist
...
This simplifies a few places which had to check for both tags before.
2011-09-26 20:22:31 +02:00
Günther Brammer
0fa37ef35d
Optimize if(!...) from two bytecodes to one
2011-10-14 00:28:32 +02:00
Günther Brammer
283876696d
Optimize away STACK 0 bytecodes
...
They got created for this without parentheses.
2011-05-07 00:18:00 +02:00
Günther Brammer
0c2ea0b6b5
C4AulParseState::AddBCC returns the position of the added chunk
2011-10-14 00:28:29 +02:00
Günther Brammer
c1d1424a56
Annotate Bytecode debug output with jump target labels
2011-05-07 00:19:01 +02:00
Günther Brammer
0cd46a2ebc
Wrap C4AulFunc::Name in C4AulFunc::GetName()
2011-10-14 00:40:55 +02:00
Günther Brammer
725f0e0f5a
Remove GuessType from a comment
2011-08-21 17:10:45 +02:00
Günther Brammer
8758e35255
Remove redundant C4Value::GetTypeInfo
2011-08-21 14:40:29 +02:00
Günther Brammer
39ba48ee54
Rename C4Value::ConvertTo(NoNil) to C4Value::Check(Par)Conversion
...
The NoNil variant thus has the shorter name, because most code should
use it. Conversion checks mostly secure code that uses the value and would
crash with a nullpointer. The exception are function parameters, which all
also accept nil and 0 and check for nullpointers in the function itself.
2011-08-21 01:47:38 +02:00
Günther Brammer
c82debf5f1
Remove almost unused C4AulScript::GetSFunc(int)
...
This also transforms a O(n^2) loop into a O(n) one. Though the n were small
and the loop seldomly called.
2011-09-30 01:39:12 +02:00
Günther Brammer
65a11ef1c3
Script: Remove unused function "descs"
2011-09-29 02:46:26 +02:00
Armin Burgmeier
6afadc6397
Allow mesh graphics images in messages
2012-01-10 22:40:46 +01:00
Armin Burgmeier
cc62b169c8
Add "MouseDrag" property for finer control of script-implemented drag+drop
2011-12-28 19:33:19 +01:00
Günther Brammer
ccbf4d1d45
Consolidate duplicated simple Log functions
...
The various small utilities do not use the engine Log implementation but
one that simply prints to stdout. Instead of duplicating that one, link a
common one into the utilities.
2011-11-02 21:36:39 +01:00
Günther Brammer
3c41310fa3
Remove C4ConfigShareware to reduce OpenSSL dependency
2011-11-02 00:07:29 +01:00
Günther Brammer
5f2f995852
Unify the #include blocks a little bit
...
One line for C4Include.h, one for the .h corresponding to the .cpp, one
empty line, the other C4* includes, another empty line, external headers.
2011-11-01 23:17:41 +01:00
Günther Brammer
6700bff4de
Replace CFacet with C4Facet
...
The latter is almost a superset of the former.
2011-08-27 17:47:49 +02:00
Günther Brammer
562816cfe5
Clean up some unused variables and obsolete FIXMEs
2011-09-28 01:09:56 +02:00
Günther Brammer
1ebc11c213
Savegames: Rename some fields in the Game.txt
...
Effects/GlobalEffects is now Script/Effects, and Script/GlobalNamed is now
Script/StaticVariables
2011-09-19 21:48:14 +02:00
Günther Brammer
4a32e63c46
Savegames: Correctly Denumerate the first enumerated value ( #657 )
...
When that value was copied it went from Enum 0 to nil. While this could
be fixed by making C4V_Enum a NullableType, counting from 1 is a tiny bit
less code overall.
2011-09-19 23:02:18 +02:00
Günther Brammer
9bc61db360
copyright notices update 2011
2011-09-01 16:58:52 +02:00
Nicolas Hake
fe747db554
Clean up copyright notices
...
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +02:00
Armin Burgmeier
333f562721
Some compiler warning fixes
2011-08-17 23:55:24 +02:00
Günther Brammer
d0010ecb0f
Fix c4script standalone with debugrec
2011-07-17 15:56:53 +02:00
Tobias Zwick
92069bb2f8
removed undocumented ~GetCustomComponents callback and the involved hackery
2011-07-31 02:22:29 +02:00
Tobias Zwick
481a59835c
docs: talk about nil for defaults. enclose nil, false and true in <code> tags
2011-07-31 01:32:02 +02:00
Maikel de Vries
248f85c2eb
Removed Defcore:Edible and OCF_Edible
...
Had no use in the engine, should therefore be defined in C4Script if deemed necessary.
2011-07-05 13:10:56 +02:00
Günther Brammer
a533b93f10
Do not print a deleted-object-warning while warning about that object
2011-05-25 20:09:12 +02:00
Günther Brammer
37242503df
Read old nil C4Values from player files for compatibility with 5.1
2011-05-21 23:13:49 +02:00
Günther Brammer
e0f49b4cca
Handle unknown C4Value type tags in player files or save games
2011-05-21 23:12:43 +02:00
Günther Brammer
b1e3eeb32d
Savegames: Do not assert() that all C4Values are unenumerated
...
Only C4V_Any never makes it into the Type field of a C4Value.
2011-05-15 19:30:53 +02:00
Günther Brammer
2d9d0d8596
Reduce verbosity of backtraces with object parameters
2011-05-09 23:19:31 +02:00
Günther Brammer
f2d2cd098b
Correct is-current-code-in-function assertions
2011-05-08 19:28:48 +02:00
Günther Brammer
f97cde74c3
Split C4V_Any into C4V_Nil for the data type and C4V_Any for the typecheck
2011-05-09 14:37:28 +02:00
Günther Brammer
fed6d6a0de
Script: Debug output for proplist contains all properties
2011-05-05 22:27:22 +02:00
Günther Brammer
af52109912
Small parser cleanups
2011-05-02 23:52:41 +02:00
Günther Brammer
9c4dabc810
Maintain a pointer to the last added bcc, instead of one after that
2011-04-13 02:16:55 +02:00
Günther Brammer
e3bcd14db0
Simplify Parse_FuncHead
2011-04-18 01:50:33 +02:00
Günther Brammer
baeffbc67f
Let script functions have less than 10 parameters
...
Script functions using ... or Par() still take all 10
parameters, but those are the exceptions now. This makes
calling functions with few parameters faster.
2011-04-18 01:48:37 +02:00
Günther Brammer
63a3b546d5
Use bytecode to push variables onto the stack
2011-04-17 23:52:55 +02:00
Günther Brammer
50b6fcf47a
Use AB_DUP instead of AB_PARN
2011-05-02 21:39:52 +02:00
Günther Brammer
0b8c2bba37
Use AB_DUP instead of AB_VARN
2011-05-02 21:53:58 +02:00
Günther Brammer
76376ee7bb
Remove unused C4AulFunc::GetLocalSFunc
...
ResortObjects was the only user, and that's gone now.
2011-05-03 00:56:49 +02:00
Günther Brammer
fadacd3bb4
Move StrToI32 to lib/
2011-05-01 18:55:02 +02:00
Günther Brammer
117cbe2b81
Script: Add warnings against wrong operator parameter types
2011-05-01 18:53:50 +02:00
Günther Brammer
7b640daedb
Script: Add "\t" escape for tabulator
2011-04-13 23:51:35 +02:00
Günther Brammer
82f6b180e1
Split C4Value typecheck into two variants, one not permitting nil
...
Previously, the typecheck callers often separately checked for
null pointers. This is superfluous since C4Value already checks
for null pointers.
2011-04-11 23:33:11 +02:00
Günther Brammer
51d75e891b
Move script operator parameter types from a table into the code
...
This makes the target type visible to the compiler.
2011-05-01 17:16:02 +02:00
Günther Brammer
7eedece257
Replace C4Value typecheck table with switch statements
...
This has the advantage that the compiler can simplify the check when the
target type is known at compile time.
2011-04-10 03:46:59 +02:00
Günther Brammer
c21248d322
Decrease the initial size of hash tables
...
At the moment, the majority of hash tables has at most one element, so
allocating more is wasteful. There needs to be at least one unused bucket
in the table, so the initial size is 2.
Also, increase the maximum load factor to 3/4.
2011-04-14 16:16:59 +02:00