Commit Graph

585 Commits (4a2048575f22b18d9bc7c6db6d8348d774e197c4)

Author SHA1 Message Date
Günther Brammer 4b4b8781a0 Make GTK+ and SDL2 work together
If the gamepad code initialized the SDL video subsystem, GTK+ crashed in
libX11. Or something along those lines.

Making the optional subsystems using SDL for gamepads and audio use
SDL_InitSubSystem and only the SDL Application port do the full SDL_Init
is the proper way to do things in any case.
2016-02-06 21:12:56 +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 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 2fe0beebdb Move contents of src/gamescript into other directories
C4Effect will get moved into the ScriptEngine, and just three source files
is a bit too little for one directory.
2016-02-02 02:57:46 +01:00
Günther Brammer 8425169dd6 Rename C4Script.h to C4GameScript.h 2016-01-24 12:27:23 +01:00
Günther Brammer 4c01592196 Move C4AulScriptFunc into its own source file 2016-01-24 12:27:23 +01:00
Günther Brammer e790d2c327 Remove duplicated stubs for the scriptengine from mape 2016-01-24 02:09:14 +01:00
Günther Brammer 78e3457ff7 MSVC: Remove support and workarounds for versions older than 2015
We require that version for its C++14 support anyway.
2016-01-23 23:10:02 +01:00
Günther Brammer 93f12150c4 CMake: Remove obsolete USE_X11 option and add USE_WIN32_WINDOWS
USE_WIN32_WINDOWS was previously defined in PlatformAbstraction.h. Move it
to CMakeLists.txt and config.h like its peers. Replace USE_X11 with USE_GTK
or GDK_WINDOWING_X11 as appropriate.
2016-01-23 20:36:34 +01:00
Günther Brammer 11bbeb2a5b Rename WITH_DEVELOPER_MODE to USE_GTK
This mirrors USE_WIN32_WINDOWS, USE_SDL_MAINLOOP and USE_COCOA.
2016-01-23 20:36:33 +01:00
Nicolas Hake 8136edb45a Pull tests into main CMake project 2016-01-23 13:49:05 +01:00
Nicolas Hake 8579c0d522 MSVC: Sort individual projects into folders 2016-01-23 13:49:04 +01:00
Nicolas Hake c2dbd319bb VS 2015: Enable Edit-and-Continue for 64 bit builds
Visual Studio 2015 supports Edit-and-Continue for 64 bit builds, so we
can enable it.
2016-01-21 23:18:10 +01:00
Günther Brammer aa2e660094 Merge branch 'cmake' 2016-01-18 01:12:59 +01:00
Günther Brammer debc559bc7 CMake: Fix building mape on systems with more than one GTK+ CPP flag 2016-01-18 01:12:41 +01:00
Günther Brammer e4b96c49d4 CMake: Remove unmaintained list of dependency packages 2016-01-17 23:34:29 +01:00
Günther Brammer bc3754b871 Merge branch 'editor' 2016-01-16 16:00:57 +01:00
Günther Brammer 30c579b846 CMake: Link to freetype even if it is not in the default directory 2016-01-11 11:10:53 +01:00
Günther Brammer 0f94dd2249 Remove obsolete IFT icons
This probably breaks the macosx editor even more.
2016-01-11 01:52:50 +01:00
Günther Brammer 39c2a0e18c gtk: Use glib-compile-resources instead of gdk-pixbuf-csource
Yet another deprecated feature replacement. At least this one makes our
code more concise.
2016-01-11 01:52:49 +01:00
Martin Plicht 1a3b47dcbb CMakeLists.txt: Stop setting CMAKE_XCODE_ATTRIBUTE_GCC_PREFIX_HEADER in case of Xcode 2016-01-10 18:01:29 +01:00
Günther Brammer 7b7f6023b8 CMake: Bump minimum version requirement to the version in Debian stable 2015-12-29 18:35:55 +01:00
Günther Brammer 7400c7e20e CMake: Remove -std=gnu++0x-removal code 2015-12-29 18:35:55 +01:00
Nicolas Hake c0befc6ba0 Remove C4RTF
The only use of C4RTF in its final moments was parsing out plain text
from RTF files anyway, so why even go to all the trouble instead of just
storing plain text in the beginning?
2015-12-29 17:51:43 +01:00
Günther Brammer 77a71c39d3 Require some C++14 support (make_unique, index_sequence) 2015-12-29 15:47:55 +01:00
Günther Brammer b8953d8a09 CMake: Simplify precompiled header support for MSVC
Instead of conditionally adding src/C4Include.cpp, simply add it always. It
doesn't do anything with other compilers, but the tiny speedup from not
compiling it isn't worth the additional complexity.
2015-12-29 15:47:55 +01: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 0ef4e71363 MSVC 2015: Add natvis file to solution
This employs a rather ugly hack to make CMake do what we want. CMake
doesn't allow us to add items directly to the solution (as opposed to
one of the projects inside it), and thus requires us to abuse its lack
of parameter validation to manually add the file.
2015-12-29 13:58:15 +01:00
Günther Brammer 475ec23ef5 OS X: Use the same compiler flags code as the other stuff
Also remove redundant and inconsistent setting of the
XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS property, and a dead variable.
2015-12-29 01:48:41 +01:00
Günther Brammer 78f806f03c CMake: Fix check for getopt.h 2015-12-29 01:48:41 +01:00
Günther Brammer 4f64d13fc0 CMake: Remove broken addition of GLEW_DEFINITIONS to openclonk
This only didn't break earlier because this code was located before
find_package(GLEW). The add_definitions(${GLEW_DEFINITIONS}) call that
actually adds the macro is a bit broad, but the macro doesn't harm the
targets that do not use GLEW.
2015-12-29 01:48:41 +01:00
Nicolas Hake 6051c3e171 OS X: Stop overriding C++ version 2015-12-28 21:45:22 +01:00
Günther Brammer 3d00540311 CMake: Check that getopt.h works without additional libraries
Since there's already a getopt library in thirdparty/, there's no need to
guess about ways to make it work with a system header without support in
the C library itself.
2015-12-28 20:12:35 +01:00
Günther Brammer bb5f4c9440 Switch gcc to C++14, if supported
Keep the check for C++0x/C++11 for now. Remove that flag instead of not
adding it, because it most likely still is in the CMAKE_CXX_FLAGS, which
are cached.
2015-12-28 18:50:32 +01:00
Günther Brammer f07038d3ac CMake: Move Mac OS bundle contents near the generated header commands
Both contain resources for the editor GUI, so they fit together.
2015-12-28 18:50:31 +01:00
Günther Brammer 715cdd009f CMake: Move the headers and libraries checks before source lists
This way, the source lists are nearer to the executable definitions, which
also contain source lists.
2015-12-28 18:50:31 +01:00
Günther Brammer 9c241f507e CMake: Move commands to generate headers from bitmaps into a section 2015-12-28 18:50:31 +01:00
Günther Brammer c3f67cae5a CMake: Arrange the CMakeLists.txt a bit more clearly 2015-12-28 18:50:29 +01:00
Günther Brammer 4b672c3518 CMake: Move vasprintf check to the other compiler checks 2015-12-28 18:48:46 +01:00
Günther Brammer 1ae9343c46 CMake: Silence warnings from GTK+ header files 2015-12-28 18:48:46 +01:00
Günther Brammer 5271b038db CMake: Remove remnants of USE_CONSOLE option
It wasn't set anymore, except as a C++ macro, so checking it doesn't do
anything.
2015-12-28 18:48:46 +01:00
Günther Brammer 30e0cdb418 CMake: Re-enable readline support for openclonk-server 2015-12-28 18:48:45 +01: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
Armin Burgmeier d7a5ac373d Fix the console build on Mac
cmake still does not create a nice bundle for it, but at least
the build does not fail anymore.
2015-12-23 16:31:19 -08:00
Günther Brammer 576f461ea5 CMake: Set compiler flags before checking compiler features
Moving the flags from CMAKE_CXX_FLAGS to OC_CXX_FLAGS, adding flags and
removing duplicates keeps CMAKS_CXX_FLAGS from growing. Unfortunately,
-std=gnu++0x needs to be in CMAKE_CXX_FLAGS before compiler features get
tested, but CMAKE_CXX_FLAGS is filled from OC_CXX_FLAGS further down.

