Commit Graph

53 Commits (eabca223f5e7c237f5d3bb88183d38a41cb9bced)

Author SHA1 Message Date
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
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
Tobias Zwick 94c618d153 add new type C4TimeMilliseconds for time measurements to solve problems when GetTime() overflows (#251)
The new type C4TimeMilliseconds behaves for the most part like a uint32_t but is overflow-proof in comparisons.
In some places, a 0-value (or uint_max) of the variable storing the time had the special meaning "not set yet". This has been resolved by having it as a pointer to C4TimeMilliseconds with NULL meaning that it has not been set yet.
2013-12-04 19:35:07 +07:00
David Dormagen b0bc2d627f implemented fallback for particle drawing in case glPrimitiveRestartIndex is not supported (#995) 2013-11-29 22:43:36 +01:00
Tobias Zwick ecf538cd1f refactor: consistently use time_t t... variables for times in sound system, stats, application and player controls 2013-11-29 14:16:14 +07:00
Tobias Zwick ddf8b181a1 sound system now clears its sound instances in the main game loop while in the startup gui (#818) 2013-11-11 00:56:40 +07:00
Tim Blume 240193ad5a Remove remains of Direct3D support
Direct3D hasn't worked for more than a year now, and there don't seem to
be any efforts to revive it. Remove it and concentrate on better OpenGL
support.
2013-11-02 21:39:34 +01:00
Nicolas Hake e753bf8168 Replace ResTable with a proper dictionary
ResTable (the main system string table) was a home-grown hashmap that
did not cope with collisions at all. Since we already have a proper
dictionary in C4LangStringTable, use that instead.
2013-10-19 19:28:54 +02:00
Martin Plicht eb070c98a2 debugrecread/write: required_argument, optarg for Windows does not support optional_argument 2013-05-26 14:15:15 +02:00
Martin Plicht 8b3390a5f4 No --debugrec option but --debugrec(write|read) with optional external file as argument. If not specified, record-internal debugrec file is used 2013-05-26 13:07:24 +02:00
Martin Plicht 524fe879aa Make DEBUGREC define a commandline option 2013-05-25 22:51:32 +02:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Günther Brammer d9c3c1d713 The dedicated server command line can now start a scenario
I don't know how useful that is without control over other options, but at
least its something instead of nothing.
2012-11-30 22:20:16 +01:00
Günther Brammer 7967d94a59 Merge StdFont.cpp and C4Fonts.cpp 2012-11-12 02:30:16 +01:00
Günther Brammer 77479e4f71 Get the window size fresh from the window instead of storing it
This makes Application.GetConfigWidth/Height simply return the appropriate
configuration value instead of mixing configuration and state in the same
function. The caller needing the state now uses C4Window::GetSize instead.
2012-10-22 23:15:48 +02:00
Julius Michaelis c4506a2b69 Fix entering fullscreen mode in lobby
Remove a debuglog
2012-10-14 17:45:01 +02:00
Julius Michaelis 69bbc6b4d1 Fix resolution reset in editor mode and on tabbing out
Win32's SetVideoMode doesn't enumerate display modes anymore for windowed mode
2012-10-14 13:28:38 +02:00
Sven Eberhardt 96cb91a2a2 Fix resolution stuff for ScreenX/ScreenY==-1 and automatic switching 2012-10-13 17:17:06 +02:00
Sven Eberhardt 8c2a07afa0 Fix broken graphics on first start with empty config
Config.ResX/Config.ResY, were set to -1 on first start. But those values are used frequently e.g. when the GUI screen is initialized
2012-10-13 12:50:15 +02:00
Sven Eberhardt 8bdd761027 PlayerControls: Allow usage of keyboard scan codes instead of virtual key names using $%x format (Win32 only)
Also re-resolves keys if the keyboard layout changed at runtime.
2012-10-09 00:54:34 +02:00
Tobias Zwick b5d0af513a remove splash video and option for it 2012-10-02 23:02:52 +02:00
Julius Michaelis 023aa90c0e Add config option for automatic windowed/fullscreen switching 2012-09-29 23:49:30 +02:00