Nicolas Hake
4fdafbc78a
Move StdColors.h ref from C4Surface.h to files that actually need it
...
C4Surface.h doesn't require anything from StdColors.h, so there's no
reason to reference the latter there.
2016-02-08 02:13:18 +01:00
Günther Brammer
52de8900dd
Script: Remove PlayerObjectCommand
2016-02-03 03:17:22 +01:00
Günther Brammer
03d11cd596
Merge script branch
2016-01-31 21:51:58 +01:00
Maikel de Vries
4bcdfc451e
block construction sites based on Exclusive and not on planes ( #1534 )
...
This makes more sense, exclusive object block all other construction sites, irrespective of their planes.
2016-01-30 14:46:14 +01:00
Günther Brammer
5be63d1e96
Use macros to reduce duplication in script engine definitions
...
While at it, make AddFunc take a C4PropList* instead of a C4AulScript*.
2016-01-25 00:00:58 +01:00
Günther Brammer
5287121d86
Use void instead of C4Void for engine functions that always return nil
...
This allows the removal of quite a few return C4Void();.
Also stop pretending that Nillable<void> is the same class as Nillable<T>.
Its only function was as an implementation detail for C4Void, which doesn't
need any implementation details anymore.
2016-01-25 00:00:58 +01:00
Günther Brammer
68c436576e
Simplify construction of C4AulParSets
2016-01-25 00:00:57 +01:00
Günther Brammer
ce2b8f45b8
Make FnSetPlrKnowledge(C4Player*) a C4Player member function
...
The overload with FnSetPlrKnowledge(C4PropList*) will get problematic.
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
8425169dd6
Rename C4Script.h to C4GameScript.h
2016-01-24 12:27:23 +01:00
Günther Brammer
234101ddbc
Remove C4Script.h from C4Aul.h
2016-01-24 12:27:23 +01:00
Günther Brammer
c3c402061b
Move struct C4ScriptConstDef to C4AulDefFunc.h
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
6b6dd96719
Move GameScript.GRBroadCast to Game.GRBroadCast
...
This avoids a dependency on ::Objects from C4ScriptHost.
2016-01-24 02:09:14 +01:00
Günther Brammer
a5f797f96b
Move miscellaneous global functions from C4Effect.cpp to their users
2016-01-24 02:09:14 +01:00
Sven Eberhardt
bdc0274e3d
CommandFailure: Route missing sound effect to failure function playing clonk skin sound.
2016-01-10 21:16:34 -05:00
Sven Eberhardt
8552b3a8f9
Change return value of InsertMaterial when inserting outside landscape bounds #1509
...
Fixes clogged pump when pumping outside map.
2016-01-08 01:05:22 -04:00
Günther Brammer
a115801f0e
Script: Rename FnGetLeagueScore to GetLeagueScore
2016-01-04 05:10:10 +01:00
Nicolas Hake
3da14127a4
C4TransferZone: Merge ctor/Default, dtor/Clear
2015-12-29 02:59:01 +01:00
Günther Brammer
249715bbcc
Script: The Prototype of effects is readonly
...
The new effect API will be triggered by the effect having a prototype, and
doing that accidentally would be far too confusing.
2015-12-22 18:07:38 +01:00
Günther Brammer
8e889479cc
Script: Find_Property can also search for engine-defined properties
...
Previously it used a C4PropList API that only checked the properties
set by script.
2015-12-22 18:07:38 +01:00
David Dormagen
dcfb986e34
moved sounds into subfolders
...
This completes http://forum.openclonk.org/topic_show.pl?tid=3215
2015-12-13 22:14:55 +01:00
Nicolas Hake
617a0828fb
Aul: Throw exceptions by value, not by pointer
...
Throwing values instead of pointers simplifies memory management at the
catch site.
2015-12-08 13:17:40 +01:00
Sven Eberhardt
d758c85028
Add max memory time to music resume feature ( #1461 )
2015-12-03 19:17:41 -05:00
Sven Eberhardt
cc12230d56
Add "immediate" parameter to SetPlrView and ResetCursorView script functions to force viewport scroll position to the target.
2015-12-02 22:11:28 -05:00
David Dormagen
a1cefd2681
reduced volume of default splashing sound
...
Which was much louder than other sounds and felt a bit weird.
2015-11-05 20:49:57 +01:00
David Dormagen
4556fbe011
documented GetPlayerControlState
2015-10-15 18:05:21 +02:00
Sven Eberhardt
d136dc22c0
Implement landscape inflammation.
...
It used to create the non-existent FLAM objects from the engine. Use a script callback to a global function that creates Flame objects instead.
2015-10-09 16:24:16 -04:00
Sven Eberhardt
17e0e2f423
Add breaks between music.
2015-09-30 22:50:18 -04:00
Sven Eberhardt
8614ce46c4
Create default ambience controller in all scenarios.
...
Can be overloaded by providing a custom function InitializeAmbience either globally or in the Scenario proplist.
2015-09-28 20:20:31 -04:00
Sven Eberhardt
3f6cacade4
Add parameters to Music and SetPlayList to resume a piece from where it was last interrupted.
2015-09-27 20:58:37 -04:00
Sven Eberhardt
3723024e2f
Added implicit layer check to local calls of FindObjects-family functions ( #1383 ).
...
Also fixed some docs links. Note that GetObjectLayer and SetObjectLayer are still not documented.
2015-09-09 20:19:45 -04:00
Sven Eberhardt
e3213812a9
Implement GetStartupTeamCount() script function ( #1246 ).
...
Returns number of teams containing active players at game start.
2015-09-06 23:29:22 -04:00
Sven Eberhardt
b74750f1cb
Fix sound modifier parameter in SoundAt script function.
...
The modifier was created but not applied.
2015-09-03 21:26:50 -04:00
Sven Eberhardt
20d3de46cd
Fix some unused variables.
2015-09-03 21:26:49 -04:00
Sven Eberhardt
84fbff95a8
Add Find_Property.
2015-09-02 23:55:45 -04:00
David Dormagen
ac738735b2
Merge branch 'master' into Controls
...
Conflicts:
planet/Objects.ocd/Vehicles.ocd/Airplane.ocd/Script.c
src/game/C4Game.cpp
src/game/C4GraphicsSystem.cpp
src/gamescript/C4GameScript.cpp
2015-09-02 08:19:34 +02:00
Peter Wortmann
30857e835e
Shader gamma implementation
...
In comparison to the old system, this is a downgrade - instead of being
able to set a full color mapping by gamma ramp, we now get just a value
per colour channel.
Upside is that we do not need to play around with the global gamma ramps
any more, which was arguably the wrong way to do it.
This commit will likely break everything that has been using gamma so far.
2015-08-31 17:35:08 +01:00
Sven Eberhardt
6ab6a1ac3c
Add script interface for some EFX sound modifiers.
2015-08-27 21:44:23 -04:00
Sven Eberhardt
d92df758a8
Added pitch parameter to Sound() script function and allow pitch and sound level to be modified for sounds that have already been started.
...
Sound() called when the instance is already running used to fail. Now, it always succeeds (also for script sync safety) but updates the sound level and pitch parameters. SoundAt has not been modified since it allows creation of multiple concurrent sound instance of the same effect without object context.
2015-08-09 18:40:42 -04:00
Armin Burgmeier
51986b68ef
Allow script functions to access background landscape
...
Add GetBackMaterial() and GetBackTexture(), and allow DrawMaterialQuad to
specify a background mat-tex combination.
2015-08-04 21:21:24 -04:00
Armin Burgmeier
92f3a3e749
Remove GBackIFT in favor of a lookup in the background surface
2015-08-04 21:21:23 -04:00
David Dormagen
36544bd56c
Merge branch 'master' into Controls
...
Conflicts:
planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c
planet/Objects.ocd/Vegetation.ocd/Branch.ocd/Script.c
planet/Objects.ocd/Vegetation.ocd/Trunk.ocd/Script.c
planet/System.ocg/FindLocation.c
2015-08-02 19:24:04 +02:00
Sven Eberhardt
0d48105b46
Added shape library.
...
Also fixed some coconut tree reproduction issues.
2015-07-31 00:42:01 -04:00
David Dormagen
196f528201
Merge branch 'master' into Controls
...
Conflicts:
planet/Objects.ocd/HUD.ocd/FancyGridMenu.ocd/DefCore.txt
planet/Objects.ocd/HUD.ocd/GridMenu.ocd/DefCore.txt
planet/Objects.ocd/Helpers.ocd/Dummy.ocd/Graphics.png
planet/Objects.ocd/Items.ocd/Tools.ocd/WindBag.ocd/Script.c
planet/Objects.ocd/Items.ocd/Weapons.ocd/Javelin.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Flag.ocd/Marker.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
planet/Objects.ocd/Structures.ocd/Flagpole.ocd/Script.c
planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c
src/game/C4Game.cpp
src/gamescript/C4GameScript.cpp
src/gui/C4GameMessage.cpp
src/landscape/C4Landscape.cpp
2015-06-03 22:32:36 +02:00
Nicolas Hake
b791404147
Remove superfluous pointer check
...
The pointer to a member variable of a static object is never NULL, so
checking for this is useless.
2015-05-25 16:27:16 +02:00
Sven Eberhardt
21500a81a9
Fix pump to clear the last row of pixels ( #1057 ) and allow pumping from pump without source pipe.
...
ExtractMaterial has been changed to be able to slurp in from the most distant horizontal position rather than the closest to the extraction top center.
Also speed up ExtractMaterial for the common case of no required horizontal shifts.
2015-05-01 18:13:41 +02:00
Sven Eberhardt
116a5b4ae6
Add Find_InArray ( #1073 ).
2015-04-28 18:59:50 +02:00
Sven Eberhardt
976ed549b6
Change C4FO and C4SO constants to be increasing regularly.
...
Regular values allows compilers to use jump table optimizations for switch statements and I don't see any upsides of the previous values.
2015-04-28 18:29:27 +02:00
Nicolas Hake
874a9f2632
Pathfinder: Use callback functors instead of raw function ptrs
2015-03-31 17:21:52 +02:00