Previously, the graphics code tried to set a refresh rate as close to
85 Hz as possible. This led to black screens when the display driver
would report a refresh rate that was not actually supported by the
monitor.
This change also uses the currently set monitor orientation, instead
of always selecting a non-rotated display mode.
The editor now uses the same methods to start a game startup uses. Startup
no longer uses a nested main loop. Without a game running in the editor,
the application is in startup mode.
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
Some build systems, particularly MSVC, don't ship with an implementation
of getopt or getopt_long in their standard library. This patch adds a BSD
licensed implementation, to be used in case there is no system provided
one.
Using the standard utility function on windows to split the line and the
operating system provided argc/argv on the others.
Also move the function to C4Application. It's not a huge win because the
flags are spread out between C4Game and C4Application pretty evenly, but
eventually most of them should move to a more appropriate place.
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.
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.
Lobby: Desaturation filter and watermark on unregistered players gone
Startup: Doesn't show "Unregistered" anymore
About: No "register now button"
Network: /regjoinonly switch removed
Instead of doing the resolution switch deep inside the OpenGL initialisation
code, the Application does it on startup, and the code responsible for
runtime resolution switches is responsible for the resolution-dependant
initialisations.
Unfortunately, the D3D code uses two different but similar pieces of code
for both cases, which need to be merged.