Commit Graph

96 Commits (368a073415064957c292242483e2967a4c3e28b3)

Author SHA1 Message Date
Peter Wortmann 88ef1d40fa Warning fixes
Actually pretty sure a few of them were bugs
2015-08-31 19:52:39 +01:00
Peter Wortmann 30857e835e Shader gamma implementation
In comparison to the old system, this is a downgrade - instead of being
able to set a full color mapping by gamma ramp, we now get just a value
per colour channel.

Upside is that we do not need to play around with the global gamma ramps
any more, which was arguably the wrong way to do it.

This commit will likely break everything that has been using gamma so far.
2015-08-31 17:35:08 +01:00
Sven Eberhardt 6ab6a1ac3c Add script interface for some EFX sound modifiers. 2015-08-27 21:44:23 -04:00
Sven Eberhardt d92df758a8 Added pitch parameter to Sound() script function and allow pitch and sound level to be modified for sounds that have already been started.
Sound() called when the instance is already running used to fail. Now, it always succeeds (also for script sync safety) but updates the sound level and pitch parameters. SoundAt has not been modified since it allows creation of multiple concurrent sound instance of the same effect without object context.
2015-08-09 18:40:42 -04:00
Armin Burgmeier 51986b68ef Allow script functions to access background landscape
Add GetBackMaterial() and GetBackTexture(), and allow DrawMaterialQuad to
specify a background mat-tex combination.
2015-08-04 21:21:24 -04:00
Armin Burgmeier 92f3a3e749 Remove GBackIFT in favor of a lookup in the background surface 2015-08-04 21:21:23 -04:00
Sven Eberhardt 0d48105b46 Added shape library.
Also fixed some coconut tree reproduction issues.
2015-07-31 00:42:01 -04:00
Nicolas Hake b791404147 Remove superfluous pointer check
The pointer to a member variable of a static object is never NULL, so
checking for this is useless.
2015-05-25 16:27:16 +02:00
Sven Eberhardt 21500a81a9 Fix pump to clear the last row of pixels (#1057) and allow pumping from pump without source pipe.
ExtractMaterial has been changed to be able to slurp in from the most distant horizontal position rather than the closest to the extraction top center.

Also speed up ExtractMaterial for the common case of no required horizontal shifts.
2015-05-01 18:13:41 +02:00
Sven Eberhardt 116a5b4ae6 Add Find_InArray (#1073). 2015-04-28 18:59:50 +02:00
Nicolas Hake 874a9f2632 Pathfinder: Use callback functors instead of raw function ptrs 2015-03-31 17:21:52 +02: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
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
Günther Brammer 5bcedb5bbf Remove some redundant #includes 2015-01-25 18:53:48 +01:00
Sven Eberhardt b2501ed0e5 SetPlrKnowledge(nil, ...) sets/removes knowledge for all players (#1236)
Useful e.g. for ingame scripting when you want to grant extra construction plans. Additionally, this kind of behavior is known from some other functions with per-player parameters like e.g. Sound().
2015-01-14 00:36:44 +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
Mark 850bf1b9d4 CreateObject/CreateObjectAbove (#1214)
Renamed CreateObject() to CreateObjectAbove() and replaced all occurrences in script files.
Added CreateObject(), the function may need a rewrite though, see comment in code.
Updated documentation
2015-01-11 19:02:03 +01:00
Tobias Zwick 6cf5ba325a use true/false instead of 0/1 as return for a FnSetViewOffset 2015-01-04 22:09:01 +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
Tobias Zwick 4981182cf8 Merge remote-tracking branch '_origin/master' into lights
Conflicts:
	src/c4group/C4Components.h
2014-12-15 21:16:40 +01:00
Armin Burgmeier ffed845849 Build fix 2014-12-07 14:59:38 -05:00
Sven Eberhardt 612a05fe40 New script function: GetPXSCount.
Counts number of loose pixels of a material in an area.
2014-12-07 19:52:05 +01:00
Sven Eberhardt baf05264d1 Implement music fading.
Moved music system execution from game tick execution into main application execution so music fading works when the game is paused or lagging.
2014-12-06 18:04:55 +01:00
Armin Burgmeier db6df15377 Add SetAmbientBrightness and GetAmbientBrightness script functions 2014-11-20 17:07:31 -05:00
Martin Plicht 3144b74f36 C4GameScript: Add some explicit cast because clang 2014-09-24 23:41:36 +02:00
Sven Eberhardt abab7be591 Added scenario achievements displayed as small symbols beside the scenario name in the startup selection screen.
They can be used e.g. to show that you have finished a scenario on different difficulty levels.
2014-09-24 23:08:40 +02:00
Sven Eberhardt 0f48e7ef44 Fix simultaneous setting of zoom value and zoom limits in SetPlayerZoom(ByViewRange)() script functions when new zoom value lies outside previous zoom limits.
Simply fixed by adjusting zoom limits first, then setting the zoom value afterwards.
2014-08-12 15:27:57 +02:00
Sven Eberhardt 9dd600c26b Add player parameter to SetPlayList (#1084) 2014-08-07 17:33:36 +02:00
Sven Eberhardt 5cd9b915b0 Added some dialogue functions and speaker portraits. UpdatedAddMenuItem and CustomMessage to allow more customization for picture graphics.
I would prefer to render the models for speaker portraits directly. However, it seems like it's not currently possible to clip or render models to offscreen surfaces.
2014-07-05 15:25:30 +02:00
Sven Eberhardt 4556cb4890 Add particle value provider function PV_Sin 2014-06-30 01:00:15 +02:00
Sven Eberhardt 488044f266 Added script function GetPlayerZoomLimits (#1071). 2014-05-11 11:10:13 +02:00
Sven Eberhardt 893d5e87da Implement PLRZOOM_Set flag to allow setting current zoom and limits in the same call. 2014-05-11 10:30:41 +02:00
Martin Plicht 9bcb313f3e C4GameScript: Do not use TRUE literal 2014-04-24 12:40:30 +02:00
Sven Eberhardt cd4b3610da Add script function SetPlayerZoom to set zoom factors directly instead of by view range (#1065) 2014-04-21 19:38:05 +02:00
Sven Eberhardt bddd6d0a01 Fix assertion in SetLeagueProgressData without player ID set 2014-04-20 20:10:53 +02:00
Sven Eberhardt 4266b370d6 Added script functions SetLeagueProgressData, GetLeagueProgressData, GetLeagueScore and SetLeaguePerformance. 2014-04-20 15:33:36 +02:00
Julius Michaelis 2c7d9c0549 Fix a load of warnings (two were actual errors, only in diagnostics though) 2014-04-17 19:24:41 +02:00
Maikel de Vries 9b96ab2305 Cleaned up base material in library and engine
* rename to cleaner *Base* instead of *HomeBase*
* fixed library implementation
* engine code is now obsolete
2014-04-16 14:07:01 +02:00
Maikel de Vries c70c44387f Fix some DoDamage issues
Fire.c use correct number of parameters
Axe.c implemented FX_Call_DmgChop according to documentation
2014-04-06 17:15:13 +02:00
Julius Michaelis 405fc4f841 Fix dedicated 2014-04-02 20:53:12 +02:00
David Dormagen 6b25e54f0b PV_Step: added "maximumValue" parameter 2014-02-18 20:37:43 +01:00
Tobias Zwick 12ad7d41a6 mark undocumented functions in C4GameScript.cpp 2014-01-22 14:00:37 +07: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 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
Sven Eberhardt 8d1fbd1401 Fix engine internal smoke.
Smoke() used to create a Smoke particle directly, but the particle definitions changed. Now it just calls the global script function to create smoke.
2013-12-14 12:09:31 +01:00
Tobias Zwick fe2a400c02 replace global function GetTime() with class function C4TimeMilliseconds::Now() 2013-12-07 21:27:01 +07:00
Tobias Zwick 94c618d153 add new type C4TimeMilliseconds for time measurements to solve problems when GetTime() overflows (#251)
The new type C4TimeMilliseconds behaves for the most part like a uint32_t but is overflow-proof in comparisons.
In some places, a 0-value (or uint_max) of the variable storing the time had the special meaning "not set yet". This has been resolved by having it as a pointer to C4TimeMilliseconds with NULL meaning that it has not been set yet.
2013-12-04 19:35:07 +07:00
Tobias Zwick ceca8b8fc7 add SoundAt function in C4Script (part of #238), document
also, extend the documentation for Sound with previously undocumented parameters; threw out undocumented and also unused "multiple" parameter.
2013-11-29 18:20:36 +07:00
David Dormagen f9d7b63e2b dynamic particles: allowed lifetime of 0; allowed value providers for coordinate parameters of CreateParticleEx; load particles even if DrawFn etc. are missing (with warning for now) 2013-11-26 21:24:56 +01:00