Commit Graph

77 Commits (7f79c77af6716143c475181220458310518494fe)

Author SHA1 Message Date
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
Armin Burgmeier 61b05f92c3 Remove unused FoW tracking in C4Player
The FoW decay mechanism is not needed anymore, either, because the light
system itself is already slowly fading out when the light changes.
2014-12-29 23:09:31 +01:00
Armin Burgmeier 748b565259 Remove objects from light sources when dead or removed 2014-12-29 23:09:04 +01:00
Armin Burgmeier 2f08918393 Add FoWEnabled entry in Scenario.txt [Game] section (#1178) 2014-12-29 12:29:43 +01:00
Armin Burgmeier aed907e30d Remove old fog of war 2014-11-07 11:53:10 -05:00
Armin Burgmeier a6d949d313 Merge branch 'master' into lights 2014-11-04 11:26:45 -05:00
Martin Plicht 0bab7c17de C4Object: ShiftContents done with iterators 2014-10-25 21:26:07 +02:00
Martin Plicht d84d42717e C4Object: Call Contents.GetLastObject() instead of accessing Last link directly 2014-10-25 21:26:06 +02:00
Martin Plicht 03f43f462b C4ObjectList: Replace trivial cases of manual list traversal with iterator usage 2014-10-25 21:25:52 +02:00
Armin Burgmeier 8146419e2d Use PerformMultiLines in C4Object::DrawLine 2014-10-18 13:35:20 -04:00
Tobias Zwick b11e8d5d7a Merge branch 'master' into lights
Conflicts:
	planet/Graphics.ocg/LandscapeShader.c
	src/graphics/C4DrawGLMesh.cpp
	src/graphics/C4DrawGL.cpp
	src/landscape/C4Landscape.cpp
	src/landscape/C4Landscape.h
	src/landscape/C4LandscapeRender.cpp
	src/landscape/C4Scenario.cpp
	src/landscape/C4Scenario.h
2014-10-06 23:27:16 +02: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
Maikel de Vries 653b135919 Move contents ejection on death after Death Call
This allows the scripter to access the contents in OnClonkDeath and similar callbacks preventing solutions using effects or static variables.
2014-04-22 20:15:26 +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
Sven Eberhardt 57463b61c4 Rework SolidMasks to be defined in a separate SolidMask.png graphics file instead of the main definition graphics. 2014-01-08 01:55:33 +01: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
Tobias Zwick 325053410f rename script callback UpdateTransferZone to OnSynchronized (#220) 2013-12-17 23:16:11 +07:00
David Dormagen e7e9190fb9 objects now also instantiate their dynamic particle structures when loading from a savegame (fixes crash) 2013-11-26 22:00:03 +01:00
Nicolas Hake 7ffa636540 C4Object: Don't do any drawing calcs when headless
There's no point in calculating render positions or audio source
locations when we're not rendering any audio or graphics. Skip it when
headless to save CPU cycles.
2013-10-18 22:30:01 +02:00
Sven Eberhardt bd103481e8 Fix crash when ATTACHed object detaches in Enter/Exit call. 2013-10-12 23:36:42 +02:00
David Dormagen fc3aaab835 dynamic particles: more code cleanup and fixes 2013-10-09 01:29:12 +02:00
David Dormagen 2e2c40db07 dynamic particles: added phase property; added parameters to PV_Step; objects now draw their particles correctly; fixed PV_Random 2013-10-07 20:56:51 +02: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
Maikel de Vries c05875da06 Make COMD_* work more intuitive for DFA_FLOAT
Changing from COMD_UpRight to COMD_Up now makes you go upwards instead of continuing in the diagonal direction.
This does not seem to break anything, although the C4Command.cpp code is hard to verify due to lacking comments. If this is broken I will fix it. In any case no one is using it anyways.
2013-10-07 19:15:46 +02:00
Maikel de Vries 9e8dd57dbb Disabled scaling and hangling under water, fixed vertices for swimming clonk
Please note that the dive animation is putting the clonk to low compared to its center this should be fixed by one of the OC modelers.
2013-10-06 14:55:48 +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
Martin Plicht 405453aed3 Merge branch 'debugrecoption' 2013-05-31 14:39:16 +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
Martin Plicht eaf93d6a0e Also check for DebugRec flag in #ifdef DEBUGREC_* blocks 2013-05-25 23:01:41 +02:00
Martin Plicht 524fe879aa Make DEBUGREC define a commandline option 2013-05-25 22:51:32 +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 ecae81d985 Enlarge rotated shape only by the minimum necessary
Previously, a rotated object had a quadratic shape that could hold all
possible rotations.
2013-05-25 14:47:54 +02:00
Sven Eberhardt 4557d1638e Added property LineMaxDistance to let a line break when connected objects are too far apart. 2013-05-09 12:02:44 +02:00