Skip to content

Converter: the map's preset by name (no change for M, K, F) - #90

Merged
phantoslayer21 merged 1 commit into
mainfrom
model-l/converter-preset-name
Nov 13, 2026
Merged

phantoslayer21 merged 1 commit into
mainfrom
model-l/converter-preset-name

Conversation

@phantoslayer21

Copy link
Copy Markdown
Owner

The converter told which preset a map is for from its version number alone (versions 1 and 4: M, 2 and 3: K, 5: F).
A further preset that reuses an existing map version could not be named. This makes the preset a name the map can
carry, with no change for the existing presets.

  • Per-preset table (clean/converter/src/map.cpp known_presets, declared in map.h with find_preset and
    preset_for_version): each preset's name, the map versions its maps use, and the player's "no preset-X model"
    message (exit 12). api.cpp takes that message from the table instead of a hard-wired M/K/F choice.
  • Optional top-level map field "preset" (text). Without it, the preset is the one the map's version always meant,
    so the shipped maps (data/preset-M.v1, -K.v1, -F.v1, none of which has the field) load exactly as before.
    With it, the name must be in the table and its preset must use the map's version. Otherwise the map is
    "converter data damaged" ("K" in a version-1 map, "X", "m", "", 7, null). Map::preset() still returns
    the letter, and Map::preset_info() gives the table entry.
  • main.cpp usage text: the optional-group rule is described for any map with an optional group, not as "preset M".
  • clean/converter/README.md: the field and the table.

No new preset is added here. That is a later pull request, once its map data exists.

Refs #89

Tested

Run locally on Windows, CPU only, Ninja Release /MT with MSVC. "Main" is d9c697e.

  • Converter ctest (unit, decompression-vectors, synthetic, synthetic5): 4/4 passed on main and on this branch.
  • New unit checks (tests/unit_tests.cpp, test_api_files): no field means the version's preset; "preset":"M" in
    the version-1 and version-4 unit maps loads, with the same stages and sources; the seven bad values above are
    refused as damaged, with the reason logged; the table's names, version sets and messages.
  • Byte-identical output: after the synthetic and synthetic5 tests (seeded synthetic DLLs and maps for M, K and
    F, including --raw), every output file was hashed on main and on this branch: 1615 files (63 model.wgcm plus
    their raw tensors), SHA-256 identical, 0 differences.
  • CI "launcher" step (the installer links the converter library; wg-core, launcher-core, coexist-core,
    source-size, wording): 5/5 passed.
  • python tools/ci/check_line_endings.py: 1143 files, 0 problems.

Not tested

  • The launcher's full WRONGGPU_TESTING build and its integration suites: the launcher code does not change, and it
    only reaches the new code through load_map and the exit-12 message, which stay the same for the shipped maps.
  • No real DLL, game or GPU.

…unchanged

A per-preset table (map.cpp known_presets: name, the map versions it uses, the
player's no-model message) replaces the version-derived letter. A map may name its
preset in the optional top-level field "preset"; without it the preset is the one
its version always meant (1/4 M, 2/3 K, 5 F), so the shipped maps load as before.
An unknown name, a non-text value or a preset that does not use the map's version
is converter data damaged. Unit tests for the field and the table; the converter's
outputs on the synthetic test vectors are byte for byte those of main.

Refs #89

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21
phantoslayer21 marked this pull request as ready for review November 13, 2026 21:59
@phantoslayer21
phantoslayer21 merged commit 2e513e7 into main Nov 13, 2026
2 checks passed
@phantoslayer21
phantoslayer21 deleted the model-l/converter-preset-name branch November 13, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant