Commit Graph

9 Commits

Author SHA1 Message Date
00131bb85e main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:58:38 -05:00
b87abdef57 Merge mandy's main into port/d3d12-nvidia
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.

Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.

Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:50:37 -05:00
fe63ca4642 PR #1435: instance_lists: ask report_paths for the report-path guard (INSTANCE-LISTS-SHARED-REPORT-PATH)
From https://github.com/ProjectLeonida/mandy/pull/1435 (head 7fb61fe3f0), applied as a reviewed patch.

Co-authored-by: Dashhhhhhhh <Dashhhhhhhh@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 15:48:44 -05:00
9898deecbb instance_lists, world_interior_names: read the block number from 20 bits, as world_index and psin_data do
A 0DRP/PSIN pool pointer keeps the 1-based block number in its low 20 bits
and the byte offset above (docs/psin.md, docs/ped_catalogues.md, psin_data).
instance_lists and world_interior_names masked 12 bits, as docs/world.md
said, so a block number of 4,096 or more would have been read as a wrong block.

world_index.split_pointer is now the one decoder for the three tools, and
docs/world.md gives the 20-bit form. Over the 0x7a resources of levels.rpf,
story000.rpf, shared_minigame000.rpf and packs.rpf (232,846), the most blocks
one has is 1,760, and every non-null 0x52 array and 0x42 string pointer has
bits 12-19 at zero, so the counts the tools report don't change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:49:18 -05:00
b23779d6a9 tests: pass errors=replace to subprocess pipes capturing python -I tools 2026-11-23 00:42:37 +02:00
ae2db6d4dc instance_lists: validate RPF9 headers and preserve offset-0 schema members 2026-11-22 16:43:25 -03:00
c6b63b58d5 fix(tools): honor zero field offsets in grass schemas
The reporter read the built-in byte rather than a declared zero offset, counting unrelated fields when grass records used a different layout. Use the built-in layout only when the schema member is absent.
2026-11-22 17:09:55 +01:00
e9e02e7e23 vertex_types, instance_lists: --json can't overwrite an input archive
Both tools write their --json report after the whole scan, with no check
on the path. Given one of the input .rpf archives, the archive was
replaced by the report and the run exited 0; a directory, or a file in a
folder that doesn't exist, ended the scan in a traceback.

Now, before the scan, a --json that is a directory or the same file as an
input archive (for vertex_types also one found under an input folder) is
one error line with exit 2. The report's folder is created before
writing, and a write that still fails is one "cannot write" line (the
summary is already on stdout). Same checks as navmesh_decode's
same_report_path/_make_parent and bvh_index's same_output_path.

Synthetic archives only, no game files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:20:17 +05:30
55b2fb6e94 Tools: count and check instanced props and grass in map resources
Map resources can hold instance lists besides CEntityDef. Their struct names
are the case-sensitive joaat of the GTA V class names:

  0xBA049770 rage__fwPropInstanceListDef
  0xEA6B3A96 rage__fwPropInstanceListDef__InstanceData
  0x7C475B5D rage__fwGrassInstanceListDef
  0xED86F522 rage__fwGrassInstanceListDef__InstanceData

tools/instance_lists.py finds the 0x7a map resources as world_index.py does,
assembles each resource's virtual and physical streams from its block map,
reads every field through the resource's own schema member table (by name
hash), and writes counts only: schema agreement with the documented offsets,
prop matrices (orthonormal axes, handedness, scale, translation inside the
list's BatchAABB), grass instances (normal inside the unit disc, Scale vs
ScaleZ, RotationIdx range), and list fields (lodLevel, IsSLODList,
OrientToTerrain, ScaleRange order, InstanceLodDist <= lodDist).

tests/test_instance_lists.py builds a minimal resource with both lists and
runs the tool on it, also end to end through a fake archive.

AI-assisted (Claude). Tested: python -I tests/test_instance_lists.py (7 pass),
python -m compileall -q make_game.py tools tests; no GPU involved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 989900c44cbe31ceba5316c7bcc571fd4bb144cd)
2026-11-22 00:33:50 -05:00