Commit Graph

3143 Commits (56d228b6e4f227fa5d5c68b1138989d5f033af39)

Author SHA1 Message Date
Sven Eberhardt 2a31fe72f8 Initialize new player viewports with proper zoom and zoom limits (#1419). 2015-10-10 21:47:09 -04:00
Sven Eberhardt f49dc93d44 Fix full map screenshot saving.
It was partly overwritten by a regular screenshot being saved in parallel.
2015-10-09 23:06:02 -04:00
Armin Burgmeier d28913a1cb Optimize loading of ogg files
Try to load the whole data in one go instead of re-allocating a vector every
8K bytes. This otherwise results in a lot of reallocations for O(MB)
(uncompressed) sound data.

This speeds up engine initialization by about a second for me.
2015-10-09 18:43:10 -04:00
Armin Burgmeier 63bff7914e Fix the mape build 2015-10-09 18:43:02 -04:00
Sven Eberhardt d136dc22c0 Implement landscape inflammation.
It used to create the non-existent FLAM objects from the engine. Use a script callback to a global function that creates Flame objects instead.
2015-10-09 16:24:16 -04:00
Sven Eberhardt cb25282350 Fix mape again. 2015-10-09 14:55:43 -04:00
Sven Eberhardt 675db52e38 Texture shape coverage fix and mape build fix. 2015-10-09 14:49:31 -04:00
Sven Eberhardt a81249438a Win32 editor: Fix selection of textures with names included in other texture names (e.g. rock and rock_smooth). 2015-10-09 00:51:07 -04:00
Sven Eberhardt 47e422f452 Rework and document texture shapes.
* Renamed from material shapes to textures shapes
* No per-texture, so the same material can use different shapes with different textures
* Load a shape image instead of text file with vector components
* Allow texture sizes that are not multiple of the map zoom
* Add minimum overlap parameter to draw shapes only when the given overlap is reached.
2015-10-09 00:16:24 -04:00
Sven Eberhardt cc5d43d0b0 Localize loading message for scenario local player control definitions. 2015-10-05 22:38:45 -04:00
Peter Wortmann 1ce2f8fe77 Warning fix 2015-10-04 14:26:00 +01:00
Peter Wortmann 86679d2fb0 Allow all shaders to refresh
The solution is slightly hacky and not entirely stable, but for fine-
tuning this functionality is essential.

While I was at it, also reduced refresh interval so it doesn't have a
chance to lag the game.
2015-10-04 14:25:56 +01:00
Peter Wortmann beef0369e7 Fix OC_SKY definition
Lost in the merge...
2015-10-04 14:24:49 +01:00
Sven Eberhardt f5a0ff3d8f Script GUI: Process double click as second single click. 2015-10-03 22:43:06 -04:00
Sven Eberhardt 7725a379c2 Fix display of player-colored charts (/chart). 2015-10-03 21:37:41 -04:00
Armin Burgmeier fb68624686 Try to compile vertex shader before trying work-around (#1368)
It looks like sometimes graphics drivers don't report the correct number for
maximum uniforms, since the workaround was enabled even though Newton
confirmed disabling the workaround worked just fine on his GPU. Therefore,
don't listen to what the graphics driver is saying but just try to compile the
shader, and fall back to the workaround if the compilation fails.
2015-10-03 14:45:54 -04:00
Armin Burgmeier b8ed577c0f Rotate the OGRE coordinate frame by 90 degrees in X
Also rotate all meshes backwards so that everything keeps working. This should
make it more convenient for modellers to create new meshes.
See http://forum.openclonk.org/topic_show.pl?pid=29410#pid29410.
2015-10-03 11:39:08 -04:00
Armin Burgmeier 745683c860 Small shader preprocessor fixes 2015-10-03 11:18:47 -04:00
Peter Wortmann df6d564d2d Remove "ColorAnimation"
Not used any more
2015-10-03 15:32:39 +01:00
Peter Wortmann cf4ed1b0b7 Shiny materials, shader reorganisation
This implements the proposal made in the forum for "shiny" materials -
material can now determine the angle at which the most light is reflected.
Shiny materials might set this lower to approximate a "reflection" effect,
and increase the "spottiness" at the same time. To compensate for the
lack of brightness without light, "emittance" can be used.

Not sure this is the most elegant way to model this - the "proper" way
here would be to have emittance, shading and specular as three separate
light parameters instead of molding one into the other and using the third
to compensate.

Furthermore, this reorganises shaders in a major way: We reduce the
number of shader files down to three, pushing a number of possible
configurations into preprocessor. I believe this should be easier to
understand, which for the moment trumps theoretical extensibility
benefits.
2015-10-03 15:32:39 +01:00
Peter Wortmann f0030e33e0 Warning fixes
Actually pretty sure a few of them were bugs. Hopefully no new
ones were introduced here.
2015-10-03 15:32:39 +01:00
Julius Michaelis 2ad045f8d6 Replace strtod with stringstreams in C4ScriptGuiWindow::SetPositionStringProperties to avoid locale problems (second attempt)
Also added warnings and fixed a few whitespacing errors.
2015-10-03 13:17:17 +02:00
Sven Eberhardt 5b47a26d30 Perform DugOut callback also on non-collectibles and on objects not created through Dig2Object mechanism. 2015-10-01 22:43:01 -04:00
Nicolas Hake c8e1a38950 Revert "Replace strtod with strtof_l ..."
This reverts commit 139dee9874.

The commit introduced a memory leak on glibc, and broke the build on all
other platforms.
2015-10-01 20:50:40 +02:00
Julius Michaelis 139dee9874 Replace strtod with strtof_l in C4ScriptGuiWindow::SetPositionStringProperties to avoid locale problems
(That function could still use some more love, though: Error messages and not accepting ridiculous things when parsing.)
2015-10-01 19:50:05 +02:00
Sven Eberhardt b5fe6ea02a Fix mac build. 2015-10-01 00:22:43 -04:00
Sven Eberhardt 3d7d848eea When fading from running songs, fade out and then start new songs directly instead of fading into them.
For songs that start abruptly, fading into them often ruins the beginning.
2015-10-01 00:08:35 -04:00
Sven Eberhardt 17e0e2f423 Add breaks between music. 2015-09-30 22:50:18 -04:00
Julius Michaelis 9a7d57c0d2 Fix assertion firing in C4ConsoleGUI::SetInputFunctions introduced by 9e771ac 2015-09-30 14:35:50 +02:00
Sven Eberhardt fc7d16b2aa Fix mac build (I hope). 2015-09-29 21:31:13 -04:00
Sven Eberhardt 737b1fd8fd Save screenshots in background thread (#998, #1104).
Also ensure music keeps streaming while collecting data for full map screenshot.
2015-09-29 20:48:34 -04:00
Sven Eberhardt 3159793dfc MSVC build fix 2015-09-29 20:38:15 -04:00
Julius Michaelis ee859d85e0 Remove boost any usage of boost libraries 2015-09-30 00:16:12 +02:00
David Dormagen 6756db2768 C4ScriptGuiWindow: fix copyright header
The remaining old header has now been adjusted to the new one.
See e0dc30c59a for details.
2015-09-29 19:13:12 +02:00
Sven Eberhardt 8614ce46c4 Create default ambience controller in all scenarios.
Can be overloaded by providing a custom function InitializeAmbience either globally or in the Scenario proplist.
2015-09-28 20:20:31 -04:00
Sven Eberhardt 59d7c761fc Screenshot fixes and optimizations.
* There was an off-by-one-error causing a blank line at the screen upper screen border.
* Remove ApplyGamma. It is always applied because Gamma is just part of the drawing shaders now.
* Save by copying rows instead of pixels for whole map screenshots.
2015-09-28 18:54:34 -04:00
Sven Eberhardt edf66783aa Announce the name of each music piece only once. 2015-09-28 16:29:36 -04:00
Sven Eberhardt d6f16a0890 Change music switch due to playlist change to prefer to resume pieces that were recently played. 2015-09-28 16:29:36 -04:00
Sven Eberhardt 3f6cacade4 Add parameters to Music and SetPlayList to resume a piece from where it was last interrupted. 2015-09-27 20:58:37 -04:00
Sven Eberhardt 9e771acfd1 Editor: Add most recently entered script lines to dropdown list.
This also enables easier auto-completion via arrow-down.
2015-09-27 15:28:17 -04:00
Sven Eberhardt d3ee2fac57 Fix sorting of script and engine functions in dropdown menu in editor. 2015-09-26 20:10:55 -04:00
David Dormagen 439cfac129 custom GUIs: do not break text when style flag NoCrop is set and set NoCrop for HP display 2015-09-25 15:01:24 +02: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
Sven Eberhardt 88167a03a8 Add support for hidden scenarios.
If C4S.Head.Secret is set and mission access to the scenario has not been gained, it is hidden in the scenario selection list.
2015-09-24 23:51:16 -04:00
Sven Eberhardt 15336a7ea8 Allow scenario saving onto same file when launched from an unpacked folder. 2015-09-24 22:36:45 -04:00
Julius Michaelis d57a8fd62c Fix two small memleaks 2015-09-24 14:35:50 +02:00
Sven Eberhardt 9d5d8f7506 Fix control mode display and availability in lobby. 2015-09-23 21:48:37 -04:00
Sven Eberhardt 5b19294d76 Use ANY_OWNER instead of INT_MAX to label GUI elements shown to everyone.
Mostly to make the code more readable because there's no way to know that INT_MAX means "anyone".
2015-09-23 18:08:44 -04:00
David Dormagen f4f9afa477 custom guis: for the Player property, distinguish between NO_OWNER and nil
NO_OWNER means the message will be visible for noone (can f.e. be used to hide a ui window). nil means the message won't have visibility restrictions. This is probably what the scripter expects.
Previously, a value of "nil" would have been read as 0. So not setting the Player property and setting it to nil would mean two different things.
2015-09-23 22:03:29 +02:00
Sven Eberhardt 1f46a9004c Fix some erroneous file orders causing group rewinds. 2015-09-22 23:47:06 -04:00