Commit Graph

112 Commits (ebda8193ef6855e6df19332b75380d8061e889e7)

Author SHA1 Message Date
Sven Eberhardt ebda8193ef Replace NULL by nullptr in C++ sources
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Julius Michaelis 75289dabb5 Always Log chat message 2016-11-01 19:26:38 +01:00
Sven Eberhardt 4b3f8c0fef Remove EditCursorSelection and EditCursorDeselection callbacks
They never worked properly in network mode because all users would see the changes.

EditorProps, EditorActions and shape delegates now provide the functionality to have custom object editing widgets.

This also fixes a bug with the selection callback causing the object list to act up.
2016-10-15 10:06:43 -04:00
Sven Eberhardt 510d91fd00 Editor: Allow movement of HorizontalFix items by holding Shift and on object duplication 2016-10-10 21:46:17 -04:00
Sven Eberhardt b95d1387a4 Editor: Add "reset to saved scenario" command 2016-09-07 01:53:54 -04:00
Sven Eberhardt 3a6a7aceaa Qt editor: Fix object selection on EditorAction in network 2016-08-07 01:13:24 -04:00
Sven Eberhardt 5bb204d69b Qt editor: Fix net menu
It didn't work, had the wrong labels and crashed.
2016-08-06 21:12:04 -04:00
Sven Eberhardt fc24969899 Add EditorPlacementLimit property
Limits the number of object instances that can be placed of a given def.
2016-08-06 02:36:53 -04:00
Sven Eberhardt bce09d272d Add EditorInitialize callback 2016-08-04 22:12:10 -04:00
Sven Eberhardt f4ea3359d0 Add InitializePlayers callback after all initial players have joined 2016-07-22 00:13:57 -04:00
Sven Eberhardt 85c5deb099 Qt Editor: Add option to auto-select objects created by an EditorAction
To be used by the dialogue so you can press a button on the clonk to add and immediately configure a dialogue.
2016-07-07 01:36:58 -04:00
Sven Eberhardt a7aa89f168 Merge branch 'master' into qteditor
Conflicts:
	planet/Objects.ocd/Structures.ocd/StoneDoor.ocd/SpinWheel.ocd/Script.c
	src/platform/C4WindowSDL.cpp
	src/script/C4AulParse.cpp
	src/script/C4Effect.cpp
2016-06-20 22:27:03 -04:00
Sven Eberhardt 44d94d5043 Improve editor duplicate function to duplicate properties and object connections.
It serializes objects using a selective SaveScenarioObjects script callback and then just executes the generated script. This automatically saves important properties, connects switches and doors, etc.

This change also solves the problem that duplicating an elevator plus case would create two elevator cases.

If execution fails (e.g. because of script errors or because a non-saveable object was duplicated), the method falls back to the legacy duplication method of creating objects with the same prototypes at the same position.
2016-06-20 01:45:26 -04:00
Sven Eberhardt 25fa57cabf Qt Editor: Add "Static Flat" landscape mode 2016-06-17 18:44:59 -04:00
Sven Eberhardt b70882d7fa Editor: Object scaling+rotation 2016-06-17 00:07:49 -04:00
Sven Eberhardt 747077b71b Qt Editor: Fix effect properties 2016-05-23 19:22:05 -04:00
Günther Brammer 3e5d982475 Allow modifications to Scenario local vars from /script 2016-05-15 15:17:17 +02:00
Nicolas Hake 9dddf289db Merge branch 'master' into qteditor 2016-04-03 21:06:32 +02:00
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 0537df5f23 C4Object: Move C4Def.h dep out of header
C4Def is only ever used as a pointer inside C4Object.h, so we don't need
to include C4Def.h from it.
2016-04-03 13:24:26 +02:00
Nicolas Hake 735f9cc06b C4Landscape: Pull everything private out of the header
Since LTCG is enabled now, we don't have to define every function inside
the headers for ~xXx super speed xXx~, which means we can strip the
headers down to their bare minimum and reduce interdependencies and
therefore recompilation times by a lot.
2016-04-03 13:24:24 +02:00
Sven Eberhardt ed0647866e Qt Editor: Add preview for new object placement 2016-03-19 14:40:22 -04:00
Sven Eberhardt 80549ca2cc Qt Editor: Add object creator 2016-03-06 13:06:29 -05:00
Lukas Werling 8dd1450e94 Implement "gamepad stick moved" events for analog input
Analog moved events are only sent once per control frame.
2016-02-21 18:26:18 +01:00
Sven Eberhardt a4d28c383b Qt Editor: Implement object list view 2016-02-18 00:11:35 -05:00
Sven Eberhardt 92e03d8fdd Remove unused variable in C4ControlScript::Execute() 2016-02-02 21:51:51 -05:00
Günther Brammer e5f75c5a44 Remove a bunch of dead code, mostly player control related 2016-02-03 03:17:23 +01:00
Günther Brammer 68c436576e Simplify construction of C4AulParSets 2016-01-25 00:00:57 +01:00
Günther Brammer 20c22582ec Move DirectExec from C4AulScript to C4AulExec
In the long term, there is no reason DirectExec should be concerned with
C4AulScript/C4ScriptHost. In the meantime, the lookup code from Fneval can
be moved into the function.

