Commit Graph

6912 Commits (8e5aed4bea1da6bd6ce3fd7d682df03cf9479574)
 

Author SHA1 Message Date
Sven Eberhardt 2804375235 Deep Sea Mining: Skip intro when SCEN_TEST is set. 2015-07-19 10:16:02 -04:00
Maikel de Vries 9632ff03d8 default value (white) for object's light color (#1355) 2015-07-19 09:06:46 +02:00
Sven Eberhardt 00e2e10e33 Fix GetSurfaceVector when called near a surface.
Parts of the function still assumed the old proplist result format.
2015-07-18 20:45:39 -04:00
Clonkonaut 609df7df88 Added 3 libraries: Lamp Post, Lamp and Lamp Dummy
Reworked the lantern and buildings to use the libraries.

Lamp Post: Included by buildings if lamps should hang outside.
Lamp: Included by lamps!
Lamp Dummy: Included by the dummy object that resembles the (outisde) hanging lamp.
2015-07-18 13:14:31 +02:00
Clonkonaut 88389eb727 Added another trunk purely for decoration.
You can walk through and hide in it!
2015-07-14 23:29:59 +02:00
Clonkonaut fa5b8bcf53 Added "Cover" Library
Covers are foreground objects to hide behind. Covers become invisible once your (crew) cursor is behind it, effectively turning them into a good place to hide.
2015-07-14 23:27:50 +02:00
Clonkonaut c7c970822d Added Rectangle_IsInside
Checks whether a given position is inside a given rectangle.
2015-07-14 23:26:26 +02:00
Maikel de Vries 213de4b40b fix updating clonk's vertices after swimming (#1354) 2015-07-14 19:14:27 +02:00
Mark ecb24dc927 CastObjects: Array
CastObjects returns an array now, so that further function calls can be issued on the created objects.

(cherry picked from commit 184943fe6f720ba26402764bb3b182d550370e74)
2015-07-11 17:48:14 +02:00
Mark a6bab72499 Vector Library conformity
GetSurfaceVector() and the Coral object now use the array format of the vector library for vectors, instead of proplists.

(cherry picked from commit 03f644e56cdc99a84df57451ed1bac361c0c896d)
2015-07-11 17:47:56 +02:00
Mark 26ed2bb206 Vector Library
A small library for vector manipulations of arbitrary dimension.

(cherry picked from commit a180b1dce7ae93050eaef078edbe66a72d4d57d4)
2015-07-11 17:47:40 +02:00
Mark d45cc7c95b Colored lights improvements
Color value is now uint32_t, removed superfluous conversion to unsigned value, simplification in the shader.