Fortunately, all tests for compiler flags are quite simple, so they can be
done at the beginning, and the feature tests after that. Reorder the code
accordingly.
2015-12-22 18:07:38 +01:00
Günther Brammer 29f37eb821 CMake: Remove duplicate compiler flags properly
In order to be able to remove duplicates from the list, each flags needs to
be a separate list item. Otherwise, the flags from the previous run in
CMAKE_CXX_FLAGS, which are now separate list items due to
separate_arguments(), will not be recognized as duplicates of the freshly
added flags. Fortunately, in the next round the two sets of flags in
CMAKE_CXX_FLAGS will be reduced to one set, so there were never more than
two copies of the warning flags.
2015-12-22 18:07:38 +01:00
Nicolas Hake da51a2d8af CMake: Have headless build as a project instead of a separate config
Hardly anyone ever tests the headless build, because it requires you to
run CMake a second time with -DUSE_CONSOLE=On. So now it's an included
project which you'll get whether you want it or not.

I'm well aware that this could be solved more nicely, and that we could
be splitting unchanged files out into a separate support library, but
that's left for a later date.
2015-12-16 00:50:09 +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
Nicolas Hake ff57c03295 CMake: Move pthread, rt deps to libmisc
libmisc is the support library that references thread code and timing.
So the dependencies on pthread and rt should be attached to libmisc
instead of every single binary.
2015-12-13 14:34:02 +01:00
Nicolas Hake b6327fdf93 CMake: make explicit that libc4script depends on libmisc
libc4script uses C4Group, so it has a dependency on libmisc. Make this
dependency explicit so all targets that use libc4script also
automatically pull in libmisc.
2015-12-13 14:23:52 +01:00
Sven Eberhardt bf63f2ef17 Gidl+Windmill moved to new "Defense.ocf" (title picture missing)
They aren't quite fitting at the moment and Clonko wants to share the buy menu.
2015-12-12 12:06:25 -05:00
Nicolas Hake 5abc112a81 CMake: Split GTK3 tests into a separate module
Nobody uses pkg-config on Windows, and we already have a perfectly
viable solution for finding libraries - it's called CMake. We're still
defering to pkg-config when it exists because who knows what arcane
cflags might be required on some systems.
2015-10-19 16:11:12 +02:00
Nicolas Hake b32a539474 mape: Add the PCH object to the MSVC build
mape uses several headers from OpenClonk that are marked for
pre-compilation. MSVC does not support using headers flagged as such
without also linking to the object file that gets generated from the
compilation step.
2015-10-19 15:43:28 +02:00
Nicolas Hake 4fcd475e79 CMake: Test for existence of the mape target before manipulating it
Instead of checking whether mape's special GTK could be found, just test
whether mape is being built or not.
2015-10-19 15:41:38 +02:00
Nicolas Hake 0cfe72337b Allow CMake to find gdk-pixbuf-csource instead of using the plain name
By leaving figuring out of the location to cmake, we don't rely on it
being in the PATH when the binaries get build.
2015-10-19 15:38:31 +02:00
Armin Burgmeier ef4ea2d931 Drop support for GTK+ 2
The minimum GTK version is now GTK+ 3.4, which is available since 2012.
It's part of Ubuntu LTS 12.04, and so should be available on any halfway
modern linux distribution.