This allows eval in scenario script to access scenario script locals, but
that seems harmless.
2016-01-24 12:27:23 +01:00
Günther Brammer 4c01592196 Move C4AulScriptFunc into its own source file 2016-01-24 12:27:23 +01:00
Günther Brammer ca9d95b25f Replace various C4AulFunc::Exec with C4PropList::Call
In C4Control.cpp, this improves correctness by selecting the right global
function instead of a random function.
2016-01-24 12:27:23 +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
Sven Eberhardt 6e4c7a2c2d Lobby ready button: Prevent message spam, improve icon updating and some small fixes.
* Show max one message per second per client
* Do not show ready message locally
* Fix observer flag reset by ready state change
* Reflect ready state change in client list immediately
2015-11-21 23:58:40 -05:00
dylanstrategie d284f49b6b Add "ready" button for clients in game lobby.
Signed-off-by: Sven Eberhardt <sven2@goldwipf.de>
2015-11-18 22:49:59 -05:00
Nicolas Hake 24b54211c5 Drop Min, Max, Swap for std::min, std::max, std::swap
The C++ standard library comes with perfectly fine implementations of
these functions, so there's no point in reimplementing them just for the
hell of it.
2015-11-15 13:53:01 +01:00
Sven Eberhardt 20d3de46cd Fix some unused variables. 2015-09-03 21:26:49 -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
Armin Burgmeier 3ec53c2c40 Update GTK+ editor so that one can draw background materials 2015-08-04 21:21:24 -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 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Nicolas Hake e21a5bdd44 Rename BoundBy to Clamp
"BoundBy" sounds like a predicate. "Clamp" is a common function name for
the operation in graphics processing, so it should be familiar to users.
2015-02-12 23:05:55 +01:00
Sven Eberhardt f815d7ea6c Fix EditCursor selection and deselection callbacks when duplicating objects. 2015-01-17 22:53:21 +01:00
Sven Eberhardt 2cde706611 Object movement in editor respects Def->HorizontalFix and attachment procedure.
When moving attached objects, it will now move the attachment target along with the object. This makes moving elevator cases and wind generators a lot easier.
2015-01-17 21:19:56 +01:00
Sven Eberhardt cf9aca70fe Add callback EditCursorMoved. 2015-01-17 20:53:45 +01:00
Sven Eberhardt c00d8c7a4d Add next_selection parameter to EditCursorDeselection.
If an object is deselected due to a new object selection, that newly selected object is passed as next_selection.
2015-01-17 20:37:54 +01:00
David Dormagen f89b8c8319 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Environment.ocd/Cloud.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/PowerConsumer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/PowerProducer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/System.ocg/ClonkControl.c
	src/gui/C4MouseControl.cpp
	src/landscape/C4PXS.cpp
2014-12-25 15:24:19 +01:00
Martin Plicht 03f43f462b C4ObjectList: Replace trivial cases of manual list traversal with iterator usage 2014-10-25 21:25:52 +02:00
David Dormagen 2a78b77bda renamed C4GuiWindow to C4ScriptGuiWindow to increase expressivness and reduce similarity with C4Gui* 2014-10-13 18:48:03 +02:00
David Dormagen 5722339e83 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/gui/C4Gui.h
	src/gui/C4GuiDialogs.cpp
	src/gui/C4GuiWindow.cpp
2014-08-13 11:52:41 +02:00