Commit Graph

6976 Commits (lights3)
 

Author SHA1 Message Date
Nicolas Hake be9806eef8 GL: Enable OpenGL debugging on Linux
OpenClonk supports debug contexts on both Windows and Linux now. Start the
engine with the argument --debug-opengl to request a debugging context and
marvel at the many, many performance warnings that your driver may or may
not emit.
2015-05-28 23:21:54 +02:00
Nicolas Hake 0db5950c8d GL: Test for GL_KHR_debug before enabling GL_DEBUG_OUTPUT
The GLEW headers of Ubuntu 12.04 LTS don't know about GL_KHR_debug yet,
so we have to test for it before using its enum. Additionally, drivers
without support for GL_KHR_debug would emit INVALID_ENUM, so we test for
driver support too.
2015-05-28 22:56:48 +02:00
Fabian Pietsch 0f65ab4b35 GL: Avoid endless recursion via OpenGLDebugProc
When an error's log output is represented graphically the graphics
operation can lead to another error (or the same error again), which
will be logged graphically again and so forth, until stack overflow.
So log to the log file only.
2015-05-28 21:34:15 +02:00
Fabian Pietsch 8ef6d65520 GLX: More debug output, to be able to trace the code paths taken 2015-05-28 21:34:14 +02:00
Fabian Pietsch 72366a56b7 GLX: Get debug callback to work even when the driver violates the specs
According to Isilkor, the initial state of DEBUG_OUTPUT should be TRUE
on a debug context. This was not the case on my system (Mesa 10.3.2).
2015-05-28 21:34:12 +02:00
Nicolas Hake 36d348d94d GLX: Allow creating debug contexts
To create debug contexts, we have to use glXCreateContextAttribsARB. To use
that, we have to initialize GLEW, which means creating a dummy GL context. To
create a dummy context with the same FB config as the final one, we need to...
initialize GLEW, because it suppresses the GLX 1.4 function declarations.
So instead we'll just manually initialize the three function pointers we're
going to need.
2015-05-28 21:34:11 +02:00
Nicolas Hake dd56c56eff Git: Ignore NativeToolsExport.cmake
NativeToolsExport.cmake gets generated in non-cross builds so potential
cross builds later know where to find a native c4group.

