Commit Graph

207 Commits (e5814f8841dd055ee1ef6e68cf17d640c427eb15)

Author SHA1 Message Date
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
Günther Brammer 93a1e82907 Split out viewport stuff from C4GraphicsSystem to a new C4ViewportList 2010-09-29 03:44:05 +02:00
Günther Brammer 8e2ae2f543 Replace Application.DDraw with lpDDraw everywhere
There's no need for two globals always storing the same value.
2010-09-28 20:35:26 +02:00
Günther Brammer b9345fbf96 Object Draw: Fix editcursor interaction with Zoom 2010-09-25 22:54:27 +02:00
Nicolas Hake d99f558d72 win32/gl: Disable devmode material preview (#406)
The preview was broken anyway, since it rendered to the main
window of dev mode instead of the preview widget inside the
tool dialog. It has been disabled to avoid graphics corruption
on the main window.
2010-09-24 20:23:42 +02:00
Günther Brammer 3dde77508a Object Draw: Account for parallaxity when zooming
Also zoom a parallax sky correctly.
2010-09-24 19:51:34 +02:00
Günther Brammer 68d868f3ba Object Draw: Factorize calculation of position on screen into one function 2010-09-23 03:51:08 +02:00
Armin Burgmeier bd2f63bf1d Add an option to build against GTK+ 3 2010-09-22 17:11:19 +02:00
Nicolas Hake d8b97e964d win32: Fix build 2010-06-29 14:10:42 +02:00
Günther Brammer e109df627c Remove a lot of old obsolete palette code
Hardcode the few remaining palette references instead. We might want to
include some method to customize some colors again, but not for debug
display and such things.
2010-06-29 01:02:16 +02:00
Armin Burgmeier 9f65838ae8 Fix a couple of compiler warnings 2010-04-28 23:43:25 +02:00
Armin Burgmeier 70ac17c040 Mingw64 build fixes 2010-04-18 22:02:01 +02:00
Peter Wortmann 98c34b4fd3 Fixed a few warnings about booleans 2010-04-07 03:12:28 +02:00
Armin Burgmeier ffcefc82d4 Make drawing meshes additively and with mod2 work (again?) 2010-04-05 17:02:41 +02:00
Armin Burgmeier c2924041c9 Fix seperate->separate everywhere 2010-04-01 23:08:06 +02:00
Armin Burgmeier a4321646da Fix a crash when showing object properties in developer mode 2010-03-31 22:45:05 +02:00
Benjamin Herr 4378de147c Rerun astyle with missing \ added 2010-03-28 20:58:01 +02:00
Benjamin Herr 27287b981f Reformat everything according to style guidelines
as per http://forum.openclonk.org/topic_show.pl?tid=208
and http://wiki.openclonk.org/w/Style_Guidelines
via astyle
  --brackets=break
  --indent=tab=2
  --keep-one-line-statements
  --keep-one-line-blocks
  --indent-namespaces
  --convert-tabs
  --recursive
  --exclude=zlib
  --exclude=tinyxml
  src/\*.h src/*.cpp
2010-03-28 19:58:21 +02:00
Günther Brammer 5a44edb613 Store objectlocal named variables as properties
One still has to declare them in before usage, but LocalN can create new
variables now.
2010-03-27 18:52:32 +01:00
Günther Brammer c40456b55e Delete window surfaces before breaking the connection to the X server
Otherwise, destroying the OpenGL context would crash.
2010-03-25 20:58:46 +01:00
Günther Brammer b4e37b070b Change all indentation with spaces to use tabs instead
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Sven Eberhardt f32a4547e3 fix edit cursor highlight on zoomed object (#176)
MSVC assertion fix
2010-03-25 20:57:08 +01:00
Benjamin Herr f553e3f4d4 Use same file filter for Open/Open with players
Previously, the gtk /console window would not let me open scenarios
using the Open with players dialog.
2010-03-22 18:00:47 +01:00
Armin Burgmeier 56e33cc626 Make an object's current action a property
This fixes a crash on reload since the Action.pActionDef pointer becomes
invalid otherwise
2010-03-19 00:04:29 +01:00
Günther Brammer 21999a09e2 Move PageFlip() to CSurface 2010-03-05 22:15:25 +01:00
Günther Brammer 4204e2fa44 Move the console-window-update-hack to SetInitProgress
This avoids drawing to a surface while the surface is created, or during
other DebugLog stuff. SetInitProgress should be called during relatively
stable points.
2010-03-05 01:13:06 +01:00
Günther Brammer 8d81513c40 OpenGL: Clean up the context handling
Instead of sprinkling calls to select the right context throughout the code,
store the context to use in the CSurface, and create a CSurface for every
window that's drawn to, and use that as the target parameter for the drawing
calls. D3D is probably even more broken now, but it should work just fine with
the right surface creation incantation.
2010-03-06 15:07:30 +01:00
Nicolas Hake 0b137e8cd5 msvc: Build fixes for x64 compatibility
I don't know whether it works, because I don't have 64 bit libraries at the
moment. But at least the syntax errors are gone.
2010-02-27 14:48:01 +01:00
Benjamin Herr f3b35227ea avoid lots of gcc warnings 2010-01-25 05:00:59 +01:00
Nicolas Hake ed6f9424d7 Allow IDs longer than 4 characters
All C4IDs are now stored in auto-created global constants with the same name
as the ID itself. There is no special parsing of IDs anymore; this means that
you need to use the C4Id function if you aren't sure whether an ID exists.

IDs in portrait strings aren't working, since I expect portrait support to be
removed from the engine.
2010-01-25 16:57:57 +01:00
Nicolas Hake a41f896921 Replace global C4ID consts with member consts 2010-01-25 04:14:52 +01:00
Tobias Zwick edec15d64f merge 2009-11-30 17:24:14 +01:00
Nicolas Hake b3ab7fab5b Strip down C4Include.h to encourage self-sufficient sources 2009-10-23 09:29:58 +02:00
Nicolas Hake 52bde5a579 Remove BIG_C4INCLUDE define 2009-10-20 06:21:12 +02:00
Sven Eberhardt 1c941adddc fix gamepad control 2009-10-16 16:23:17 +02:00
Sven Eberhardt af8a4d56b7 silenced some msvc warnings 2009-10-13 20:41:57 +02:00
Nicolas Hake a346811dff [win32][devmode] Keep dialogs on VPs without HWND_TOPMOST
It's very annoying to have developer mode dialogs on top of everything else.
Keep them on top of the current viewport, but below other apps when OC isn't
the foreground.
2009-10-10 19:02:12 +02:00
Nicolas Hake b75e3090a4 [win32][devmode] Use correct ShowWindow flags for editing dialogs
SW_* flags are not bitfields, but an enumeration of values.
The old code only worked by chance, since SW_SHOWNORMAL|SW_SHOWNA is actually
9, which in turn is the value of SW_RESTORE. Since it seems non-activated
normal window size is the expected behavior, the correct value to use is
SW_SHOWNOACTIVATE.
2009-10-10 11:17:58 +02:00
Armin Burgmeier 809c2234cd Merged alphafix into default
This reverts the meaning of alpha components everywhere in engine and script.
alpha=0 means transparent, and alpha=255 means opaque.
2009-09-19 12:08:09 -04:00
David Dormagen a886a18180 replaced remaining TRUE and FALSE (both are invalid now) 2009-09-05 19:22:54 +02:00
Armin Burgmeier d021b9a586 Fixed a glib warning on startup about the main loop being active already
The exact warning message was

GLib-WARNING **: g_main_context_prepare(): main loop already active in another
thread

The problem was that there is code in C4Console.cpp which iterates the Glib
main loop to update the Console window while loading the game. This was not
synchronized with CGLibProc - we can't iterate the mainloop when the CGLibProc
already does.
2009-08-23 19:22:55 -04:00
Armin Burgmeier 4573315d42 Reverted meaning of alpha: Now 255 is opaque and 0 is transparent
Shader and D3D remains to be adapted yet.
2009-08-23 17:46:56 -04:00
Günther Brammer 9a8b5dd739 Replace BOOL by bool, TRUE by true, FALSE by false 2009-08-15 20:50:32 +02:00
Günther Brammer a28a6621da shuffle the #includes around a bit
This reduces the dependencies from src/lib to the rest of the code a bit.
2009-08-12 22:03:50 +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