Commit Graph

218 Commits (3a202230a25828210da3ff054b80420b660e4a35)
 

Author SHA1 Message Date
Tobias Zwick 3a202230a2 fix for FindObject and ObjectCount 2009-08-12 15:04:59 +02:00
Tobias Zwick 4211ce15f4 cleanup: script function CrewMember(obj) is obsolete 2009-08-12 10:58:55 +02:00
Günther Brammer 5be69fa1d0 merge the move-all-files branch 2009-08-10 18:17:26 +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
ModernClonker 6f4ca1cb2d Fixed the redefinition warnings of CMake 2009-08-09 14:04:27 +02:00
Günther Brammer b73009e65b Cleanup 2009-08-05 00:53:38 +02:00
Armin Burgmeier b4788cf433 Fixed a missing semicolon in C4Script.cpp (#35) 2009-08-01 15:07:21 -04:00
Nicolas Hake 43b7150161 [win32] Fix segfault on exit 2009-07-28 13:39:22 +02:00
Nicolas Hake 40a3c80093 Planet: Fix syntax errors
Spell aiming had to go unfortunately, because it depended on some stuff
we don't have. Should implement this outside of the main Clonk code though.
2009-07-26 23:16:50 +02:00
Nicolas Hake 1102146302 Fix refcounting bug that led to premature destruction of property keys 2009-07-26 22:31:45 +02:00
Nicolas Hake abb08b891b C4Aul: Fix segfault when indexing into temporary proplists 2009-07-26 19:57:57 +02:00
Nicolas Hake c049580a2f C4Script: Allow indexing into proplists
Instead of using the unwieldy GetProperty(proplist, key) you can now
write proplist[key], or, similarly, instead of SetProperty(proplist,
key, value), proplist[key]=value works too.

Keys that don't exist are autocreated on access, so if you care about
performance, GetProperty is recommended for read-only access, since it
never triggers a modification of the underlying data structure.
2009-07-26 17:54:34 +02:00
Nicolas Hake ef3a386549 Human-readable type of C4V_Any changed to 'nil'
This lowers the confusion factor of error messages like
'ERROR: operator "=" left side: got "any", but expected "&"!'
since nobody really knows what any is.
2009-07-26 17:42:22 +02:00
Nicolas Hake 4369b4e03c Fix typo 2009-07-26 17:31:27 +02:00
Nicolas Hake 30b326035e C4Script: Default CreateObject/CreateConstruction owner to current controller 2009-07-26 01:12:10 +02:00
Nicolas Hake 07028f7bf2 CMake: Find WinSDK dir automatically
A lot of people don't seem to have their platform SDK include and lib
directories in their environment, so cmake doesn't find the required
libs. Read the location from the registry and make it known to cmake.
2009-07-25 22:56:06 +02:00
Günther Brammer fc5c384681 Material: Remove color field, use textures as is
This also removes ColorByMaterial, which was alread unused in CE and CR.
2009-07-24 23:50:04 +02:00
Günther Brammer 1889d79478 Forgotten strict2 change 2009-07-24 23:43:24 +02:00
Nicolas Hake b0a7d4ed0d Fix problem where the DirectX SDK was not found in some circumstances 2009-07-24 00:48:41 +02:00
Tobias Zwick f56e4e3dd5 merge 2009-07-23 22:20:07 +02:00
Tobias Zwick 38df8e085b Sand with a texture 2009-07-23 22:16:50 +02:00
Nicolas Hake c2b0188dc2 Return nil instead of 0 from function without a return statement 2009-07-23 07:14:58 +02:00
Günther Brammer 87e12484e7 Script: Make non-#strict and #strict behave the same as #strict 2
This allows some simplifications, mostly code that's just not needed
anymore.
2009-07-23 01:02:41 +02:00
Tobias Zwick 9adc3e490f Sir, we found gold!! 2009-07-23 01:01:04 +02:00
Tobias Zwick 251d722ca0 merge 2009-07-22 19:15:33 +02:00
Tobias Zwick a634cebeab documentation of the functions in System.c4g 2009-07-22 19:04:47 +02:00
Nicolas Hake a5b3e17352 C4Object: Remove numbered locals
Also removed some undocumented function hardcoded for Lhûnrim(?).
2009-07-22 18:31:34 +02:00
Nicolas Hake 496e795577 C4Object: Line data now properties
For objects with Line set, color is now stored
as an array [LineColor, VertexColor] in the property
LineColor.
If Line==C4D_Line_Vertex, the vertices of the target objects
that the line attaches to is also stored as an array [Target0Vtx,
Target1Vtx] in the property LineAttach.
2009-07-22 18:24:07 +02:00
Nicolas Hake ab5da9cc3f C4Object: Make parallaxity a property
Instead of Local(0) and Local(1), parallaxity is now stored
as an array in the property "Parallaxity" of an object.
2009-07-22 18:03:33 +02:00
Nicolas Hake c511615376 C4Object: Visibility made a property
Accordingly, SetVisibility and GetVisibility have been removed.
Specify visibility like obj->SetProperty("Visibility", VIS_Allies).
VIS_Local has been renamed VIS_Select and uses an array:
obj->SetProperty("Visibility", [VIS_Select, Plr0Visible, Plr1Visible, ...])
where Plr*Visible are of type bool.
2009-07-22 16:31:09 +02:00
Tobias Zwick 0efc4bd8df merge 2009-07-22 16:26:38 +02:00
Günther Brammer 51179151ff Add Copyright and license to C4PropList 2009-07-22 16:15:18 +02:00
Tobias Zwick ebcf5328c5 more cleanup 2009-07-22 15:38:31 +02:00
Tobias Zwick 7155e38ecb more cleanup 2009-07-22 15:27:49 +02:00
Günther Brammer efb73a1c2f C4Script: Remove Var and Global for good 2009-07-22 15:03:43 +02:00
Nicolas Hake a36f317798 C4Script: AddMenuItem now correctly handles iParameter == nil 2009-07-22 14:10:59 +02:00
Nicolas Hake 9c59007af4 Removed obsolete C4Script functions, moved others to System.c4g
Functions moved to System.c4g:
ExtractLiquid, FlameConsumeMaterial, LaunchEarthquake,
LaunchLightning

Functions removed:
LaunchVolcano, Var, SetVar, IncVar, DecVar, SetLocal, SetGlobal,
ObjectCall, Set, Inc, Dec, GetColor, SetColor

Functions renamed:
GetColorDw -> GetColor
SetColorDw -> SetColor
GetPlrColorDw -> GetPlrColor
2009-07-22 08:48:39 +02:00
Nicolas Hake c7b8eee8b4 Dynamite: Actmap to proplist 2009-07-22 05:59:21 +02:00
Nicolas Hake 15e00a5cfe Remove DirectorySeparators from StdFile.h to avoid warnings 2009-07-22 05:12:30 +02:00
Nicolas Hake b255abdd03 Fix undefined pointer returns from C4GameObjects::ObjectPointer 2009-07-22 03:28:21 +02:00
Nicolas Hake d424f946d6 Script: Remove Cast* functions 2009-07-22 02:15:57 +02:00
Nicolas Hake afe97b4171 Fix MSVC build 2009-07-22 02:49:45 +02:00
Günther Brammer f6b8d88a66 Update CMake build
The proplist branch predates the CMakeLists.txt.
If I had changed the Makefile.am today, I would have remembered to test a cmake build, honest!
2009-07-21 17:53:30 +02:00
Nicolas Hake 8fc2d2770f C4Sector: Output meaningful messages on assert 2009-07-21 15:13:08 +02:00
Nicolas Hake b8b87136fe Request correct winsock version
WSAStartup first parameter: The high-order byte specifies
the minor version number; the low-order byte specifies the
major version number.
2009-07-21 15:12:10 +02:00
Günther Brammer 893cd20109 Merge branch 'proplist' 2009-07-21 16:46:39 +02:00
Günther Brammer 81686d441e C4Value((long)foo) doesn't always work because int32_t can be an int. 2009-07-21 15:22:51 +02:00
Günther Brammer 2c56657a41 Merge branch 'landscape' 2009-07-21 15:22:07 +02:00
Günther Brammer cec561796b Fix build with gcc and/or autotools and/or mingw 2009-07-20 22:29:48 +02:00
Nicolas Hake 03f01a6129 Use operator void* to allow use of C4Value in conditionals 2009-07-20 23:45:31 +02:00