Commit Graph

73 Commits (3a59c152508802cdb05a2d5c84008d809699a0cd)

Author SHA1 Message Date
Lukas Werling 3a59c15250 Add openclonk:// protocol handler (#1657) 2019-01-02 17:16:09 +01:00
Lukas Werling f8c0fe6f82 Fix fallthrough in command line parsing 2018-04-23 12:12:32 +02:00
Lukas Werling 55a81ea76a Launch editor via argv[0] on Unix systems without /proc/self/exe (#1999) 2018-02-17 12:57:43 +01:00
Tushar Maheshwari a661eab867 Automatic fixes using clang-tidy for header files
A follow-up on a previous PR GH-41. The discussion in the forum can be
viewed at http://forum.openclonk.org/topic_show.pl?pid=33086.
Run clang-tidy (without auto, pass-by-value and using checks) to fix the
header files not modified in the previous PR.

Summary of the changes:

 - C++11 member initialization.
 - nullptr instead of 0 for pointers.
 - override for functions declared virtual in base class.
 - default trivial special member functions
2017-05-15 13:46:46 +02: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
Nicolas Hake bc5df7f35b CMake: Add date of commit to logfile
But only if the build is from a clean index. Otherwise, the logfile will
contain the date of build.
2017-04-12 12:34:36 +02:00
Nicolas Hake 7f2cce6f79 Fix WITH_AUTOMATIC_UPDATE, non-Windows platforms 2017-03-16 23:18:38 +01:00
Nicolas Hake a151ac12de C4Application: Remove StdStrBuf 2017-03-16 19:13:06 +01:00
Nicolas Hake 71f8cb0699 C4Application: Remove unused flag IsInGameTick 2017-02-05 13:20:18 +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 890669ea0d Silence a warning from getopt when using --config 2016-10-30 21:36:29 +01:00
Julius Michaelis 376ca5a9df Prevent using USE_CONSOLE in lib{misc,c4script} 2016-10-22 17:42:23 +02:00
Julius Michaelis 34a9a1de8d Twiddle with header organization: lib{misc,c4script} do no longer include GL/glew.h
(Yes, it is just that complicated.)
2016-10-20 18:46:32 +02:00
Lukas Werling eff406a181 Fix plain --lobby not working 2016-10-06 21:19:31 +02:00
Lukas Werling fc10992ab7 Fix crash when starting a game in fullscreen mode 2016-06-20 16:55:23 +02:00
Sven Eberhardt 2a2fc68e3f Qt Editor: Add user properties 2016-04-09 14:29:02 -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
Sven Eberhardt f2daa51fa7 Qt Editor: Add "Welcome" dock widget 2016-03-26 01:36:40 -04:00
Sven Eberhardt ed0647866e Qt Editor: Add preview for new object placement 2016-03-19 14:40:22 -04:00
Lukas Werling e52bf6962b Fix gamepads only working after game start
This affected all platforms other than SDL.
2016-02-23 20:20:41 +01:00
Lukas Werling 24ef8b43af Grab the mouse while in-game (#1637)
This only implements this for the SDL port for now.
2016-02-12 21:09:40 +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
Armin Burgmeier e13cda4bd0 Use an IBO for the particle system
glDrawElements needs an IBO when using a core profile. The particle
system's IBO is actually quite static since it's always a triangle
strip with 2 triangles followed by a PRI. Therefore, this reduces the
amount of data we have to send to the GPU compared to the previous
solution.

Also, remove the workaround when glPrimitiveRestartIndex is not
available since it is always available with OpenGL 3.1 and when using
a core profile we are guaranteed to have OpenGL 3.1 anyway.
2016-01-17 11:37:17 -08:00
Günther Brammer 16ef28e05f Drop unused C4VERSIONBUILDNAME and C4ENGINEINFO
This was used to name snapshot releases of the Network2 branch, and has
seen almost no use since.

C4ENGINEINFO(LONG) was a duplicate of C4ENGINENAME and C4ENGINECAPTION.
2015-12-29 15:47:55 +01:00
Nicolas Hake 7475b89bd2 C4MessageBoard: Merge Default/Clear into ctor/dtor 2015-12-28 11:43:40 +01:00
Nicolas Hake 33e2626649 Win32: Stop trying to steal focus from other apps
If the user switched away from OC while it was loading, there was
probably a reason for that. We'll no longer assume we're the most
important app in the world and steal the focus away from whatever the
user was doing.
2015-12-27 13:22:18 +01:00
Sven Eberhardt 171080cbd5 Play frontend music by tag. 2015-12-12 12:08:45 -05:00
Sven Eberhardt 737b1fd8fd Save screenshots in background thread (#998, #1104).
Also ensure music keeps streaming while collecting data for full map screenshot.
2015-09-29 20:48:34 -04:00
Sven Eberhardt e4eedf3c45 Unify directory separators of filenames given on command line (#1066) 2015-09-19 00:06:42 -04:00
Sven Eberhardt c22157c04b Simplified implementation of StartupPlayerCount.
Setting it by player filenames in the beginning is not necessery (and wrong for invalid files). Also copying it through C4S.Head didn't serve any purpose because PlayerInfo is synchronized in network and replays and startup player count can be deduced from that.

Tested in standalone, network, savegames, runtime join and replays from standalone, savegames and runtime join (Some replays of network games were bugged but that's an unrelated error).
2015-09-06 22:31:04 -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
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
Sven Eberhardt 49f991c819 Move shader logging into separate file and log only in editor mode (#1209) 2015-01-03 17:53:59 +01:00
Tobias Zwick 4981182cf8 Merge remote-tracking branch '_origin/master' into lights
Conflicts:
	src/c4group/C4Components.h
2014-12-15 21:16:40 +01:00
Armin Burgmeier 7a8778acca Make sure graphics resources are loaded before drawing anything
This was not required before, but now most drawing operations require
the shaders to be loaded from Graphics.ocg. Therefore, move the graphics
resource loading earlier in the startup sequence, and make sure we don't
initialize the message board prematurely in OnResolutionChanged().
2014-12-06 17:16:36 -05:00
Sven Eberhardt baf05264d1 Implement music fading.
Moved music system execution from game tick execution into main application execution so music fading works when the game is paused or lagging.
2014-12-06 18:04:55 +01:00
Armin Burgmeier 73e4f5a89c Remove some unused code in C4Draw 2014-11-04 11:24:55 -05:00
Sven Eberhardt e740938bbb Fix .ocu updates and allow direct download of installer for future updates. 2014-10-05 14:32:23 +02:00
Sven Eberhardt 3fc1f02c6d Implement custom scenario parameter selection in startup scenario selection dialogue and by command line. 2014-09-27 16:05:32 +02:00
Sven Eberhardt cfe242b2b8 Implement ogg file playing for OpenAL-based audio system. (#1096) 2014-08-07 13:46:45 +02:00
Günther Brammer 8780a69b51 Improve the messages for path problems
C4Group::Open would sometimes overwrite more specific error messages or
not mention the problematic path. DirectoryIterator::Read also now mentions
more detail. Two superfluous messages were removed to make space.
2014-06-09 04:17:17 +02:00
Julius Michaelis e5b7ef5b80 AutoFrameSkip: Graphics option to reduce lag by slow
Skips drawing every second frame if drawing the previous frame was too slow
Setting is controlled by game host
Default: on

Imported from Clonk Rage

From e6e680f49ac50a352e9a051ee21622e7f00648b6 Mon Sep 17 00:00:00 2001
From: sven2 <sven2@786b8e90-9c09-0410-89a9-bccc6ef1e79b>
Date: Sat, 21 Sep 2013 21:34:44 +0000
Subject: [PATCH] + AutoFrameSkip: Graphics option to reduce lag by slow
 clients in network games

git-svn-id: https://www.clonk.de:83/svn/clonk/stable@14501 786b8e90-9c09-0410-89a9-bccc6ef1e79b
2014-04-03 14:53:12 +02:00
Tobias Zwick a04a1b697b fix game does not initialize when OS runs for longer than 30 days or so.
Special thanks to Yshxod for having the patience and debugging the game with me!
2014-01-28 00:04:31 +07:00
Martin Plicht 426e6c659a C4Application: Check if pGameTimer exists before removing/deleting 2014-01-23 17:52:53 +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
David Dormagen a10c9316ef renamed DynamicParticles* to Particles* and CreateParticleEx to CreateParticle 2013-12-17 22:32:01 +01:00
Tobias Zwick fe2a400c02 replace global function GetTime() with class function C4TimeMilliseconds::Now() 2013-12-07 21:27:01 +07:00