Commit Graph

114 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
Sven Eberhardt 1f81b87c33 PlayAnimation: Delete previous animations in same slot if no weight is given.
This will simplify fixing several animation leaks.
2016-01-28 22:02:27 -05:00
Günther Brammer 6b6dd96719 Move GameScript.GRBroadCast to Game.GRBroadCast
This avoids a dependency on ::Objects from C4ScriptHost.
2016-01-24 02:09:14 +01:00
Günther Brammer a5f797f96b Move miscellaneous global functions from C4Effect.cpp to their users 2016-01-24 02:09:14 +01:00
Sven Eberhardt fcf870672c Fix overflow when calling DoEnergy with large values #1646 2016-01-22 22:52:09 -05:00
Sven Eberhardt 26084af502 Fix crash when grab target is lost. 2016-01-15 08:54:03 -05:00
Sven Eberhardt cc613c01f4 Fix action target reset on same procedure only. 2016-01-15 08:14:46 -05:00
Sven Eberhardt 579cb7e66c Reset action targets on procedure change #1552 2016-01-14 21:40:42 -05:00
Sven Eberhardt e2acb8b9bb Add missing sounds for Grab/UnGrab #1585 2016-01-10 21:17:06 -05:00
Maikel de Vries a6efefaecc fix float physics for objects moving out of a liquid surface (#1523)
This also fixes objects which previously jumped out of the water continuously, by adding an extra check to also capture faster moving objects. It could be made speed dependent, but that seems to be overkill for the situation.
2015-12-30 12:54:04 +01:00
David Dormagen a8c57ea5b9 fix assertion failure when changing C4Object.Touchable at runtime
Which would cause Boomshire to trigger an assertion on startup.
2015-12-16 23:01:28 +01:00
David Dormagen dcfb986e34 moved sounds into subfolders
This completes http://forum.openclonk.org/topic_show.pl?tid=3215
2015-12-13 22:14:55 +01:00
Nicolas Hake 617a0828fb Aul: Throw exceptions by value, not by pointer
Throwing values instead of pointers simplifies memory management at the
catch site.
2015-12-08 13:17:40 +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 f701dfd703 UpdateOCF: also update OCF_Inflammable, which can be manipulated by scripts
Previously, changing the ContactIncinerate property in a script would trigger an assertion in a debug build.
2015-11-10 19:13:52 +01:00
Sven Eberhardt cf6f66469c Pass last dead clonk as parameter to global RelaunchPlayer callback. 2015-11-08 17:15:34 -05:00
Armin Burgmeier 70fd6d20bf Keep parallax objects fixed on full map screenshots (#1042) 2015-10-17 17:38:50 -04:00
Sven Eberhardt 7fc7790257 Fix object drawing clipping at left and top screen border for models with action but without action facet set. 2015-09-25 00:51:36 -04:00
Armin Burgmeier 20eb0615ee Custom shader for drawing sky
Add a C4ShaderCall parameter to tho most important drawing functions, and
make C4DrawGL's CreateSpriteShader public with additional parameters to
specify additional defines and shader slices. C4Sky uses this to compile its
own shader with OC_SKY defined.
2015-09-12 18:15:34 -04:00
Sven Eberhardt a4629e0758 Clear container of contents prior to removing them.
The container had already set Status==0 and cleared these objects from its contents, which can cause access to dead objects when anything container-relevant is done in the destruction callback.
2015-09-03 23:39:06 -04:00
Clonkonaut 5f4978d3e6 S2Fix 2015-09-03 20:04:56 +02:00
Sven Eberhardt 54619930c7 Fix crash at game end due to callbacks into deleted objects. 2015-09-02 22:57:24 -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
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
Armin Burgmeier 08ae643c2c Add a draw mode which shows the background 8-bit surface 2015-08-04 21:21:24 -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
Maikel de Vries 9632ff03d8 default value (white) for object's light color (#1355) 2015-07-19 09:06:46 +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
Maikel de Vries fce2bce58e clonks do not attempt to scale underwater (#1176) 2015-03-26 19:52:26 +01: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
David Dormagen df56689946 added Armin's particle fire
http://forum.openclonk.org/topic_show.pl?tid=3070
Only some optimizations have been added.
2015-03-22 10:22:15 +01:00
David Dormagen d07893dadc fixed player names, clonk names and selector info being zoomed (#687) 2015-03-22 09:58:43 +01:00
Nicolas Hake a70433b6a7 Skip drawing line objects with less than two vertices (#1263)
A line object must have at least two points to plot a line through. At
any vertex count less than that, we were accessing invalid memory by
dereferencing the first element of an empty vector (VtxNum==1), or
issuing an OOB read from the vertex data (VtxNum==0).
2015-02-15 14:23:44 +01:00
Nicolas Hake e21a5bdd44 Rename BoundBy to Clamp
"BoundBy" sounds like a predicate. "Clamp" is a common function name for
the operation in graphics processing, so it should be familiar to users.
2015-02-12 23:05:55 +01:00
Sven Eberhardt cd3b969fc4 Silence a few warnings in render and SolidMask code. 2015-02-08 12:37:00 +01:00
Günther Brammer 4f9bc068ad Merge #include cleanup and SDL-mainloop fix 2015-01-25 20:47:50 +01:00
Günther Brammer 5bcedb5bbf Remove some redundant #includes 2015-01-25 18:53:48 +01:00
Sven Eberhardt b00ff573cd Fix leaked light and some possible dead pointers on game end and section switch. 2015-01-25 18:39:34 +01:00
Sven Eberhardt 089b4794a8 Fix a few warnings in Win64 build. 2015-01-25 16:43:51 +01:00
Maikel de Vries 615b26b453 RemoveObject(true) first tries to put contents into parent container before exiting them 2015-01-15 17:46:54 +01:00
Armin Burgmeier f2830311a6 Fix crash on scenario section change (#1221) 2015-01-14 12:03:05 -05:00
Mark deadfcf099 Initialize newzoom variable (#1217)
Fixes a problem with zoom in debug mode.
2015-01-13 21:29:01 +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 5e188aafb3 Fix setting small ViewOffsets. Refactor neighbouring code, enable a slight MouseAutoScroll by default
* make ViewX,ViewY,ViewOffsetX and Y private, add getters and setters that update variables that are dependent on these
2015-01-03 22:53:02 +01:00
Sven Eberhardt f25edc64df Do not render lights of hostile objects on player-owned viewports. 2015-01-02 01:42:24 +01:00
Tobias Zwick f5ecd4776d new function SetLightRange (replaces SetPlrViewRange) 2015-01-02 01:06:00 +01:00