This should allow getting rid of using deprecated GTK+ API much easier.
2015-10-18 14:45:52 -04:00
Nicolas Hake 9f03209ed7 Stop checking for nullptr
We're already requiring the compiler to implement C++11, so checking for
nullptr support again is useless.
2015-10-12 17:34:28 +02:00
Nicolas Hake a9bf9bfc36 Remove a bunch of vestigial autotools defines from config.h
autotools by default checks for a bunch of stuff absolutely nobody cares
about. The macros removed here were stuff left over from porting the old
autotools build to cmake.
2015-10-12 17:34:28 +02:00
Nicolas Hake 7f5abcd547 CMake: Stop removing obsolete variables from cache
For one, people are unlikely to still have these variables in their
cache, and for another, if building fails, the proper solution is to
start from a clean slate anyway.
2015-10-12 17:34:27 +02:00
Nicolas Hake 85f07b1365 CMake: Always prefer system TinyXML
I don't remember why we're even shipping our own copy of TinyXML when we
aren't doing it for any other library. Maybe we should just stop that.
2015-10-12 17:34:26 +02:00
Sven Eberhardt 675db52e38 Texture shape coverage fix and mape build fix. 2015-10-09 14:49:31 -04:00
Julius Michaelis 6fe58fd878 Add warning about old gcc when !HAVE_WORKING_REGEX
Related to ee859d8.
2015-10-03 13:42:46 +02:00
Nicolas Hake c8e1a38950 Revert "Replace strtod with strtof_l ..."
This reverts commit 139dee9874.

