1
0
forked from 0ad/0ad
0ad/source/ps
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
..
GameSetup Fix console not preventing hotkeys from firing / Clean up hotkey-input conflict. 2021-04-02 14:18:20 +00:00
scripting Don't error in the network delay notifier. 2021-04-02 14:20:37 +00:00
tests Fix console not preventing hotkeys from firing / Clean up hotkey-input conflict. 2021-04-02 14:18:20 +00:00
XML Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
ArchiveBuilder.cpp Make real directory paths on the VFS predictable (retry) 2021-03-23 12:46:59 +00:00
ArchiveBuilder.h Handle mods specified on the command line when using the archive builder. 2014-06-15 16:43:08 +00:00
CacheLoader.cpp Make real directory paths on the VFS predictable (retry) 2021-03-23 12:46:59 +00:00
CacheLoader.h Fix biome-specific mappreviews in 7f602037ba for zipped mods, refs #4962. 2018-08-05 21:50:00 +00:00
CConsole.cpp Further hotkey work: clear hotkeys when an input box/the console gets focus. 2021-04-03 20:12:40 +00:00
CConsole.h Removes unused containers included in headers. 2021-03-03 23:01:08 +00:00
CLogger.cpp Cleanups includes for cassert and streams. 2021-03-03 22:26:49 +00:00
CLogger.h Cleanups includes for cassert and streams. 2021-03-03 22:26:49 +00:00
Compress.cpp More build fixes for FreeBSD. 2012-01-31 00:06:56 +00:00
Compress.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ConfigDB.cpp Implement quality levels for actors & corresponding setting. 2021-04-08 07:22:24 +00:00
ConfigDB.h Implement quality levels for actors & corresponding setting. 2021-04-08 07:22:24 +00:00
CStr.cpp Fix segfault when sending a very large net chat message. 2020-08-01 15:25:13 +00:00
CStr.h Add a hashing function for CStr8 & CStrW 2020-11-19 15:25:27 +00:00
CStrIntern.cpp Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
CStrIntern.h Replace boost::unordered_map, boost::unordered_set with std::unordered_map, std::unordered_set to establish consistency. 2019-11-25 14:30:25 +00:00
CStrInternStatic.h Removes shader code duplication to calculate LOS. 2021-01-20 18:46:32 +00:00
DllLoader.cpp Fix and disable some pesky Windows warnings. 2021-02-05 12:20:06 +00:00
DllLoader.h Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/. 2016-11-23 11:18:37 +00:00
Errors.cpp Don't leak all GUI objects on name ambiguity following 5cc814759f and remove ERROR_GROUP GUI. 2019-10-11 16:20:50 +00:00
Errors.h Catch exceptions by reference (by convention), based on patch from Markus, refs #1852 2013-05-22 22:27:53 +00:00
FileIo.cpp Update (and debundle) fmt dependancy 2020-11-26 21:01:32 +00:00
FileIo.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
Filesystem.cpp Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Filesystem.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Game.cpp Moves CRect from ps to maths to related geometric primitives. 2021-03-30 21:14:36 +00:00
Game.h Update (and debundle) fmt dependancy 2020-11-26 21:01:32 +00:00
Globals.cpp Fix hotkeys not releasing properly. 2021-01-16 15:24:58 +00:00
Globals.h Fix hotkeys not releasing properly. 2021-01-16 15:24:58 +00:00
GUID.cpp Actually remove trailing whitespace for non-header files as well. 2016-11-23 13:02:58 +00:00
GUID.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
Hotkey.cpp Fix nopch / tiny hotkey optimisation 2021-04-06 12:26:34 +00:00
Hotkey.h Further hotkey work: clear hotkeys when an input box/the console gets focus. 2021-04-03 20:12:40 +00:00
Joystick.cpp Remove disabled by default SDL1 support. 2015-12-14 10:52:21 +00:00
Joystick.h Renames our sdl.h to libsdl.h, to avoid case sensitivity errors when it includes SDL.h. 2012-01-12 23:32:27 +00:00
KeyName.cpp Replaces UNICODE characters in the code by consistent ASCII characters. 2021-01-15 10:07:36 +00:00
KeyName.h Fix no-PCH builds and checkrefs following a4852c4c01 2020-11-20 11:41:56 +00:00
Loader.cpp Remove binary_function usage. 2020-11-30 15:45:05 +00:00
Loader.h Resolve Loader memory leak from 1f1642bfe3. 2019-09-30 08:49:00 +00:00
LoaderThunks.h Remove not needed checks and code for VS2015 [VS2013 -> VS2015] 2020-01-19 12:43:41 +00:00
Mod.cpp Make real directory paths on the VFS predictable (retry) 2021-03-23 12:46:59 +00:00
Mod.h Rename ScriptRuntime to ScriptContext 2020-11-14 10:57:50 +00:00
ModInstaller.cpp Cleanups includes for cassert and streams. 2021-03-03 22:26:49 +00:00
ModInstaller.h Rename ScriptRuntime to ScriptContext 2020-11-14 10:57:50 +00:00
ModIo.cpp Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
ModIo.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
Profile.cpp Fix windows SEH hook when crashing in an std::thread 2021-01-10 08:39:54 +00:00
Profile.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Profiler2.cpp Fixes revealed missed includes after e104b41be2. 2021-03-03 22:38:59 +00:00
Profiler2.h Removes unused containers included in headers. 2021-03-03 23:01:08 +00:00
Profiler2GPU.cpp Fix building without precompiled headers. 2020-11-18 11:35:36 +00:00
Profiler2GPU.h Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c). 2017-07-10 14:26:24 +00:00
ProfileViewer.cpp Fixes revealed missed includes after e104b41be2. 2021-03-03 22:38:59 +00:00
ProfileViewer.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Pyrogenesis.cpp Bump version to alpha 25. 2021-02-27 08:48:30 +00:00
Pyrogenesis.h Fix windows SEH hook when crashing in an std::thread 2021-01-10 08:39:54 +00:00
Replay.cpp Improve JS Exception handling. 2020-11-15 18:29:17 +00:00
Replay.h Include Pyrogenesis.h and os_path.h where needed 2020-01-02 18:07:40 +00:00
SavedGame.cpp Make real directory paths on the VFS predictable (retry) 2021-03-23 12:46:59 +00:00
SavedGame.h [SM52 2/2] Update to Spidermonkey 52 APIs. 2020-11-18 14:39:04 +00:00
Singleton.h Simple refactoring of Singleton. Make it non-copyable. 2019-01-13 15:11:40 +00:00
TemplateLoader.cpp Add missing cpp files in last commit refs D2503 2020-05-28 18:18:00 +00:00
TemplateLoader.h More ScriptInterface const. 2017-11-25 06:49:58 +00:00
Threading.cpp Fix windows SEH hook when crashing in an std::thread 2021-01-10 08:39:54 +00:00
Threading.h Fix windows SEH hook when crashing in an std::thread 2021-01-10 08:39:54 +00:00
ThreadUtil.h Fix windows SEH hook when crashing in an std::thread 2021-01-10 08:39:54 +00:00
TouchInput.cpp Cleanup Camera related code and uses constant references where possible. 2019-10-03 12:58:47 +00:00
TouchInput.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
UniDoubler.h Use default Unicode encoding in source code on Windows. 2017-11-29 20:14:22 +00:00
UserReport.cpp Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
UserReport.h Write UserReport data to local logfiles, so that users can review the personal data impact without exposing the data to JS/mods, refs #5257, b3438cabd2. 2018-08-22 22:17:42 +00:00
utf16string.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Util.cpp Adds ortho projection type and its test. 2021-03-17 23:03:35 +00:00
Util.h Fixes big screenshots with water (reflection or refraction camera), adds big screenshot customization. 2021-02-12 21:20:07 +00:00
VideoMode.cpp Allows to override GL version for SDL. 2021-01-22 19:40:02 +00:00
VideoMode.h Remove obsolete GetVideoMode platform-specifics, replaces by platform-agnostic SDL2`s APIs. 2020-06-08 17:49:26 +00:00
VisualReplay.cpp Update the replay cache to consider modification time. 2021-03-07 08:55:27 +00:00
VisualReplay.h Fix NoPCH following cb346e207b 2021-03-03 11:08:57 +00:00
World.cpp [SM52 2/2] Update to Spidermonkey 52 APIs. 2020-11-18 14:39:04 +00:00
World.h [SM52 2/2] Update to Spidermonkey 52 APIs. 2020-11-18 14:39:04 +00:00