Commit Graph

37 Commits (6ad42ed24d43c292322217553fa61c981c36906e)

Author SHA1 Message Date
Günther Brammer bddbc23354 Remove C4ObjectMenu
It's been superseded by other methods.
2016-01-30 16:04:05 +01:00
Günther Brammer a5f797f96b Move miscellaneous global functions from C4Effect.cpp to their users 2016-01-24 02:09:14 +01:00
Günther Brammer 690b4f9ba0 Move comparison out of C4Object::TargetBounds
This probably enlarges the maximum landscape height for borderbound objects.
The "infinity" constant +1000000 is larger than the biggest C4Fixed, so
would have been truncated to 16960.
2016-01-01 22:18:41 +01:00
Nicolas Hake 24b54211c5 Drop Min, Max, Swap for std::min, std::max, std::swap
The C++ standard library comes with perfectly fine implementations of
these functions, so there's no point in reimplementing them just for the
hell of it.
2015-11-15 13:53:01 +01: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
Julius Michaelis 2a9b481087 Add a new variant of vehicle that can be passed from below but be walked on from above. 2015-08-30 22:19:36 +09:00
Sven Eberhardt 6ab6a1ac3c Add script interface for some EFX sound modifiers. 2015-08-27 21:44:23 -04:00
David Dormagen 36544bd56c Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c
	planet/Objects.ocd/Vegetation.ocd/Branch.ocd/Script.c
	planet/Objects.ocd/Vegetation.ocd/Trunk.ocd/Script.c
	planet/System.ocg/FindLocation.c
2015-08-02 19:24:04 +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
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
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
David Dormagen 7d1d70f017 removed NoCollectDelay from engine; it's now handled by script
Which allows a lot more fine-grained controls as all the control and UI stuff is now also in script anyway.
2015-03-26 12:23:20 +01:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Mark f9369f9eb4 Different implementation of CreateObject() (#1214)
CreateObject() now does not reposition an object after it has been created, but rather grows it around the center of said object.
To that end a new parameter has been added to DoCon() and SetCon() and the documentation has been updated.
2015-01-13 21:03:27 +01:00
Tobias Zwick f5ecd4776d new function SetLightRange (replaces SetPlrViewRange) 2015-01-02 01:06:00 +01:00
Armin Burgmeier 5e43e595d3 Make attached meshes use their own blit parameters (#1095)
This might break some scenarios which for example change the color modulation
of a clonk and then expect that also its shovel or other objects get colored.
Such scenarios need to be fixed by also coloring the attached objects. This
might not be very convenient, and maybe we should introduce an option for
attached meshes to use the old behaviour (take blit parameters from main
object).

However, let's see how this change turns out in practise and then we see
whether further modifications are needed.
2014-10-16 11:50:30 -04:00
Sven Eberhardt 91db5d33c2 Added SolidMaskPlane property.
If an object moves and other objects are attached to its SolidMask, only objects in front of this plane are moved along with it. Defaults to Plane if zero.
2014-05-04 14:16:46 +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
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 921f21e9a6 allocate particle lists for C4Objects lazily
This should fix an error with incorrect particle lists after loading. This is also a cleaner way overall, since only a fraction of all objects will ever have particles attached to them
2013-12-22 18:51:05 +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
David Dormagen 8025e7c2b0 the dynamic particle system now runs the calculations in a different thread
added PV_KeyFrames
2013-10-07 20:56:49 +02:00
David Dormagen 40b66d1c76 added (early demo of) new particle system which should both be faster and more flexible than the old one 2013-10-07 20:56:49 +02:00
Nicolas Hake 58a39e972f Improve C4Object const correctness 2013-08-31 23:23:35 +02:00
Sven Eberhardt ba84fc7c4b Fix internal marker for FindObject searches and CrossCheck using shapes.
Before, the marker would be reset in every frame, but object markers and main counter weren't reset consistently at the same time. This could cause some objects to be not found if their markers were set after the object marker reset but before the main marker counter reset.
2013-08-10 23:21:26 +02:00
Armin Burgmeier 90ee4d2380 Fix crash when an object whose mesh is attached to another mesh is removed 2013-05-27 15:55:18 +02:00
Günther Brammer 4e875f4495 Don't store object rotation twice
Rotation was still stored as an integer and as a fixed point number.
Compute the integer on demand from the fixed point instead, like the
position. Rewrite the movement code where the two variables were
temporarily out of sync.
2013-05-25 14:59:58 +02:00
Günther Brammer 019ea36ee9 Remove unused C4Object::GetActionByName 2013-01-20 17:25:02 +01:00
Günther Brammer 6a6190564f Remove some forward declarations that are already in C4Prototypes.h 2012-12-31 22:03:12 +01:00
Sven Eberhardt 86b20be644 Fix C4Command::Jump, i.e. jumping as part of pathfinder. 2012-12-09 18:44:22 +01:00
Tobias Zwick 348fb8c7a9 clean up mouse controls, reduced cursor graphics to the used ones 2012-11-16 17:29:42 +01:00
Nicolas Hake 27eb5dd65a Allow object interaction with closed borders
Conceptually, the landscape stretches infinitely on both left and right hand
borders of the map. So far, the "closed" part of the border only blocked objects
from passing through. (Additionally, there was a bug where you could scale the
border under certain circumstances.) This patch allows objects to properly
move around on the map borders, including scaling the fake terrain.
2012-10-10 21:28:25 +02:00
Günther Brammer 4e71af5489 Script: Add GetProperties function to get the keys of a proplist 2012-05-26 01:32:43 +02:00
Günther Brammer 099cd15e56 Script: Remove unused OnBlastIncinerationDamage callback
Scenarios that want to override the default behaviour of BlastObject should
overload the BlastObject function itself. Objects can simply use the Damage
callback and/or set BlastIncinerate to nil.
2012-05-06 15:37:43 +02:00
Maikel de Vries 6fcc0f6d2e Removed TimerCall in favour of AddTimer script implementation 2012-05-05 12:09:44 +02:00
Günther Brammer 1a29f8625d Reorder engine source file organization a bit
This mostly consists of flattening the hierarchy, splitting the
graphics stuff out of platform, and a few smaller cleanups.
2012-04-27 19:04:43 +02:00