<!--
 Copyright (c) 2019 Emilian Roman
 
 This software is provided 'as-is', without any express or implied
 warranty. In no event will the authors be held liable for any damages
 arising from the use of this software.
 
 Permission is granted to anyone to use this software for any purpose,
 including commercial applications, and to alter it and redistribute it
 freely, subject to the following restrictions:
 
 1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation would be
    appreciated but is not required.
 2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.
 3. This notice may not be removed or altered from any source distribution.
-->

CONFIGURATION
=============

This documentation outlines how the SPV3 loader lays out and handles the
configuration of:

-   its own settings, which are mainly persistent parameters for hce;
-   hxe settings, which include the kernel and post-processing settings;
-   opensauce settings, primarily the post-processing ones.

This is also written so I can remember in months time the disaster I've
managed to come up.

OBJECT LAYOUT
-------------

Not my favourite architectural style, but deadlines are deadlines.
Luckily, my 2-space indentation will make the nested classes tolerable.
Purists will hate partials.

This is particularly easier to deal with than passing objects around for
shared access. Well, only time will tell. What could possibly go wrong?

------------------------------------------------------------------------

    Configuration
                |
                +- Loader    - SPV3 settings state
                +- OpenSauce - HXE OpenSauce state
                +- Chimera   - HXE Chimera state
                +- Shaders   - HXE Post-Processing object

------------------------------------------------------------------------

SPV3 LOADER
-----------

This one's a little saner. The SPV3 loader settings are stored in its
own dedicated binary at:

    %APPDATA%\SPV3\loader.bin

LAYOUT

  Offset   Property            Type
  -------- ------------------- --------
  0x00     Vanity signature    utf16
           Shaders toggle      bool
           Window toggle       bool
           Resolution width    ushort
           Resolution height   ushort
           Refresh rate        byte
           Video preference    byte
           Gamma toggle        bool
           Adapter index       byte
           DOOM Mode           bool
           Photo Mode          bool
           Borderless          bool
           EAX Toggle          bool
           Preset Toggle       bool
           Cinematic Toggle    bool
           Elevated Toggle     bool
           Display Mode        byte
           Native Resolution   bool

Binary length: 256
