Commit Graph

494 Commits (master)

Author SHA1 Message Date
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