Ignore it so in-tree builds don't accidentally commit it.
2015-05-27 22:42:46 +02:00
Nicolas Hake 0a8c367d6c GLX: Don't request indirect contexts, ever
We're trying to do 3D rendering here, there's no point asking for an indirect
rendering context.
2015-05-25 23:59:47 +02:00
Nicolas Hake d53c8bffad WGL: Reinitialize GLEW after creating rendering context
The GL driver is allowed to use different entry points depending on the
context. This means that we can't just initialize GLEW once and use it
all the time, but we must refresh the entry point list every time we
create a new context.
2015-05-25 18:32:35 +02:00
Nicolas Hake 7a4dc6ac79 Remove superfluous return value qualifier
Type qualifiers on a function return value are ignored anyway.
2015-05-25 16:28:04 +02:00
Nicolas Hake b791404147 Remove superfluous pointer check
The pointer to a member variable of a static object is never NULL, so
checking for this is useless.
2015-05-25 16:27:16 +02:00
Nicolas Hake 4b1b06388e Replace inverted condition with something more obvious
Instead of checking the inverse of the category against a bit mask, just
check whether none of the mask bits are set in the category.
2015-05-25 16:17:58 +02:00
Nicolas Hake d18f7b9fa4 Correctly wrap multi-statement macro
A multi-statement macro requires the user to wrap its invocation in
curly braces if it's used as body of a conditional or loop. This is
confusing and leads to strange errors (like in lines 550f).
2015-05-25 16:16:22 +02:00
Maikel de Vries a93d96a3ca fix use of hammer in front of damaged structures (#1331) 2015-05-25 11:31:23 +02:00
Sven Eberhardt d3a9a3bc39 Change mission unlock key to Ctrl+M (from Alt+M).
Alt+Key was problematic for some Linux people. Also most other combinations have been changed to Ctrl+Key already.
2015-05-22 21:41:34 +02:00
Sven Eberhardt 593723e687 Windows: Fix saving of custom keys (#1313)
The registry compiler couldn't handle strings beginning with a separator, which was used for marking keys defined by scan code.
2015-05-22 21:20:36 +02:00
Nicolas Hake 97d7240fe8 Fix C4ENGINECAPTION generation
Not only was it interpolating the wrong variable, it was also adding a
space that shouldn't be there.
2015-05-22 21:00:17 +02:00
Nicolas Hake f13a44e5cc Bump version to 7.0-alpha0 2015-05-21 23:09:02 +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 f41ea3cd86 Set C4VERSION macros from CMake assembled vars
There's no reason to have CMake assemble a version string, then have a
similar (but slightly different) string built by the C preprocessor.
Since CMake already has the values we want, just dump those into the
macros.
2015-05-21 23:09:00 +02:00
Nicolas Hake 4deadd7271 Fix incorrect version string interpolation 2015-05-21 23:08:59 +02:00
Nicolas Hake d6abfe755e Use C4VERSIONEXTRA for pre-release versions
Instead of using some arbitrary minor version set to mark pre-release
versions, use C4VERSIONEXTRA, which is already a dedicated marker.
This also complies with semantic versioning.
2015-05-21 23:08:58 +02:00
Nicolas Hake 335af9fa0a Drop reference to non-existent C4XVER4
Version.txt was still adding C4XVER4 to the version string, which was
removed a while ago. This was mostly unproblematic though because
nothing besides the Windows game browser used this string.
2015-05-21 23:08:57 +02:00
Maikel de Vries aa84f78c03 fixed description of the chest interaction 2015-05-21 22:32:23 +02:00
Maikel de Vries 54a5c5b672 parkour: players respawn at best team checkpoint 2015-05-18 20:14:29 +02:00
Maikel de Vries 34133c7076 fix grenade launcher blocking hands after shooting 2015-05-17 18:42:51 +02:00
Maikel de Vries a9cd57eae8 remove logging message in Explode() 2015-05-17 14:12:49 +02:00
Maikel de Vries 42a7f03788 kill tracing for incinerated dynamite (box) and iron bomb 2015-05-17 14:01:26 +02:00
Maikel de Vries 18d292e180 lorry: pass controller to objects which are casted on destruction 2015-05-17 13:56:52 +02:00
Maikel de Vries d583746cc5 correct kill tracing for ammo launched by grenade launcher 2015-05-16 22:56:15 +02:00
Maikel de Vries 03b049b0ca add cause_plr to OnShockWaveHit callback
This can be used to damage and kill tracing for objects which die, receive damage or are destroyed on shockwaves.
2015-05-16 21:16:01 +02:00
Armin 035e1fc808 Docs: Correct DoEnergy() and AddCommand() examples (#1305)
Signed-off-by: Maikel de Vries <mdt.maikel@gmail.com>
2015-05-14 12:42:23 +02:00
Maikel de Vries 8a297766b3 fix pump power consumption (#1309) 2015-05-13 21:18:15 +02:00
Maikel de Vries 87079c7aa0 make cabin invincible in Crash.ocs for goal checking 2015-05-13 15:52:23 +02:00
Maikel de Vries 0157e7b496 remove obsolete BuildTurnTo defcore entry 2015-05-11 21:47:55 +02:00
Nicolas Hake a405dcdf4c StdCompilerINIRead: Maintain line break cache for error msgs (#1310)
Deserializing proplists tries to read a boolean variable from the
representation in order to be backwards compatible to old (<6.0)
savegames. Newer savegames do not write this boolean, so StdCompiler
(correctly) throws an exception. This exception uses line numbers, which
StdCompiler used to obtain by scanning through the entire buffer. Having
to scan through the entire buffer for every serialized proplist is
ridiculously slow (and the data isn't used anyway in this instance).
Since line information is still valuable outside of proplist
deserialization, replace the repeated SGetLine calls with an on-demand
cache.
This reduces load times of a 14 MB Game.txt from slightly over 3 minutes
to 7 seconds on my computer.
2015-05-10 20:52:35 +02:00
Maikel de Vries d3b38b3bbd option to choose goal in scorched gardens 2015-05-10 19:41:44 +02:00
Nicolas Hake 0fe248692e Fix mismatched mape function stub
21500a8 changed a function prototype inside C4Landscape but neglected to
change the mape stub to match. Fix this so the build stops failing.
2015-05-09 22:14:40 +02:00
Sven Eberhardt 7db849a804 Remove duplicate crashed plane skin from Treasure Hunt mission.
Already defined in decoration folder.
2015-05-07 20:29:51 +02:00
Sven Eberhardt 067c4d4e57 Light up target door on remote control by switch (#1296). 2015-05-07 20:26:16 +02:00
Sven Eberhardt 341712eba5 Remove dialogue when target NPC dies (#1295). 2015-05-07 19:54:14 +02:00
Sven Eberhardt 21500a81a9 Fix pump to clear the last row of pixels (#1057) and allow pumping from pump without source pipe.
ExtractMaterial has been changed to be able to slurp in from the most distant horizontal position rather than the closest to the extraction top center.

Also speed up ExtractMaterial for the common case of no required horizontal shifts.
2015-05-01 18:13:41 +02:00
Sven Eberhardt 00b0a6f52d Add Find_InArray to docs for FindObject(s) and ObjectCount. 2015-04-28 21:14:24 +02:00
Sven Eberhardt 116a5b4ae6 Add Find_InArray (#1073). 2015-04-28 18:59:50 +02:00
Sven Eberhardt 976ed549b6 Change C4FO and C4SO constants to be increasing regularly.
Regular values allows compilers to use jump table optimizations for switch statements and I don't see any upsides of the previous values.
2015-04-28 18:29:27 +02:00
Sven Eberhardt 38131aae74 Allow CNAT_* constants in VertexCNAT definition of DefCore (#1307)
Also fix decompiling of none-values in bitfields.
2015-04-28 00:18:32 +02:00
Martin Plicht c82adb7853 C4DrawGLMac: Put OSX 10.9 API usage into #ifdef block 2015-04-27 22:13:15 +02:00
Nicolas Hake 5c9d687d67 Merge pull request #6 from mistydemeo/mac_timer
StdSchedulerMac: don't call setTolerance:
2015-04-26 21:31:41 +02:00
Misty De Meo 5768410a83 StdSchedulerMac: don't call setTolerance:
respondsToSelector isn't properly guarding against calling this method
on unsupported platforms, possibly because it existed as a private
method in OS X before 10.9. For example, attempting to build this on
OS X 10.8 fails with the error:
no visible @interface for 'NSTimer' declares the selector 'setTolerance:'

Since the default tolerance is 0 anyway, this can be removed without
adverse effect.
2015-04-26 12:08:02 -07:00
Sven Eberhardt dfd9431e8d HotIce alternate map added.
Also converted old map to Map.c and fixed some spawning issues.
2015-04-17 16:57:32 +02:00