Sven Eberhardt
0bb910814d
Qt Editor: Fix display and control of enum delegate parameters
2016-06-08 00:37:48 -04:00
Sven Eberhardt
f44cb9fa62
Qt Editor: Fix script errors on empty selection
2016-06-06 23:26:20 -04:00
Sven Eberhardt
16e31098b4
Qt Editor: Improve proplist and array display/editing
...
* Add/Remove element buttons
* Display customization of user delegates
2016-06-06 01:54:05 -04:00
Sven Eberhardt
b10da0629d
Qt Editor: More EditorProps types (string, array) and attributes (EditOnSelection, DefaultEditorProp)
2016-06-03 01:20:43 -04:00
Sven Eberhardt
af2a74b6ec
Qt Editor: Array editing
2016-05-28 09:30:54 -04:00
Sven Eberhardt
d304b17028
Qt Editor: Editing of child proplists
2016-05-24 23:06:00 -04:00
Sven Eberhardt
8a5dbdc73f
Qt Editor: More shape prop storage options
2016-05-23 19:22:49 -04:00
Sven Eberhardt
747077b71b
Qt Editor: Fix effect properties
2016-05-23 19:22:05 -04:00
Sven Eberhardt
881534bee0
Qt Editor: Shape properties
2016-04-25 16:17:10 -04:00
Sven Eberhardt
c0228be4e7
Qt Editor: More editor property types and functionality
2016-04-16 22:05:35 -04:00
Armin Burgmeier
0580132d81
Fix the build on Linux
...
With NULL, the function call was ambiguous. Use nullptr to choose the overload
taking a pointer and not the one taking an integer.
2016-04-10 13:27:16 -07:00
Sven Eberhardt
2a2fc68e3f
Qt Editor: Add user properties
2016-04-09 14:29:02 -04:00
Sven Eberhardt
879d501592
Merge remote-tracking branch 'remotes/origin/qteditor' into qteditor
...
Conflicts:
src/editor/C4ConsoleQtPropListViewer.cpp
src/editor/C4ConsoleQtPropListViewer.h
src/script/C4ValueArray.cpp
2016-04-04 19:34:02 -04:00
Nicolas Hake
1e1532ef8a
Darwin: What the hell does "#import" do anyway?
2016-04-04 23:27:50 +02:00
Sven Eberhardt
98c36e5955
Qt Editor: Implement setting of properties
2016-04-03 23:46:58 -04:00
Sven Eberhardt
e8f48fd53e
Qt Editor: Win32 build fixes
2016-04-03 23:46:20 -04: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
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
370b9cf898
Qt Editor: Disable vsync to avoid laggy viewports
2016-03-28 23:10:10 -04:00
Lukas Werling
a12e485458
Qt Editor: Add scroll bars to the viewports
2016-03-28 22:07:43 +02:00
Sven Eberhardt
9294d8b9dc
Qt Editor: Fix title and icon
...
Using the .ico needs a plugin that is not always loaded.
2016-03-26 23:55:28 -04:00
Lukas Werling
ca88a0a52a
Implement new Linux editor todos
2016-03-26 21:43:37 +01:00
Lukas Werling
6d9aef33c2
Merge branch 'qteditor-sdl' into qteditor
2016-03-26 20:57:10 +01:00
Lukas Werling
f8dc58e0ed
Remove Windows editor rendering hacks (untested)
2016-03-26 20:54:26 +01:00
Lukas Werling
61e97ee87e
Fix zooming not working in the editor
2016-03-26 20:40:09 +01:00
Lukas Werling
f9190cd1ea
Fix keyboard input for Qt editor/SDL
...
The SDL port used to define a separate set of key codes differing from
the usual ones. The SDL codes are now translated to make the Qt input
easy.
This also fixes a broken keycode for the '0' key.
2016-03-26 20:29:07 +01:00
Lukas Werling
30dd360a57
Update the Qt rendering widget periodically
2016-03-26 19:03:16 +01:00
Sven Eberhardt
dc7259bb1e
Qt Editor: Allow opening of user path from welcome page
2016-03-26 14:02:40 -04:00
Sven Eberhardt
f2daa51fa7
Qt Editor: Add "Welcome" dock widget
2016-03-26 01:36:40 -04:00
Armin Burgmeier
56545dc5f3
Fix crash when constructing C4ConsoleQtDefinitionListViewer
2016-03-25 14:16:43 -07:00
Sven Eberhardt
1613885f47
Qt Editor: Use qt resource to set icon
2016-03-23 22:56:17 -04:00
Sven Eberhardt
9690174007
Qt Editor: Fix windows includes
2016-03-23 18:20:23 -04:00
Sven Eberhardt
b1ac208249
Qt Editor: Add "File->New" menu entry
2016-03-22 23:08:05 -04:00
Lukas Werling
4290038909
Move all viewport drawing to QOpenGLWidget::paintGL
...
Unfortunately, this still doesn't fix rendering. Note that the paintGL()
isn't called periodically yet, only when resizing the window.
2016-03-22 16:50:38 +01:00
Lukas Werling
e1eb62a552
Fix warnings about overridden functions
2016-03-20 21:16:52 +01:00
Lukas Werling
75f62e52f2
Make Qt editor work with the SDL engine
...
Viewport rendering doesn't quite work yet, though.
2016-03-20 21:16:52 +01:00
Lukas Werling
08d7c9dcea
Implement GetShiftWParam() with Qt
2016-03-20 21:16:52 +01:00
Sven Eberhardt
a3cdfa3221
Qt Editor: Add shadow to landscape brush circle
...
To be more visible e.g. when drawing snow or in front of a white sky
2016-03-20 11:35:20 -04:00
Sven Eberhardt
3f7d68ff2c
Qt Editor: Sort objects in object creator by name
2016-03-19 14:40:23 -04:00
Sven Eberhardt
ed0647866e
Qt Editor: Add preview for new object placement
2016-03-19 14:40:22 -04:00
Lukas Werling
b64b4e8574
Compilation fixes for Linux
2016-03-18 21:34:21 +01:00
Sven Eberhardt
4f70fdbfc8
Qt Editor landscape drawing fixes and improvements. Add brush size preview.
2016-03-18 00:26:14 -04:00
Sven Eberhardt
645520c7af
Qt Editor: Fix viewport focus and keyboard handling.
2016-03-15 22:58:41 -04:00
Sven Eberhardt
f6ce50e9e7
Qt Editor: Use qt widgets for viewports
2016-03-10 00:07:17 -05:00
Sven Eberhardt
63bbba06bb
Qt Editor: Add missing creator files
2016-03-06 13:17:14 -05:00
Sven Eberhardt
80549ca2cc
Qt Editor: Add object creator
2016-03-06 13:06:29 -05:00
Sven Eberhardt
74b3983f7f
Fix some Qt editor crashes
...
Fix use-after-delete on proplists by item view and crash on recursive execution of message processing.
2016-03-03 00:13:39 -05:00
Sven Eberhardt
771a333e21
Qt Editor: Add effects to object list view + fixes
...
Also remove cache of C4Values and use callbacks on object and effect deletion instead.
2016-02-21 22:23:42 -05:00
Sven Eberhardt
a4d28c383b
Qt Editor: Implement object list view
2016-02-18 00:11:35 -05:00
Sven Eberhardt
e0e09133d6
Qt Editor: Add some string translations.
2016-02-18 00:10:30 -05:00
Sven Eberhardt
2af22ee824
New editor (Qt-based)
...
Work in progress. So far only for Windows.
2016-02-15 08:38:06 -05:00
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
934b519bb4
Update the SDL port to SDL2
...
SDL2 is a much closer match to the other platform code, and
allows the creation of OpenGL 3 core contexts, which is
now required.
2016-02-06 16:48:21 +01:00
Günther Brammer
37fd0a88c6
win32: Rename C4Window::hRenderWindow to renderwnd to match GTK+
2016-01-23 22:02:52 +01:00
Günther Brammer
9210c65e85
gtk: Hide usages of X11 behind #ifdef GDK_WINDOWING_X11
2016-01-23 22:02:51 +01: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
8257264415
Avoid a gtk runtime warning on empty statusbar text
...
(openclonk:12546): Gtk-CRITICAL **: gtk_statusbar_push: assertion 'text != NULL' failed
2016-01-17 23:34:29 +01:00
Sven Eberhardt
0a9cf34e77
Win32 editor: Allow resizing of main console window #1601
2016-01-16 21:01:11 -05:00
Sven Eberhardt
f1c4273bb9
Win32 editor: Allow resizing of property window #1601
2016-01-16 19:56:24 -05:00
Günther Brammer
39c2a0e18c
gtk: Use glib-compile-resources instead of gdk-pixbuf-csource
...
Yet another deprecated feature replacement. At least this one makes our
code more concise.
2016-01-11 01:52:49 +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
Günther Brammer
7613393359
gtk editor: Exchange cursor and time information
...
The toolbar doesn't have enough space by default, and this way we can use
the GtkStatusbar widget.
2016-01-10 00:19:07 +01:00
Günther Brammer
a185cae264
gtk editor: Simplify landscape preview drawing
...
In earlier versions, DrawPatternedCircle was a fairly complicated function.
Nowadays, it just copies pixels in memory, bounded by a circle. Since we
need to convert our surfaces to a format GTK+ can use anyway, combine that
step with the circle boundaries. Also use a cairo surface instead of a
GdkPixbuf. Cairo uses almost the same pixel format, except for
premultiplied alpha. Ignore this for now.
2016-01-10 00:19:07 +01:00
Günther Brammer
ab7f4f0bbf
gtk editor: Use GTK+ 3 layout widgets
...
Specifically, GtkGrid. For most cases, this is an increase in lines of
code, but the landscape tools dialog can now be done with just three layout
widgets.
While at it, use a toolbar and move the mode buttons into it, too.
2016-01-10 00:19:07 +01:00
Günther Brammer
67bf24f1e1
editor: Always remove previous suggestions before adding new ones
...
9e771ac
moved the Win32 ClearInput implementation into SetInputFunctions,
but broke at least GTK while doing that. 9a7d57c0d2
fixed the assertion
failure in GTK that resulted, but failed to restore the removal of the old
completions.
Fix this by folding ClearInput into SetInputFunctions in all implementations.
2016-01-08 15:22:00 +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
Armin Burgmeier
4d36f43025
gtk editor: keep scroll position when updating property dialog ( #566 )
...
This is still not quite optimal since we need to wait for line validation.
There does not seem to be a way to trigger immediate validation.
2015-11-12 16:04:28 -08:00
Armin Burgmeier
ef4ea2d931
Drop support for GTK+ 2
...
The minimum GTK version is now GTK+ 3.4, which is available since 2012.
It's part of Ubuntu LTS 12.04, and so should be available on any halfway
modern linux distribution.
This should allow getting rid of using deprecated GTK+ API much easier.
2015-10-18 14:45:52 -04:00
Sven Eberhardt
a81249438a
Win32 editor: Fix selection of textures with names included in other texture names (e.g. rock and rock_smooth).
2015-10-09 00:51:07 -04:00
Peter Wortmann
f0030e33e0
Warning fixes
...
Actually pretty sure a few of them were bugs. Hopefully no new
ones were introduced here.
2015-10-03 15:32:39 +01:00
Julius Michaelis
9a7d57c0d2
Fix assertion firing in C4ConsoleGUI::SetInputFunctions introduced by 9e771ac
2015-09-30 14:35:50 +02: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
d3ee2fac57
Fix sorting of script and engine functions in dropdown menu in editor.
2015-09-26 20:10:55 -04:00
Sven Eberhardt
15336a7ea8
Allow scenario saving onto same file when launched from an unpacked folder.
2015-09-24 22:36:45 -04:00
Sven Eberhardt
08f4d29d02
Fix memory leak by editor preview surface ( #1405 ).
2015-09-22 22:54:16 -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
Armin Burgmeier
fd285f6656
Create mipmaps only for static textures that are expected to be zoomed
...
Hopefully fixes #1403 .
2015-09-18 21:10:39 -04:00
Nicolas Hake
a11135e4ac
Win32: Properly clean up tools dialog after use ( #1377 )
...
When switching dialogs in editor mode, the (paint) tools dialog wouldn't
be properly cleared, instead only destroying the dialog window. Thus,
the next time it would be used, it'd try painting onto a device context
which did no longer correspond to any existing window, which made OpenGL
sad.
2015-09-18 15:02:31 +02:00
Nicolas Hake
51eb389739
Win32: Actually delete all of the landscape dlg bitmaps on close
...
We used to leak a bunch of HBITMAPs when the langscape tools dialog
closed, because for some reason we only destroyed a few instead of all.
2015-09-18 15:02:30 +02:00
Sven Eberhardt
9f4391ff0a
Fix ModeBack initialization on editor startup.
...
It would be set by state and then immediately reset in Default(). This had the effect that if you used the color picker on sky before ever selecting a background material, the wrong background would be used.
2015-09-17 22:25:46 -04:00
Armin Burgmeier
5107e23905
Select sane defaults for background material and texture in editor ( #1402 )
2015-09-17 20:03:53 -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
Sven Eberhardt
7d9f7aee02
Fix some unused variables and integer type conversions.
2015-09-01 22:18:39 -04:00
Sven Eberhardt
638ed81608
Implement background material controls in Windows editor.
...
Also removed auto-sort from the material combo boxes (so sky is on top in both) and put true background materials (i.e. sky and tunnel) on top.
2015-08-09 13:36:44 -04:00
Armin Burgmeier
ad57b5a9c9
Fix fill tool in developer mode
2015-08-04 23:15:16 -04:00
Armin Burgmeier
94ce958e4c
editor: sort background textures differently than foreground textures
...
The sort order in the combo boxes depends on the selected material.
2015-08-04 21:39:23 -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
b1e9c3924d
Make the Map field private in C4Landscape
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
a7ecc86dc4
Hide normal maps from landscape drawing texture list in editor. ( #1255 )
2015-02-14 23:45:16 +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
Nicolas Hake
1a1cecadd4
Update license texts
...
Some files, most notably ObjC and test cases, hadn't been updated to use
the new license header. Fix this.
2015-02-08 15:05:11 +01:00
Günther Brammer
5bcedb5bbf
Remove some redundant #includes
2015-01-25 18:53:48 +01:00
Nicolas Hake
2ef2c637a7
Remove several instances of disabled legacy code
2015-01-18 22:59: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
Armin Burgmeier
338910949d
Fix build with GTK+
2015-01-04 12:13:48 +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
Tobias Zwick
5e188aafb3
Fix setting small ViewOffsets. Refactor neighbouring code, enable a slight MouseAutoScroll by default
...
* make ViewX,ViewY,ViewOffsetX and Y private, add getters and setters that update variables that are dependent on these
2015-01-03 22:53:02 +01:00
Sven Eberhardt
f50e2e9e3a
Fix scroll bars in zoomed editor viewports on Windows.
2014-12-14 16:08:56 +01:00
Sven Eberhardt
8df39d06e4
Fix texture preview in editor tools dialogue on Windows.
2014-12-14 15:20:57 +01:00
Armin Burgmeier
56b19ac065
Fix brush preview in GTK+ developer mode
...
This looks like an artifact from when the alpha channel was inverted.
2014-11-24 16:32:25 -05: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
Kevin Zheng
6a1a551d01
Clean up deprecated headers and functions
...
"gdk_pixbuf_unref has been deprecated since version 2.0 and should not be
used in newly-written code. Use g_object_unref()."
sys/timeb.h isn't used anymore since 2005.
2014-05-27 00:30:20 +02: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
Maikel de Vries
db8e639b3e
Fixed some Clonk 4 string occurrences in C4Console
2014-03-20 21:16:27 +01:00
Martin Plicht
3d9c965ebd
mac: C4Particles: glGenVertexArrays fix for Mac OS X
2014-01-23 17:52:19 +01: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
Tim Blume
240193ad5a
Remove remains of Direct3D support
...
Direct3D hasn't worked for more than a year now, and there don't seem to
be any efforts to revive it. Remove it and concentrate on better OpenGL
support.
2013-11-02 21:39:34 +01:00
Martin Plicht
7ba5333f8b
mac: C4ConsoleGUI: Implement SetInputFunctions
2013-10-05 13:19:59 +02:00
Nicolas Hake
5254302547
Win32/Editor: Use StdCopyStrBuf for Common Dialog buffers ( #975 )
...
Change StdStrBuf usage to StdCopyStrBuf because FileSelect tries to
get a non-const pointer to its data, which correctly asserts when called
on a StdStrBuf that references const data.
Closes #975 .
2013-09-14 21:09:04 +02:00
Nicolas Hake
7e260aa9de
Remove C4ControlScript::fInternal
...
fInternal basically acted as a reverse "evil bit" as in RFC 3514: when
set, the engine would not do any checks on the script contained in the
control packet, nor log the script (visibly in game; the packet log
would of course contain the packet). A malicious game client thus would
be able to inject arbitrary script without people (immediately) noticing
anything was amiss.
As of this patch, only the host is able to execute arbitrary scripts,
and those will be shown in the message board for all players to see.
This privilege can be irrevocably disabled in network games by any
client by using the "/nodebug" message board command.
Closes #936 .
2013-09-04 20:18:06 +02:00
Nicolas Hake
ef9f79d815
Fix GTK build
2013-09-04 19:57:26 +02: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
9506c5ad97
Merge branch 'scancodes'
2013-05-24 17:47:59 +02:00
Günther Brammer
71d9e3c9e3
editor: Recognize pressing shift and alt in viewport again
2013-03-24 22:10:11 +01:00
Günther Brammer
346842470d
Clean up some superfluous includes
2013-03-24 18:33:01 +01:00
Sven Eberhardt
c64afb8626
Win32: Fix broken "Save as..." dialog in editor mode when engine is started with forward slashes in scenario path
2013-03-19 00:36:05 +01:00
Günther Brammer
2a9d63cb2a
gtk: Use higher-resolution logo as window icon
...
Metacity started to display bigger icons in the window list, so the higher
resolution is now actually useful for me. While at it, use gdk-pixbuf-csource
to generate the .h at build time from the .ico instead of duplicating the
data in the repository.
2013-02-12 01:08:02 +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
Günther Brammer
95de10f6a8
editor: Fix USE_CONSOLE
2012-11-16 00:05:58 +01:00
Sven Eberhardt
41cff7ad92
Editor: Fix handling of erronous map indices by material picker
2012-10-28 15:23:45 +01:00
Martin Plicht
4f8effcd10
mac: Fix editor window
2012-10-14 19:45:39 +02:00
Sven Eberhardt
db84b849b1
/sound reenabled. Sound-creating client now shown in client list box (F4). No sounds played when client is ignored.
2012-10-13 13:37:59 +02:00
Sven Eberhardt
8bdd761027
PlayerControls: Allow usage of keyboard scan codes instead of virtual key names using $%x format (Win32 only)
...
Also re-resolves keys if the keyboard layout changed at runtime.
2012-10-09 00:54:34 +02:00
Martin Plicht
b264612b10
mac: Move C4EditorWindowController from platform to editor
2012-09-02 20:57:49 +02:00
Martin Plicht
562565f865
mac: Move C4OpenGLView.mm/h to graphics/C4DrawGLMac.mm/h and move some C4AbstractApp functions to C4AppMac.mm to better match implementations for the other platforms
2012-09-02 20:51:43 +02:00
Martin Plicht
10a328d5ba
mac: Change prefix of Objective-C classes/filenames from Clonk to C4, give xib files names that make more sense
2012-09-02 15:39:29 +02:00
Martin Plicht
f6825d073e
mac: Compile with Automatic Reference Counting enabled
2012-09-02 13:56:53 +02:00
Günther Brammer
5a2831a1e7
editor: Increase default viewport size to 800x500
...
This should allow one to place four viewports plus the console and the
property/tool window on a 1920x1080 screen.
2012-08-19 21:01:54 +02:00
Günther Brammer
2fded23a1b
Editor: Get function autocomplete names from proplists instead of scripts
2012-05-18 17:49:38 +02:00
Martin Plicht
daabc5be16
mac: Fix compilation
2012-05-01 15:05:43 +02:00
Günther Brammer
1995b59adc
win32: C4Window::SetSize calls AdjustWindowRectEx, GUI::Dialog doesn't need to
2012-04-28 15:09:35 +02:00
Günther Brammer
1a29f8625d
Reorder engine source file organization a bit
...
This mostly consists of flattening the hierarchy, splitting the
graphics stuff out of platform, and a few smaller cleanups.
2012-04-27 19:04:43 +02: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
7632c823fe
gtk: Drop compatibility with GTK versions older than 2.18
2012-04-18 00:37:31 +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
Nicolas Hake
cbbcf200cf
win32: Build fix
2012-04-15 13:22:58 +02:00
Günther Brammer
15ebf70ab1
win32: Move C4GUI::DialogWindow platform code to C4WindowWin32.cpp
2012-04-01 22:16:59 +02:00
Günther Brammer
c865021716
gtk: Fold C4GtkWindow into C4Window
2012-04-11 04:15:33 +02:00
Günther Brammer
86a99ce458
C4Window: Introduce a separate WindowKind for the console window
2012-03-28 19:37:13 +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
Günther Brammer
25bbaef7d2
sdl-mainloop: Draw things again
2012-03-25 01:54:07 +01:00
Martin Plicht
9177c3e515
mac: Fix some Xcode warnings
2012-03-22 01:19:10 +01:00
Martin Plicht
6d21e74dab
elsif shmelsif
2012-03-20 18:32:21 +01:00
Martin Plicht
da7b38c263
C4EditCursor.h: Definition of ObjselItemDt contains platform specific thingies again
2012-03-20 17:30:41 +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
Günther Brammer
b895bbad31
Consolidate some random platform abstraction functions into a single file
...
That way, the windows variants can be used without requiring the Win32
C4Window implementation.
2012-03-12 20:43:27 +01:00
Günther Brammer
3ec624bb7a
win32: Clean up some leftover old frontend User Messages
2012-03-04 19:15:16 +01:00
Günther Brammer
89bf0fc35a
Remove obsolete C4ConsoleGUI::SetCaption wrapper
...
The old windows editor is gone and doesn't need to find the engine with
FindWindow anymore.
2012-02-29 23:49:45 +01:00
Günther Brammer
dfea0914a9
Merge the functions pointer branch
2012-03-09 17:42:48 +01:00
Günther Brammer
9f180dffee
Script: Remove ScriptGo, ScriptCounter, goto and the ScriptN callbacks
...
No scenario uses them, and ScheduleCall provides an alternative.
2011-09-19 21:33:05 +02: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
Günther Brammer
0cd46a2ebc
Wrap C4AulFunc::Name in C4AulFunc::GetName()
2011-10-14 00:40:55 +02:00
Armin Burgmeier
e44b216230
Enable face ordering individually for all submeshes
2011-10-15 21:35:39 +02:00
Günther Brammer
469eb4ddbc
editor: Do copy the scenario before saving as a scenario
...
The deletion only happened when saving as a savegame.
C4Console::SaveScenario also is a much more natural place to do the
copying, since it already contained the part where the new path was copied
to Game.ScenarioFilename.
2011-10-12 20:47:08 +02:00
Martin Plicht
d5c94ae089
Mac: Fix some compiler errors caused by class renamings (C4AbstractApp etc)
2011-10-09 19:33:14 +02:00
Günther Brammer
1cafba4be8
Rename files implementing C4AbstractApp and C4Window
2011-10-03 17:19:24 +02:00
Günther Brammer
2b6f4432de
Rename lpDDraw to pDraw
2011-10-03 16:30:18 +02:00
Günther Brammer
68d6b34f72
Replace SURFACE with C4Surface *
2011-10-03 16:07:07 +02:00
Günther Brammer
55f6bc8d0f
Replace CSurface and C4Surface with just C4Surface
...
The methods that previously were on C4Surface still are in a separate
file.
2011-10-03 16:06:41 +02:00
Günther Brammer
d835ab002a
Rename CStdWindow to C4Window
2011-08-27 23:12:01 +02:00
Günther Brammer
f4ff47239f
Rename CBltTransform, CBltVertex, CBltData, CPattern and CGammaControl
2011-09-30 22:15:51 +02:00
Günther Brammer
8039a35791
Rename CStdApp to C4AbstractApp
2011-08-27 16:20:39 +02:00
Günther Brammer
1f160083d7
editor: Do not copy and delete the scenario before saving
2011-09-28 01:10:31 +02:00
Günther Brammer
b2e9fcd13e
win32: FormatMessage now produces an utf-16 error message
2011-09-21 22:20:52 +02:00
Günther Brammer
9bc61db360
copyright notices update 2011
2011-09-01 16:58:52 +02:00
Nicolas Hake
fe747db554
Clean up copyright notices
...
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +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
Nicolas Hake
0d61cf0fe2
win32: Correctly recode strings to UTF-16 in editor mode ( #631 )
2011-08-19 22:03:03 +02:00
Günther Brammer
4d1238beb4
win32: Use Unicode APIs for File manipulation
2011-04-02 18:45:44 +02:00
Tobias Zwick
221aae1bf5
fixed some ridiculous formatting of consts
2011-08-04 01:30:37 +02:00
Günther Brammer
c4f16d42ce
Initialize some uninitialized variables
2011-07-18 02:12:37 +02:00
Günther Brammer
6e5332517d
editor: File/Save (As) again uses Game.ScenarioFile for saving ( #611 )
...
This should make it work again without having to understand what exactly
went wrong.
2011-06-24 14:25:30 +02:00
Günther Brammer
c70013b208
editor: File/Save Game As correctly preserves the Origin
2011-05-15 19:40:14 +02:00
Günther Brammer
3c943479ab
editor: File/Save creates a savegame when the original scenario was one
2011-05-15 19:38:47 +02:00
Günther Brammer
8bb2afc477
editor: Remove File/Save Game in favor of File/Save Game As
...
Overwriting a non-savegame scenario with a savegame is too seldomly useful
to feature prominently in the menu.
2011-05-15 18:07:26 +02:00
Günther Brammer
e537296829
editor: Change FileSelect abstraction to use StdStrBuf
...
Of course, windows still uses a buffer on the stack, but at least the other
versions don't.
2011-04-08 23:52:40 +02:00
Nicolas Hake
ab2be9b53f
win32/msvc: Fix build
2011-04-05 18:03:27 +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
b5dea20dae
Remove some dead code
2011-03-27 18:15:10 +02:00
Günther Brammer
05146718c0
Remove RECT structure from platformindependant code
2011-03-13 20:45:30 +01:00
Günther Brammer
6c2a89eaf8
Replace timeGetTime with a platformneutral GetTime wrapper
2011-03-13 17:25:35 +01:00
Armin Burgmeier
884809e8f2
Merge filename extension changes
2011-03-13 17:15:40 +01:00
Armin Burgmeier
2a2408f9a8
Change .c4p extension to .ocp
2011-03-13 16:39:48 +01:00
Armin Burgmeier
eaf62f71f9
Change .c4f extension to .ocf
2011-03-13 16:38:33 +01:00
Armin Burgmeier
e282bf9a9c
Change .c4s extension to .ocs
2011-03-13 16:11:55 +01:00
Günther Brammer
8569eaab8c
win32: Do not include windows.h from PlatformAbstraction.h
...
A few windows headers are still included, but not the big offenders
rpcndr.h, wingdi.h and winuser.h. Unfortunately, the latter two need to be
included from StdWindow.h, so still wind up in a lot files, which means
some of the #defines in them need to be undone. To avoid doing that in
multiple places, a few more files include StdWindow.h now.
2011-03-11 03:48:25 +01:00
Martin Plicht
9ff63b25d7
editor: cocoa: Enable/Disable some more user interface controls when game running/closed
2011-01-29 09:05:04 +01:00
Günther Brammer
cde66b249f
C4Include.h: Do not include C4Gui.h
...
The two dialogs in headers included in C4Game.h are only used by classes in
those headers, and do not need to be defined in the headers.
2011-01-24 01:15:58 +01:00
Günther Brammer
829874e011
editor/gtk: Migrate to non-deprecated APIs
2011-01-23 23:04:40 +01:00
Günther Brammer
8d3692e093
editor/gtk: Ask before overwriting a scenario
...
Previously, this was commented out because GTK 2.4 did not have the
convenience API, but Clonk requires a newer GTK now.
2011-01-19 02:16:48 +01:00
Günther Brammer
d3ddc171ee
editor/win32: Remove Components menu in favour of external editors
2011-01-19 02:14:59 +01:00
Günther Brammer
91e85c04f8
editor/gtk: Wrap text instead requiring horizontal scrollbars
2011-01-14 00:50:36 +01: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
49241e4512
editor/win32: Get id to reload on demand instead of every selection change
2011-01-13 01:16:30 +01:00
Günther Brammer
a2015e0db1
editor: Move function autocompletion list generation to C4AulScriptEngine
...
This actually removes some code duplication and makes the ScriptEngine
API smaller.
2011-01-13 01:09:06 +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
94335b6a49
editor: Move object debug information into C4Object(List)
2011-01-12 23:43:05 +01:00
Günther Brammer
05ccd857e3
editor/gtk: ObjectListDlg opens object properties on double click
2011-01-12 22:09:28 +01:00
Günther Brammer
b64653d003
editor/gtk: Pipette updates material combobox
...
This was lost in the editor source split.
2011-01-13 17:56:46 +01:00
Günther Brammer
8a0cc8d072
editor/gtk: Move ObjectListDlg to the front when activated while open
...
Previously, the menu entry did nothing when the dialog was open
2011-01-12 22:09:16 +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
476439a1d4
editor/gtk: Hide unimplemented menu entries and object list pictures
...
The components menu entries never got implemented for the gtk editor mode
and probably never will, given their limited utility. The object list
pictures are simply broken.
2011-01-10 00:03:56 +01:00
Günther Brammer
20afa7b470
console mode: Move keyboard input to CStdInProc, make it compile again
2011-01-10 00:01:17 +01:00
Martin Plicht
c56f385ecc
Mac: Cocoa: Make C4EditCursor.(Delete|Duplicate|GrabContents) accessible via main menu
2010-12-13 23:29:14 +01:00
Günther Brammer
6d3feabe69
Reduce #includes so that C4Include.h doesn't include C4Value.h
...
This should avoid many complete rebuilds.
2011-01-08 17:04:20 +01:00
Günther Brammer
00db064ad5
SDL: updates for the editor and CStdWindow::Init changes
2011-01-08 02:18:36 +01:00
Günther Brammer
a03f849a4f
application: Simplify the way startup and game initialization works a bit
...
The editor now uses the same methods to start a game startup uses. Startup
no longer uses a nested main loop. Without a game running in the editor,
the application is in startup mode.
2011-01-07 00:51:35 +01:00
Günther Brammer
4d218d46da
editor: Simplify net menu API
2011-01-04 20:31:55 +01:00
Günther Brammer
5d6a1f7bf2
editor/gtk: Populate function completion list
2011-01-04 17:17:21 +01:00
Günther Brammer
5d0f6fb30b
editor/gtk: Disable landscape controls when necessary
2011-01-04 17:16:51 +01:00
Günther Brammer
f990fe7651
editor/gtk: Warning fixes
2011-01-04 16:27:38 +01:00
Maikel de Vries
3943e0da03
Editor: Fixed window creation
...
Thanks to ck
2010-12-30 17:01:02 +01:00
Martin Plicht
a22d5ee35c
Mac: Add Cocoa port
2010-12-27 04:49:02 +01:00
Günther Brammer
884572bbb3
Script: Reflect C++ effect variables as properties
...
With references gone, the engine can sanely run code upon modification of
properties, or throw exceptions on read-only ones. This obsoletes one use
case of GetEffect, simplifying the function a lot.
2010-12-24 15:10:39 +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
Günther Brammer
220182639f
GTK editor mode: A little bit more margins and borders
2010-12-15 22:39:21 +01:00
Günther Brammer
8e52daf128
win32: make d3d code compile again
2010-12-14 02:06:48 +01:00
Günther Brammer
8c2d2d3cc1
editor: consolidate the four status text fields in one function
...
Only a very minor improvement in terms of lines-of-code, but still.
2010-12-14 02:06:23 +01:00
Günther Brammer
511e835955
GTK editor mode: Use a toolbar instead of normal buttons for main controls
2010-12-14 00:52:42 +01:00
Nicolas Hake
96f65c21a9
win32/editor: Consider editor active once window has been created
2010-12-13 17:37:07 +01:00
Günther Brammer
0b746f756a
Autotools: Add new editor files and rename a new header to .h
...
If it's #included, it's a header, even if it looks like a normal
compilation unit.
2010-12-13 03:11:06 +01:00
Armin Burgmeier
51aee6b4af
GTK editor mode: Fix widget callbacks (most interactions lead to a crash before)
2010-12-12 17:10:13 +01:00
Armin Burgmeier
27b39489aa
GTK editor mode: Fix GTK+ warnings when closing console window
2010-12-12 16:32:56 +01:00
Armin Burgmeier
fabc022481
Fix crash when starting a scenario in console mode on Linux
2010-12-12 14:53:57 +01:00
Sven Eberhardt
1d404730e4
console mode: fix tool ctrls
2010-12-12 13:58:10 +01:00
Sven Eberhardt
1b4b801fec
Win32 compile fixes
2010-12-12 13:53:51 +01:00
Martin Plicht
44928f1a8d
Platform-specific code in C4Console.cpp gets factored out into C4Console(Win32/GTK).cpp
2010-12-11 19:50:38 +01:00
Günther Brammer
aa0cef3a8d
win32: Replace most BOOL usages
...
The callbacks apparently changed for 64 bit support, and
RegisterWindowClass is just a simple C++ function. Unfortunately, there's
one callback left.
2010-12-03 20:25:17 +01:00
Sven Eberhardt
ec2fad98c5
fix OpenGL drawing after a new context has been created ( #450 )
2010-12-03 20:18:36 +01:00
Günther Brammer
b946751f36
Fix problems found by z33ky with g++ 4.6
2010-11-25 15:24:49 +01:00
Günther Brammer
25d74134c7
Support subpixel object movement in the editor
...
This also converts internal usage of ForcePosition to C4Real. For the
attach procedure, this should only result in smoother movements, but the
consequences for flight are less clear.
2010-10-10 18:46:23 +02:00
Nicolas Hake
58e0e4b14d
Lessen rounding errors when moving objects in zoomed editor window
2010-10-07 01:11:52 +02:00
Günther Brammer
9bf3288c77
Rewrite ParseCommandLine to work on argc/argv instead of a single string
...
Using the standard utility function on windows to split the line and the
operating system provided argc/argv on the others.
Also move the function to C4Application. It's not a huge win because the
flags are spread out between C4Game and C4Application pretty evenly, but
eventually most of them should move to a more appropriate place.
2010-10-04 21:39:19 +02:00