Commit Graph

75 Commits (eabca223f5e7c237f5d3bb88183d38a41cb9bced)

Author SHA1 Message Date
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 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
Günther Brammer 11bbeb2a5b Rename WITH_DEVELOPER_MODE to USE_GTK
This mirrors USE_WIN32_WINDOWS, USE_SDL_MAINLOOP and USE_COCOA.
2016-01-23 20:36:33 +01:00
Günther Brammer c20f98dcf9 gtk editor: Support EditCursorCommands, too
Reuse the windows code for this. Both versions had three parts: Enabling
the right menu items, adding the selection-specific ones, and showing the
menu. The second part is now common code, with the platform code in a new
function, since it grew big enough to be worth sharing.
2016-01-11 01:52:49 +01: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 9e771acfd1 Editor: Add most recently entered script lines to dropdown list.
This also enables easier auto-completion via arrow-down.
2015-09-27 15:28:17 -04:00
Sven Eberhardt 26dff21b8a Fix tool picker on materials with sky background.
It selected an invalid texture before.
2015-09-19 22:37:45 -04:00
Sven Eberhardt 5b539a5b34 Fix manipulation of multiple objects in editor.
It would only do work on the last (and possibly random objects because initialized memory was accessed).
2015-09-15 21:29:26 -04:00
Armin Burgmeier 20eb0615ee Custom shader for drawing sky
Add a C4ShaderCall parameter to tho most important drawing functions, and
make C4DrawGL's CreateSpriteShader public with additional parameters to
specify additional defines and shader slices. C4Sky uses this to compile its
own shader with OC_SKY defined.
2015-09-12 18:15:34 -04:00
Sven Eberhardt 20d3de46cd Fix some unused variables. 2015-09-03 21:26:49 -04:00
Armin Burgmeier ad57b5a9c9 Fix fill tool in developer mode 2015-08-04 23:15:16 -04:00
Armin Burgmeier 3ec53c2c40 Update GTK+ editor so that one can draw background materials 2015-08-04 21:21:24 -04:00
Armin Burgmeier 006cf68874 Some refactoring, and restore support for Map.bmp
The new behaviour that allows 255 mat-tex combinations (once we increased
C4M_MaxTexCount...) is enabled with MapFg.bmp, and then MapBg.bmp can be
used to draw IFT or other fancy things.
2015-08-04 21:21:23 -04:00
Armin Burgmeier 92f3a3e749 Remove GBackIFT in favor of a lookup in the background surface 2015-08-04 21:21:23 -04: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
Sven Eberhardt 42b9ca4577 Add custom EditCursorCommands available in editor context menu.
Example: this.EditCursorCommands = ["Explode(20)"] on an item will offer a menu entry to explode the object. Commands may be either strings or function pointers, but function pointers will always be called by name.
2015-01-03 23:21:36 +01:00
Martin Plicht b2fcc2ee32 C4EditCursor: Instead of manual list traversal use iterator 2014-10-25 21:26:06 +02:00
Martin Plicht 03f43f462b C4ObjectList: Replace trivial cases of manual list traversal with iterator usage 2014-10-25 21:25:52 +02:00
Armin Burgmeier a597dc28d7 Use PerformMultiLines where appropriate 2014-10-08 18:33:46 -04:00
Armin Burgmeier 05a3e86472 Make C4EditCursor use PerformMultiPix instead of DrawPix for selection frame 2014-10-08 18:33:45 -04:00
Günther Brammer 04e1c74c05 Merge Call fix commit 2014-04-19 19:02:27 +02:00
Günther Brammer 22016e075f Replace some usages of C4ID with C4Def*
In particular those that made the c4script shell depend on C4Id.cpp.
2014-04-19 19:02:22 +02:00
Julius Michaelis 2c7d9c0549 Fix a load of warnings (two were actual errors, only in diagnostics though) 2014-04-17 19:24:41 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Nicolas Hake 7e70554a04 Use control packet for more editor mode actions
Actions changed include dropping definitions, (de-)selecting objects,
player elimination. This removes some more pre-assembled C4Script code
going across the network unchecked.

