Commit Graph

172 Commits (master)

Author SHA1 Message Date
Nicolas Hake c638647227 CMake: Remove <locale.h> test
We're not using the <locale.h> header anywhere besides including it
for no purpose, so we can drop the test (and the inclusion).
Additionally, the header is part of standard C++.
2018-12-31 12:30:06 +01:00
Lukas Werling a73e5fc871 undef "s" macro in C4Config
Necessary for unity builds, but also has a high conflict probability in
general.
2018-10-14 23:16:59 +02:00
Lukas Werling 5395a8dc84 Add WITH_APPDIR_INSTALLATION configuration option
With this option enabled, `make install` will install the files in an
AppDir-compatible directory structure suitable for creating an AppImage.
2018-09-24 19:22:32 +02:00
Lukas Werling 9855f9355e Autodetect "/proc/self/exe"-equivalent on FreeBSD (#1999) 2018-02-17 12:41:16 +01:00
Maikel de Vries f5f8b18204 remove unused AttractLightning defcore entry
Not used in either the engine or in script, script implementation of lightning can use a script defined property.
2017-07-15 14:00:19 +02:00
Sven Eberhardt aa7c964fab Ignore main exe path for group loading when loading data from planet/ subfolder
This fixes a slowdown in scenario selection when some of the dependency folders (e.g. qt) are searched for scenarios.

Should also fix a bug where music is loaded from the exe path instead of planet/ if present
2017-07-11 20:43:21 -07:00
Tushar Maheshwari 3a4f49ad90 Revisit #includes
Consolidate the include statements scattered across the code in accordance
with the comment in C4Include.h. The advantages are listed in the same
comment.
Furthermore, it follows llvm-include-order which is the logical
extrapolation of the project's style guideline wherever possible
(C4Include.h being the most-frequent exception).
2017-05-15 13:24:59 +02:00
Tushar Maheshwari e58a7884e4 Automatic fixes using clang-tidy
See http://forum.openclonk.org/topic_show.pl?tid=3376 for discussion.

Close GH-41
2017-05-03 20:30:45 +02:00
Sven Eberhardt c300c79cc7 Fix Windows saving of keyboard config if custom assignments are deleted (hack) 2017-03-26 21:19:58 -04:00
Nicolas Hake 7f2cce6f79 Fix WITH_AUTOMATIC_UPDATE, non-Windows platforms 2017-03-16 23:18:38 +01:00
Nicolas Hake 30c5bb5f8d Aul: Allow the user to selectively enable/disable warnings
This commit introduces a new Aul directive "#warning", which can be used
to enable or disable warnings for a particular piece of code.

"#warning enable" enables all warnings.
"#warning disable" disables all warnings.
"#warning enable empty_parameter_in_call" selectively enables one
specific warning while not affecting any other.

All warnings that used to be controlled by Developer.ExtraWarnings
remain disabled by default.
2017-02-13 15:07:50 +01:00
Sven Eberhardt ebda8193ef Replace NULL by nullptr in C++ sources
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Julius Michaelis 65940080a7 Remove two unused config options, set music to default off with the dedicated.
I admit that this is just a hack to silence some warnings by default.
2016-10-30 21:36:29 +01:00
Julius Michaelis e61dcbe4c3 Extend the netpuncher: clients can ask hosts for a connection initiation to circumvent port restricted NATs 2016-10-23 22:34:43 +02:00
Julius Michaelis 376ca5a9df Prevent using USE_CONSOLE in lib{misc,c4script} 2016-10-22 17:42:23 +02:00
Lukas Werling 8d9657a800 Change default puncher address to netpuncher.openclonk.org 2016-09-09 18:31:39 +02:00
Lukas Werling 7177c261b3 Bring back and fix the netpuncher
As carrier-grade NATs are becoming common, many players cannot host
Clonk games at all. The simple STUN-like netpuncher from Clonk Rage
which was removed three years ago is already effective against some
DS-Lite NATs.

With some extensions, we should be able to make it work with more
restrictive NATs as well.

This reverts commit 72002cc366.
2016-09-08 21:10:06 +02:00
Sven Eberhardt 11b317808f Qt Editor: Add toggle help button to "?" menu 2016-07-25 21:39:35 -04:00
Sven Eberhardt a7aa89f168 Merge branch 'master' into qteditor
Conflicts:
	planet/Objects.ocd/Structures.ocd/StoneDoor.ocd/SpinWheel.ocd/Script.c
	src/platform/C4WindowSDL.cpp
	src/script/C4AulParse.cpp
	src/script/C4Effect.cpp
2016-06-20 22:27:03 -04:00
Lukas Werling a71ca69f1d Make ingame mouse cursor size configurable
On High-DPI displays, the mouse cursor is very tiny. We'll probably want
some high-resolution cursor graphics at some point, but the current ones
scale good enough.
2016-05-23 21:14:03 +02: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 0abef8dac5 Remove "High-res landscape" option
We're requiring shaders for everything else we render, so there's no
point in having a shader-free landscape renderer around.
2016-03-31 19:22:17 +02:00
Sven Eberhardt f2daa51fa7 Qt Editor: Add "Welcome" dock widget 2016-03-26 01:36:40 -04:00
Günther Brammer e5f75c5a44 Remove a bunch of dead code, mostly player control related 2016-02-03 03:17:23 +01:00
Nicolas Hake cd01561d65 Remove Config.Graphics.RenderInactiveEM 2016-02-02 00:25:57 +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
Sven Eberhardt 28e794654c Add network option to disable UPnP.
Also add some more UPnP failure messages to log.
2016-01-24 00:11:14 -05:00
Sven Eberhardt 102b44aa35 Give system path precedence over user path #831 2016-01-08 00:28:23 -04:00
Nicolas Hake d737dc1b05 Remove C4Video, StdVideo
Video recording and playback only worked on Windows, and recording only
handled video, not game audio. As such, it was of fairly limited use,
and there's lots of software available these days that handle both.
2015-12-28 11:43:41 +01:00
Nicolas Hake 72002cc366 Kill netpuncher
Another piece of code that hasn't been tested in ages, gone. The default
puncher address was still pointing to clonk.de, which I'm very certain
isn't providing UDP hole punching services anymore.

Instead of a bespoke hole punching implementation we should use a STUN
lib.
2015-12-13 16:11:08 +01:00
Sven Eberhardt 7f827d4b15 Add optional debug logging for shape texture loading.
Set Config.Developer.DebugShapeTextures to 1 for testing.
2015-11-20 20:35:05 -05:00
Nicolas Hake 8fc57b69c3 Don't ZeroMem non-POD types
Using memset to initialize non-POD types doesn't work. Or rather, it may
work right now, but will fail when somebody adds a member that relies on
its constructor doing something (like for example any STL container).
Either way it's undefined behavior and needs to go. Furthermore, using
it to reinitialize an object also prevents any dtors from doing their
work when needed.

A new helper function InplaceReconstruct will take an object of nothrow-
default-constructible type, and call the dtor to properly clean up
before placement-new reconstructing the object in the same location.
This is still bad design, but unfortunately removing the Default/Clear
functions from every object currently using them is a herculean task.
2015-11-14 16:43:19 +01:00
Julius Michaelis f356c9053a Invert the functionality of CNAT_CollideHalfVehicle 2015-10-21 22:15:33 +02:00
Peter Wortmann df6d564d2d Remove "ColorAnimation"
Not used any more
2015-10-03 15:32:39 +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 34a4586a16 Reduce default music volume.
The music is beautiful but it's louder than all the other sounds somehow.
2015-09-13 00:34:18 -04:00
Sven Eberhardt 288de8c89f Fix /todo failing when launching from program folder without proper access permissions.
Write the TODO.txt at user path instead.
2015-09-13 00:14:42 -04:00
Peter Wortmann 30857e835e Shader gamma implementation
In comparison to the old system, this is a downgrade - instead of being
able to set a full color mapping by gamma ramp, we now get just a value
per colour channel.

Upside is that we do not need to play around with the global gamma ramps
any more, which was arguably the wrong way to do it.

This commit will likely break everything that has been using gamma so far.
2015-08-31 17:35:08 +01:00
Julius Michaelis 2a9b481087 Add a new variant of vehicle that can be passed from below but be walked on from above. 2015-08-30 22:19:36 +09:00
Armin Burgmeier c43ca4ce9a Increase maximum number of material-texture combinations to 255
This is the maximum we can do. One value is reserved for diff / transparency,
and we have 8bpp surfaces.
2015-08-04 21:21:24 -04:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
David Dormagen d07893dadc fixed player names, clonk names and selector info being zoomed (#687) 2015-03-22 09:58:43 +01:00
Sven Eberhardt 90cca08d63 Add /todo message board command.
Adds text to local TODO.txt file. Useful for taking notes quickly e.g. when testing new scenarios in a network game.

TODO filenames are configurable. Default file is TODO.txt in the scenario file (if it's unpacked) and TODO.txt on the current path if access to the first location failed.
2015-03-05 16:04:07 +01:00
Nicolas Hake cac94659d0 wGL: Allow OpenGL debugging
This introduces a new command line parameter "--debug-opengl", which
will create special debug OpenGL contexts and attach a callback that the
driver will invoke when it detects a problem. The callback will then
write the error message to the logfile, and break into the debugger if
one is attached.
Currently only works on Windows.
2015-02-16 17:45:10 +01:00
Martin Plicht 2ca9a77cc4 mac: Do #include guessing dance until compile success 2015-02-04 21:52:04 +01:00
Sven Eberhardt c2d9e1b46e Change MouseAutoScroll default to off for now. 2015-01-04 15:49:11 +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 98093961ec Add packet logging option.
This should reduce log spam in network games.
2015-01-03 18:15:41 +01:00