Commit Graph

371 Commits (d44d7ba33ec03fa24e72089abae8898d25b56134)

Author SHA1 Message Date
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
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
Armin Burgmeier 1e77de1044 Merge branch 'lights'
Conflicts:
	src/c4group/C4Components.h
2015-01-03 16:00:20 +01:00
Armin Burgmeier f65c08f041 Register clonk:// protocol handler on Linux 2014-12-26 21:48:17 +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
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
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
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
Günther Brammer 862aeba488 cmake: Use C++ compiler to check for vasprintf and iconv 2014-05-28 03:54:37 +02:00
Günther Brammer f6b7001d0b cmake: Use C++ compiler to check for X11/extensions/Xrandr.h and keysym.h
To do this, port the CHECK_INCLUDE_FILES macro from the CMake source to
C++. While at it, actually check for both headers instead of XLib.h alone.
2014-05-28 03:53:20 +02:00
Günther Brammer b1292a3421 cmake: The netpuncher can use the Scheduler source files from libmisc 2014-05-28 03:38:11 +02:00
Günther Brammer 7c38154837 cmake: Use builtin support for .rc compilation on mingw
This requires CMake 2.8.4.
2014-05-28 03:38:11 +02:00
Kevin Zheng e129005b0e Let CMake determine the location of the targets to install 2014-05-28 00:46:53 +02:00
Sven Eberhardt 75a626efd2 Added Decoration.ocd to CMakeLists. 2014-05-12 09:26:42 +02:00