Commit Graph

577 Commits (b702f1583c7b8f0cf15f0a08887233c4a41a97d8)

Author SHA1 Message Date
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
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
Günther Brammer 73c6931cfb Give g++ 4.9 a chance to prove that it has working <regex>
The -std=gnu++0x-Flag was removed from the compiler flags before
testing the <regex> header, and so just re-confirmed that <regex>
didn't work in previous C++ standards.
2014-05-12 02:24:19 +02:00
Günther Brammer 3e7d0ba1ff win32: Fix installer generation from MSVC
f897e95071 broke this by reusing the macro with the path to the binary
as the binary name, which doesn't work if the path contains directories.
Also, 0dcfe72148 moved the binaries, but the LOCATION property still
pointed to the old location. Luckily, CMake also has a non-broken option to
pass target file paths to custom commands.
2014-05-12 02:24:19 +02:00
Günther Brammer b7a022852e Revert "Move C4Aul code into separate subdirectory"
The distinction between the "aul" and "non-aul" parts of
the script engine are mostly historical accident, and the
current organization of the source code does not use
sub-subdirectories. I'd like to keep it that way.

This reverts commit 69ba06b8d0.
2014-05-12 02:24:19 +02:00
Günther Brammer 52dbf8e585 Revert "Use pkg-config to get linker flags for SDL_mixer"
This reverts commit 9941388526.

The breakage was just due to me using an outdated library list.
2014-05-12 02:24:19 +02:00
Nicolas Hake 69ba06b8d0 Move C4Aul code into separate subdirectory 2014-05-11 16:17:48 +02:00
Günther Brammer 9941388526 Use pkg-config to get linker flags for SDL_mixer
This makes CMake use the dynamic library instead of the static library on
my system. The latter doesn't link on today's Debian unstable due to a
missing libmad.a.
2014-04-19 19:02:22 +02:00
Günther Brammer 22016e075f Replace some usages of C4ID with C4Def*
In particular those that made the c4script shell depend on C4Id.cpp.
2014-04-19 19:02:22 +02:00
Julius Michaelis 66d11b459c Default-deactivate gcc precompiled headers in CMakeLists 2014-04-02 20:53:12 +02:00
David Dormagen 5c17b48bc2 Merge branch 'master' into Controls 2014-03-26 23:58:24 +01:00
Nicolas Hake 3c80a745b0 MinGW: Use __mingw_vasprintf if available
Recent versions of MinGW do no longer declare vasprintf in <stdio.h>,
but they ship a compatible function called __mingw_vasprintf. Use this
function if vasprintf isn't available.
2014-03-25 23:20:34 +01:00
Nicolas Hake dde5556105 cmake: Correctly check for vasprintf and iconv
CheckFunctionExists only checks for the function to be linkable, it does
not require any declaration in a header. CheckSymbolExists requires a
declaration and also linking to succeed.
2014-03-25 23:16:01 +01:00
Julius Michaelis f04d1163b1 Fix gcc precompiled headers 2014-03-25 19:11:22 +01:00
Martin Plicht 90dec14601 cmake: mac: Re-add libs bundling, revert to LegacyFindFreeType for APPLE 2014-02-16 10:18:45 +01:00
Martin Plicht 59bc72f54e cmake: mac: Reorder compiler flag selection a bit 2014-02-16 10:18:45 +01:00
David Dormagen 06ac00ace8 Merge branch 'master' into Controls
Conflicts:
	CMakeLists.txt
	Makefile.am
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Club.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	src/control/C4Control.cpp
	src/control/C4Control.h
	src/gamescript/C4GameScript.cpp