Part of #936.
2013-09-04 17:51:55 +02:00
Günther Brammer 71d9e3c9e3 editor: Recognize pressing shift and alt in viewport again 2013-03-24 22:10:11 +01:00
Sven Eberhardt 06e70b7b74 Synchronized EditCursor(De)selection, so you can edit scenarios in network mode and/or record it. 2013-01-15 23:30:23 +01:00
Sven Eberhardt f51a085592 Added object callbacks EditCursorSelection and EditCursorDeselection. Useful to show or hide developer stuff in the editor. 2013-01-15 23:10:25 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Sven Eberhardt 41cff7ad92 Editor: Fix handling of erronous map indices by material picker 2012-10-28 15:23:45 +01:00
Armin Burgmeier e11e9845d1 Fix Windows build 2012-04-23 21:45:01 +02:00
Armin Burgmeier 206f90adbc Pass through key state handling from event callbacks (#745)
This gets rid of Application.IsAltDown() and friends which was used for
this purpose in C4MouseControl and C4EditCursor. In case non-event
callbacks need to access the state of the modifier keys the state is
now cached in these classes (if it wasn't already).

This new solution is supposed to be more robust, since the key modifier
state comes always directly from the input event. This fixes #745, where
Application.IsAltDown was stuck for some reason.

I updated the Windows and Mac code as well, but wasn't able to test it,
it might not compile and/or not work, in which case please someone fix it :)
2012-04-22 22:09:06 +02:00
Günther Brammer bc5e77d9d0 Simplify C4Game::FindObject
It isn't exposed to script anymore, and the internal users don't use most
features. This might even speed up lava-in-oil a bit.
2012-04-15 23:32:37 +02:00
Günther Brammer 40de33ca3c win32: Make sdl-mainloop option work
As it doesn't have the editor, this is only useful for compiling
more of our code on more platforms.
2012-03-23 22:53:56 +01:00
Martin Plicht 6d21e74dab elsif shmelsif 2012-03-20 18:32:21 +01:00
Martin Plicht a8cadb8723 Amazing fixes to make it compile for Mac again 2012-03-20 16:38:45 +01:00
Julius Michaelis 489255f7b5 Editor mode: Allow moving objects which are selected but covered by other objects 2012-03-17 18:10:36 +01:00
Julius Michaelis dee0811b23 Add an option to select an arbitrary object under the cursor via context menu to windows console mode
Follow-up for 73a05d70b206
2012-03-15 13:58:56 +01:00
Julius Michaelis b4dba5b255 Add an option to select an arbitrary object under the cursor via context menu to gtk console mode 2012-01-27 23:01:37 +01:00
Armin Burgmeier e44b216230 Enable face ordering individually for all submeshes 2011-10-15 21:35:39 +02:00
Günther Brammer 2b6f4432de Rename lpDDraw to pDraw 2011-10-03 16:30:18 +02:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Günther Brammer 69225246f1 editor/gtk: Also open the properties dialog when switching to edit mode
And remove the last remains of the win32 implementation, too.
2011-08-30 20:21:19 +02:00
Nicolas Hake 5c243fb048 win32: Always open property dialog when switching to C4CNS_ModeEdit (#635) 2011-08-30 15:23:49 +02:00
Günther Brammer 3f7e879ffe win32: Use Unicode APIs for the user interface 2011-04-03 15:47:02 +02:00
Günther Brammer 4e01716f28 editor: Automatically open landscape tools dialog
The landscape tools is mostly useless without the dialog, whereas the other
modes are useful without the dialog.

But mostly this is a side effect of removing PropertyDlg.Active along with
the C4PropertyDlg class.
2011-01-13 18:21:59 +01:00
Günther Brammer 3ef004506c editor: Store the selected objects only in EditCursor 2011-01-12 23:40:22 +01:00
Günther Brammer c908c47ca5 editor: Immediately update information about selected objects
This avoids resetting the selection of the object list dialog. Previously,
after selecting object in the list, C4EditCursor::Execute would set the
object list selection to what the user just had selected.
2011-01-12 21:31:10 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00