Commit Graph

7603 Commits (0c1abe69f95fa28f62f19ba32662613ccca7710e)
 

Author SHA1 Message Date
David Dormagen 7a6e8cdf90 interaction menu: simplified object-finding-logic greatly
This is mainly to get rid of IsContainerEx, because wtf.
The only reason why the categories were restricted was to prevent HasExtraSlot-objets from being found. Some C4D_Objects (or with wrong category in general) wanted to be found however. They are now found just like that.. like it was supposed to be.
2015-09-20 17:36:45 +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 d1313f622f Drop hack that allowed taking a reference to a temporary value
This has never been legal C++, and the compilers where it was necessary
are no longer supported.
2015-09-20 13:27:13 +02:00
Sven Eberhardt 26dff21b8a Fix tool picker on materials with sky background.
It selected an invalid texture before.
2015-09-19 22:37:45 -04:00
Sven Eberhardt 26085a1824 Fix rain change from water to snow (not ice) when it's cold.
Also optimize the cloud a bit since it was the top element on the script profiler.
2015-09-19 21:22:56 -04:00
Sven Eberhardt 95da770892 Move GetDefWidth and GetDefHeight script functions to engine.
They started to appear in script profiler runs and the GetDefVal-implementation is very inefficient.
2015-09-19 21:22:55 -04:00
Sven Eberhardt 369be20860 Fix cloud clipping (#1404). 2015-09-19 21:22:55 -04:00
Armin Burgmeier 653680b296 Revert "Add Scale parameter in materials"
This reverts commit 8ef1f908cc. This seems to be
a performance bottleneck on some graphics cards and/or drivers. Clonkonaut
reports issues with a Radeon HD 7800.

This feature is not vital since textures can always be drawn such that they
tile properly at 512x512. While that particular problem with the Radeon card
could probably be worked around, it's just not worth it.
2015-09-19 17:26:46 -04:00
Sven Eberhardt 4020769e23 Don't delete objects with partial shape still in viewport (#1404).
This will allow better graphics for the clouds movement when wrapping the landscape.

There is some potential for weird behavior; e.g. objects hidden just out of view outside the landscape. But we don't have any goals like Clonk Rage gold mine where you would have to find that nugget lying hidden in that place. Besides, the current behavior of just removing stuff even though it was just halfway out is worse.
2015-09-19 17:22:43 -04: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
Sven Eberhardt 3f100cffb0 Fix possible sync loss on seasonal temperature change. 2015-09-19 13:37:51 -04:00
Armin Burgmeier 6d226e30ed mape: fix memory corruption when setting filename (#1256) 2015-09-19 11:39:20 -04:00
Armin Burgmeier 8ef1f908cc Add Scale parameter in materials
This allows to scale textures up or down from their initial size, allowing
them to tile at intervals other than 512x512.
2015-09-19 10:48:28 -04:00
Maikel de Vries f1a6653c94 remove energy bar rule
This rule is obsolete as the HP of structures is shown in the interaction menu now.
2015-09-19 07:59:05 +02:00
Maikel de Vries 8d18b61403 remove energy bars from Krakatoa (#1366) 2015-09-19 07:57:56 +02:00
Sven Eberhardt e4eedf3c45 Unify directory separators of filenames given on command line (#1066) 2015-09-19 00:06:42 -04:00
Armin Burgmeier fd285f6656 Create mipmaps only for static textures that are expected to be zoomed
Hopefully fixes #1403.
2015-09-18 21:10:39 -04:00
Clonkonaut 1746d25dd1 Mesh graphics for wheat. 2015-09-18 19:45:52 +02:00
Clonkonaut 6a9ef8b961 New: Cotton, Cotton Seed, Cloth, Seed Library 2015-09-18 19:44:49 +02:00
Clonkonaut a2f2aff572 Fix sickle being able to harvest contents. 2015-09-18 19:42:55 +02:00
Clonkonaut e196ddcb2c Tidy up Crop Library. 2015-09-18 19:41:21 +02:00
Sven Eberhardt bdad81d2d1 Show "gl: Create context" messages on first context only.
They would clutter the log whenever you switched tools, created viewports, etc.
2015-09-18 09:50:06 -04:00
Nicolas Hake ab4f1d7258 Win32: Update crash handler for MSVC 2015 2015-09-18 15:02:33 +02:00
Nicolas Hake a11135e4ac Win32: Properly clean up tools dialog after use (#1377)
When switching dialogs in editor mode, the (paint) tools dialog wouldn't
be properly cleared, instead only destroying the dialog window. Thus,
the next time it would be used, it'd try painting onto a device context
which did no longer correspond to any existing window, which made OpenGL
sad.
2015-09-18 15:02:31 +02:00
Nicolas Hake 51eb389739 Win32: Actually delete all of the landscape dlg bitmaps on close
We used to leak a bunch of HBITMAPs when the langscape tools dialog
closed, because for some reason we only destroyed a few instead of all.
2015-09-18 15:02:30 +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
Sven Eberhardt b746dcc1d4 Fix infinite coconut jump (#1388).
Hit is called after force redirection so resetting xdir to its pre-hit value is a bad idea.
2015-09-17 22:38:29 -04:00
Sven Eberhardt 410e570b94 Add localized strings for ToolsDlg foreground and background labels. 2015-09-17 22:30:22 -04:00
Sven Eberhardt 9f4391ff0a Fix ModeBack initialization on editor startup.
It would be set by state and then immediately reset in Default(). This had the effect that if you used the color picker on sky before ever selecting a background material, the wrong background would be used.
2015-09-17 22:25:46 -04:00
Sven Eberhardt 881fc084c5 Fix invalid background material in Crash Landing map. 2015-09-17 21:59:29 -04:00
Sven Eberhardt af5302b949 Fix insect swarm and boiling lava scenario saving. 2015-09-17 21:59:05 -04:00
Armin Burgmeier c3b491ad6c Enable mipmapping for sprites
This should improve the appearance of sprite graphics when zoomed out.
2015-09-17 20:09:21 -04:00
Armin Burgmeier 5107e23905 Select sane defaults for background material and texture in editor (#1402) 2015-09-17 20:03:53 -04:00
Armin Burgmeier 5d2e36149b Don't warn if a smaller material texture is perfectly tileable 2015-09-17 18:55:41 -04:00
Sven Eberhardt c466fd6257 Remove some dead files. 2015-09-17 18:39:25 -04:00
Clonkonaut c1d87dd971 Added random value to Seed timer to prevent possible calculation spikes in key frames. 2015-09-18 00:00:46 +02:00
Clonkonaut aadbe20f5c Fixed null pointer error in growth effect.
When using negative values for growing (shrinking).
2015-09-17 23:56:44 +02:00
Sven Eberhardt 30a8ef7f0e Store allow_fire parameter of invincibility effect. 2015-09-16 23:30:23 -04:00
Sven Eberhardt 51ae849e36 Add HalfVehicle to TexMap.
Otherwise the engine would add it and save a custom Material.ocg for every saved scenario and savegame.
2015-09-16 22:25:40 -04:00
Sven Eberhardt aac23e6bc7 Fix landscape renderer and ambience level on savegame resume (#1400). 2015-09-16 22:11:39 -04:00
Armin Burgmeier c28c63ce0d Remove some now unused code in C4LandscapeRender.cpp 2015-09-16 22:01:51 -04:00
Armin Burgmeier 8e2ad1fb33 Fix property name "LightOffset" in SetLightRange docs 2015-09-16 21:55:33 -04:00
Armin Burgmeier 790219ac7e Replace 3D texture in landscape shader by a 2D texture array
A texture array is conceptionally what should be used in this case. One
advantage of this is that we don't have to generate mipmaps ourselves but can
let the graphics driver take care of it. Same for selection of the mipmap
level. This would even allow to choose different mipmap levels for different
textures.

This is a somewhat experimental change since it makes OpenGL 3.0 a hard
requirement for OpenClonk. I expect that this is fine, but if this causes
failures during landscape creation on common hardware/drivers we should
revisit.
2015-09-16 21:45:30 -04:00
Armin Burgmeier 061305c0c7 Don't enable textures in C4ShaderCall::AllocTexUnit
This was only necessary with the fixed function pipeline, but not when
using shaders.
2015-09-16 21:45:30 -04:00
Sven Eberhardt 0bb693172d Lamp post offsets light source to lamp attachment position. 2015-09-16 21:14:09 -04:00
Sven Eberhardt b683e47499 Add LightOffset property to allow light sources to origin from locations other than the object center. 2015-09-16 21:14:08 -04:00
Armin 267737cab0 SetPlayerViewLock() for all players (#1194)
Signed-off-by: Maikel de Vries <mdt.maikel@gmail.com>
2015-09-16 22:51:36 +02:00
Sven Eberhardt 56ff5bbf27 Lantern: Fix attachment on CreateContents, fix scenario saving and remove lantern dummy.
RejectCollect is not called on CreateContents or other forced entry methods but should still cause the lantern to attach. So move any side-effects to Collection2 instead of direct RejectCollect.

The lantern dummy had Timer=1 and wasn't doing anything. Use a simple overlay instead.

Note that interaction menus still show the lantern always with off-material. But that's a bug in the interaction menu.
2015-09-15 22:41:30 -04:00
Sven Eberhardt 53a002c31f Lantern: Increase light range and color light.
The range wasn't any further than the clonk's natural light which made lamp usage a bit pointless.
2015-09-15 21:48:02 -04:00