The commit introduced a memory leak on glibc, and broke the build on all
other platforms.
2015-10-01 20:50:40 +02:00
Julius Michaelis 139dee9874 Replace strtod with strtof_l in C4ScriptGuiWindow::SetPositionStringProperties to avoid locale problems
(That function could still use some more love, though: Error messages and not accepting ridiculous things when parsing.)
2015-10-01 19:50:05 +02:00
Julius Michaelis ee859d85e0 Remove boost any usage of boost libraries 2015-09-30 00:16:12 +02:00
Nicolas Hake 6a11e3e811 Stop checking for rvalue ref support
We already require support for std::unique_ptr, which itself requires
support for rvalue references. As such, we know we can use rvalue
references, and thus don't have to keep carrying dead code around.
2015-09-20 13:27:14 +02:00
Nicolas Hake 8e36b43f9c CMake: Split GLEW out into a module, look for both shared and static lib
On Windows, we need to know whether the library we're linking against is
a static library or a shared library import stub. If it's a shared lib
(and only then), we need to #define GLEW_STATIC.

Other OSes handle library imports differently and don't care.
2015-09-19 21:35:55 +02:00
Nicolas Hake 5d37444065 CMake: Update list of Boost versions yet again 2015-09-18 14:33:15 +02:00
Nicolas Hake 9c546d1d1d CMake: Link winmm to libmisc
libmisc contains C4TimeMilliseconds, which requires winmm.
2015-09-18 14:33:14 +02:00
Maikel de Vries dd0a01f3df fix oc_groups for cmake after tutorial folder change 2015-09-13 15:32:35 +02:00
Nicolas Hake 2b876a6cb6 C4Script: Split stubs from script runner 2015-09-04 13:21:06 +02:00
Sven Eberhardt 8551da87ac Added C4ScriptGuiWindow.h to sources in CMakeLists.txt.
This ensures it's in the file list in the MSVC IDE (and possibly others).

Also put C4ScriptGuiWindow.* into alphabetical sort order.
2015-09-03 23:15:48 -04:00
David Dormagen ac738735b2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Vehicles.ocd/Airplane.ocd/Script.c
	src/game/C4Game.cpp
	src/game/C4GraphicsSystem.cpp
	src/gamescript/C4GameScript.cpp
2015-09-02 08:19:34 +02:00
Sven Eberhardt 6ab6a1ac3c Add script interface for some EFX sound modifiers. 2015-08-27 21:44:23 -04:00
Armin Burgmeier 0cdafc278b Transform all mesh data to Clonk reference frame on load
Instead of doing the transformation when drawing a mesh. This allows making
the OpenGL normal matrix more consistent, since it does not include the
Ogre-To-Clonk transformation, and so that the transformation does not need
to be inverted in the shader.

As a side effect, all Attach transformations were updated, since before
they were specified in the OGRE reference frame, not the Clonk reference
frame.
2015-08-18 20:30:20 -04:00
David Dormagen 196f528201 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/FancyGridMenu.ocd/DefCore.txt
	planet/Objects.ocd/HUD.ocd/GridMenu.ocd/DefCore.txt
	planet/Objects.ocd/Helpers.ocd/Dummy.ocd/Graphics.png
	planet/Objects.ocd/Items.ocd/Tools.ocd/WindBag.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Javelin.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Flag.ocd/Marker.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Flagpole.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c
	src/game/C4Game.cpp
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/landscape/C4Landscape.cpp
2015-06-03 22:32:36 +02:00
Nicolas Hake 2eb78b617d Split calculated values out of Version.txt
Version.txt should only contain values that you set manually. Anything
that's derived from that or calculated separately should be in a
separate file.
2015-05-21 23:09:01 +02:00
Nicolas Hake 5f46161433 Remove unused clone of C4PathFinder
Why the hell is there a second implementation of C4PathFinder around? It
wasn't even used anywhere.
2015-03-31 17:57:58 +02:00
hasufell 5f29846b7d Fix USE_SYSTEM_TINYXML
* fix the if-conditional
* don't use pkgconfig (there is no .pc file upstream)