2014-02-15 14:44:57 +01:00
Tobias Zwick 44ffc5c470 add a note to CMakeLists.txt
(cherry picked from commit a0848af371d451e6ef69918bacf2dd42bf7a6202)
2014-02-07 21:53:06 +07:00
Nicolas Hake fe7d2de852 Add option to link Boost dynamically (#1025)
Distributions can guarantee the existence of a specific version of
the Boost libraries, so it makes less sense to link them statically.
2014-02-06 22:08:15 +01:00
Martin Plicht acceeb7291 mac: Add precompiled nib files to really not require Xcode … 2014-01-29 20:39:24 +01:00
Martin Plicht f1cc91055a cmake: mac: make install installs bundle 2014-01-29 14:12:22 +01:00
Martin Plicht c26ac97729 cmake: Insert hacks and hardcoded paths to make mac version compilable using Unix make 2014-01-27 14:22:22 +01:00
Martin Plicht b3c1706b1b mac: Clonk.icns is oc.icns 2014-01-27 14:22:22 +01:00
Martin Plicht 515aaf656d cmake: Only add StdSchedulerMac.mm when APPLE platform 2014-01-25 16:12:02 +01:00
Martin Plicht bf1f9037a8 Merge branch 'macscheduler' 2014-01-25 16:00:29 +01:00
Tobias Zwick 8e8653678e install icons of different sizes on linux 2014-01-24 16:54:47 +07:00
Martin Plicht 130660a544 Merge branch 'master' into macscheduler 2014-01-23 17:53:58 +01:00
Martin Plicht d504626a40 StdScheduler: Split into StdSchedulerWin32/StdSchedulerPoll/StdSchedulerMac 2014-01-23 17:53:40 +01:00
Philipp Kern e151b1de91 move the clonk binary to /usr/games
The FHS says that game binaries should be stored in /usr/games.
2014-01-23 00:14:32 +07: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
David Dormagen 02f54ba1eb removed the legacy particle system from the engine and docs 2013-12-17 22:32:01 +01:00
Tobias Zwick f5592a49e6 build fix 2013-12-08 04:05:56 +07:00
Tobias Zwick 4f416c3147 replace global function GetTime() with class function C4TimeMilliseconds::Now() 2013-12-07 21:28:06 +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
Nicolas Hake 35f31a7c1d win32: Manually generate manifest to indicate Win7 compatibility
Telling Windows that we support Windows 7 means it will stop catching
unhandled exceptions that occur in a callback from kernel mode, and
allow our own crash handler to catch then.
2013-11-10 19:22:26 +01: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 924e0538fc Fallback to Boost.Regex if <regex> is broken
A large number of g++ versions ship a <regex> that declares all of the
required functions, but don't actually implement them, making using them
result in a linker error.

Fallback to Boost.Regex if the host C++11 <regex> implementation is
broken; the interface is the same anyway, only differing in the
containing namespace.

Unfortunately, Boost.Regex is not a header-only library, but this is not
a big deal because all major Linux distributions ship it, and Visual
Studio implements <regex> since 2010 (the oldest version we still
support).
2013-10-29 16:59:38 +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
Nicolas Hake 759cf73704 cmake: Make Freetype mandatory for non-headless builds
OpenClonk fails to start without Freetype support, because it cannot
load required fonts.
2013-10-18 22:27:55 +02:00
Nicolas Hake 9e18ca3c9f cmake: Always use multiproc build in MSVC
Multicore processors have become the norm, and the minimal rebuild
setting only works on i386 anyway.
2013-10-18 14:20:09 +02:00
Nicolas Hake 8709b841bf cmake: Also look for static libraries 2013-10-08 22:02:39 +02:00
Nicolas Hake 59ee0ed090 cmake: Get FindFreetype to look for versioned libraries
Since FindFreetype.cmake already extracts the version of freetype
from its header files, I have no idea why they're not automatically
using that info to look for the proper library name in lieu of
hardcoding a single version.
2013-10-08 21:23:07 +02:00
David Dormagen 4032a161ea CMakeList: added entries for dynamic particle source files 2013-10-07 20:56:55 +02:00
Maikel de Vries 7f9f40a1f5 Renamed Settlement.ocf to Missions.ocf 2013-10-05 17:39:14 +02:00
Martin Plicht 31119f1b88 cmake: Add Worlds.ocf to OC_C4GROUPS 2013-10-05 13:19:59 +02:00
Nicolas Hake 9ceb69236b Remove unused Base64 codec 2013-08-04 18:10:10 +02:00
Tobias Zwick 9027544c37 Merge branch 'master' into Controls 2013-06-04 20:13:35 +02:00
David Dormagen 7eaef70af1 Merge branch 'master' into Controls
Conflicts:
	planet/System.ocg/PlayerControls.txt
2013-05-26 18:19:51 +02:00
Martin Plicht 524fe879aa Make DEBUGREC define a commandline option 2013-05-25 22:51:32 +02:00
Martin Plicht 928ecc1892 mac: Lazy cmake fix 2013-05-25 20:11:21 +02:00
David Dormagen d18d8c65c9 Merge branch 'Menus' into Controls 2013-05-24 01:24:57 +02:00
David Dormagen fc7e5b9a35 added methods to serialize C4GuiWindow to C4Value as proplist 2013-05-23 16:29:14 +02:00
Nicolas Hake 7a8352e672 CMake: Allow dynamic linking of Ogg/Vorbis
Previously, MSVC builds did only allow static linking of libogg,
libvorbis and libvorbisfile. If there was a reason to do so, I have no
idea what it was, because it isn't documented in either VCS or a
comment. So I'll allow both dynamic and static linking.
2013-05-20 16:10:17 +02:00
David Dormagen 9ad9a67939 Merge branch 'master' into Menus
Conflicts:
	src/script/C4StringTable.cpp
	src/script/C4StringTable.h
2013-04-07 23:02:36 +02:00
Nicolas Hake 459fce0758 Replace std::auto_ptr with std::unique_ptr
std::auto_ptr has awkward copy semantics and is deprecated in C++11.
2013-03-26 15:43:01 +01:00
Sven Eberhardt 57e63a5275 Added support for scripted maps (Map.c) and documentation. 2013-03-19 00:36:06 +01:00
Günther Brammer 814f809885 cmake: USE_GTK3 defaults to off for now
The defaults should follow the settings the binary downloads use where
reasonable.
2013-03-12 02:12:26 +01:00
Günther Brammer 169b3750d4 cmake: Also search for freetype version 2.4.11 2013-03-10 14:01:38 +01:00
Günther Brammer 2ef47af689 cmake: Default to a deps folder in CMAKE_CURRENT_BINARY_DIR 2013-03-10 14:01:35 +01:00
Günther Brammer 1075822af3 cmake: Don't try to create openclonk.png without convert 2013-03-10 14:01:26 +01:00
Günther Brammer 12c8b31a10 cmake: Use CMAKE_DEPENDENT_OPTION to structure the various options 2013-03-10 14:01:15 +01:00
Günther Brammer 159cfb9885 cmake: Explicitly instead of indirectly link openclonk with pthread
In practice, other libraries pulled pthread in, except for the USE_CONSOLE
build. But since there are direct calls to pthread in our code, we really
shouldn't rely on that.

Also, this should fix the USE_CONSOLE build on windows.
2013-03-10 14:00:01 +01:00
Julius Michaelis 06d4db2d72 Remove need for freetype and jpeg libraries building with USE_CONSOLE 2013-03-03 15:22:48 +01:00
Julius Michaelis 2df3b20a20 CMake: Adjust precompiles headers to new build division 2013-02-17 17:00:33 +01:00
David Dormagen d3dba14323 added support for custom menus and dialogs 2013-02-12 20:39:20 +01:00
Günther Brammer 2a9d63cb2a gtk: Use higher-resolution logo as window icon
Metacity started to display bigger icons in the window list, so the higher
resolution is now actually useful for me. While at it, use gdk-pixbuf-csource
to generate the .h at build time from the .ico instead of duplicating the
data in the repository.
2013-02-12 01:08:02 +01:00
Martin Plicht 6217a62c8d mac: cmake: Fix compilation of libmisc 2013-02-11 11:39:24 +01:00
Oliver Schneider c43a682785 tests: Compile gtest from source, add a few new tests
GTest does not ship precompiled binaries anymore. They are now compiled
using the CMakelists.txt from gtest.

Add basic unit tests for C4Value, DirectExec and C4StringTable.
2013-01-29 01:07:22 +01:00
Oliver Schneider e45a569aa3 cmake: Use libraries to avoid compiling files multiple times 2013-01-29 01:02:05 +01:00
Oliver Schneider 14369b509f cmake: Check for convert at configure step 2013-01-29 01:01:58 +01:00
Nicolas Hake f897e95071 Rename game binary to "openclonk" (#830)
Since the name of the game is OpenClonk, having the binary named
differently is at least confusing. At worst it conflicts with the
trademark license granted by RedWolf Design.

The Mac build will still have to be fixed because the installer
template .dmg file is not editable on non-Macintosh systems.
2013-01-28 13:57:29 +01:00
Armin Burgmeier 2a1ba0f8fe Split the mesh drawing into C4DrawMeshGL.cpp 2013-01-27 23:52:57 +01:00
Günther Brammer db81cf193d gtk: Bump minimum required versions to the oldest versions we test with 2013-01-24 19:36:59 +01:00
Nicolas Hake 8a9926ccc4 CMake: Ensure compatibility with cmake <2.8.6 2013-01-20 22:10:26 +01:00
Nicolas Hake 6bb595f842 CMake: Use GTK+ cflags as reported by pkg-config
Ignoring CFLAGS/LDFLAGS makes GTK+ not work correctly
if the libraries are compiled with -mms-bitfields (as
is the case with the prebuilt binaries from gnome.org).
2013-01-20 21:53:56 +01:00
Günther Brammer 211634cf15 mape: Even more windows fixes 2013-01-20 20:36:51 +01:00
Armin Burgmeier e1ccbddd5e Fix configure error when mape build is not enabled 2013-01-16 23:24:14 +01:00
Armin Burgmeier 2cd91a56c4 Add support for algo=script overlays 2013-01-14 02:25:15 +01:00
Armin Burgmeier 9a6d545f94 Use the OpenClonk version as the mape version 2013-01-14 02:25:13 +01:00
Armin Burgmeier 926a3afdd4 Restore original formatting of CMakeLists.txt 2013-01-14 02:25:13 +01:00
Armin Burgmeier abfdd12501 Build mape always when the dependencies are available 2013-01-14 02:25:12 +01:00
Armin Burgmeier aa2f3df779 Make mape link only against the part of the Clonk engine that is needed
and not against the whole engine. This avoids pulling in unnecessary
dependencies like SDL or OpenGL.
2013-01-14 02:25:11 +01:00
Armin Burgmeier 3420b2a9a2 Move C4ScenarioSection code from C4Scenario.cpp into C4ScenatioSection.cpp
This allows compiling and linking with C4Scenario.cpp without having to
pull in whole C4Game.
2013-01-14 02:14:37 +01:00
Armin Burgmeier b2be39b576 Handle-ify the random seed setting 2013-01-14 01:41:21 +01:00
Armin Burgmeier 4b4da8646b Handle-ify the mapgen call 2013-01-14 01:40:54 +01:00
Armin Burgmeier 662d9bc4f4 Use the icons that come with OC for mape
gdk-pixbuf-csourcing them from the .ico files in a build step.
2013-01-14 01:40:47 +01:00
Armin Burgmeier 257db99165 Merge remote-tracking branch 'new/master' into mape
Conflicts:
	CMakeLists.txt
	src/graphics/C4Draw.h
2013-01-14 01:38:03 +01:00
Günther Brammer b5ae4f1f9d Move CStdInProc to its own source file
It should be usable without USE_CONSOLE, even though only the dedicated server
uses it at the moment.
2012-11-30 22:18:38 +01:00
Günther Brammer 7967d94a59 Merge StdFont.cpp and C4Fonts.cpp 2012-11-12 02:30:16 +01:00
Günther Brammer 4dffefe8c9 X11: Remove support for the xf86vidmode extension
In practice, only the xrandr code path received any testing. Since Clonk
works fine without changing the resolution, this will not terribly
inconvenience anybody still stuck on old systems without xrandr.

Also only minimize the window when the resolution was changed.
The minimization is there to prevent accidental focus restoration
resulting in unwanted resolution switching.
2012-11-17 18:07:37 +01:00
Tobias Zwick f7f734d2bb fix: don't try to load OpenAL if option is turned off 2012-11-16 17:30:52 +01:00
Tobias Zwick 348fb8c7a9 clean up mouse controls, reduced cursor graphics to the used ones 2012-11-16 17:29:42 +01:00
Günther Brammer a8dfeeaf7e win32: Make USE_CONSOLE compile again
There's even a plausible implementation of CStdInProc::GetEvent.
2012-11-15 23:01:24 +01:00
Peter Wortmann a6ede89284 Missing CMakeList.txt update 2012-09-24 10:16:23 +01:00
Peter Wortmann 56bdeec585 FoW/lights preview
This is pretty much still prototype stage. Lots of bug, lots of stuff missing.
2012-08-19 19:35:10 +01:00
Philipp Kern cbf6f37996 change the OpenClonk data directory to obey the FHS
The FHS specifies /usr/share/games as the place for static game data files.
Hence move the OpenClonk data directory to /usr/share/games/openclonk.
2012-10-21 15:03:24 +02:00
Nicolas Hake 8b7a4a8023 CMake: Update list of C4Groups to build to match refactoring changesets 2012-10-10 21:28:25 +02:00
Sven Eberhardt 00349f045a SoundSystem: Implement non-apple wav loading when using OpenAL 2012-10-07 13:18:28 +02:00
Sven Eberhardt 15aa9b961e FIx build using OpenAL in MSVC 2012-10-05 18:02:52 +02:00
Tobias Zwick 41a33999cd remove video playback feature 2012-10-04 23:03:57 +02:00
Martin Plicht b264612b10 mac: Move C4EditorWindowController from platform to editor 2012-09-02 20:57:49 +02:00
Martin Plicht 562565f865 mac: Move C4OpenGLView.mm/h to graphics/C4DrawGLMac.mm/h and move some C4AbstractApp functions to C4AppMac.mm to better match implementations for the other platforms 2012-09-02 20:51:43 +02:00
Martin Plicht 7bbb3468b9 cmake: Add BeyondTheRocks.ocf to OC_C4GROUPS 2012-09-02 19:48:18 +02:00