0ad/source/simulation2/components
wraitii 76acc4e146 Implement quality levels for actors & corresponding setting.
An actor file, as referenced by the VisualActor, can now define
different actors for different "quality level" setting.
In this initial version, the quality is handled directly by the object
manager.

Actor format impact:
- '<qualitylevels>' may be used as the root node, containing actor nodes
as children.
  - such actor nodes can refer to a file, or to an inline actor, or
simply be inlined.
  - such actor nodes may have a 'quality' attribute, specifying the
maximum quality level of this actor. By default, 255 (the maximum) is
implied.
- The actor format remains valid, but 'groups', 'variants', 'material',
'castshadow' and 'float' can be given a [minquality, maxquality[ range
via XML attributes. Outside of this range, the XML node is ignored
(making it possible to define, in a single actor file, several quality
levels).

Quality is a 0-255 value, with:
- Range 0-99 intended for lower level-of-detail actors (billboards,
etc.)
- Range 100-200 the 'normal' range for models. 100 is "low", 150
"medium", and 200 "high".
- Range 201-255 used for higher quality actors that might be used for
e.g. cinematics.
The range is wide to make it easier to add intermediate levels in the
future and it seemed easier given that an integer value of some kind was
required anyways.

Engine impacts:
- A new CActorDef class is introduced, wrapping an art/actors XML file
and its different quality levels. ObjectBase remains the definition of a
given 'actor', now at a given quality level.
- CActorDef imposes a maximal # of quality level for a particular actor
definition (5 currently).
- CUnit is made to refer to an Actor Definition explicitly, not a
particular ObjectBase.
- As a minor optimisation, variation keys are calculated on
pointer-to-sets-of-selections, instead of raw sets-of-selections, as
this reduces copying.
- some refactoring, including better const-correctness and hotloading
support via std::shared_ptr.

Differential Revision: https://code.wildfiregames.com/D3787
This was SVN commit r25210.
2021-04-08 07:22:24 +00:00
..
tests Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
CCmpAIManager.cpp Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
CCmpCinemaManager.cpp Fix most Clang 10 Warnings 2020-12-31 14:25:37 +00:00
CCmpCommandQueue.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
CCmpDecay.cpp Actually remove trailing tabs from source/. 2016-11-23 14:09:58 +00:00
CCmpFootprint.cpp Fix compilation following 52fcee9c91 2021-02-27 11:12:21 +00:00
CCmpMinimap.cpp Update the minimap, range overlay renderer, and status bars when a player's color is changed in Atlas. 2019-06-26 19:16:57 +00:00
CCmpMotionBall.cpp Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
CCmpObstruction.cpp Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
CCmpObstructionManager.cpp Use templates to replace explicit serialization helpers. 2020-12-19 09:10:37 +00:00
CCmpOverlayRenderer.cpp Fix documentation of non system component. 2017-03-24 07:09:28 +00:00
CCmpOwnership.cpp Bump year number of files changed this year in the license headers. 2017-05-01 14:28:22 +00:00
CCmpParticleManager.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
CCmpPathfinder.cpp Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
CCmpPathfinder_Common.h Fix UpdateComponents logic for pathfinding following d592bf9cb6 2020-11-08 08:58:19 +00:00
CCmpPosition.cpp Allow to specify subunits on creation. 2021-04-05 05:22:25 +00:00
CCmpProjectileManager.cpp Moves Frustum from graphics to maths to more related geometric primitives like bounding ones. 2021-03-29 17:28:13 +00:00
CCmpRallyPointRenderer.cpp Decouple LOS resolution from terrain resolution 2021-03-02 16:44:40 +00:00
CCmpRallyPointRenderer.h Move LOS to a los helper header and cleanup Grid.h includes. 2020-06-14 20:39:03 +00:00
CCmpRangeManager.cpp Fix off-by-one error in d8ea401a95. 2021-03-30 07:11:44 +00:00
CCmpRangeOverlayRenderer.cpp Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
CCmpSelectable.cpp Fix most of the new vs2017 induced warnings. 2020-11-26 22:28:50 +00:00
CCmpSoundManager.cpp Notify players with a sound when a player is defeated 2020-11-18 09:14:08 +00:00
CCmpTemplateManager.cpp Fix most Clang 10 Warnings 2020-12-31 14:25:37 +00:00
CCmpTerrain.cpp Decouple LOS resolution from terrain resolution 2021-03-02 16:44:40 +00:00
CCmpTerritoryInfluence.cpp Allow boolean and u16 modifications for C++ 2020-12-11 14:07:48 +00:00
CCmpTerritoryManager.cpp Fix most Clang 10 Warnings 2020-12-31 14:25:37 +00:00
CCmpTest.cpp Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
CCmpUnitMotion.h Fix chasing after Motion Manager & Pushing. 2021-04-03 07:00:58 +00:00
CCmpUnitMotion_System.cpp Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
CCmpUnitMotionManager.h Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
CCmpUnitRenderer.cpp Moves Frustum from graphics to maths to more related geometric primitives like bounding ones. 2021-03-29 17:28:13 +00:00
CCmpVision.cpp Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
CCmpVisualActor.cpp Implement quality levels for actors & corresponding setting. 2021-04-08 07:22:24 +00:00
CCmpWaterManager.cpp Fix error when deserializing following f2b3c4d8ec 2021-01-23 21:13:26 +00:00
ICmpAIInterface.cpp Employ some variadic macros to make some of the C++ -> JS function calling code nicer. 2017-01-28 23:37:15 +00:00
ICmpAIInterface.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpAIManager.cpp Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpAIManager.h Choose AI behavior in gamesetup 2017-12-20 22:02:15 +00:00
ICmpAttack.cpp Do not hardcode attacktypes in the engine/Atlas 2020-10-10 15:12:17 +00:00
ICmpAttack.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpCinemaManager.cpp Cinema Path GUI hiding and silhouettes fixes. 2017-06-17 14:17:30 +00:00
ICmpCinemaManager.h Draw paths only when cinematics isn't playing. Patch by Vladislav. 2017-05-08 04:02:33 +00:00
ICmpCommandQueue.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpCommandQueue.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpDecay.cpp # Add corpse decay and building collapse. 2010-08-01 17:38:01 +00:00
ICmpDecay.h # Add corpse decay and building collapse. 2010-08-01 17:38:01 +00:00
ICmpFogging.cpp Reduce drastically the number of mirages by making fogging conditional: entities will be miraged only if their health/resource amount is modified, or if they have a non-gaia owner. 2015-02-07 15:48:32 +00:00
ICmpFogging.h Reduce drastically the number of mirages by making fogging conditional: entities will be miraged only if their health/resource amount is modified, or if they have a non-gaia owner. 2015-02-07 15:48:32 +00:00
ICmpFootprint.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
ICmpFootprint.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpGarrisonHolder.cpp Fix some C++-style notes from b5df81af76. 2021-01-11 11:26:31 +00:00
ICmpGarrisonHolder.h Fix some C++-style notes from b5df81af76. 2021-01-11 11:26:31 +00:00
ICmpGuiInterface.cpp Employ some variadic macros to make some of the C++ -> JS function calling code nicer. 2017-01-28 23:37:15 +00:00
ICmpGuiInterface.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpIdentity.cpp Replace {gender} by {phenotype} and support this tag in VisualActor. 2019-08-01 19:14:40 +00:00
ICmpIdentity.h Replace {gender} by {phenotype} and support this tag in VisualActor. 2019-08-01 19:14:40 +00:00
ICmpMinimap.cpp Stop serializing minimap playercolors 2018-01-07 20:23:04 +00:00
ICmpMinimap.h Stop serializing minimap playercolors 2018-01-07 20:23:04 +00:00
ICmpMirage.cpp Hide changes to buildings in the fog-of-war. 2014-08-04 22:49:19 +00:00
ICmpMirage.h Hide changes to buildings in the fog-of-war. 2014-08-04 22:49:19 +00:00
ICmpMotion.cpp # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpMotion.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpObstruction.cpp Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
ICmpObstruction.h Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
ICmpObstructionManager.cpp Move "IsInRange" family of functions to the Obstruction Manager and make the commutative. 2019-06-06 19:37:23 +00:00
ICmpObstructionManager.h Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
ICmpOverlayRenderer.cpp End source files with a newline. 2016-11-23 11:27:54 +00:00
ICmpOverlayRenderer.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpOwnership.cpp Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpOwnership.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpParticleManager.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
ICmpParticleManager.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
ICmpPathfinder.cpp Fix UpdateComponents logic for pathfinding following d592bf9cb6 2020-11-08 08:58:19 +00:00
ICmpPathfinder.h Removes unused containers included in headers. 2021-03-03 23:01:08 +00:00
ICmpPlayer.cpp Split CColor from Shapes. 2019-01-13 15:38:41 +00:00
ICmpPlayer.h Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpPlayerManager.cpp # Add new renderer mode based on GL_ARB_fragment_program. 2011-03-26 20:17:21 +00:00
ICmpPlayerManager.h # Add new renderer mode based on GL_ARB_fragment_program. 2011-03-26 20:17:21 +00:00
ICmpPosition.cpp Fix target height computation when launching projectiles. 2021-01-22 18:16:13 +00:00
ICmpPosition.h Fix target height computation when launching projectiles. 2021-01-22 18:16:13 +00:00
ICmpProjectileManager.cpp Let the template define the actor used for the projectile. Also let projectiles have an impact animation (such as an explosion). 2017-12-23 09:27:19 +00:00
ICmpProjectileManager.h Let the template define the actor used for the projectile. Also let projectiles have an impact animation (such as an explosion). 2017-12-23 09:27:19 +00:00
ICmpRallyPoint.cpp Spawn units in rally point direction 2018-02-07 20:58:07 +00:00
ICmpRallyPoint.h Spawn units in rally point direction 2018-02-07 20:58:07 +00:00
ICmpRallyPointRenderer.cpp Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpRallyPointRenderer.h Spawn units in rally point direction 2018-02-07 20:58:07 +00:00
ICmpRangeManager.cpp Decouple LOS resolution from terrain resolution 2021-03-02 16:44:40 +00:00
ICmpRangeManager.h Decouple LOS resolution from terrain resolution 2021-03-02 16:44:40 +00:00
ICmpRangeOverlayRenderer.cpp Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpRangeOverlayRenderer.h Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpSelectable.cpp Split CColor from Shapes. 2019-01-13 15:38:41 +00:00
ICmpSelectable.h Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpSettlement.cpp # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpSettlement.h # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpSound.cpp Fix units not being able to play sounds when walking and running 2018-02-24 18:13:03 +00:00
ICmpSound.h Fix units not being able to play sounds when walking and running 2018-02-24 18:13:03 +00:00
ICmpSoundManager.cpp Notify players with a sound when a player is defeated 2020-11-18 09:14:08 +00:00
ICmpSoundManager.h Fix building without precompiled headers. 2020-11-18 11:35:36 +00:00
ICmpTemplateManager.cpp Switch back to an unplaceable filter for templates. 2017-09-30 15:22:51 +00:00
ICmpTemplateManager.h AIManager: loads only the used templates when starting (or deserializing) a game 2017-11-24 19:13:28 +00:00
ICmpTerrain.cpp Replace hardcoded copies of a C++ simulation constant in JS used to compute the mapsize with a call to a new getter in the C++ interface. 2017-05-31 16:43:57 +00:00
ICmpTerrain.h Replace hardcoded copies of a C++ simulation constant in JS used to compute the mapsize with a call to a new getter in the C++ interface. 2017-05-31 16:43:57 +00:00
ICmpTerritoryDecayManager.cpp Add a TerritoryDecayManager component to update territoryMap with the blinking state when territories are recomputed. That's needed by the AI which was up to now not aware of blinking cells. 2017-10-07 08:42:39 +00:00
ICmpTerritoryDecayManager.h Add a TerritoryDecayManager component to update territoryMap with the blinking state when territories are recomputed. That's needed by the AI which was up to now not aware of blinking cells. 2017-10-07 08:42:39 +00:00
ICmpTerritoryInfluence.cpp # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpTerritoryInfluence.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpTerritoryManager.cpp Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpTerritoryManager.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpTest.cpp # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpTest.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpTurretHolder.cpp Allow to specify subunits on creation. 2021-04-05 05:22:25 +00:00
ICmpTurretHolder.h Fix some C++-style notes from b5df81af76. 2021-01-11 11:26:31 +00:00
ICmpUnitMotion.cpp Enforce tight coupling of CCmpUnitMotion/CCmpUnitMotionManager 2021-03-26 16:47:07 +00:00
ICmpUnitMotion.h Enforce tight coupling of CCmpUnitMotion/CCmpUnitMotionManager 2021-03-26 16:47:07 +00:00
ICmpUnitMotionManager.cpp Implement a Motion Manager around UnitMotion. 2021-03-17 17:04:51 +00:00
ICmpUnitMotionManager.h Enforce tight coupling of CCmpUnitMotion/CCmpUnitMotionManager 2021-03-26 16:47:07 +00:00
ICmpUnitRenderer.cpp New unit renderer. 2014-06-01 18:24:50 +00:00
ICmpUnitRenderer.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpUnknownScript.cpp # Added initial support for players and population counters in new simulation system, plus various infrastructure improvements. 2010-01-22 20:03:14 +00:00
ICmpUnknownScript.h # Added initial support for players and population counters in new simulation system, plus various infrastructure improvements. 2010-01-22 20:03:14 +00:00
ICmpValueModificationManager.cpp Allow boolean and u16 modifications for C++ 2020-12-11 14:07:48 +00:00
ICmpValueModificationManager.h Allow boolean and u16 modifications for C++ 2020-12-11 14:07:48 +00:00
ICmpVisibility.cpp RangeManager: Grid for 2D array, enum cleanups. 2020-06-13 09:05:40 +00:00
ICmpVisibility.h RangeManager: Grid for 2D array, enum cleanups. 2020-06-13 09:05:40 +00:00
ICmpVision.cpp Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpVision.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpVisual.cpp Fix VisualActor tech changes for mirages 2020-11-28 08:57:15 +00:00
ICmpVisual.h Implement quality levels for actors & corresponding setting. 2021-04-08 07:22:24 +00:00
ICmpWaterManager.cpp Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpWaterManager.h Replaces UNICODE characters in the code by consistent ASCII characters. 2021-01-15 10:07:36 +00:00