Signed-off-by: Julius Michaelis <caesar@hg.openclonk.org>
(Added license to FindTinyXML.cmake)
2015-03-28 22:58:53 +09:00
Kevin Zheng fd6914f9cb Fix linking with SDL 2015-03-15 19:26:57 +01:00
Nicolas Hake 4cb97e7a03 OS X: Make app bundle renamable
XCode automatically sets EXECUTABLE_NAME correctly. We have to do it by
hand if we're not using XCode.
2015-03-15 16:03:44 +01:00
Nicolas Hake db295b8678 Add emulation of C++14's std::make_unique
Unlike std::make_shared, std::make_unique was unfortunately missing from
C++11. It's a useful utility though.
Technically, declaring a new name in the std namespace is undefined, but
the other way to make make_unique available to all callers regardless of
C++ version, putting it into a distinct utility namespace and importing
the declaration from std if available, makes for more ugly code.
2015-02-25 23:37:04 +01:00
Nicolas Hake 0b55cea227 Disable assertions in non-debug builds
Making the engine terminate when an assertion fails is a good thing in
debug builds, but keeping them enabled in release builds only hurts our
users.
2015-02-20 23:36:36 +01:00
Nicolas Hake 9bfd232ab5 Test whether GLDEBUGPROCARB's userParam is const or not
Depending on how current your headers are, the userParam parameter to
GLDEBUGPROCARB may be const, or it may not. The ARB has added the const
qualifier at some point after publishing the specs. Hooray for breaking
API changes.
2015-02-16 21:21:31 +01:00
Nicolas Hake 9093bde491 Suppress -Wcast-align on clang
Alignment doesn't matter on any platform we support, and unlike gcc,
clang uses natural alignment instead of required alignment to emit this
warning.
2015-02-14 19:45:32 +01:00
Nicolas Hake cdd490b53c Set some warning flags when compiling with clang
The Clang warning flags are woefully underdocumented, so I've just
matched the g++ list in as much as I knew the flags existed.
2015-02-14 00:11:51 +01:00
Nicolas Hake 69cdae5ef2 Use find_package instead of raw include to find libraries 2015-02-12 20:09:58 +01:00
Nicolas Hake 0076fc7d7b Fix DbgHelp check
CMake didn't always find the correct DbgHelp.lib on Win64. Somehow,
nobody seems to have noticed!
2015-02-08 15:03:08 +01:00
Sven Eberhardt e05c7de976 Flag UPnP includes as system to suppress warnings. 2015-02-07 22:46:52 +01:00
Sven Eberhardt f032662052 Mark getopt and tinyxml thirdparty includes as system libraries.
This should silence some warnings occuring in thirdparty code so warnings in our own code get the exposition they deserve.
2015-02-07 22:02:42 +01:00
Nicolas Hake e4fea50a9a Mark thirdparty as system headers so we don't get warnings from there
thirdparty needs to be pristine code so we can update those libraries
without having to figure out whether we need to apply some more patches.
This means we can't easily fix warnings in there; telling GCC that these
are system headers means it won't emit any.
2015-02-07 17:39:15 +01:00
Nicolas Hake c087a88977 Fall back to COMPILE_DEFINITIONS_DEBUG for old CMake
Debian Stable still ships 2.8.9, so for the time being we want to
support that version.
2015-01-27 17:58:31 +01:00
Günther Brammer 36ce941e4d cmake: Restore SDL-Mainloop build 2015-01-25 19:05:06 +01:00
Günther Brammer a92c22a7b3 Merge various build system fixes and cleanups 2015-01-25 18:50:29 +01:00
Nicolas Hake 2e1bdd742f OSX: Bundle libraries even when not compiling with XCode
We have half-arsed support for building Darwin executables with Unix
tools instead of XCode. Make it slightly more whole-arsed.
2015-01-24 23:28:33 +01:00
Nicolas Hake d44d7ba33e OSX: Use /bin/bash to pack game data
Since the script is using bashisms, a posixly correct /bin/sh isn't
sufficient. Explicitly use /bin/bash instead.
2015-01-23 19:22:04 +01:00
Nicolas Hake a7548cfa12 Get CMake to use tools from a native build when cross-compiling 2015-01-23 19:20:55 +01:00
Nicolas Hake d994b893ba OSX: Fix capitalization of several imports and includes 2015-01-23 18:24:31 +01:00
Nicolas Hake 53ff6da5ef Remove some OSX-specific hacks from the main CMakeLists 2015-01-23 17:15:56 +01:00
Nicolas Hake f4e95ea85c Use find_package for finding libbz2 instead of hard-coding the path 2015-01-23 17:11:23 +01:00
Nicolas Hake 9759f72b89 Downgrade requirements to Ubuntu Precise (12.04LTS) 2015-01-19 12:26:42 +01:00
Nicolas Hake 4060991124 CMake: Add support for Boost 1.57.0
For some reason, even the most recent (as of this writing) CMake 3.1.0
doesn't know about Boost 1.57.0, which was released two months before
CMake. Add it to the known version list.
2015-01-18 20:50:33 +01:00
Nicolas Hake ee62586013 CMake: Fallback to the system FindFreetype if pkg-config fails
Instead of shipping our own copy of FindFreetype.cmake, use the system
one if pkg-config is not available or can't find FreeType.
2015-01-18 20:50:32 +01:00
Nicolas Hake 2b2d70d02a CMake: Update for 3.1 compatibility
CMake 3.1's if() by default now interprets quoted variable names as
strings. This is a good idea from a strictness perspective, so make it
do this even if we're in 2.8.9 compatibility mode.
2015-01-18 20:50:31 +01:00
Nicolas Hake fad70eb204 Increase required CMake version to 2.8.9
Debian Wheezy is shipping 2.8.9, and nobody is testing older versions
anyway.
2015-01-18 20:50:30 +01:00
David Dormagen bd04722553 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
	src/game/C4GraphicsSystem.cpp
	src/game/C4GraphicsSystem.h
	src/game/C4Viewport.cpp
	src/gui/C4GameMessage.cpp
