Commit Graph

8600 Commits (epoxy)
 

Author SHA1 Message Date
Günther Brammer d4634526fd GL: Switch from GLEW to Epoxy
Epoxy automatically fetches the extension functions on demand, including
the GLX context creation functions. This means that you can't test the
function pointers for NULL anymore, because they're always set to a
resolver function until the first call. Instead, you have to check for the
availability of an extension by the extension's name. Thanks to Isilkor for
catching these.

On windows, epoxy invalidates all extension function pointers when the
GL context changes. This means we need to have an active context at all
times we call an extension function (like wglGetPixelFormatAttribivARB)
or else the code will jump to an invalid pointer. On the other hand, we do
not need to make it reinitialize the pointers ourselves.

Epoxy automatically uses an alias for a function if the requested name is
not available, like glDebugMessageCallbackARB instead of
glDebugMessageCallback. It also does not have the problem with varying
parameter types for that function. So switch to it while removing
GLDEBUGPROCARB_USERPARAM_IS_CONST.
2016-02-06 16:50:47 +01:00
Günther Brammer 408dfff96e Fix indentation of the KeyCodeMap table
It used a mix of tabs and spaces for indentation, and tabs to separate the
columns, which doesn't work with variable tab sizes and variable column
widths. Use tabs for indentation and spaces for column separation.
2016-02-06 16:50:47 +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 1010732ba8 Fix the SDL build 2016-02-06 16:47:56 +01:00
Günther Brammer 59e5a327b2 gtk: Add support for microsoft windows 2016-02-06 16:47:44 +01:00
Günther Brammer 487277b58d WGL: Stop caching the window handle in the GL context 2016-02-06 15:54:47 +01:00
Günther Brammer 263b3bf909 CMake: Remove USE_CONSOLE remnant
The code was from the time where the dedicated server was an alternative
toolkit, not a separate build target.
2016-02-06 15:54:47 +01:00
David Dormagen a13a9036a5 shovel: changed GetModifiedDigSpeed to GetDigSpeed
Half of the callback's work was done outside (fetching the target speed) for no good reason. It's now all done in the callback, making it less weird.
2016-02-05 21:06:30 +01:00
David Dormagen 71fa846016 Zaphive: now C4D_Object + DFA_ATTACH instead of C4D_StaticBack (#1653)
Which means that you can
1) Drag around the tree / nest in editor mode
2) Shoot zapnests that were put into a catapult by a scenario designer
3) Can RemoveObject a tree and the nest will fall down (instead of keep floating)
4) Can put zap nests in earth (just like in CR!)
2016-02-04 20:07:48 +01:00
Maikel de Vries 0ac6093b1a improvements to gem grabbers
- bats as a challenge
- less gem mining on normal
- everrock on insane
- basements for shipyard and inventors lab
2016-02-04 17:53:59 +01:00
Maikel de Vries 456678afbd add new items to worlds knowledge 2016-02-04 17:52:21 +01:00
Maikel de Vries e4095fb77b bat: placement option for tunnel only 2016-02-04 13:31:44 +01:00
Maikel de Vries ca3bf5e5cd only structures should have Exclusive=1
Otherwise these objects would block new constructions
2016-02-04 13:29:38 +01:00
Maikel de Vries 879048c366 show projectile trajectory preview for the grenade launcher 2016-02-03 19:49:23 +01:00
Maikel de Vries 17fae9c77b add GetSpeed counterpart to SetSpeed 2016-02-03 14:49:05 +01: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 52de8900dd Script: Remove PlayerObjectCommand 2016-02-03 03:17:22 +01:00
Günther Brammer 70d25b0b91 gtk: Fold contents of C4AppGTKImpl.h into C4AppGTK.cpp
C4WindowGTK.cpp no longer needs anything from it.
2016-02-03 03:17:16 +01:00
Günther Brammer cc4da38f74 gtk: Remove unused C4X11AppImpl::gammasize 2016-02-03 03:08:53 +01:00
Günther Brammer d0fb24adda Merge epoxy preparation branch
Various changes to make the commit switching to epoxy smaller.
2016-02-02 03:35:13 +01:00
Nicolas Hake cd01561d65 Remove Config.Graphics.RenderInactiveEM 2016-02-02 00:25:57 +01:00
Nicolas Hake 301a088ebc StdColors: Remove several orphaned functions 2016-02-02 00:00:26 +01:00
Nicolas Hake e9cf0f6fdc Stop pretending we support 16 bit color
The GTK and OS X platforms already ignored the requested bit depth and
always used 32 bit. Windows and SDL would set a 16 bit color depth for
the screen, but still did all of the rendering short of the final
present in 32 bit.
2016-02-02 00:00:23 +01:00
Maikel de Vries 2000f741c3 kill tracing: fix relaunching tests 2016-02-01 22:02:09 +01:00
Maikel de Vries c2131ee122 kill tracing: reduce code duplication in tests 2016-02-01 21:21:30 +01:00
Maikel de Vries 00b43d3d60 kill tracing: add test for blasting free objects 2016-02-01 21:21:30 +01:00
Nicolas Hake 0c3811fe66 Keep rendering while unfocused (#1638)
In windowed mode, we shouldn't stop rendering just because we have lost
focus. However, we don't need to render at full framerate; throttling to
5 fps should be sufficient. Note though that we still have to calculate
game ticks at full speed so network games don't slow down when a player
tabs out of the game.
2016-02-01 20:48:17 +01:00
Nicolas Hake 98c966c7d1 Win32: Don't take/restore copies of all textures on app (de)activation
Even though we (might) change the resolution, that doesn't result in
loss of textures because we don't recreate the OpenGL context. Therefore
we also don't have to restore their data. I believe this code is a relic
from the DirectX renderer, which would lose textures when switching away
from a fullscreen window.
2016-02-01 20:48:17 +01:00
Maikel de Vries e7c296104f set controller of dig2material objects when the digger exists
This ensures correct kill tracing for example a piece of coal falling on an enemy after being dug out.
2016-02-01 20:20:26 +01:00
David Dormagen 76ac759533 shovel: fix the Destruction functionality
Previously, it was checked incorrectly whether the action was "Dig". Then the check was thrown out completely in https://git.openclonk.org/openclonk.git/commit/39e86474fccbd54eb357175d2b8fbec5c60639ab - which did remove the warning but not solve the defect.
This should be a proper fix. The shovel only does stuff when the user is digging AND actually using this very shovel for it.
2016-02-01 20:15:01 +01:00
Maikel de Vries a390f8f248 fuse and activate iron bomb on cannon shot, fuse dynamite as well 2016-02-01 00:10:23 +01:00
David Dormagen 6c5294a05f fixed invisible UI elements accepting player input
When an UI element was only visible to a player (via the Player property), it still allowed ALL players to click on buttons.
I am wondering why noone else noticed that bug before. It's possible that it didn't show when the visibility was set via the menu's Target (instead of the Player property).

Maybe this was the cause of the "clicks sometimes do nothing" bug?
2016-01-31 23:36:06 +01:00
David Dormagen 99d57c83fa fixed Height of Icon_Cancel 2016-01-31 23:36:05 +01:00
Sven Eberhardt beaf214a8f Hot Ice: Add grenade launcher mode 2016-01-31 16:52:01 -05:00
Maikel de Vries 39e86474fc fix wrong use of GetAction in shovel 2016-01-31 22:40:40 +01:00
Günther Brammer 03d11cd596 Merge script branch 2016-01-31 21:51:58 +01:00
Günther Brammer a6b1ee79e9 Fix assertion failure when rendering mesh with degenerate transform
It isn't enough to check the top-level mesh, because attached meshes also
get a transformation from script. At least cotton branches sometimes do
that.

So check the matrix directly before using it and skip rendering.
2016-01-31 21:51:50 +01:00
Sven Eberhardt 6e251832b8 Fix league signup with usernames containing non-ascii characters 2016-01-31 12:26:07 -05:00
Maikel de Vries 273c574dc0 shovel: symmetrize dig angle limits 2016-01-31 09:59:41 +01:00
Armin Burgmeier eb1750a7d3 Fix drawing of the FoW debug mode (#1659) 2016-01-30 11:49:20 -08:00
Günther Brammer d3428003a8 Fix navigation in player menus with more than one column/row 2016-01-30 16:03:22 +01:00
Günther Brammer 23acdc6060 Use the same team id in view update as in team join 2016-01-30 16:02:31 +01:00
Maikel de Vries 4bcdfc451e block construction sites based on Exclusive and not on planes (#1534)
This makes more sense, exclusive object block all other construction sites, irrespective of their planes.
2016-01-30 14:46:14 +01:00
Maikel de Vries fb0932df26 fix additional preview overlay after combining with other structure
This caused an overlay warning in the previewer object when constructing an elevetor and combining it with another elevator and detaching it again.
2016-01-30 12:28:35 +01:00
Maikel de Vries 2d22022a20 correctly place/preview basement for elevator (#1534) 2016-01-30 12:28:35 +01:00
David Dormagen 447be6c91d Clonk control: moved "menu" local to "clonk.control.menu"
"menu" is an error prone name in one of the most frequently used/overloaded objects of the planet. Actually, there was a bug in some other thing which disappeared now. So I guess something, somewhere uses the name "menu", too.
Anyway, this is more consistent (because the other control stuff is in this.control, too) and less error prone. So it's a good change regardless of whether it actually fixes an existing bug.
2016-01-29 22:48:59 +01:00
David Dormagen a9ac0c85ab inventory bar: moved slot number to the top (#1639)
This separates the slot number visually from the item stack count.
2016-01-29 21:14:07 +01:00
Maikel de Vries ce6cbc1cf6 add more kill tracing tests 2016-01-29 18:56:09 +01:00
Günther Brammer a1a6e36cde GL: Deduplicate the check for glObjectLabel 2016-01-29 18:37:32 +01:00