Commit Graph

6587 Commits (77e8d779211b2f3b20c6ef80e24f21d149b8e264)
 

Author SHA1 Message Date
Sven Eberhardt 9a87240d47 Fix off-by-one error in landscape X bias calculation. 2015-01-01 15:52:15 +01:00
Sven Eberhardt 2b997b994a Add light effect to explosions.
Currently, all players see the light. In the future, we may want limit it to the controller of the explosion.
2014-12-31 13:36:22 +01:00
Maikel de Vries 588b75955f correct bottom open for Chine.ocs 2014-12-30 14:13:34 +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 ae505e3c6b Render FoW only if active for player
This allows to enable or disable FoW individually for each player with
SetFoW().
2014-12-29 23:08:17 +01:00
Armin Burgmeier a508fb38e7 Remove GL shade model changes
This gets rid of GL state changes for questionable gain. It also fixes drawing
of fade sky backgrounds in global viewports (where, for some reason, the shade
model was set to GL_FLAT instead of GL_SMOOTH).
2014-12-29 22:27:49 +01:00
Armin Burgmeier 4c3235bbc9 Ifdef-out unused shader code in ObjectLightShader.glsl 2014-12-29 22:26:18 +01:00
Armin Burgmeier 2f08918393 Add FoWEnabled entry in Scenario.txt [Game] section (#1178) 2014-12-29 12:29:43 +01:00
Armin Burgmeier be92651219 Make the clonk a bit brighter
This compenates for the fact that the ambient and emissive part of
mesh materials are not taken into account anymore.
2014-12-28 17:22:32 +01:00
Armin Burgmeier a3049207c9 Use full ambient lighting in global viewports
This allows to see the whole landscape without any areas covered by FoW
in the global viewport. Basically the ambient lighting is set to 1.0
independent of the ambient light map. In the course of this, a second
shader for the landscape has been introduced.
2014-12-28 15:07:42 +01:00
Armin Burgmeier c687ea4040 C4Viewport: Fix memory leak of C4FoWRegion object 2014-12-28 14:07:50 +01:00
Armin Burgmeier 2ebb15c5db Fix crash on player elimination (#1191) 2014-12-28 12:28:25 +01:00
Armin Burgmeier 3306d9163c Use default lighting for picture mesh graphics
Instead of flat shading.
2014-12-27 20:05:28 +01:00
Armin Burgmeier f65c08f041 Register clonk:// protocol handler on Linux 2014-12-26 21:48:17 +01:00
Armin Burgmeier 8116a96ed4 Fix fragment coordinate transforms (#1192)
There were two problems with the previous transforms:
  1) For inverting the Y axis for the ambient map, the total height of the
     output window is needed, not only the viewport region.
  2) The Y offset to only use the part of the light texture that is being
     rendered to was not applied.

In order to keep the transformations more readable, a new lightweight class
C4FragTransform has been introduced which can only handle translations
and scales in x and y.
2014-12-26 16:16:09 +01:00
David Dormagen 64e092cd3e custom guis: fixed text alignment
C4ScriptGuiWindowStyleFlag should probably be a class enum. Or at least put in a separate namespace. This is TODO to prevent further name collisions. However, it's not completely trivial.
2014-12-26 12:18:17 +01:00
David Dormagen a2a1778092 mouse tooltip: fixed possible crash when object has no tooltip 2014-12-26 11:51:02 +01:00
David Dormagen c2c80b94db custom gui: fixed FitChildren style flag 2014-12-26 11:50:40 +01:00
David Dormagen 8a3c965e3e default to allow collection of objects into non-hand slots if Collect() is called by a script (#959) 2014-12-25 18:40:10 +01:00
David Dormagen 44989941cd inventory menu: also show name of object in description box 2014-12-25 18:14:30 +01:00
David Dormagen d73799ab07 when a currently-used object is suddenly deleted, the usage is quickly cancelled (#899) 2014-12-25 18:04:19 +01:00
David Dormagen 5565c4401c adjusted construction menu to work with arbitrary resolutions 2014-12-25 17:21:39 +01:00
David Dormagen f89b8c8319 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Environment.ocd/Cloud.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/PowerConsumer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/PowerProducer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/System.ocg/ClonkControl.c
	src/gui/C4MouseControl.cpp
	src/landscape/C4PXS.cpp
2014-12-25 15:24:19 +01:00
Armin Burgmeier 5bb8b48e5d Update documentation for custom shaders 2014-12-22 22:58:09 +01:00
Armin Burgmeier 8686441d45 Make mesh shaders use the C4Shader slice machinery 2014-12-22 22:56:30 +01:00
Armin Burgmeier fdd94a3311 Add named slice positions for vertex shaders 2014-12-22 22:56:30 +01:00
Armin Burgmeier 574149e289 Pick up a shader slice only after a newline
Otherwise a workaround such as "#define slice(x)" would not work for non-OC
shader code.
2014-12-22 22:56:30 +01:00
Armin Burgmeier 5c98fdccec Make C4ShaderCall use a const C4Shader* 2014-12-22 22:56:30 +01:00
Armin Burgmeier d6bdf9a6e0 Add possibility to add vertex slices from the parser 2014-12-22 22:56:30 +01:00
Armin Burgmeier 8c42704181 Rename some shader files and add basic shader for meshes 2014-12-22 22:56:30 +01:00
Armin Burgmeier 7f1cf15274 Change slice syntax such that positions appear in parentheses
This allows to ignore slice declarations using `#define slice(x)`, which
mill be useful for custom mesh material shaders, allowing to write them
such that they can be used standalone in a mesh viewer but also as slices
for OpenClonk, in which case lighting and color modulation will be applied
automatically.
2014-12-22 22:56:30 +01:00
Maikel de Vries 1e5d5b56da fix IsPowerAvailable function in power library 2014-12-21 20:20:25 +01:00
Mark 305637b246 Loading skeletons separately (#1180)
Animations are now part of the skeleton, and skeletons are loaded before meshes. They are stored in a map in StdMeshSkeletonLoader. This is only the first part of changes for #1180.
2014-12-20 23:11:33 +01:00
Maikel de Vries 2d1647ea77 improved prioritizing of power consumers 2014-12-19 21:47:08 +01:00
Maikel de Vries 289f59a872 moved consumer and producer library into power library folder 2014-12-19 14:59:46 +01:00
Maikel de Vries 22dfab63aa clean up scripts of power library 2014-12-19 14:56:01 +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 e0bfc3211c Fix definition packing order (#1189)
To match the changed loading order from previous commit
2014-12-15 09:07:50 -05:00
Mark 99acc31098 More readable C4Def::Load
The load function now calls several functions for loading specific files, even if these functions may be very short. The behaviour changed slightly: Sounds are now always loaded before the graphics. Enables loading sounds even if the graphics are invalid.

Conflicts:
	src/object/C4Def.cpp
2014-12-14 22:09:55 -05:00
Sven Eberhardt f50e2e9e3a Fix scroll bars in zoomed editor viewports on Windows. 2014-12-14 16:08:56 +01:00
Sven Eberhardt 8df39d06e4 Fix texture preview in editor tools dialogue on Windows. 2014-12-14 15:20:57 +01:00
Sven Eberhardt bd1f59cb2d Fix Win32 MinGW build.
I hope...
2014-12-14 13:43:58 +01:00
Sven Eberhardt 296a1b8f8d Auto-select nVidia GPU on Optimus laptops.
Since we're no longer using DirectX, nVidia's automatic detection no longer works classifies OpenClonk as a game to use the high performance GPU. Note that this flag does not work on some old drivers (version<302 according to specs). To support these old drivers, we would have to link against DirectX despite not using it.
2014-12-14 13:24:16 +01:00
Sven Eberhardt dd9fdbb159 Log information about GPU used by OpenGL on startup. 2014-12-14 12:35:22 +01:00
Sven Eberhardt 9db21442b7 Fix assertion when drawing boxes on non render targets.
This doesn't fix material preview in editor mode yet but at least there's no more assertion. We should probably create a proper render target surface for that.
2014-12-13 15:14:51 +01:00
Nicolas Hake 6c2995fe41 Squelch varargs warnings in System.ocg
The engine (extra)warns whenever you use Par() or ... inside of a
function that is not declared as taking a variable number of arguments.
Change the declaration of all System.ocg varargs functions so it is
immediately obvious.
2014-12-12 23:27:17 +01:00
Maikel de Vries c6802b8776 increase game content version entries to 6.0 2014-12-12 22:58:16 +01:00
Nicolas Hake 9089f6857f Remove Sort field from C4FolderHead
This field apparently was intended to be used in folder maps, but was
already unused in Clonk Rage, and has never been used in OC either.
2014-12-12 22:54:42 +01:00
Tobias Zwick d59b1e5e5b reduce version numbering from x.y.z (x does never changes) to y.z 2014-12-12 21:57:52 +01:00