2015-01-15 19:57:01 +01:00
Nicolas Hake 8a729b4c6f Crash handler: Use PRIdPTR format where available
Printing pointers from the crash handler has been broken starting
with an update to MinGW at some point in the past, when they stopped
using printf from MSVCRT, instead replacing it with a private
implementation. Fix this by checking for inttypes.h availability, and
using it (and its format macro) when possible.
2015-01-15 10:18:37 +01:00
Armin Burgmeier ae5f56594a Fix openclonk build with GTK3 2015-01-12 16:25:00 -05:00
Nicolas Hake 804bf41c92 Fix UPnP auto-detection
Auto-detecting UPnP might fail when CMake was invoked multiple times.
This would result in a broken build because the compiler would not find
<natupnp.h>.
2015-01-07 21:15:53 +01:00
Günther Brammer d9e3d9db3d Require filenames to be in unicode, remove iconv usage
Every modern operating system and Clonk uses UTF-8, and windows uses UTF-16
and has its own conversion code.
2015-01-03 20:41:03 +01:00
Günther Brammer 11844a87dd cmake: Re-enable debugging code in debug builds
Partially reverts cf474e99aa.

Cmake starting to whine about usage of a deprecated feature is no excuse
for regressions. The cmake warning even explained how to do this!
2015-01-03 20:40:50 +01:00
Armin Burgmeier 1e77de1044 Merge branch 'lights'
Conflicts:
	src/c4group/C4Components.h
