Commit Graph

86 Commits (1204d7d2d96721e286a7309b8876eeae690ff88b)

Author SHA1 Message Date
Nicolas Hake 3e29dbea57 Dynamic particles: skip calculations and rendering when headless
Particles are not required for synchronicity in network play, so we can
skip all calculations concerning them in headless mode.
2013-10-18 22:30:03 +02:00
Maikel de Vries 12f677f96e Fixed MAPALGO_Lines, added MAPALGO_Rotate constant, fixed documentation 2013-10-13 10:28:13 +02:00
Sven Eberhardt 8cf8ad00e5 Added MAPALGO_Lines.
This might make life easier for people who transition from Landscape.txt.

For new maps, lines should probably better be drawn using MAPALGO_Poly in a loop. This gives you more control over individual line widths, angles, etc.
2013-10-12 19:28:22 +02:00
Martin Plicht b89d505457 dynamic particles: Fix last commit
Remove explicit inherited destructor call
	Thread stopping in C4DynamicParticleSystem destructor seems more sensible
2013-10-12 00:34:21 +02:00
Martin Plicht 3f356031b8 dynamic particles: CalculationThread destructor calls DynamicParticles.CalculateNextStep() to make the thread code waiting on the internal event object come to an end 2013-10-12 00:12:30 +02:00
David Dormagen 23a3abe01e CreateParticleEx: added "amount" parameter
fixed some minor documentation errors (mainly links)
2013-10-10 17:19:20 +02:00
David Dormagen 7ffa7e2ed9 dynamic particles: fixed incorrect copying of union 2013-10-09 01:49:10 +02:00
David Dormagen fc3aaab835 dynamic particles: more code cleanup and fixes 2013-10-09 01:29:12 +02:00
David Dormagen f5ad59382d dynamic particles: some code cleanups 2013-10-08 00:08:15 +02:00
David Dormagen dc574ff76b dynamic particles: use event based waiting in favor of Sleep() 2013-10-07 23:37:01 +02:00
David Dormagen 21c387fbd2 dynamic particles: PV_KeyFrames all other values for smoothing than "0" are currently not functional 2013-10-07 20:56:57 +02:00
David Dormagen 82f68db9a8 dynamic particles: removed the size-parameter of CreateParticleEx 2013-10-07 20:56:57 +02:00
David Dormagen 01bf846eb2 dynamic particles: changed nested value providers to use member pointers instead of direct pointers; not allow size of 0 2013-10-07 20:56:56 +02:00
David Dormagen beaa394b1d dynamic particles: value provider functions can now be nested 2013-10-07 20:56:56 +02:00
David Dormagen 9ea484f027 dynamic particles: fixed wrong particle color for constant colors 2013-10-07 20:56:55 +02:00
David Dormagen 564b722720 dynamic particles: fixed calculation of collision vertex and allow CollisionVertex=0 2013-10-07 20:56:54 +02:00
David Dormagen 0282ca0bd7 dynamic particles: fixed default value of Stretch 2013-10-07 20:56:53 +02:00
David Dormagen 1cb2296a37 dynamic particles: added on collision functions PC_Die and PC_Bounce 2013-10-07 20:56:53 +02:00
David Dormagen 85e0d9788a dynamic particles: added property CollisionVertex 2013-10-07 20:56:52 +02:00
David Dormagen 9753b48f7e dynamic particles: now respect particles' aspect ratio; added PV_Speed, added property Stretch 2013-10-07 20:56:51 +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 ba41d77e0b dynamic particles: added BlitMode property (supports additive and 0) 2013-10-07 20:56:50 +02:00
David Dormagen e43b9d4fee dynamic particles: added rotation property
added PV_Step and PV_Direction
2013-10-07 20:56:50 +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
Sven Eberhardt 324a1f03c0 Fix LandscapeRender ReInit when loading scenario sections.
The LandscapeRender Init() proc loads graphics from the main graphics group, which is already closed when a section is loaded. So just keep the renderer around on landscape recreation now.
2013-07-03 22:28:50 +02:00
Tobias Zwick f6d64e46f8 fix querying InsertMaterial for bodies of water that stretch to the edge of the landscape 2013-06-02 17:59:13 +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
Sven Eberhardt 183c1527b6 Added query_only parameter to script function InsertMaterial. 2013-04-28 13:57:52 +02:00
Sven Eberhardt 09a6349060 Fix DrawMaterialQuad with DMQ_Bridge and non-default texture settings 2013-04-08 19:33:20 +02:00
Sven Eberhardt 6250ff1766 Silence a few MSVC warnings 2013-04-01 12:48:02 +02:00
Sven Eberhardt c17080a4a2 Added no_instability_check parameter to script functions DigFree and DigFreeRect (#932). 2013-03-31 15:39:29 +02:00
Sven Eberhardt 1322391f5f Implemented C4S.Landscape.BottomOpen=2: Bottom is closed iff corresponding map pixel in bottom row has tunnel background. 2013-03-30 14:54:51 +01:00
Sven Eberhardt 1f78ee3a88 Adjusted PXS code for cases of PXS-density > C4M_Solid (#944). 2013-03-30 14:05:12 +01:00
Sven Eberhardt 1e1d4eb78a Fix potential double-free of static Map and MapLayer prop lists (#935) 2013-03-27 21:48:18 +01:00
Nicolas Hake 459fce0758 Replace std::auto_ptr with std::unique_ptr
std::auto_ptr has awkward copy semantics and is deprecated in C++11.
2013-03-26 15:43:01 +01:00
Sven Eberhardt 698be41e90 Fix build 2013-03-26 10:57:46 +01:00
Sven Eberhardt c115fbfaa0 FnBlastFree: Added max_density parameter.
Also updated material densities and added attribute MaxPickDensity to pickaxe, so it's now possible to define a pickaxe that cannot go through granite.
2013-03-26 00:45:44 +01:00
Sven Eberhardt 4b6c26a48a Added script function array MapLayer.CreateMatTexMask(any mask_spec).
Returns mask_spec as an array of 256 bools to be used e.g. in conjunction with the return value of GetPixel.
2013-03-24 13:23:37 +01:00
Sven Eberhardt cc7c9488c5 FnLayerSetPixel also takes string parameter for pixel color 2013-03-22 21:31:34 +01:00
Sven Eberhardt 0edee130a7 Fix error message in C4MapScriptAlgo::GetXYProps 2013-03-20 23:09:40 +01:00
Sven Eberhardt 0b8476c029 Scripted map drawing: Fix integer overflow issues for large maps in MAPALGO_Ellipsis and MAPALGO_Polygon 2013-03-19 20:10:37 +01:00
Sven Eberhardt 57e63a5275 Added support for scripted maps (Map.c) and documentation. 2013-03-19 00:36:06 +01:00
Sven Eberhardt 8e19c52014 Do not check instability when converting material to solid. This fixes ice of frozen lakes immediately crumbling down due to our cool, new anti-single-pixel-code. 2013-03-02 22:33:55 +01:00
Sven Eberhardt e6df566ebe Fix theoretical crash when several objects dug free at the same time delete each other. 2013-02-21 00:22:50 +01:00
Sven Eberhardt b02676a6e7 Auto-collect fragile objects (i.e.: Firestones) when digging.
See http://www.clonkspot.org/comic/1
2013-02-20 21:12:50 +01:00
Sven Eberhardt 437433776f C4Landscape::InsertMaterial use ptr instead of ref for insertion pos 2013-02-18 00:48:25 +01:00
Sven Eberhardt 30e07f87b8 Added parameter to InsertMaterial() to return actual insertion position.
The insertion position might be pushed upwards if e.g. water is inserted to the bottom of a lake. However, we need the actual insertion position if we ever want to modify the pump to require/produce energy depending on the vertical distance of material pumped.
2013-02-17 18:29:44 +01:00