OOVPA sorting - Cxbx-Reloaded/XbSymbolDatabase GitHub Wiki

Each library specific OOVPA database contain OOVPA registrations for all OOVPA's we have for that library.

Each OOVPA registration is done using a macro called REGISTER_OOVPA. It's arguments are:

  • (symbol, version, ...).

When all these occurrences are sorted, all symbols end up together, in incremental order of version.

This makes it very easy to manually spot and prevent duplicates.

The version argument must indicate the exact XDK version the OOVPA is based upon.

Some symbols stay the same across all XDK version, so require only one OOVPA version registration.

Other symbols differ between XDK versions and thus require multiple registrations.

If a symbol returns to a prior form, use an aliased OOVPA.

An alias OOVPA registration type is not the same as an OOVPA alias declaration.

An OOVPA alias declaration is simply one line, formed like this:

#define name_3 name_1

  • Where name is the OOVPA name, like D3D_CreateDevice.

  • Where 3 represents the new version for which the OOVPA must be used.

  • Where 1 represents the old OOVPA version to reuse.

An example:

#define OOVPA_D3D_CreateDevice_5788 OOVPA_D3D_CreateDevice_4344

This introduces a new version 5788 OOVPA for D3D_CreateDevice, based on the 4344 version OOVPA for that same function.

Summarizing:

  • All symbols must use consistent names.

  • Registrations must be kept sorted.

  • Never duplicate OOVPAs. Instead, use aliases.