2015-01-03 16:00:20 +01:00
Günther Brammer 70cca346ec cmake: Simplify special handling of the -std=gnu++0x flag 2015-01-01 22:13:57 +01:00
Günther Brammer 0e11bff939 win32: Only set mape cmake property if building mape 2015-01-01 22:13:56 +01:00
Günther Brammer f1c937a143 win32: Only use the HAVE_NATUPNP_H cmake variable for the system header
CMake remembers the variable in subsequent runs, so setting it to true
if the copy from thirdparty/natupnp needs to be used will prevent that copy
from being used after a rerun of cmake.
2015-01-01 22:13:56 +01:00
Armin Burgmeier f65c08f041 Register clonk:// protocol handler on Linux 2014-12-26 21:48:17 +01:00
David Dormagen f89b8c8319 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Environment.ocd/Cloud.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/PowerConsumer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/PowerProducer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/System.ocg/ClonkControl.c
	src/gui/C4MouseControl.cpp
	src/landscape/C4PXS.cpp
2014-12-25 15:24:19 +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
Tobias Zwick d59b1e5e5b reduce version numbering from x.y.z (x does never changes) to y.z 2014-12-12 21:57:52 +01:00
Peter Wortmann 72289713f9 Modular shader system
The idea here is that we compose shaders out of "slices", which can
come from the engine ("built-in"), from files or possibly even from
models. This should allow us to more easily share the code between
different rendering shaders (e.g. for lights / normals).

TODO: Workarounds not yet implemented, so this might degrade less
gracefully.
2014-11-20 11:52:14 +01:00
Armin Burgmeier 88f8f75441 Add ambient lighting
This introduces a new texture, an ambient light map, that is generated
automatically at the beginning of the round by the sky portion of the
landscape. This basically makes everything that is close to sky visible
by default.

The shaders have been adapted so that they deploy direction-independent
lighting for the ambient component, and the current (diffuse) behaviour
for the diffuse component. This makes the shaders use an additional
texture unit that represents the ambient light. We can think about merging
this information into the light texture, but the coordinate systems are
different at the moment, so this could be performed at the stage of light
texture generation.

