Commit Graph

3318 Commits (cc672bbd0022f995cd21c675ce7fc6f5b5686574)
 

Author SHA1 Message Date
Nicolas Hake 0f050f0343 Import source 2009-05-08 15:28:41 +02:00
Günther Brammer 4b022c0a45 Give PropLists an ObjectNumber 2009-04-19 23:33:42 +02:00
Günther Brammer 64c7be0429 Garbage collect unused proplists to avoid memory leaks 2009-05-20 00:37:14 +02:00
Günther Brammer 07b58d88f3 Move some stuff to C4GameObjects 2009-04-19 00:23:58 +02:00
Günther Brammer cb1e6e6a5c Add a PropList set to C4GameObjects to keep track of all proplists
Also remove C4EnumPointer2. It was only used for C4Player object pointers,
which only need an offset, not a range.
2009-04-18 02:46:19 +02:00
Günther Brammer abe1bad6bd Add a global variable holding a prototype for actions
Either the engine or the script part of this should be replaced later.
2009-04-28 21:45:42 +02:00
Günther Brammer c86532ea6f Script to convert Clonk Rage objects to the new format
Currently converts Names.txt, ActMap.txt and Collectible to properties.
2009-05-20 00:36:08 +02:00
Günther Brammer c420a3bf3b C4Value does not store C4IDs anymore
Instead, C4IDs are converted from/to C4PropLists. This will have to change,
of course.

Objects can be created from prototypes which only inherit from C4Def
2009-04-12 14:04:28 +02:00
Günther Brammer b9f398b111 Replace C4ActionDef with C4PropList
C4Object now stores a pointer to a C4PropList instead of the Name and Number
of a C4ActionDef in the ActMap of the Object's definition.
2009-04-12 14:03:14 +02:00
Günther Brammer 427a2f2346 Collectible as a property 2009-04-11 16:38:31 +02:00
Günther Brammer 0898288a87 Merge C4DefCore and C4Def
The DefCore was only used by the editor and to get an id from a filename
for the drag and drop code. The former is dead, the latter does not need
the separation.
2009-05-20 00:34:13 +02:00
Günther Brammer 79f8d5496a Add CreatePropList script function
Is this needed?
2009-05-20 00:32:01 +02:00
Günther Brammer bf839b9a66 Call Definition in every definition at start
This is mainly intended to fill the proplist of the definition and replace
the defcore, but other one time initialisation could also be done at that
point.
2009-05-20 00:30:49 +02:00
Günther Brammer 1964e442f1 Add C4PropList literals
The syntax is { Key: value, "Key2": value2 , Key3 = value3 }
We might want to drop : or = later.
2009-04-12 02:56:41 +02:00
Günther Brammer 9a9a7fec62 Make C4Object::Name a property
Every proplist can have a name, so move the code there.
2009-04-03 21:06:29 +02:00
Günther Brammer c4b68c771d Move ::Game.ScriptEngine.Strings to ::Strings
This saves some typing and better reflects the role of the object:
It's no longer the list of strings that has to be saved in the savegame,
but is only used to ensure that no string is duplicated.
2009-04-03 23:53:48 +02:00
Günther Brammer 42d3b6e79a Add C4PropList
A Proplist is a map of C4Strings to C4Values which can chain lookups
to "Prototype" Proplists. This can be used to implement inheritance.

Proplists can be stored in C4Values.

C4Object now inherits from C4Proplist, C4Values can be converted between
those two.
2009-05-20 00:12:11 +02:00
Günther Brammer 6274cf7a5e Hold C4Strings in a hashtable instead of a linked list
I didn't measure wether this helps performance, but I plan to use the
generic hashtable for function lists and object fields, too.
2009-04-01 23:36:58 +02:00