Files
Luciano Ciccariello cc2c0cc81c Add all known DRA PS1 builds + VERSION refactor (#3817)
Something I've been wanted to do for a while. Importing all DRA builds,
with the recent TEK discovery in the equation, allowed me to get a more
concrete idea of the builds lineage.

I am putting the PR in draft for two reasons:
1. I want to collect feedback on this already big PR.
2. I am planning to make jp10, jp11, us, hk, and jp12 builds optional,
and just let the CI to always test them. Reason is I realize not
everyone has/wants these additional builds. Moreover, it would further
creep the build time.

The most interesting change is
https://github.com/Xeeynamo/sotn-decomp/blob/dec7c323d50ac22fd7511d6e1c1fdb3027ddf82a/include/version.h
, which drastically changes how versions are tested on the
pre-processor. Gone are `VERSION_US` and friends. Instead they're
replaced with `#define VER_US 19970901U`, corresponding to the greatest
creation date of each file from a given build. TEK and HD have unknown
build dates, so I gave them numbers prior to `VER_JP10`.

This allows us to document the code as follows:

```
// before
#if defined(VERSION_US) || defined(VERSION_EU) || defined(VERSION_HK) ||       \
    defined(VERSION_USPROTO) || defined(VERSION_JP10) ||                       \
    defined(VERSION_JP11) || defined(VERSION_JP12)

// after
#if VERSION >= VERSION_JP10
```

Helpers such as `IS_VER_INTL` are created to indicate all English PS1
builds, excluding the USPROTO. INTL is a short name for "International".

I took the chance to also change how we test a region with the new macro
`REGION_*`. The PSP exclusive paths are now tested with `'#if TARGET ==
TARGET_PSP`. I could've used `#if defined(TARGET_PSP)` but we may have
run to the same traps as earlier. Instead, we could create a simple
helper to do `#if IS_TARGET_PSP` but I did not want to add too many
unnecessary wrappers.

I also eliminate almost all inverted conditions. `#if !(defined(xxx) &&
defined(yyy))` and similar were far too hard to read.

`VER_NEXT` is our custom "ultimate" build with community fixes. It could
be paired with `PLATFORM_PSYZ`, which now replaces `VERSION_PC`
2026-11-07 11:49:01 +00:00
..
2025-06-20 19:51:21 +01:00