For meshes, the ambient material is not actually used, but instead a
diffuse light from the front is used. This makes many meshes look more
interesting, maybe also because the ambient material setting of most
meshes are not set correctly at the moment.
2014-11-17 09:35:50 -05:00
Tobias Zwick fd0163ebc6 refactor and document: C4FoWLightSection only calculates the triangles now, C4FoWLight stitches everything together and renders
* intermediate fade triangles are now calculated in C4FoWLight
* rendering takes also place in C4FoWLight, using different C4FoWDrawStrategies
* solved an old TODO from Peter (int -> int32_t)
* refactor and simplify portions of the light vertex calculation code
2014-11-16 18:57:42 +01:00
Armin Burgmeier a6d949d313 Merge branch 'master' into lights 2014-11-04 11:26:45 -05:00
Armin Burgmeier 45d090ae37 mape: initialize the landscape pixmaps (#1162) 2014-10-17 18:27:31 -04:00
Philipp Kern 20701562e8 Allow distributions to use the system tinyxml.
Add a new cmake option WITH_SYSTEM_TINYXML=ON that allows to use the system
tinyxml library and header instead of the bundled copy. Adjust the include
path in the single source file referencing the header and add the thirdparty
path to the include search path if the use system option is unset or off.
2014-10-16 11:52:44 -04:00
David Dormagen c09e9880e2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
2014-10-13 18:54:05 +02:00
David Dormagen 2a78b77bda renamed C4GuiWindow to C4ScriptGuiWindow to increase expressivness and reduce similarity with C4Gui* 2014-10-13 18:48:03 +02:00
Tobias Zwick 7963065eb8 rename C4FoWRay to C4FoWBeam, add some documentation 2014-10-12 12:59:25 +02:00
Tobias Zwick 21e532da23 split up C4FoW header and source file into one file for each class
* added some class and method documentation, removed some superfluous comments like

	void C4FoW::Update(C4Rect r)
	{
		// Update all lights
		...

* added ASK comments that need clarification before proper documentation
2014-10-11 23:13:10 +02:00
Tobias Zwick b11e8d5d7a Merge branch 'master' into lights
Conflicts:
	planet/Graphics.ocg/LandscapeShader.c
	src/graphics/C4DrawGLMesh.cpp
	src/graphics/C4DrawGL.cpp
	src/landscape/C4Landscape.cpp
	src/landscape/C4Landscape.h
	src/landscape/C4LandscapeRender.cpp
	src/landscape/C4Scenario.cpp
	src/landscape/C4Scenario.h
2014-10-06 23:27:16 +02:00
Tobias Zwick 336a39c71a remove superfluous internal dependencies in CMakeLists for installing some icons in the install process 2014-10-03 23:35:24 +02:00
David Dormagen 952f06b173 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
2014-09-29 11:47:09 +02:00
Sven Eberhardt abab7be591 Added scenario achievements displayed as small symbols beside the scenario name in the startup selection screen.
They can be used e.g. to show that you have finished a scenario on different difficulty levels.
2014-09-24 23:08:40 +02:00
Martin Plicht cf474e99aa mac: Rearrange sound toolkit includes and FindAudio.cmake so that sound+music works for OSX 2014-09-21 22:16:54 +02:00
Kevin Zheng e19653b607 Replace CMAKE_REQUIRED_FLAGS with CMAKE_CXX_FLAGS
This prevents C++ flags from being passed to the C compiler while
running CMake tests.
2014-09-01 20:07:54 +02:00
Sven Eberhardt c8f7d2b3cb Revert "Fix CMake so it doesn't search non-static glew32." to make snapshots work until problem is resolved.
This reverts commit 326d609ddc.
2014-08-20 18:06:19 +02:00
Sven Eberhardt 326d609ddc Fix CMake so it doesn't search non-static glew32. 2014-08-14 17:18:28 +02:00
David Dormagen 5722339e83 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/gui/C4Gui.h
	src/gui/C4GuiDialogs.cpp
	src/gui/C4GuiWindow.cpp
2014-08-13 11:52:41 +02:00
Armin Burgmeier 1b425696ac mape: Suppress console window on Windows 2014-08-04 21:58:47 -04:00
Armin Burgmeier dbadd3bcbe mape: Show rendering time in statusbar 2014-08-04 16:27:07 -04:00
Armin Burgmeier 428046400d mape: Implement minimalist C4DefList 2014-08-04 16:27:06 -04:00
Armin Burgmeier f25ec83568 Link C4MapScript into mape
Remove the two dependencies to ::Game from C4MapScript, so that ::Game
does not need to be linked into mape, which would basically drag the
whole rest of the engine after itself.
2014-08-04 13:04:35 -04:00
Nicolas Hake 72865fe166 Only fallback to natupnp.h on Windows 2014-08-03 21:56:50 +02:00
Nicolas Hake 227d3d760d Ship a fallback natupnp.h
MinGW doesn't bring a natupnp.h out of the box. Add one to the repository
so MinGW builds also support UPnP/NAT-PMP.
2014-08-03 21:48:53 +02:00
Nicolas Hake 642ce2eb9c Merge all of the audio provider switches into one
There's no point in splitting the audio library selection into multiple
CPP macros, since there can always only be one anyway. Merge all of them
into a single macro AUDIO_TK (for "toolkit") and have CMake select one
for the user, instead of making him choose (and potentially failing).
2014-08-01 23:37:42 +02:00
Nicolas Hake 86a0351e09 cmake: Remove USE_APPLE_CLANG option
The option has been unused for a while, and clang is the default
compiler on OS X.
2014-07-28 16:46:00 +02:00
Nicolas Hake 5eca6f8f35 cmake: Don't prefer pthreads on win32
Recent MinGW releases ship a pthread implementation for Windows. So while
CMake is technically correct in finding pthread, we don't want it to, and
instead use the standard Win32 threading.
2014-07-27 23:05:16 +02:00
Günther Brammer 13d9608f9e Avoid using ICONV_LIBRARIES when the search for the library failed. 2014-06-09 04:17:17 +02:00
Kevin Zheng 7bc06ad652 Fix iconv detection and 'const' qualifier. 2014-06-09 04:11:52 +02:00
Günther Brammer 11b19a64e9 cmake: Link the execinfo library if necessary for execinfo.h 2014-05-28 03:54:58 +02:00