Open: C4DP_Last and number of drawing passes
2015-07-11 17:46:00 +02:00
Sven Eberhardt 9042450399 Fix DoExplosion from global context.
Avoid null pointer and do play sounds.
2015-07-09 01:03:34 -04:00
Sven Eberhardt 6535d1a5ad Fix gravestone inscriptions for clonks with empty death messages (#896). 2015-07-08 21:14:56 -04:00
Armin e135a74189 Docs: Remove some dead hyperlinks leading to deleted functions. And remove the Alpha entry in Material (ocm).
Signed-off-by: Maikel de Vries <mdt.maikel@gmail.com>
2015-07-08 22:29:55 +02:00
Sven Eberhardt fe46689d3e Make ExplosionEffect function overloadable. 2015-07-08 15:55:33 -04:00
Sven Eberhardt 103eb2528f Add sanity check for animation length when using Anim_Linear as a position provider in PlayAnimation script function. 2015-07-07 22:59:41 -04:00
Sven Eberhardt 221565952d Fix erroneous Piranha bite animation and associated savegame problem (#1352)
This caused animations to never end and thus excessive stacking of animation nodes until saving of the game would take very long or even crash.
2015-07-07 22:04:07 -04:00
Sven Eberhardt df0c2b9921 Document precision parameter of GetX and GetY.
Also update wording on SetPosition precision parameter documentation.
2015-07-04 11:30:24 -04:00
Sven Eberhardt 723d3c6df9 Document precision parameter of SetPosition() (#1348) 2015-07-04 11:10:41 -04:00
Clonkonaut f653d4c70c Lantern may now be attached to buildings. Simply put it in the building's inventory. 2015-07-02 22:36:32 +02:00
Clonkonaut 00fcee09ee Producer Library: ForceEntry callback to bypass RejectEntrance 2015-07-02 22:36:32 +02:00
Clonkonaut cce37fc272 Little performance tweak. 2015-07-02 22:36:32 +02:00
Armin Burgmeier 5f63e9d4b3 Skip mission access check in debug builds 2015-06-30 22:08:37 -04:00
Mark 02fd798631 Colored lights
The color of object lights can now be changed. This includes the following changes:
- added light test scenario, based on DarkCastle, with some lights,
- new functions SetLightColor() and GetLightColor() with C4Script documentation,
- third drawing pass for rendering the light color, the drawing passes are now referenced by enum,
- the blending of light from multiple colored light sources works correctly with alpha blending,
- light color value affects the intensity of the light,
- alpha blending of the light depends on color value and lightness. This means that brighter (= more value) and lighter (= more whiteish) light will be preferred in blending over other lights,
- the object light color is rendered to the lower half of the fow light texture now,
- the shader accesses the brightness/direction information and color information correctly,

The patch was created from the following commits:
dab898a SetLightColor()
f57286e Color texture experiment
d0702f5 Dynamic color
fa14cdf Light test scenario
f99203d Alternate lights
474bade Bugfixes
3113698 Brightness handled better
516fb21 GetLightColor
1d91ec9 Improvements
3cfbf6c Documentation
95ec185 Improvements: Light Shader
a63bffc Scope of alpha
20c7ca0 Improvement: C4FoWLight
17d9123 Undo code style
d79411b Cleaner code

(cherry picked from commit 36dec610e36860b88417e91ce727250673bc2ec2)

Conflicts:
	src/landscape/fow/C4FoWRegion.cpp, merged
2015-06-28 21:28:40 +02:00
Clonkonaut 1021c51fe8 Lantern: Simple light source and fire bomb!
Also added a second click sound.
2015-06-28 18:59:02 +02:00
Armin Burgmeier ecaedb7106 Add GetAnimationList() script function (#1344) 2015-06-22 19:58:58 -04:00
Nicolas Hake 9eb8eedf82 Fix headless build
Several rendering changes have resulted in a non-rendering build that
failed to build from source. Dummy out all of these functions to make it
work again.
2015-06-17 21:30:56 +02:00
Armin Burgmeier 45c3d1ff2e Remove dead/superfluous code in C4Landscape 2015-06-16 20:56:53 -04:00
Nicolas Hake 79b702ac4b GLX: Don't crash when multisampling is supported
std::copy'ing into an empty vector doesn't work, and wasn't what was
intended in the first place. Assigning the full range should work better.
2015-06-15 07:03:49 +02:00
Maikel de Vries 7ef3e9c13e add some title images for scenarios 2015-06-12 21:43:17 +02:00
Fabian Pietsch 706e9e71a9 Fix logic error in shader log file locking
On success, flock() returns 0, so !flock() is true then. Testing for
!flock() to detect a locking error is therefore wrong. This got the log
file closed immediately after opening it on my GNU/Linux machine,
resulting in an always empty OpenClonkShader.log.
2015-06-06 21:31:19 +02:00
Clonkonaut ef7626ac88 Added new lichen grahpics by Foaly 2015-06-01 22:38:41 +02:00
Maikel de Vries a0f95c0e93 add global function to get players in a team 2015-06-01 18:52:58 +02:00
Maikel de Vries d8342b8410 add a world icon 2015-06-01 18:52:17 +02:00
Nicolas Hake 22dfa97a7f Remove C4Draw::DebugLog
I'm sure there was a reason to have a separate DebugLog function inside
C4Draw, with a different visibility trigger, but I don't see it. Also
there was no DebugLogF, so that's fun too.
2015-05-28 23:34:29 +02:00
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