OpenRA/OpenRA — pull request #2699 by pchote (2013-02-25 10:24:50+00:00)
Title: Renderer refactoring - Palettes

These patches clean up the renderer (mainly relating to palettes) to provide a useable base for implementing voxel units.

Key changes:
* Palette ownership has been moved from ModData to WorldRenderer.
* A PaletteReference type has been introduced to replace the strings/ints that were previously passed around the engine.
* System palettes to be ignored by palette modifiers are handled at runtime, removing the need for hardcoded lists.
* Cleaner color picker palette modification.
* Cleaner palette initialization.
* Removed a bunch of explicit and implicit dependencies on RenderSimple (palette lookups).
* Removed duplicated World/Chrome shaders (this was dumb).

Other Side effects:
* Referencing undefined palettes fails early, at the point of definition instead of deep in the renderer.
* Parachutes now work correctly with turreted units.
* Rally points / GpsDots / Repair indicators now work correctly with actors that don't use the default player palette.
* Minor perf improvements by caching trait and palette lookups (below the noise level, but visible when comparing screenshots of the perf graph).