Commit Graph

6256 Commits (e64875d1c768e3a4f55765ae50d85e4c7a55ce00)
 

Author SHA1 Message Date
Armin Burgmeier e64875d1c7 C4Landscape: Make GetPix and _GetPix const 2014-11-17 09:13:01 -05:00
Tobias Zwick 7f1ca342c2 another build fix 2014-11-16 20:36:12 +01:00
Tobias Zwick eb6bba9c4e fix linker error for G++ and clang 2014-11-16 20:18:09 +01:00
Tobias Zwick fd0163ebc6 refactor and document: C4FoWLightSection only calculates the triangles now, C4FoWLight stitches everything together and renders
* intermediate fade triangles are now calculated in C4FoWLight
* rendering takes also place in C4FoWLight, using different C4FoWDrawStrategies
* solved an old TODO from Peter (int -> int32_t)
* refactor and simplify portions of the light vertex calculation code
2014-11-16 18:57:42 +01:00
Armin Burgmeier 00447dd524 Merge branch 'master' into lights 2014-11-12 08:47:43 -05:00
Armin Burgmeier fb5365c2b1 Fix possible crash when drawing empty pix or line PXS 2014-11-12 08:46:53 -05:00
Maikel de Vries fb707a8634 fixed tutorial 3 flint drop (#1171) 2014-11-09 14:38:30 +01:00
Armin Burgmeier a1d653415d Fix typo in elevator description (github #3) 2014-11-07 20:25:16 -05:00
Armin Burgmeier c3bcedfbf9 Don't attempt mouse hover callbacks when mouse control is passive (github #5) 2014-11-07 20:16:30 -05:00
Armin Burgmeier ebeeb534ce CreateParticleAtBone: Take object rotation into account (#1173) 2014-11-07 19:57:04 -05:00
Armin Burgmeier 53f4185958 Add auto-generated normal maps for the firestone graphics 2014-11-07 15:29:32 -05:00
Armin Burgmeier 137abb89df Implement normal maps for sprite graphics 2014-11-07 15:29:09 -05:00
Armin Burgmeier 672e343b84 Remove C4DefGraphics::CopyGraphicsFrom()
It is not used.
2014-11-07 15:28:13 -05:00
Armin Burgmeier 5b54a3d6ea Remove fixed-function lighting for meshes
The light direction is now taken from the light texture, so the only thing that is
still needed is the material definitions.
2014-11-07 12:08:06 -05:00
Armin Burgmeier aed907e30d Remove old fog of war 2014-11-07 11:53:10 -05:00
Armin Burgmeier 219fa8597c Implement light calculations for meshes 2014-11-06 15:56:19 -05:00
Armin Burgmeier 0795715465 Apply lighting on sprites 2014-11-06 15:56:19 -05:00
Armin Burgmeier a6d949d313 Merge branch 'master' into lights 2014-11-04 11:26:45 -05:00
Armin Burgmeier 73e4f5a89c Remove some unused code in C4Draw 2014-11-04 11:24:55 -05:00
Armin Burgmeier a1bafb937f Implement DrawQuadDw with PerformMultiTris
This simplifies the code further.
2014-11-04 11:02:40 -05:00
Armin Burgmeier 9e9f0cee9d Avoid setting oc_ClrModMap shader parameter when clrmodmap is not used
Otherwise, ResolveAutoParameter() does not set the correct parameter type, and
the code would try to set a sampler2D parameter as a float4. It does not matter
in principle since the shader would not use the texture anyway, but it
generates a GL error that is avoid this way.
2014-11-03 14:39:17 -05:00
Armin Burgmeier e9b4ddc426 Fix texture name in normal map shader 2014-11-03 14:38:17 -05:00
Armin Burgmeier f89058f094 Remove config entries that are no longer used 2014-11-02 16:57:50 -05:00
Armin Burgmeier fe7897539a Remove unused code 2014-11-02 16:57:28 -05:00
Armin Burgmeier 233e5e7c13 Remove CStdGL::BlitLandscape
This code is only used for the low-resolution landscape that is hardly in use
anymore. The code was mostly a duplicate of the standard C4Surface blit
function, CStdGL::PerformBlt, with some added code for blitting material
textures with higher resolution. However, that code was not enabled anymore
by the classic landscape renderer either, so it seems safe to remove it.

The landscape is now simply drawn by C4Draw::Blit.
2014-11-02 11:15:06 -05:00
Armin Burgmeier 50769171f1 Remove manual clipping in C4Draw::BlitUnscaled
This was not working anymore correctly, since it now operated on unzoomed
coordinates. This could have been worked around by only applying it in the
unzoomed case, however I don't think the code is actually used much anymore.
In other cases of the rendering code, such as the mesh rendering, manual
clipping was never implemented and this did not seem to cause any problems.

Therefore, it can probably be removed safely.
2014-11-01 23:11:35 -04:00
Armin Burgmeier 373b992f45 Tweak the shader a bit 2014-11-01 22:45:14 -04:00
Armin Burgmeier 2b2bc56e77 Remove unused PerformBlt function 2014-11-01 22:28:03 -04:00
Armin Burgmeier 65a47623e4 Use PerformMultiTris in the standard blitting code
This makes blits with overlays to actually use a single pass only, and
applies the GLSL shader also to standard object blits, which might come
handy when the lighting calculations in the lights branch are applied
on sprite objects.

It also removes the last user of C4Draw::PerformBlt, which will be removed
in a subsequent commit.
2014-11-01 22:28:03 -04:00
Armin Burgmeier b58fde88aa Add option to draw overlay with PerformMultiTris
This allows drawing images with overlay in a single rendering pass.
2014-11-01 22:28:03 -04:00
Martin Plicht 1ddb8ebf39 mac: Quit from main menu also calls Application.Clear() 2014-11-01 15:47:04 +01:00
Martin Plicht d05c784478 C4GameObjects: Turn remaining explicit iterator use into for (x : list) loop 2014-11-01 15:47:04 +01:00
Martin Plicht f1f1627995 C4ObjectList: InsertLink, InsertLinkBefore and Clear also do some iterator adjusting 2014-11-01 15:47:03 +01:00
Armin Burgmeier b0f2f507b1 Fix execl invocation in C4UpdateDlg 2014-10-29 00:35:13 -04:00
Maikel de Vries 856e37a360 fix c4script error in clonkcontrol library 2014-10-28 18:01:59 +01:00
Maikel de Vries dd239b97a5 fix c4script error when producer creates object that deletes itself 2014-10-28 18:01:12 +01:00
Maikel de Vries 0c883b0948 balance structure costs
This reduces the time to construct a basic settlement, which should improve game play.
2014-10-27 19:30:45 +01:00
Armin Burgmeier d09651ab1b Add base mesh material for normal maps
This can be derived from by other materials to actually use a normal map
with a single base texture.
2014-10-26 21:32:08 -04:00
Armin Burgmeier babb0b243b Load mesh material scripts also from .ocd folders without definition 2014-10-26 21:29:36 -04:00
Sven Eberhardt b310369b64 Initialize C4Game::CheckObjectEnumeration()::Check::maxNumber in ctor.
MSVC2012 build fix.
2014-10-26 20:44:06 +01:00
Sven Eberhardt a60bf33358 Rename C4DrawMeshGLProgramInstance::Parameter::Parameter to avoid name conflict.
MSVC doesn't like members having the same name as the enclosing class.
2014-10-26 20:41:45 +01:00
Maikel de Vries 8c16a9b4d7 moved all particle definition into separate folder Particles.ocd
This adds a bit more structure to Objects.ocd and particles could be further organized into different subfolders.
2014-10-26 19:49:22 +01:00
Maikel de Vries 868b17b6d7 improved difficulties for Krakatoa 2014-10-26 15:58:48 +01:00
Maikel de Vries 399524330d new title image for Krakatoa 2014-10-26 11:27:25 +01:00
Martin Plicht 0bab7c17de C4Object: ShiftContents done with iterators 2014-10-25 21:26:07 +02:00
Martin Plicht afa6974f37 C4GameObjects: Sorting out objects with inactive state done with regular Remove/Add calls instead of manually doing linked list dance again 2014-10-25 21:26:07 +02:00
Martin Plicht 0219a40d2b C4GameObjects: PostLoad sanity Contents check done with iterators instead of direct C4ObjectLink access 2014-10-25 21:26:07 +02:00
Martin Plicht e375e4b30a C4GameObjects: When shelving contents of InactiveObjects temporarily, make a copy instead of setting InactiveObjects.First 2014-10-25 21:26:07 +02:00
Martin Plicht e05bdfbcb4 C4Game: Refactor CheckObjectEnumeration to not use manual list traversal 2014-10-25 21:26:07 +02:00
Martin Plicht 843d4039b1 C4GameObjects: Use this instead of ::Objects 2014-10-25 21:26:07 +02:00