From ecb40397b327f36a3a1e861769e6c0b74bbc60ef Mon Sep 17 00:00:00 2001 From: leonidarider <358984476+leonidarider@users.noreply.github.com> Date: Thu, 3 Dec 2026 01:51:30 +0100 Subject: [PATCH] refactor: move GTA6 atmosphere to or-world-gta6, organize flat crates, and unify mod roots (desloppify wave 5D-2) - Move GTA VI's 9 atmosphere/ephemeris/exposure/cloud/weather/wind modules (17 files) from or-title into or-world-gta6/src/day/, dropping glam and memmap2 from or-title and keeping it focused on editions, archives, DLC order, and VFS. - Organize flat package roots while preserving all public API paths: - or-io/src/container/rpf/: group 28 GTA VI / RPF9 files under rpf/rpf9/. - or-wardrobe/src/: group 64 files under {intake,model,shop,build,ops}/. - or-world-gta5/src/: group 52 files under {archetypes,map,streaming,authoring}/. - or-renderer/src/game_shaders/: group 86 entries under {core,geometry,lighting,post,trace}/. - Eliminate all 21 directories mixing foo/mod.rs and foo.rs+foo/ siblings across the workspace (0 mixed directories remaining), updating .config/nextest.toml, test path checks, and doc citations. --- .config/nextest.toml | 16 +-- AGENTS.md | 2 +- Cargo.lock | 3 +- LICENSE-third-party.md | 6 +- .../or-maps/src/{roads/mod.rs => roads.rs} | 0 .../src/{bounds.rs => bounds/mod.rs} | 0 .../or-wardrobe/src/{ => build}/alloc.rs | 0 .../or-wardrobe/src/{ => build}/export.rs | 0 .../or-wardrobe/src/{ => build}/freeze.rs | 0 .../or-wardrobe/src/{ => build}/layout.rs | 0 .../or-wardrobe/src/{ => build}/metadata.rs | 0 crates/domain/or-wardrobe/src/build/mod.rs | 13 +++ .../or-wardrobe/src/{ => build}/options.rs | 0 .../or-wardrobe/src/{ => build}/outfit.rs | 0 .../or-wardrobe/src/{ => build}/plan.rs | 0 .../src/{ => build}/replace_mode.rs | 0 .../or-wardrobe/src/{ => build}/sizes.rs | 0 .../or-wardrobe/src/{ => build}/verify.rs | 0 .../or-wardrobe/src/{ => intake}/adopt.rs | 0 .../or-wardrobe/src/{ => intake}/cache.rs | 0 .../or-wardrobe/src/{ => intake}/facts.rs | 0 .../or-wardrobe/src/{ => intake}/follow.rs | 0 .../src/{ => intake}/gctproject.rs | 0 .../or-wardrobe/src/{ => intake}/images.rs | 0 .../or-wardrobe/src/{ => intake}/import.rs | 0 .../src/{intake.rs => intake/ingest.rs} | 0 .../or-wardrobe/src/{ => intake}/measure.rs | 0 crates/domain/or-wardrobe/src/intake/mod.rs | 19 ++++ .../src/{ => intake}/pack_package.rs | 0 .../or-wardrobe/src/{ => intake}/package.rs | 0 .../or-wardrobe/src/{ => intake}/reopen.rs | 0 .../or-wardrobe/src/{ => intake}/resolve.rs | 0 .../src/{ => intake}/source_facts.rs | 0 crates/domain/or-wardrobe/src/lib.rs | 83 ++++---------- .../or-wardrobe/src/{ => model}/alternate.rs | 0 .../or-wardrobe/src/{ => model}/audio.rs | 0 .../or-wardrobe/src/{ => model}/behaviour.rs | 0 .../or-wardrobe/src/{ => model}/dummies.rs | 0 .../src/{ => model}/firstperson.rs | 0 .../or-wardrobe/src/{ => model}/flags.rs | 0 .../or-wardrobe/src/{ => model}/hair.rs | 0 .../or-wardrobe/src/{ => model}/heels.rs | 0 .../or-wardrobe/src/{ => model}/mask.rs | 0 crates/domain/or-wardrobe/src/model/mod.rs | 22 ++++ .../or-wardrobe/src/{ => model}/names.rs | 0 .../src/{ => model}/rules/export.rs | 0 .../src/{ => model}/rules/measured.rs | 0 .../src/{rules.rs => model/rules/mod.rs} | 0 .../or-wardrobe/src/{ => model}/settings.rs | 0 .../src/{model.rs => model/wardrobe.rs} | 0 .../or-wardrobe/src/{ => model}/wind.rs | 0 .../or-wardrobe/src/{ => ops}/backup.rs | 0 .../or-wardrobe/src/{ => ops}/budget.rs | 0 .../domain/or-wardrobe/src/{ => ops}/bulk.rs | 0 .../or-wardrobe/src/{ => ops}/duplicate.rs | 0 .../domain/or-wardrobe/src/{ => ops}/edit.rs | 0 .../domain/or-wardrobe/src/{ => ops}/fix.rs | 0 .../domain/or-wardrobe/src/{ => ops}/lock.rs | 0 .../domain/or-wardrobe/src/{ => ops}/maps.rs | 0 .../src/{ => ops}/mesh/embedded.rs | 0 .../src/{ => ops}/mesh/materials.rs | 0 .../src/{mesh.rs => ops/mesh/mod.rs} | 0 .../or-wardrobe/src/{ => ops}/mesh/uvcrop.rs | 0 crates/domain/or-wardrobe/src/ops/mod.rs | 17 +++ .../domain/or-wardrobe/src/{ => ops}/redo.rs | 0 .../or-wardrobe/src/{ => ops}/repair.rs | 0 .../or-wardrobe/src/{ => ops}/replace.rs | 0 .../domain/or-wardrobe/src/{ => ops}/slots.rs | 0 .../or-wardrobe/src/{ => ops}/textures.rs | 0 .../or-wardrobe/src/{ => ops}/variations.rs | 0 .../src/{shop.rs => shop/apparel.rs} | 0 .../or-wardrobe/src/{ => shop}/changes.rs | 0 .../or-wardrobe/src/{ => shop}/credits.rs | 0 .../or-wardrobe/src/{ => shop}/dress.rs | 0 .../domain/or-wardrobe/src/{ => shop}/dump.rs | 0 crates/domain/or-wardrobe/src/shop/mod.rs | 19 ++++ .../or-wardrobe/src/{ => shop}/query.rs | 0 .../or-wardrobe/src/{ => shop}/review.rs | 0 .../or-wardrobe/src/{ => shop}/search.rs | 0 .../or-wardrobe/src/{ => shop}/shop_edit.rs | 0 ..._is_written_over_so_no_original_is_kept.rs | 10 +- .../src/{ => archetypes}/archetype_assets.rs | 0 .../src/{ => archetypes}/catalogue.rs | 0 .../src/{ => archetypes}/collision/bound.rs | 0 .../src/{ => archetypes}/collision/mod.rs | 0 .../src/{ => archetypes}/contents.rs | 0 .../src/{ => archetypes}/map_types.rs | 0 .../or-world-gta5/src/archetypes/mod.rs | 17 +++ .../src/{ => archetypes}/model_catalogue.rs | 0 .../src/{ => archetypes}/models.rs | 0 .../{archetypes.rs => archetypes/resolve.rs} | 0 .../src/{ => archetypes}/tables.rs | 0 .../src/{ => archetypes}/textures.rs | 0 .../src/{ => archetypes}/vehicles.rs | 0 .../src/{ => archetypes}/world_collision.rs | 0 .../src/{ => authoring}/create.rs | 0 .../src/{ => authoring}/execute.rs | 0 .../src/{ => authoring}/generate.rs | 0 .../src/{ => authoring}/manifest_build.rs | 0 .../domain/or-world-gta5/src/authoring/mod.rs | 13 +++ .../src/{ => authoring}/partition.rs | 0 .../or-world-gta5/src/{ => authoring}/plan.rs | 0 .../src/{ => authoring}/prefab.rs | 0 .../src/{ => authoring}/script_forms.json | 0 .../src/{ => authoring}/script_text.rs | 0 .../src/{ => authoring}/validate.rs | 0 .../src/{ => authoring}/write.rs | 0 .../or-world-gta5/src/{ => authoring}/xml.rs | 0 crates/domain/or-world-gta5/src/lib.rs | 70 ++++-------- .../or-world-gta5/src/{ => map}/beside.rs | 0 .../or-world-gta5/src/{ => map}/body.rs | 0 .../src/{ => map}/content_flags.rs | 0 .../or-world-gta5/src/{ => map}/doors/arc.rs | 0 .../or-world-gta5/src/{ => map}/doors/find.rs | 0 .../or-world-gta5/src/{ => map}/doors/leaf.rs | 0 .../or-world-gta5/src/{ => map}/doors/mod.rs | 0 .../or-world-gta5/src/{ => map}/doors/pair.rs | 0 .../or-world-gta5/src/{ => map}/extension.rs | 0 .../or-world-gta5/src/{ => map}/extents.rs | 0 .../or-world-gta5/src/{ => map}/field.rs | 0 .../or-world-gta5/src/{ => map}/grass.rs | 0 .../or-world-gta5/src/{ => map}/group.rs | 0 .../or-world-gta5/src/{ => map}/keys.rs | 0 .../or-world-gta5/src/{ => map}/lights.rs | 0 .../or-world-gta5/src/{ => map}/map_data.rs | 0 crates/domain/or-world-gta5/src/map/mod.rs | 20 ++++ .../or-world-gta5/src/{ => map}/named.rs | 0 .../or-world-gta5/src/{ => map}/profile.rs | 0 .../or-world-gta5/src/{ => map}/scenario.rs | 0 .../domain/or-world-gta5/src/{ => map}/sea.rs | 0 .../or-world-gta5/src/{ => map}/transform.rs | 0 .../or-world-gta5/src/{ => map}/wind.rs | 0 .../src/{find.rs => streaming/find/mod.rs} | 0 .../src/{ => streaming}/find/neutral.rs | 0 .../src/{ => streaming}/find/placed.rs | 0 .../src/{ => streaming}/index.rs | 0 .../src/{ => streaming}/install.rs | 0 .../{layers.rs => streaming/layers/mod.rs} | 0 .../src/{ => streaming}/layers/read.rs | 0 .../src/{ => streaming}/manifest.rs | 0 .../domain/or-world-gta5/src/streaming/mod.rs | 13 +++ .../src/{ => streaming}/placement.rs | 0 .../src/{ => streaming}/source.rs | 0 .../src/{ => streaming}/state.rs | 0 .../src/{ => streaming}/title.rs | 0 .../world_forest/mod.rs} | 0 .../src/{ => streaming}/world_forest/read.rs | 0 .../src/{ => streaming}/world_index/kept.rs | 0 .../world_index/mod.rs} | 0 .../{ => streaming}/world_index/mounted.rs | 0 .../{ => streaming}/world_index/switching.rs | 0 .../src/{ => streaming}/world_index/tree.rs | 0 crates/domain/or-world-gta6/Cargo.toml | 6 +- .../or-world-gta6/src/day/cloud.rs} | 0 .../or-world-gta6/src/day/day_tests.rs} | 0 .../or-world-gta6/src/day/exposure.rs} | 8 +- .../or-world-gta6/src/day/exposure_tests.rs} | 0 .../or-world-gta6/src/day/frame.rs} | 4 +- .../or-world-gta6/src/day/frame_tests.rs} | 0 .../or-world-gta6/src/day/mod.rs} | 19 +++- .../or-world-gta6/src/day/sky.rs} | 2 +- .../or-world-gta6/src/day/sky_tests.rs} | 0 .../or-world-gta6/src/day/sun.rs} | 4 +- .../or-world-gta6/src/day/sun_tests.rs} | 0 .../or-world-gta6/src/day/vars.rs} | 4 +- .../or-world-gta6/src/day/vars_tests.rs} | 0 .../or-world-gta6/src/day/weather.rs} | 29 +++-- .../or-world-gta6/src/day/weather_tests.rs} | 0 .../or-world-gta6/src/day/wind.rs} | 6 +- .../or-world-gta6/src/day/wind_tests.rs} | 0 crates/domain/or-world-gta6/src/lib.rs | 4 +- .../or-world/tests/the_core_names_no_game.rs | 2 +- ...leaves_a_folder_in_the_temporary_folder.rs | 2 +- .../or-io/src/codec/{anim.rs => anim/mod.rs} | 0 crates/io/or-io/src/container/rpf/mod.rs | 101 ++++++------------ .../container/rpf/{ => rpf9}/gta6_archive.rs | 6 +- .../rpf/{ => rpf9}/gta6_archive_tests.rs | 0 .../rpf/{ => rpf9}/gta6_chunk_table.rs | 0 .../rpf/{ => rpf9}/gta6_container_build.rs | 2 +- .../rpf/{ => rpf9}/gta6_container_deps.rs | 0 .../rpf/{ => rpf9}/gta6_container_table.rs | 0 .../rpf/{ => rpf9}/gta6_container_write.rs | 0 .../{ => rpf9}/gta6_container_write_tests.rs | 0 .../container/rpf/{ => rpf9}/gta6_content.rs | 0 .../rpf/{ => rpf9}/gta6_dependencies.rs | 0 .../rpf/{ => rpf9}/gta6_dependencies_tests.rs | 0 .../container/rpf/{ => rpf9}/gta6_extract.rs | 0 .../container/rpf/{ => rpf9}/gta6_form_h.rs | 0 .../container/rpf/{ => rpf9}/gta6_image.rs | 0 .../container/rpf/{ => rpf9}/gta6_keygate.rs | 4 +- .../container/rpf/{ => rpf9}/gta6_kinds.rs | 0 .../container/rpf/{ => rpf9}/gta6_mount.rs | 2 +- .../rpf/{ => rpf9}/gta6_name_cache.rs | 0 .../rpf/{ => rpf9}/gta6_name_cache_tests.rs | 0 .../rpf/{ => rpf9}/gta6_navigation_rows.rs | 0 .../container/rpf/{ => rpf9}/gta6_patch.rs | 2 +- .../rpf/{ => rpf9}/gta6_patch_tests.rs | 0 .../src/container/rpf/{ => rpf9}/gta6_rpf.rs | 29 +++-- .../container/rpf/{ => rpf9}/gta6_rpf_row.rs | 0 .../container/rpf/{ => rpf9}/gta6_strings.rs | 0 .../container/rpf/{ => rpf9}/gta6_write.rs | 2 +- .../container/rpf/{rpf9.rs => rpf9/mod.rs} | 46 ++++++++ .../rpf/{ => rpf9}/rpf9_first_entry.rs | 0 .../src/container/rpf/{ => rpf9}/rpf9_grow.rs | 0 .../rpf/{ => rpf9}/rpf9_scan/kept.rs | 0 .../{rpf9_scan.rs => rpf9/rpf9_scan/mod.rs} | 4 +- .../{ => rpf9}/rpf9_scan/names_by_count.rs | 0 .../rpf/{ => rpf9}/rpf9_scan/raw_deflate.rs | 0 .../rpf/{ => rpf9}/rpf9_scan/stored.rs | 0 .../rpf/{ => rpf9}/rpf9_scan/stored_names.rs | 0 .../rpf/{ => rpf9}/rpf9_scan/tests/counted.rs | 0 .../{ => rpf9}/rpf9_scan/tests/raw_streams.rs | 0 .../rpf/{ => rpf9}/rpf9_scan/tests/recount.rs | 0 .../rpf/{ => rpf9}/rpf9_scan/tests/stored.rs | 0 .../src/container/rpf/{ => rpf9}/rpf9_toc.rs | 2 +- .../container/rpf/{ => rpf9}/rpf9_write.rs | 2 +- .../src/gta5/{bounds.rs => bounds/mod.rs} | 0 .../data/{timecycle.rs => timecycle/mod.rs} | 0 .../src/gta5/data/{water.rs => water/mod.rs} | 0 .../src/gta5/{fragment.rs => fragment/mod.rs} | 0 .../or-io/src/gta6/{ => anim}/anim_tests.rs | 20 ++-- .../or-io/src/gta6/{anim.rs => anim/mod.rs} | 0 .../src/gta6/{bcpack.rs => bcpack/mod.rs} | 0 .../mod.rs} | 0 .../script/{project.rs => project/mod.rs} | 0 .../script/{ => project}/project_tests.rs | 0 .../or-io/src/meta/{typed.rs => typed/mod.rs} | 0 crates/io/or-io/src/{rel.rs => rel/mod.rs} | 0 .../the_key_snapshot_is_in_the_tree_once.rs | 4 +- .../io/or-media/src/{opus.rs => opus/mod.rs} | 0 .../src/{replace.rs => replace/mod.rs} | 0 .../runtime/or-renderer/src/game_shaders.rs | 21 ++++ .../or-renderer/src/game_shaders/core.rs | 22 ++++ .../src/game_shaders/{ => core}/bindings.rs | 0 .../game_shaders/{ => core}/bindings/tests.rs | 0 .../src/game_shaders/{ => core}/constants.rs | 0 .../{ => core}/constants/tests.rs | 0 .../src/game_shaders/{ => core}/engine.rs | 6 +- .../game_shaders/{ => core}/engine/tests.rs | 2 +- .../src/game_shaders/{ => core}/frame.rs | 2 +- .../game_shaders/{ => core}/frame/tests.rs | 0 .../src/game_shaders/{ => core}/kept_dx12.rs | 16 +-- .../{ => core}/kept_dx12/tests.rs | 0 .../src/game_shaders/{ => core}/link.rs | 0 .../src/game_shaders/{ => core}/link/tests.rs | 0 .../src/game_shaders/{ => core}/mips.rs | 0 .../src/game_shaders/{ => core}/mips/tests.rs | 0 .../src/game_shaders/{ => core}/pack.rs | 0 .../src/game_shaders/{ => core}/pack/tests.rs | 0 .../src/game_shaders/{ => core}/pipeline.rs | 4 +- .../game_shaders/{ => core}/pipeline/tests.rs | 0 .../src/game_shaders/{ => core}/quad.rs | 18 ++-- .../src/game_shaders/{ => core}/quad/tests.rs | 2 +- .../src/game_shaders/{ => core}/samplers.rs | 0 .../src/game_shaders/{ => core}/screen.rs | 14 +-- .../game_shaders/{ => core}/screen/tests.rs | 0 .../src/game_shaders/{ => core}/stand_in.rs | 6 +- .../game_shaders/{ => core}/stand_in/tests.rs | 0 .../src/game_shaders/{ => core}/states.rs | 2 +- .../game_shaders/{ => core}/states/tests.rs | 0 .../src/game_shaders/{ => core}/synthetic.rs | 16 +-- .../src/game_shaders/{ => core}/targets.rs | 0 .../src/game_shaders/{ => core}/test_pack.rs | 10 +- .../or-renderer/src/game_shaders/geometry.rs | 12 +++ .../game_shaders/{ => geometry}/drawable.rs | 2 +- .../{ => geometry}/drawable/tests.rs | 0 .../{ => geometry}/effect_pass.rs | 24 ++--- .../{ => geometry}/effect_pass/tests.rs | 0 .../src/game_shaders/{ => geometry}/fed.rs | 28 ++--- .../game_shaders/{ => geometry}/fed/arena.rs | 0 .../game_shaders/{ => geometry}/fed/tests.rs | 12 +-- .../src/game_shaders/{ => geometry}/gta5.rs | 2 +- .../src/game_shaders/{ => geometry}/mesh.rs | 12 +-- .../game_shaders/{ => geometry}/mesh/scene.rs | 30 +++--- .../{ => geometry}/mesh/scene/tests.rs | 2 +- .../game_shaders/{ => geometry}/mesh/tests.rs | 14 +-- .../game_shaders/{ => geometry}/meshlets.rs | 33 +++--- .../{ => geometry}/meshlets/calls_tests.rs | 0 .../{ => geometry}/meshlets/far_tests.rs | 0 .../{ => geometry}/meshlets/forward.rs | 0 .../{ => geometry}/meshlets/forward_frame.rs | 0 .../{ => geometry}/meshlets/frame_around.rs | 0 .../{ => geometry}/meshlets/frame_cones.rs | 0 .../{ => geometry}/meshlets/frame_covered.rs | 0 .../{ => geometry}/meshlets/frame_light.rs | 0 .../{ => geometry}/meshlets/frame_shadow.rs | 0 .../{ => geometry}/meshlets/frame_steps.rs | 0 .../{ => geometry}/meshlets/frame_tone.rs | 0 .../{ => geometry}/meshlets/ground.rs | 0 .../{ => geometry}/meshlets/hair.rs | 0 .../{ => geometry}/meshlets/resolve.rs | 0 .../{ => geometry}/meshlets/scene.rs | 0 .../{ => geometry}/meshlets/scene_tests.rs | 0 .../{ => geometry}/meshlets/shared.rs | 0 .../{ => geometry}/meshlets/shared_tests.rs | 0 .../{ => geometry}/meshlets/sun_mask.rs | 2 +- .../{ => geometry}/meshlets/sun_shadow.rs | 4 +- .../{ => geometry}/meshlets/tests.rs | 0 .../{ => geometry}/meshlets/traced.rs | 0 .../{ => geometry}/meshlets/traced_tests.rs | 0 .../src/game_shaders/{ => geometry}/model.rs | 10 +- .../{ => geometry}/model/tests.rs | 0 .../src/game_shaders/{ => geometry}/sprite.rs | 10 +- .../{ => geometry}/sprite/tests.rs | 0 .../src/game_shaders/{ => geometry}/store.rs | 0 .../{ => geometry}/store/matched.rs | 2 +- .../{ => geometry}/store/pages.rs | 0 .../{ => geometry}/store/tests.rs | 6 +- .../src/game_shaders/{ => geometry}/trail.rs | 10 +- .../{ => geometry}/trail/tests.rs | 0 .../or-renderer/src/game_shaders/lighting.rs | 14 +++ .../game_shaders/{ => lighting}/ambient.rs | 20 ++-- .../{ => lighting}/ambient/tests.rs | 16 +-- .../{ => lighting}/capsule_lights.rs | 8 +- .../game_shaders/{ => lighting}/coronas.rs | 21 ++-- .../game_shaders/{ => lighting}/deferred.rs | 64 +++++------ .../{ => lighting}/deferred/tests.rs | 16 +-- .../{ => lighting}/distant_lights.rs | 14 +-- .../src/game_shaders/{ => lighting}/dome.rs | 18 ++-- .../game_shaders/{ => lighting}/dome/tests.rs | 0 .../{ => lighting}/fog_volumes.rs | 14 +-- .../{ => lighting}/fog_volumes/tests.rs | 0 .../{ => lighting}/light_volumes.rs | 12 +-- .../{ => lighting}/light_volumes/tests.rs | 0 .../{ => lighting}/point_lights.rs | 8 +- .../{ => lighting}/point_lights/tests.rs | 0 .../src/game_shaders/{ => lighting}/shadow.rs | 20 ++-- .../{ => lighting}/shadow/tests.rs | 14 +-- .../src/game_shaders/{ => lighting}/sky.rs | 0 .../game_shaders/{ => lighting}/sky/tests.rs | 0 .../{ => lighting}/spot_lights.rs | 8 +- .../{ => lighting}/spot_lights/tests.rs | 0 .../src/game_shaders/{ => lighting}/water.rs | 2 +- .../or-renderer/src/game_shaders/mod.rs | 53 --------- .../or-renderer/src/game_shaders/post.rs | 8 ++ .../src/game_shaders/{ => post}/antialias.rs | 16 +-- .../{ => post}/antialias/tests.rs | 6 +- .../src/game_shaders/{ => post}/bloom.rs | 22 ++-- .../game_shaders/{ => post}/bloom/tests.rs | 0 .../src/game_shaders/{ => post}/depth_fog.rs | 20 ++-- .../src/game_shaders/{ => post}/meter.rs | 18 ++-- .../game_shaders/{ => post}/meter/tests.rs | 6 +- .../src/game_shaders/{ => post}/resolve.rs | 38 ++++--- .../game_shaders/{ => post}/resolve/tests.rs | 10 +- .../src/game_shaders/{ => post}/tone.rs | 4 +- .../src/game_shaders/{ => post}/tone/tests.rs | 0 .../game_shaders/{trace/mod.rs => trace.rs} | 0 .../or-renderer/tests/shader_ledger.rs | 21 ++-- .../tests/the_frame_as_targets_and_passes.rs | 60 ++++++----- crates/title/or-title/Cargo.toml | 4 - crates/title/or-title/src/lib.rs | 9 -- .../src/rdna/{tests.rs => tests/mod.rs} | 0 .../rdna/to_naga/{trace.rs => trace/mod.rs} | 0 docs/direction/Clothing_Tool_Design.md | 2 +- docs/direction/GTA_VI_Platforms_Plan.md | 10 +- docs/direction/Project_Context.md | 2 +- docs/direction/Project_Model_Design.md | 4 +- docs/direction/Roadmap.md | 84 +++++++-------- docs/direction/Shaded_World_Plan.md | 20 ++-- docs/direction/Shaded_World_Technical_Plan.md | 14 +-- docs/direction/Shader_Pipeline_Design.md | 4 +- docs/direction/Unified_World_Plan.md | 46 ++++---- docs/direction/Workbench_Plan.md | 2 +- docs/direction/Workbench_UX_Design.md | 4 +- docs/direction/Workbench_Views_Design.md | 30 +++--- docs/direction/World_Editor_Parity.md | 16 +-- docs/direction/World_Editor_Plan.md | 46 ++++---- docs/direction/World_Editor_UX_Design.md | 4 +- docs/features/GTA_VI_Builds.md | 34 +++--- docs/features/GTA_V_World_Viewer.md | 4 +- docs/features/Viewport_Shading_Modes.md | 2 +- docs/guides/Development_Workflow.md | 4 +- docs/guides/GTA_VI_Modding.md | 4 +- docs/reference/Crate_Reference.md | 86 +++++++-------- plugins/README.md | 2 +- src/README.md | 2 +- src/{audio.rs => audio/mod.rs} | 0 .../{game_scene.rs => game_scene/mod.rs} | 0 .../mod.rs} | 0 src/repo_tests/doc_counts.rs | 12 ++- src/{self_check.rs => self_check/mod.rs} | 0 .../every_viewer_path_takes_both_targets.rs | 2 +- .../{file_index.rs => file_index/mod.rs} | 0 src/state/{game_pack.rs => game_pack/mod.rs} | 0 .../{gta6_modding.rs => gta6_modding/mod.rs} | 0 src/state/gta6_worldview/sky.rs | 2 +- src/state/{plugins.rs => plugins/mod.rs} | 0 src/state/{project.rs => project/mod.rs} | 0 .../mod.rs} | 0 src/ui/{shortcuts.rs => shortcuts/mod.rs} | 0 390 files changed, 1098 insertions(+), 923 deletions(-) rename crates/domain/or-maps/src/{roads/mod.rs => roads.rs} (100%) rename crates/domain/or-source/src/{bounds.rs => bounds/mod.rs} (100%) rename crates/domain/or-wardrobe/src/{ => build}/alloc.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/export.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/freeze.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/layout.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/metadata.rs (100%) create mode 100644 crates/domain/or-wardrobe/src/build/mod.rs rename crates/domain/or-wardrobe/src/{ => build}/options.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/outfit.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/plan.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/replace_mode.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/sizes.rs (100%) rename crates/domain/or-wardrobe/src/{ => build}/verify.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/adopt.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/cache.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/facts.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/follow.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/gctproject.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/images.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/import.rs (100%) rename crates/domain/or-wardrobe/src/{intake.rs => intake/ingest.rs} (100%) rename crates/domain/or-wardrobe/src/{ => intake}/measure.rs (100%) create mode 100644 crates/domain/or-wardrobe/src/intake/mod.rs rename crates/domain/or-wardrobe/src/{ => intake}/pack_package.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/package.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/reopen.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/resolve.rs (100%) rename crates/domain/or-wardrobe/src/{ => intake}/source_facts.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/alternate.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/audio.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/behaviour.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/dummies.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/firstperson.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/flags.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/hair.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/heels.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/mask.rs (100%) create mode 100644 crates/domain/or-wardrobe/src/model/mod.rs rename crates/domain/or-wardrobe/src/{ => model}/names.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/rules/export.rs (100%) rename crates/domain/or-wardrobe/src/{ => model}/rules/measured.rs (100%) rename crates/domain/or-wardrobe/src/{rules.rs => model/rules/mod.rs} (100%) rename crates/domain/or-wardrobe/src/{ => model}/settings.rs (100%) rename crates/domain/or-wardrobe/src/{model.rs => model/wardrobe.rs} (100%) rename crates/domain/or-wardrobe/src/{ => model}/wind.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/backup.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/budget.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/bulk.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/duplicate.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/edit.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/fix.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/lock.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/maps.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/mesh/embedded.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/mesh/materials.rs (100%) rename crates/domain/or-wardrobe/src/{mesh.rs => ops/mesh/mod.rs} (100%) rename crates/domain/or-wardrobe/src/{ => ops}/mesh/uvcrop.rs (100%) create mode 100644 crates/domain/or-wardrobe/src/ops/mod.rs rename crates/domain/or-wardrobe/src/{ => ops}/redo.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/repair.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/replace.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/slots.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/textures.rs (100%) rename crates/domain/or-wardrobe/src/{ => ops}/variations.rs (100%) rename crates/domain/or-wardrobe/src/{shop.rs => shop/apparel.rs} (100%) rename crates/domain/or-wardrobe/src/{ => shop}/changes.rs (100%) rename crates/domain/or-wardrobe/src/{ => shop}/credits.rs (100%) rename crates/domain/or-wardrobe/src/{ => shop}/dress.rs (100%) rename crates/domain/or-wardrobe/src/{ => shop}/dump.rs (100%) create mode 100644 crates/domain/or-wardrobe/src/shop/mod.rs rename crates/domain/or-wardrobe/src/{ => shop}/query.rs (100%) rename crates/domain/or-wardrobe/src/{ => shop}/review.rs (100%) rename crates/domain/or-wardrobe/src/{ => shop}/search.rs (100%) rename crates/domain/or-wardrobe/src/{ => shop}/shop_edit.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/archetype_assets.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/catalogue.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/collision/bound.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/collision/mod.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/contents.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/map_types.rs (100%) create mode 100644 crates/domain/or-world-gta5/src/archetypes/mod.rs rename crates/domain/or-world-gta5/src/{ => archetypes}/model_catalogue.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/models.rs (100%) rename crates/domain/or-world-gta5/src/{archetypes.rs => archetypes/resolve.rs} (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/tables.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/textures.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/vehicles.rs (100%) rename crates/domain/or-world-gta5/src/{ => archetypes}/world_collision.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/create.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/execute.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/generate.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/manifest_build.rs (100%) create mode 100644 crates/domain/or-world-gta5/src/authoring/mod.rs rename crates/domain/or-world-gta5/src/{ => authoring}/partition.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/plan.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/prefab.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/script_forms.json (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/script_text.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/validate.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/write.rs (100%) rename crates/domain/or-world-gta5/src/{ => authoring}/xml.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/beside.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/body.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/content_flags.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/doors/arc.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/doors/find.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/doors/leaf.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/doors/mod.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/doors/pair.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/extension.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/extents.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/field.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/grass.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/group.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/keys.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/lights.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/map_data.rs (100%) create mode 100644 crates/domain/or-world-gta5/src/map/mod.rs rename crates/domain/or-world-gta5/src/{ => map}/named.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/profile.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/scenario.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/sea.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/transform.rs (100%) rename crates/domain/or-world-gta5/src/{ => map}/wind.rs (100%) rename crates/domain/or-world-gta5/src/{find.rs => streaming/find/mod.rs} (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/find/neutral.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/find/placed.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/index.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/install.rs (100%) rename crates/domain/or-world-gta5/src/{layers.rs => streaming/layers/mod.rs} (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/layers/read.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/manifest.rs (100%) create mode 100644 crates/domain/or-world-gta5/src/streaming/mod.rs rename crates/domain/or-world-gta5/src/{ => streaming}/placement.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/source.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/state.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/title.rs (100%) rename crates/domain/or-world-gta5/src/{world_forest.rs => streaming/world_forest/mod.rs} (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/world_forest/read.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/world_index/kept.rs (100%) rename crates/domain/or-world-gta5/src/{world_index.rs => streaming/world_index/mod.rs} (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/world_index/mounted.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/world_index/switching.rs (100%) rename crates/domain/or-world-gta5/src/{ => streaming}/world_index/tree.rs (100%) rename crates/{title/or-title/src/gta6_cloud.rs => domain/or-world-gta6/src/day/cloud.rs} (100%) rename crates/{title/or-title/src/gta6_day_tests.rs => domain/or-world-gta6/src/day/day_tests.rs} (100%) rename crates/{title/or-title/src/gta6_exposure.rs => domain/or-world-gta6/src/day/exposure.rs} (98%) rename crates/{title/or-title/src/gta6_exposure_tests.rs => domain/or-world-gta6/src/day/exposure_tests.rs} (100%) rename crates/{title/or-title/src/gta6_day_frame.rs => domain/or-world-gta6/src/day/frame.rs} (99%) rename crates/{title/or-title/src/gta6_day_frame_tests.rs => domain/or-world-gta6/src/day/frame_tests.rs} (100%) rename crates/{title/or-title/src/gta6_day.rs => domain/or-world-gta6/src/day/mod.rs} (98%) rename crates/{title/or-title/src/gta6_sky.rs => domain/or-world-gta6/src/day/sky.rs} (99%) rename crates/{title/or-title/src/gta6_sky_tests.rs => domain/or-world-gta6/src/day/sky_tests.rs} (100%) rename crates/{title/or-title/src/gta6_day_sun.rs => domain/or-world-gta6/src/day/sun.rs} (99%) rename crates/{title/or-title/src/gta6_day_sun_tests.rs => domain/or-world-gta6/src/day/sun_tests.rs} (100%) rename crates/{title/or-title/src/gta6_day_vars.rs => domain/or-world-gta6/src/day/vars.rs} (98%) rename crates/{title/or-title/src/gta6_day_vars_tests.rs => domain/or-world-gta6/src/day/vars_tests.rs} (100%) rename crates/{title/or-title/src/gta6_day_weather.rs => domain/or-world-gta6/src/day/weather.rs} (90%) rename crates/{title/or-title/src/gta6_day_weather_tests.rs => domain/or-world-gta6/src/day/weather_tests.rs} (100%) rename crates/{title/or-title/src/gta6_day_wind.rs => domain/or-world-gta6/src/day/wind.rs} (99%) rename crates/{title/or-title/src/gta6_day_wind_tests.rs => domain/or-world-gta6/src/day/wind_tests.rs} (100%) rename crates/io/or-io/src/codec/{anim.rs => anim/mod.rs} (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_archive.rs (99%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_archive_tests.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_chunk_table.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_container_build.rs (99%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_container_deps.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_container_table.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_container_write.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_container_write_tests.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_content.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_dependencies.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_dependencies_tests.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_extract.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_form_h.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_image.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_keygate.rs (98%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_kinds.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_mount.rs (99%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_name_cache.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_name_cache_tests.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_navigation_rows.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_patch.rs (99%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_patch_tests.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_rpf.rs (97%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_rpf_row.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_strings.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/gta6_write.rs (99%) rename crates/io/or-io/src/container/rpf/{rpf9.rs => rpf9/mod.rs} (93%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_first_entry.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_grow.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/kept.rs (100%) rename crates/io/or-io/src/container/rpf/{rpf9_scan.rs => rpf9/rpf9_scan/mod.rs} (99%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/names_by_count.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/raw_deflate.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/stored.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/stored_names.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/tests/counted.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/tests/raw_streams.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/tests/recount.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_scan/tests/stored.rs (100%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_toc.rs (99%) rename crates/io/or-io/src/container/rpf/{ => rpf9}/rpf9_write.rs (99%) rename crates/io/or-io/src/gta5/{bounds.rs => bounds/mod.rs} (100%) rename crates/io/or-io/src/gta5/data/{timecycle.rs => timecycle/mod.rs} (100%) rename crates/io/or-io/src/gta5/data/{water.rs => water/mod.rs} (100%) rename crates/io/or-io/src/gta5/{fragment.rs => fragment/mod.rs} (100%) rename crates/io/or-io/src/gta6/{ => anim}/anim_tests.rs (98%) rename crates/io/or-io/src/gta6/{anim.rs => anim/mod.rs} (100%) rename crates/io/or-io/src/gta6/{bcpack.rs => bcpack/mod.rs} (100%) rename crates/io/or-io/src/gta6/headerless/{write_geometry.rs => write_geometry/mod.rs} (100%) rename crates/io/or-io/src/gta6/script/{project.rs => project/mod.rs} (100%) rename crates/io/or-io/src/gta6/script/{ => project}/project_tests.rs (100%) rename crates/io/or-io/src/meta/{typed.rs => typed/mod.rs} (100%) rename crates/io/or-io/src/{rel.rs => rel/mod.rs} (100%) rename crates/io/or-media/src/{opus.rs => opus/mod.rs} (100%) rename crates/io/or-media/src/{replace.rs => replace/mod.rs} (100%) create mode 100644 crates/runtime/or-renderer/src/game_shaders.rs create mode 100644 crates/runtime/or-renderer/src/game_shaders/core.rs rename crates/runtime/or-renderer/src/game_shaders/{ => core}/bindings.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/bindings/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/constants.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/constants/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/engine.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/engine/tests.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/frame.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/frame/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/kept_dx12.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/kept_dx12/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/link.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/link/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/mips.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/mips/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/pack.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/pack/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/pipeline.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/pipeline/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/quad.rs (93%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/quad/tests.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/samplers.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/screen.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/screen/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/stand_in.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/stand_in/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/states.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/states/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/synthetic.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/targets.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => core}/test_pack.rs (96%) create mode 100644 crates/runtime/or-renderer/src/game_shaders/geometry.rs rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/drawable.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/drawable/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/effect_pass.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/effect_pass/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/fed.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/fed/arena.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/fed/tests.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/gta5.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/mesh.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/mesh/scene.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/mesh/scene/tests.rs (95%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/mesh/tests.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/calls_tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/far_tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/forward.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/forward_frame.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/frame_around.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/frame_cones.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/frame_covered.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/frame_light.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/frame_shadow.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/frame_steps.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/frame_tone.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/ground.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/hair.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/resolve.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/scene.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/scene_tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/shared.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/shared_tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/sun_mask.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/sun_shadow.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/traced.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/meshlets/traced_tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/model.rs (95%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/model/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/sprite.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/sprite/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/store.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/store/matched.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/store/pages.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/store/tests.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/trail.rs (95%) rename crates/runtime/or-renderer/src/game_shaders/{ => geometry}/trail/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/ambient.rs (95%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/ambient/tests.rs (95%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/capsule_lights.rs (93%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/coronas.rs (92%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/deferred.rs (95%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/deferred/tests.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/distant_lights.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/dome.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/dome/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/fog_volumes.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/fog_volumes/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/light_volumes.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/light_volumes/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/point_lights.rs (90%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/point_lights/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/shadow.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/shadow/tests.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/sky.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/sky/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/spot_lights.rs (94%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/spot_lights/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => lighting}/water.rs (98%) delete mode 100644 crates/runtime/or-renderer/src/game_shaders/mod.rs create mode 100644 crates/runtime/or-renderer/src/game_shaders/post.rs rename crates/runtime/or-renderer/src/game_shaders/{ => post}/antialias.rs (88%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/antialias/tests.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/bloom.rs (96%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/bloom/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/depth_fog.rs (89%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/meter.rs (97%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/meter/tests.rs (98%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/resolve.rs (93%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/resolve/tests.rs (94%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/tone.rs (99%) rename crates/runtime/or-renderer/src/game_shaders/{ => post}/tone/tests.rs (100%) rename crates/runtime/or-renderer/src/game_shaders/{trace/mod.rs => trace.rs} (100%) rename crates/tools/or-shader-front/src/rdna/{tests.rs => tests/mod.rs} (100%) rename crates/tools/or-shader-front/src/rdna/to_naga/{trace.rs => trace/mod.rs} (100%) rename src/{audio.rs => audio/mod.rs} (100%) rename src/render/{game_scene.rs => game_scene/mod.rs} (100%) rename src/render/{gta6_drawable.rs => gta6_drawable/mod.rs} (100%) rename src/{self_check.rs => self_check/mod.rs} (100%) rename src/state/{file_index.rs => file_index/mod.rs} (100%) rename src/state/{game_pack.rs => game_pack/mod.rs} (100%) rename src/state/{gta6_modding.rs => gta6_modding/mod.rs} (100%) rename src/state/{plugins.rs => plugins/mod.rs} (100%) rename src/state/{project.rs => project/mod.rs} (100%) rename src/state/{world_session.rs => world_session/mod.rs} (100%) rename src/ui/{shortcuts.rs => shortcuts/mod.rs} (100%) diff --git a/.config/nextest.toml b/.config/nextest.toml index b355fff09..5694d2479 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -271,9 +271,9 @@ not ( | (binary_id(=or-io) & ( test(/^codec::texture::image::tests::/) | test(/^container::rpf::crypto::encrypt_cache::tests::/) - | test(/^container::rpf::gta6_extract::tests::the_extracted_snapshot/) - | test(/^container::rpf::gta6_patch::tests::a_one_mebibyte_chunk_past_the_old_cap_is_patched_by_the_optimal_parse$/) - | test(/^container::rpf::gta6_extract::tests::the_real_executable_opens/) + | test(/^container::rpf::rpf9::gta6_extract::tests::the_extracted_snapshot/) + | test(/^container::rpf::rpf9::gta6_patch::tests::a_one_mebibyte_chunk_past_the_old_cap_is_patched_by_the_optimal_parse$/) + | test(/^container::rpf::rpf9::gta6_extract::tests::the_real_executable_opens/) | test(/^gta6::headerless::write_geometry::cut::palette_tests::/) | test(/^gta6::headerless::write_geometry::per_geometry::build_tests::/) | test(/^gta6::script::native_addresses::tests::the_users_listings/) @@ -433,11 +433,11 @@ not ( | binary_id(=or-project::a_pack_is_counted_by_the_entries_each_archive_holds_and_divides_between_contents) | (binary_id(=or-project::gta6_mod) & test(/^a_gta6_build_row_given_its_own_body_plans_as_a_patched_copy$/)) | (binary_id(=or-renderer) & ( - test(/^game_shaders::drawable::tests::/) - | test(/^game_shaders::model::tests::/) - | test(/^game_shaders::pipeline::tests::/) - | test(/^game_shaders::sprite::tests::/) - | test(/^game_shaders::trail::tests::/) + test(/^game_shaders::geometry::drawable::tests::/) + | test(/^game_shaders::geometry::model::tests::/) + | test(/^game_shaders::core::pipeline::tests::/) + | test(/^game_shaders::geometry::sprite::tests::/) + | test(/^game_shaders::geometry::trail::tests::/) | test(/^gpu_timer::tests::/) | test(/^particle_meshes::tests::/) | test(/^particle_sprites::tests::/) diff --git a/AGENTS.md b/AGENTS.md index 4bb1844f7..cdeff0ad8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -222,7 +222,7 @@ starts the editor take the focus of the owner's desktop. Do not run them. panel, and exits non-zero on a panic, a panel that painted nothing, or a run that wrote no preferences. - It resolves its configuration to a scratch directory it removes, and - `src/self_check.rs` refuses to run against the real one; set + `src/self_check/mod.rs` refuses to run against the real one; set `OPENRAGE_CONFIG_DIR` to keep what it writes. - `--viewport` adds a surfaceless wgpu device and draws through the render bridge. Nothing reaches winit or a window surface, so if a change cannot be diff --git a/Cargo.lock b/Cargo.lock index c9dd2224b..f59ca32a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3446,8 +3446,6 @@ name = "or-title" version = "0.2.0" dependencies = [ "dirs", - "glam", - "memmap2", "or-io", "or-media", "or-test-support", @@ -3543,6 +3541,7 @@ version = "0.2.0" dependencies = [ "bytemuck", "glam", + "memmap2", "or-io", "or-job", "or-test-support", diff --git a/LICENSE-third-party.md b/LICENSE-third-party.md index 6a263c85c..33c80db1b 100644 --- a/LICENSE-third-party.md +++ b/LICENSE-third-party.md @@ -88,7 +88,7 @@ keep, then its origin. | `crates/io/or-io/src/gta6/bcpack/bc1_tables.rs` | the two JSON tables of its data folder | The preset endpoints and the quadrant indices of the BC1 mode, which bcpack-rs fitted; the values are unchanged. | | `crates/io/or-io/src/gta6/bcpack/tests.rs` | encode.rs of its sources | The coder the tests build their streams with; the tests are OpenRage's own. | -`crates/io/or-io/src/gta6/bcpack.rs` is OpenRage's own, and so are +`crates/io/or-io/src/gta6/bcpack/mod.rs` is OpenRage's own, and so are `crates/io/or-io/src/gta6/bcpack/bc2.rs`, which rebuilds BC2 blocks from their fifteen lanes, `crates/io/or-io/src/gta6/bcpack/planes.rs`, which rebuilds BC1, BC3, BC4 and BC5 blocks through tables, and `crates/io/or-io/src/gta6/bcpack/calibrate.rs`, which fits those tables on the user's @@ -199,7 +199,7 @@ contributors' Rust translation of Google's Zopfli, offered under Apache-2.0 with the appendix line Copyright 2011 Google Inc. Its terms are the Apache-2.0 text reproduced at the end of this file for rusty_mp3, word for word but for that line. It is pure Rust, and the package carries no NOTICE file. Only -`crates/io/or-io/src/container/rpf/gta6_patch.rs` calls it. +`crates/io/or-io/src/container/rpf/rpf9/gta6_patch.rs` calls it. ## Linked: the Opus codec @@ -207,7 +207,7 @@ that line. It is pure Rust, and the package carries no NOTICE file. Only [ropus](https://crates.io/crates/ropus) crate, version 0.12.18, a pure-Rust fixed-point port of the Xiph.Org Opus codec, offered under BSD-3-Clause. Its licence is reproduced at the end of this file, with the royalty-free patent -licences it points to. Only `crates/io/or-media/src/opus.rs` calls it. +licences it points to. Only `crates/io/or-media/src/opus/mod.rs` calls it. ## Bundled: the Inter typeface diff --git a/crates/domain/or-maps/src/roads/mod.rs b/crates/domain/or-maps/src/roads.rs similarity index 100% rename from crates/domain/or-maps/src/roads/mod.rs rename to crates/domain/or-maps/src/roads.rs diff --git a/crates/domain/or-source/src/bounds.rs b/crates/domain/or-source/src/bounds/mod.rs similarity index 100% rename from crates/domain/or-source/src/bounds.rs rename to crates/domain/or-source/src/bounds/mod.rs diff --git a/crates/domain/or-wardrobe/src/alloc.rs b/crates/domain/or-wardrobe/src/build/alloc.rs similarity index 100% rename from crates/domain/or-wardrobe/src/alloc.rs rename to crates/domain/or-wardrobe/src/build/alloc.rs diff --git a/crates/domain/or-wardrobe/src/export.rs b/crates/domain/or-wardrobe/src/build/export.rs similarity index 100% rename from crates/domain/or-wardrobe/src/export.rs rename to crates/domain/or-wardrobe/src/build/export.rs diff --git a/crates/domain/or-wardrobe/src/freeze.rs b/crates/domain/or-wardrobe/src/build/freeze.rs similarity index 100% rename from crates/domain/or-wardrobe/src/freeze.rs rename to crates/domain/or-wardrobe/src/build/freeze.rs diff --git a/crates/domain/or-wardrobe/src/layout.rs b/crates/domain/or-wardrobe/src/build/layout.rs similarity index 100% rename from crates/domain/or-wardrobe/src/layout.rs rename to crates/domain/or-wardrobe/src/build/layout.rs diff --git a/crates/domain/or-wardrobe/src/metadata.rs b/crates/domain/or-wardrobe/src/build/metadata.rs similarity index 100% rename from crates/domain/or-wardrobe/src/metadata.rs rename to crates/domain/or-wardrobe/src/build/metadata.rs diff --git a/crates/domain/or-wardrobe/src/build/mod.rs b/crates/domain/or-wardrobe/src/build/mod.rs new file mode 100644 index 000000000..73588a02d --- /dev/null +++ b/crates/domain/or-wardrobe/src/build/mod.rs @@ -0,0 +1,13 @@ +//! Slot allocation, resource layout, metadata writing, build planning, verification and export. + +pub mod alloc; +pub mod export; +pub mod freeze; +pub mod layout; +pub mod metadata; +pub mod options; +pub mod outfit; +pub mod plan; +pub mod replace_mode; +pub mod sizes; +pub mod verify; diff --git a/crates/domain/or-wardrobe/src/options.rs b/crates/domain/or-wardrobe/src/build/options.rs similarity index 100% rename from crates/domain/or-wardrobe/src/options.rs rename to crates/domain/or-wardrobe/src/build/options.rs diff --git a/crates/domain/or-wardrobe/src/outfit.rs b/crates/domain/or-wardrobe/src/build/outfit.rs similarity index 100% rename from crates/domain/or-wardrobe/src/outfit.rs rename to crates/domain/or-wardrobe/src/build/outfit.rs diff --git a/crates/domain/or-wardrobe/src/plan.rs b/crates/domain/or-wardrobe/src/build/plan.rs similarity index 100% rename from crates/domain/or-wardrobe/src/plan.rs rename to crates/domain/or-wardrobe/src/build/plan.rs diff --git a/crates/domain/or-wardrobe/src/replace_mode.rs b/crates/domain/or-wardrobe/src/build/replace_mode.rs similarity index 100% rename from crates/domain/or-wardrobe/src/replace_mode.rs rename to crates/domain/or-wardrobe/src/build/replace_mode.rs diff --git a/crates/domain/or-wardrobe/src/sizes.rs b/crates/domain/or-wardrobe/src/build/sizes.rs similarity index 100% rename from crates/domain/or-wardrobe/src/sizes.rs rename to crates/domain/or-wardrobe/src/build/sizes.rs diff --git a/crates/domain/or-wardrobe/src/verify.rs b/crates/domain/or-wardrobe/src/build/verify.rs similarity index 100% rename from crates/domain/or-wardrobe/src/verify.rs rename to crates/domain/or-wardrobe/src/build/verify.rs diff --git a/crates/domain/or-wardrobe/src/adopt.rs b/crates/domain/or-wardrobe/src/intake/adopt.rs similarity index 100% rename from crates/domain/or-wardrobe/src/adopt.rs rename to crates/domain/or-wardrobe/src/intake/adopt.rs diff --git a/crates/domain/or-wardrobe/src/cache.rs b/crates/domain/or-wardrobe/src/intake/cache.rs similarity index 100% rename from crates/domain/or-wardrobe/src/cache.rs rename to crates/domain/or-wardrobe/src/intake/cache.rs diff --git a/crates/domain/or-wardrobe/src/facts.rs b/crates/domain/or-wardrobe/src/intake/facts.rs similarity index 100% rename from crates/domain/or-wardrobe/src/facts.rs rename to crates/domain/or-wardrobe/src/intake/facts.rs diff --git a/crates/domain/or-wardrobe/src/follow.rs b/crates/domain/or-wardrobe/src/intake/follow.rs similarity index 100% rename from crates/domain/or-wardrobe/src/follow.rs rename to crates/domain/or-wardrobe/src/intake/follow.rs diff --git a/crates/domain/or-wardrobe/src/gctproject.rs b/crates/domain/or-wardrobe/src/intake/gctproject.rs similarity index 100% rename from crates/domain/or-wardrobe/src/gctproject.rs rename to crates/domain/or-wardrobe/src/intake/gctproject.rs diff --git a/crates/domain/or-wardrobe/src/images.rs b/crates/domain/or-wardrobe/src/intake/images.rs similarity index 100% rename from crates/domain/or-wardrobe/src/images.rs rename to crates/domain/or-wardrobe/src/intake/images.rs diff --git a/crates/domain/or-wardrobe/src/import.rs b/crates/domain/or-wardrobe/src/intake/import.rs similarity index 100% rename from crates/domain/or-wardrobe/src/import.rs rename to crates/domain/or-wardrobe/src/intake/import.rs diff --git a/crates/domain/or-wardrobe/src/intake.rs b/crates/domain/or-wardrobe/src/intake/ingest.rs similarity index 100% rename from crates/domain/or-wardrobe/src/intake.rs rename to crates/domain/or-wardrobe/src/intake/ingest.rs diff --git a/crates/domain/or-wardrobe/src/measure.rs b/crates/domain/or-wardrobe/src/intake/measure.rs similarity index 100% rename from crates/domain/or-wardrobe/src/measure.rs rename to crates/domain/or-wardrobe/src/intake/measure.rs diff --git a/crates/domain/or-wardrobe/src/intake/mod.rs b/crates/domain/or-wardrobe/src/intake/mod.rs new file mode 100644 index 000000000..f793aa6f6 --- /dev/null +++ b/crates/domain/or-wardrobe/src/intake/mod.rs @@ -0,0 +1,19 @@ +//! Bringing files, folders, resources and packages into a Wardrobe pack, and gathering facts about them. + +mod ingest; + +pub mod adopt; +pub mod cache; +pub mod facts; +pub mod follow; +pub mod gctproject; +pub(crate) mod images; +pub mod import; +pub mod measure; +pub mod pack_package; +pub mod package; +pub mod reopen; +pub mod resolve; +pub(crate) mod source_facts; + +pub(crate) use ingest::{content_digest, decompiled, model, texture, Scratch}; diff --git a/crates/domain/or-wardrobe/src/pack_package.rs b/crates/domain/or-wardrobe/src/intake/pack_package.rs similarity index 100% rename from crates/domain/or-wardrobe/src/pack_package.rs rename to crates/domain/or-wardrobe/src/intake/pack_package.rs diff --git a/crates/domain/or-wardrobe/src/package.rs b/crates/domain/or-wardrobe/src/intake/package.rs similarity index 100% rename from crates/domain/or-wardrobe/src/package.rs rename to crates/domain/or-wardrobe/src/intake/package.rs diff --git a/crates/domain/or-wardrobe/src/reopen.rs b/crates/domain/or-wardrobe/src/intake/reopen.rs similarity index 100% rename from crates/domain/or-wardrobe/src/reopen.rs rename to crates/domain/or-wardrobe/src/intake/reopen.rs diff --git a/crates/domain/or-wardrobe/src/resolve.rs b/crates/domain/or-wardrobe/src/intake/resolve.rs similarity index 100% rename from crates/domain/or-wardrobe/src/resolve.rs rename to crates/domain/or-wardrobe/src/intake/resolve.rs diff --git a/crates/domain/or-wardrobe/src/source_facts.rs b/crates/domain/or-wardrobe/src/intake/source_facts.rs similarity index 100% rename from crates/domain/or-wardrobe/src/source_facts.rs rename to crates/domain/or-wardrobe/src/intake/source_facts.rs diff --git a/crates/domain/or-wardrobe/src/lib.rs b/crates/domain/or-wardrobe/src/lib.rs index a6ef87728..ad518e40b 100644 --- a/crates/domain/or-wardrobe/src/lib.rs +++ b/crates/domain/or-wardrobe/src/lib.rs @@ -13,69 +13,30 @@ //! ⚠ **Nothing here says a pack loads in game.** A build says that every file it wrote reloads //! through the readers, which is all that can be measured without running GTA V. -pub mod adopt; -pub mod alloc; -pub mod alternate; -pub mod audio; -pub mod backup; -pub mod behaviour; -pub mod budget; -pub mod bulk; -pub mod cache; -pub mod changes; -pub mod credits; -pub mod dress; -pub mod dummies; -pub mod dump; -pub mod duplicate; -pub mod edit; -pub mod export; -pub mod facts; -pub mod firstperson; -pub mod fix; -pub mod flags; -pub mod follow; -pub mod freeze; -pub mod gctproject; -pub mod hair; -pub mod heels; -mod images; -pub mod import; -mod intake; -pub mod layout; -pub mod lock; -pub mod maps; -pub mod mask; -pub mod measure; -pub mod mesh; -pub mod metadata; +pub mod build; +pub mod intake; pub mod model; -pub mod names; -pub mod options; -pub mod outfit; -pub mod pack_package; -pub mod package; -pub mod plan; -pub mod query; -pub mod redo; -pub mod reopen; -mod repair; -pub mod replace; -pub mod replace_mode; -pub mod resolve; -pub mod review; -pub mod rules; -pub mod search; -pub mod settings; +pub mod ops; pub mod shop; -pub mod shop_edit; -pub mod sizes; -pub mod slots; -mod source_facts; -pub mod textures; -pub mod variations; -pub mod verify; -pub mod wind; + +pub use build::{ + alloc, export, freeze, layout, metadata, options, outfit, plan, replace_mode, sizes, verify, +}; +pub use intake::{ + adopt, cache, facts, follow, gctproject, import, measure, pack_package, package, reopen, + resolve, +}; +pub(crate) use intake::{images, source_facts}; +pub use model::{ + alternate, audio, behaviour, dummies, firstperson, flags, hair, heels, mask, names, rules, + settings, wind, +}; +pub(crate) use ops::repair; +pub use ops::{ + backup, budget, bulk, duplicate, edit, fix, lock, maps, mesh, redo, replace, slots, textures, + variations, +}; +pub use shop::{changes, credits, dress, dump, query, review, search, shop_edit}; pub use adopt::Clothing; pub use alloc::{allocate, places_of, Allocation, Placed, Refused, MAX_PARTS, MAX_POSITION}; diff --git a/crates/domain/or-wardrobe/src/alternate.rs b/crates/domain/or-wardrobe/src/model/alternate.rs similarity index 100% rename from crates/domain/or-wardrobe/src/alternate.rs rename to crates/domain/or-wardrobe/src/model/alternate.rs diff --git a/crates/domain/or-wardrobe/src/audio.rs b/crates/domain/or-wardrobe/src/model/audio.rs similarity index 100% rename from crates/domain/or-wardrobe/src/audio.rs rename to crates/domain/or-wardrobe/src/model/audio.rs diff --git a/crates/domain/or-wardrobe/src/behaviour.rs b/crates/domain/or-wardrobe/src/model/behaviour.rs similarity index 100% rename from crates/domain/or-wardrobe/src/behaviour.rs rename to crates/domain/or-wardrobe/src/model/behaviour.rs diff --git a/crates/domain/or-wardrobe/src/dummies.rs b/crates/domain/or-wardrobe/src/model/dummies.rs similarity index 100% rename from crates/domain/or-wardrobe/src/dummies.rs rename to crates/domain/or-wardrobe/src/model/dummies.rs diff --git a/crates/domain/or-wardrobe/src/firstperson.rs b/crates/domain/or-wardrobe/src/model/firstperson.rs similarity index 100% rename from crates/domain/or-wardrobe/src/firstperson.rs rename to crates/domain/or-wardrobe/src/model/firstperson.rs diff --git a/crates/domain/or-wardrobe/src/flags.rs b/crates/domain/or-wardrobe/src/model/flags.rs similarity index 100% rename from crates/domain/or-wardrobe/src/flags.rs rename to crates/domain/or-wardrobe/src/model/flags.rs diff --git a/crates/domain/or-wardrobe/src/hair.rs b/crates/domain/or-wardrobe/src/model/hair.rs similarity index 100% rename from crates/domain/or-wardrobe/src/hair.rs rename to crates/domain/or-wardrobe/src/model/hair.rs diff --git a/crates/domain/or-wardrobe/src/heels.rs b/crates/domain/or-wardrobe/src/model/heels.rs similarity index 100% rename from crates/domain/or-wardrobe/src/heels.rs rename to crates/domain/or-wardrobe/src/model/heels.rs diff --git a/crates/domain/or-wardrobe/src/mask.rs b/crates/domain/or-wardrobe/src/model/mask.rs similarity index 100% rename from crates/domain/or-wardrobe/src/mask.rs rename to crates/domain/or-wardrobe/src/model/mask.rs diff --git a/crates/domain/or-wardrobe/src/model/mod.rs b/crates/domain/or-wardrobe/src/model/mod.rs new file mode 100644 index 000000000..a201976c2 --- /dev/null +++ b/crates/domain/or-wardrobe/src/model/mod.rs @@ -0,0 +1,22 @@ +//! The Wardrobe data model: garments, variations, ped/slot naming, behaviour fields, settings and rules. + +mod wardrobe; + +pub mod alternate; +pub mod audio; +pub mod behaviour; +pub mod dummies; +pub mod firstperson; +pub mod flags; +pub mod hair; +pub mod heels; +pub mod mask; +pub mod names; +pub mod rules; +pub mod settings; +pub mod wind; + +pub use wardrobe::{ + new_id, schema, Carried, Error, Expression, Garment, Meta, Shop, ShopEntry, Stated, Variation, + Waiver, Wardrobe, FILE, FORMAT, SCHEMA, +}; diff --git a/crates/domain/or-wardrobe/src/names.rs b/crates/domain/or-wardrobe/src/model/names.rs similarity index 100% rename from crates/domain/or-wardrobe/src/names.rs rename to crates/domain/or-wardrobe/src/model/names.rs diff --git a/crates/domain/or-wardrobe/src/rules/export.rs b/crates/domain/or-wardrobe/src/model/rules/export.rs similarity index 100% rename from crates/domain/or-wardrobe/src/rules/export.rs rename to crates/domain/or-wardrobe/src/model/rules/export.rs diff --git a/crates/domain/or-wardrobe/src/rules/measured.rs b/crates/domain/or-wardrobe/src/model/rules/measured.rs similarity index 100% rename from crates/domain/or-wardrobe/src/rules/measured.rs rename to crates/domain/or-wardrobe/src/model/rules/measured.rs diff --git a/crates/domain/or-wardrobe/src/rules.rs b/crates/domain/or-wardrobe/src/model/rules/mod.rs similarity index 100% rename from crates/domain/or-wardrobe/src/rules.rs rename to crates/domain/or-wardrobe/src/model/rules/mod.rs diff --git a/crates/domain/or-wardrobe/src/settings.rs b/crates/domain/or-wardrobe/src/model/settings.rs similarity index 100% rename from crates/domain/or-wardrobe/src/settings.rs rename to crates/domain/or-wardrobe/src/model/settings.rs diff --git a/crates/domain/or-wardrobe/src/model.rs b/crates/domain/or-wardrobe/src/model/wardrobe.rs similarity index 100% rename from crates/domain/or-wardrobe/src/model.rs rename to crates/domain/or-wardrobe/src/model/wardrobe.rs diff --git a/crates/domain/or-wardrobe/src/wind.rs b/crates/domain/or-wardrobe/src/model/wind.rs similarity index 100% rename from crates/domain/or-wardrobe/src/wind.rs rename to crates/domain/or-wardrobe/src/model/wind.rs diff --git a/crates/domain/or-wardrobe/src/backup.rs b/crates/domain/or-wardrobe/src/ops/backup.rs similarity index 100% rename from crates/domain/or-wardrobe/src/backup.rs rename to crates/domain/or-wardrobe/src/ops/backup.rs diff --git a/crates/domain/or-wardrobe/src/budget.rs b/crates/domain/or-wardrobe/src/ops/budget.rs similarity index 100% rename from crates/domain/or-wardrobe/src/budget.rs rename to crates/domain/or-wardrobe/src/ops/budget.rs diff --git a/crates/domain/or-wardrobe/src/bulk.rs b/crates/domain/or-wardrobe/src/ops/bulk.rs similarity index 100% rename from crates/domain/or-wardrobe/src/bulk.rs rename to crates/domain/or-wardrobe/src/ops/bulk.rs diff --git a/crates/domain/or-wardrobe/src/duplicate.rs b/crates/domain/or-wardrobe/src/ops/duplicate.rs similarity index 100% rename from crates/domain/or-wardrobe/src/duplicate.rs rename to crates/domain/or-wardrobe/src/ops/duplicate.rs diff --git a/crates/domain/or-wardrobe/src/edit.rs b/crates/domain/or-wardrobe/src/ops/edit.rs similarity index 100% rename from crates/domain/or-wardrobe/src/edit.rs rename to crates/domain/or-wardrobe/src/ops/edit.rs diff --git a/crates/domain/or-wardrobe/src/fix.rs b/crates/domain/or-wardrobe/src/ops/fix.rs similarity index 100% rename from crates/domain/or-wardrobe/src/fix.rs rename to crates/domain/or-wardrobe/src/ops/fix.rs diff --git a/crates/domain/or-wardrobe/src/lock.rs b/crates/domain/or-wardrobe/src/ops/lock.rs similarity index 100% rename from crates/domain/or-wardrobe/src/lock.rs rename to crates/domain/or-wardrobe/src/ops/lock.rs diff --git a/crates/domain/or-wardrobe/src/maps.rs b/crates/domain/or-wardrobe/src/ops/maps.rs similarity index 100% rename from crates/domain/or-wardrobe/src/maps.rs rename to crates/domain/or-wardrobe/src/ops/maps.rs diff --git a/crates/domain/or-wardrobe/src/mesh/embedded.rs b/crates/domain/or-wardrobe/src/ops/mesh/embedded.rs similarity index 100% rename from crates/domain/or-wardrobe/src/mesh/embedded.rs rename to crates/domain/or-wardrobe/src/ops/mesh/embedded.rs diff --git a/crates/domain/or-wardrobe/src/mesh/materials.rs b/crates/domain/or-wardrobe/src/ops/mesh/materials.rs similarity index 100% rename from crates/domain/or-wardrobe/src/mesh/materials.rs rename to crates/domain/or-wardrobe/src/ops/mesh/materials.rs diff --git a/crates/domain/or-wardrobe/src/mesh.rs b/crates/domain/or-wardrobe/src/ops/mesh/mod.rs similarity index 100% rename from crates/domain/or-wardrobe/src/mesh.rs rename to crates/domain/or-wardrobe/src/ops/mesh/mod.rs diff --git a/crates/domain/or-wardrobe/src/mesh/uvcrop.rs b/crates/domain/or-wardrobe/src/ops/mesh/uvcrop.rs similarity index 100% rename from crates/domain/or-wardrobe/src/mesh/uvcrop.rs rename to crates/domain/or-wardrobe/src/ops/mesh/uvcrop.rs diff --git a/crates/domain/or-wardrobe/src/ops/mod.rs b/crates/domain/or-wardrobe/src/ops/mod.rs new file mode 100644 index 000000000..5bb3f619f --- /dev/null +++ b/crates/domain/or-wardrobe/src/ops/mod.rs @@ -0,0 +1,17 @@ +//! Pack editing, undo/redo, backups, locks, safe fixes, texture optimisation and the mesh doctor. + +pub mod backup; +pub mod budget; +pub mod bulk; +pub mod duplicate; +pub mod edit; +pub mod fix; +pub mod lock; +pub mod maps; +pub mod mesh; +pub mod redo; +pub(crate) mod repair; +pub mod replace; +pub mod slots; +pub mod textures; +pub mod variations; diff --git a/crates/domain/or-wardrobe/src/redo.rs b/crates/domain/or-wardrobe/src/ops/redo.rs similarity index 100% rename from crates/domain/or-wardrobe/src/redo.rs rename to crates/domain/or-wardrobe/src/ops/redo.rs diff --git a/crates/domain/or-wardrobe/src/repair.rs b/crates/domain/or-wardrobe/src/ops/repair.rs similarity index 100% rename from crates/domain/or-wardrobe/src/repair.rs rename to crates/domain/or-wardrobe/src/ops/repair.rs diff --git a/crates/domain/or-wardrobe/src/replace.rs b/crates/domain/or-wardrobe/src/ops/replace.rs similarity index 100% rename from crates/domain/or-wardrobe/src/replace.rs rename to crates/domain/or-wardrobe/src/ops/replace.rs diff --git a/crates/domain/or-wardrobe/src/slots.rs b/crates/domain/or-wardrobe/src/ops/slots.rs similarity index 100% rename from crates/domain/or-wardrobe/src/slots.rs rename to crates/domain/or-wardrobe/src/ops/slots.rs diff --git a/crates/domain/or-wardrobe/src/textures.rs b/crates/domain/or-wardrobe/src/ops/textures.rs similarity index 100% rename from crates/domain/or-wardrobe/src/textures.rs rename to crates/domain/or-wardrobe/src/ops/textures.rs diff --git a/crates/domain/or-wardrobe/src/variations.rs b/crates/domain/or-wardrobe/src/ops/variations.rs similarity index 100% rename from crates/domain/or-wardrobe/src/variations.rs rename to crates/domain/or-wardrobe/src/ops/variations.rs diff --git a/crates/domain/or-wardrobe/src/shop.rs b/crates/domain/or-wardrobe/src/shop/apparel.rs similarity index 100% rename from crates/domain/or-wardrobe/src/shop.rs rename to crates/domain/or-wardrobe/src/shop/apparel.rs diff --git a/crates/domain/or-wardrobe/src/changes.rs b/crates/domain/or-wardrobe/src/shop/changes.rs similarity index 100% rename from crates/domain/or-wardrobe/src/changes.rs rename to crates/domain/or-wardrobe/src/shop/changes.rs diff --git a/crates/domain/or-wardrobe/src/credits.rs b/crates/domain/or-wardrobe/src/shop/credits.rs similarity index 100% rename from crates/domain/or-wardrobe/src/credits.rs rename to crates/domain/or-wardrobe/src/shop/credits.rs diff --git a/crates/domain/or-wardrobe/src/dress.rs b/crates/domain/or-wardrobe/src/shop/dress.rs similarity index 100% rename from crates/domain/or-wardrobe/src/dress.rs rename to crates/domain/or-wardrobe/src/shop/dress.rs diff --git a/crates/domain/or-wardrobe/src/dump.rs b/crates/domain/or-wardrobe/src/shop/dump.rs similarity index 100% rename from crates/domain/or-wardrobe/src/dump.rs rename to crates/domain/or-wardrobe/src/shop/dump.rs diff --git a/crates/domain/or-wardrobe/src/shop/mod.rs b/crates/domain/or-wardrobe/src/shop/mod.rs new file mode 100644 index 000000000..fba249537 --- /dev/null +++ b/crates/domain/or-wardrobe/src/shop/mod.rs @@ -0,0 +1,19 @@ +//! Shop metadata, server dumps, dressing, queries, diffs and credits for a Wardrobe pack. + +mod apparel; + +pub mod changes; +pub mod credits; +pub mod dress; +pub mod dump; +pub mod query; +pub mod review; +pub mod search; +pub mod shop_edit; + +pub(crate) use apparel::compact; +pub use apparel::{ + apply, carried_path, clashes, discover, escape, id_of, ids_in, is_written, key_of, kind_of, + looks_like_shop, parse, parse_tree, registered, slot_of, write_entry, written, Found, Key, + Node, Offered, Place, Raw, Registered, ShopFile, ShopReport, Written, META_TYPE, ROOT, +}; diff --git a/crates/domain/or-wardrobe/src/query.rs b/crates/domain/or-wardrobe/src/shop/query.rs similarity index 100% rename from crates/domain/or-wardrobe/src/query.rs rename to crates/domain/or-wardrobe/src/shop/query.rs diff --git a/crates/domain/or-wardrobe/src/review.rs b/crates/domain/or-wardrobe/src/shop/review.rs similarity index 100% rename from crates/domain/or-wardrobe/src/review.rs rename to crates/domain/or-wardrobe/src/shop/review.rs diff --git a/crates/domain/or-wardrobe/src/search.rs b/crates/domain/or-wardrobe/src/shop/search.rs similarity index 100% rename from crates/domain/or-wardrobe/src/search.rs rename to crates/domain/or-wardrobe/src/shop/search.rs diff --git a/crates/domain/or-wardrobe/src/shop_edit.rs b/crates/domain/or-wardrobe/src/shop/shop_edit.rs similarity index 100% rename from crates/domain/or-wardrobe/src/shop_edit.rs rename to crates/domain/or-wardrobe/src/shop/shop_edit.rs diff --git a/crates/domain/or-wardrobe/tests/nothing_is_written_over_so_no_original_is_kept.rs b/crates/domain/or-wardrobe/tests/nothing_is_written_over_so_no_original_is_kept.rs index 931514e5f..6a5f04ccc 100644 --- a/crates/domain/or-wardrobe/tests/nothing_is_written_over_so_no_original_is_kept.rs +++ b/crates/domain/or-wardrobe/tests/nothing_is_written_over_so_no_original_is_kept.rs @@ -21,11 +21,11 @@ fn the_engine_has_no_module_that_keeps_originals_or_files_written_over() { #[test] fn a_step_of_undo_carries_the_pack_and_its_copies_and_nothing_written_over() { for file in [ - "edit.rs", - "redo.rs", - "duplicate.rs", - "replace.rs", - "variations.rs", + "ops/edit.rs", + "ops/redo.rs", + "ops/duplicate.rs", + "ops/replace.rs", + "ops/variations.rs", ] { let text = std::fs::read_to_string(src(file)).unwrap(); assert!( diff --git a/crates/domain/or-world-gta5/src/archetype_assets.rs b/crates/domain/or-world-gta5/src/archetypes/archetype_assets.rs similarity index 100% rename from crates/domain/or-world-gta5/src/archetype_assets.rs rename to crates/domain/or-world-gta5/src/archetypes/archetype_assets.rs diff --git a/crates/domain/or-world-gta5/src/catalogue.rs b/crates/domain/or-world-gta5/src/archetypes/catalogue.rs similarity index 100% rename from crates/domain/or-world-gta5/src/catalogue.rs rename to crates/domain/or-world-gta5/src/archetypes/catalogue.rs diff --git a/crates/domain/or-world-gta5/src/collision/bound.rs b/crates/domain/or-world-gta5/src/archetypes/collision/bound.rs similarity index 100% rename from crates/domain/or-world-gta5/src/collision/bound.rs rename to crates/domain/or-world-gta5/src/archetypes/collision/bound.rs diff --git a/crates/domain/or-world-gta5/src/collision/mod.rs b/crates/domain/or-world-gta5/src/archetypes/collision/mod.rs similarity index 100% rename from crates/domain/or-world-gta5/src/collision/mod.rs rename to crates/domain/or-world-gta5/src/archetypes/collision/mod.rs diff --git a/crates/domain/or-world-gta5/src/contents.rs b/crates/domain/or-world-gta5/src/archetypes/contents.rs similarity index 100% rename from crates/domain/or-world-gta5/src/contents.rs rename to crates/domain/or-world-gta5/src/archetypes/contents.rs diff --git a/crates/domain/or-world-gta5/src/map_types.rs b/crates/domain/or-world-gta5/src/archetypes/map_types.rs similarity index 100% rename from crates/domain/or-world-gta5/src/map_types.rs rename to crates/domain/or-world-gta5/src/archetypes/map_types.rs diff --git a/crates/domain/or-world-gta5/src/archetypes/mod.rs b/crates/domain/or-world-gta5/src/archetypes/mod.rs new file mode 100644 index 000000000..a4207b02f --- /dev/null +++ b/crates/domain/or-world-gta5/src/archetypes/mod.rs @@ -0,0 +1,17 @@ +//! Archetypes, type files (`.ytyp`), catalogues, models, textures, vehicles and collision bounds. + +mod resolve; + +pub mod archetype_assets; +pub mod catalogue; +pub mod collision; +pub mod contents; +pub mod map_types; +pub mod model_catalogue; +pub(crate) mod models; +pub mod tables; +pub(crate) mod textures; +pub mod vehicles; +pub mod world_collision; + +pub use resolve::ArchetypeIndex; diff --git a/crates/domain/or-world-gta5/src/model_catalogue.rs b/crates/domain/or-world-gta5/src/archetypes/model_catalogue.rs similarity index 100% rename from crates/domain/or-world-gta5/src/model_catalogue.rs rename to crates/domain/or-world-gta5/src/archetypes/model_catalogue.rs diff --git a/crates/domain/or-world-gta5/src/models.rs b/crates/domain/or-world-gta5/src/archetypes/models.rs similarity index 100% rename from crates/domain/or-world-gta5/src/models.rs rename to crates/domain/or-world-gta5/src/archetypes/models.rs diff --git a/crates/domain/or-world-gta5/src/archetypes.rs b/crates/domain/or-world-gta5/src/archetypes/resolve.rs similarity index 100% rename from crates/domain/or-world-gta5/src/archetypes.rs rename to crates/domain/or-world-gta5/src/archetypes/resolve.rs diff --git a/crates/domain/or-world-gta5/src/tables.rs b/crates/domain/or-world-gta5/src/archetypes/tables.rs similarity index 100% rename from crates/domain/or-world-gta5/src/tables.rs rename to crates/domain/or-world-gta5/src/archetypes/tables.rs diff --git a/crates/domain/or-world-gta5/src/textures.rs b/crates/domain/or-world-gta5/src/archetypes/textures.rs similarity index 100% rename from crates/domain/or-world-gta5/src/textures.rs rename to crates/domain/or-world-gta5/src/archetypes/textures.rs diff --git a/crates/domain/or-world-gta5/src/vehicles.rs b/crates/domain/or-world-gta5/src/archetypes/vehicles.rs similarity index 100% rename from crates/domain/or-world-gta5/src/vehicles.rs rename to crates/domain/or-world-gta5/src/archetypes/vehicles.rs diff --git a/crates/domain/or-world-gta5/src/world_collision.rs b/crates/domain/or-world-gta5/src/archetypes/world_collision.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_collision.rs rename to crates/domain/or-world-gta5/src/archetypes/world_collision.rs diff --git a/crates/domain/or-world-gta5/src/create.rs b/crates/domain/or-world-gta5/src/authoring/create.rs similarity index 100% rename from crates/domain/or-world-gta5/src/create.rs rename to crates/domain/or-world-gta5/src/authoring/create.rs diff --git a/crates/domain/or-world-gta5/src/execute.rs b/crates/domain/or-world-gta5/src/authoring/execute.rs similarity index 100% rename from crates/domain/or-world-gta5/src/execute.rs rename to crates/domain/or-world-gta5/src/authoring/execute.rs diff --git a/crates/domain/or-world-gta5/src/generate.rs b/crates/domain/or-world-gta5/src/authoring/generate.rs similarity index 100% rename from crates/domain/or-world-gta5/src/generate.rs rename to crates/domain/or-world-gta5/src/authoring/generate.rs diff --git a/crates/domain/or-world-gta5/src/manifest_build.rs b/crates/domain/or-world-gta5/src/authoring/manifest_build.rs similarity index 100% rename from crates/domain/or-world-gta5/src/manifest_build.rs rename to crates/domain/or-world-gta5/src/authoring/manifest_build.rs diff --git a/crates/domain/or-world-gta5/src/authoring/mod.rs b/crates/domain/or-world-gta5/src/authoring/mod.rs new file mode 100644 index 000000000..90b1f8510 --- /dev/null +++ b/crates/domain/or-world-gta5/src/authoring/mod.rs @@ -0,0 +1,13 @@ +//! Authoring GTA V world files: creating, writing, planning, executing, validating, generating, prefabs and XML. + +pub mod create; +pub mod execute; +pub mod generate; +pub mod manifest_build; +pub mod partition; +pub mod plan; +pub mod prefab; +pub mod script_text; +pub mod validate; +pub mod write; +pub mod xml; diff --git a/crates/domain/or-world-gta5/src/partition.rs b/crates/domain/or-world-gta5/src/authoring/partition.rs similarity index 100% rename from crates/domain/or-world-gta5/src/partition.rs rename to crates/domain/or-world-gta5/src/authoring/partition.rs diff --git a/crates/domain/or-world-gta5/src/plan.rs b/crates/domain/or-world-gta5/src/authoring/plan.rs similarity index 100% rename from crates/domain/or-world-gta5/src/plan.rs rename to crates/domain/or-world-gta5/src/authoring/plan.rs diff --git a/crates/domain/or-world-gta5/src/prefab.rs b/crates/domain/or-world-gta5/src/authoring/prefab.rs similarity index 100% rename from crates/domain/or-world-gta5/src/prefab.rs rename to crates/domain/or-world-gta5/src/authoring/prefab.rs diff --git a/crates/domain/or-world-gta5/src/script_forms.json b/crates/domain/or-world-gta5/src/authoring/script_forms.json similarity index 100% rename from crates/domain/or-world-gta5/src/script_forms.json rename to crates/domain/or-world-gta5/src/authoring/script_forms.json diff --git a/crates/domain/or-world-gta5/src/script_text.rs b/crates/domain/or-world-gta5/src/authoring/script_text.rs similarity index 100% rename from crates/domain/or-world-gta5/src/script_text.rs rename to crates/domain/or-world-gta5/src/authoring/script_text.rs diff --git a/crates/domain/or-world-gta5/src/validate.rs b/crates/domain/or-world-gta5/src/authoring/validate.rs similarity index 100% rename from crates/domain/or-world-gta5/src/validate.rs rename to crates/domain/or-world-gta5/src/authoring/validate.rs diff --git a/crates/domain/or-world-gta5/src/write.rs b/crates/domain/or-world-gta5/src/authoring/write.rs similarity index 100% rename from crates/domain/or-world-gta5/src/write.rs rename to crates/domain/or-world-gta5/src/authoring/write.rs diff --git a/crates/domain/or-world-gta5/src/xml.rs b/crates/domain/or-world-gta5/src/authoring/xml.rs similarity index 100% rename from crates/domain/or-world-gta5/src/xml.rs rename to crates/domain/or-world-gta5/src/authoring/xml.rs diff --git a/crates/domain/or-world-gta5/src/lib.rs b/crates/domain/or-world-gta5/src/lib.rs index a5287a6fc..0f16f4647 100644 --- a/crates/domain/or-world-gta5/src/lib.rs +++ b/crates/domain/or-world-gta5/src/lib.rs @@ -14,48 +14,10 @@ //! //! ⚠ A map is keyed by its row of the linked index behind the contract, and by its name in the world index and the forest. -pub mod archetype_assets; pub mod archetypes; -pub mod catalogue; -pub mod collision; -pub mod content_flags; -pub mod contents; -pub mod create; -pub mod doors; -pub mod execute; -pub mod extension; -pub mod extents; -pub mod field; -pub mod find; -pub mod generate; -pub mod group; -pub mod keys; -pub mod layers; -pub mod lights; -pub mod manifest; -pub mod manifest_build; -pub mod map_data; -pub mod map_types; -pub mod model_catalogue; -pub mod partition; -pub mod placement; -pub mod plan; -pub mod prefab; -pub mod profile; -pub mod scenario; -pub mod script_text; -pub mod sea; -pub mod state; -pub mod tables; -pub mod transform; -pub mod validate; -pub mod vehicles; -pub mod wind; -pub mod world_collision; -pub mod world_forest; -pub mod world_index; -pub mod write; -pub mod xml; +pub mod authoring; +pub mod map; +pub mod streaming; #[cfg(any(test, feature = "made-up"))] pub mod test_fixtures; @@ -63,16 +25,22 @@ pub mod test_fixtures; #[cfg(test)] pub(crate) use test_fixtures::tests_support; -mod beside; -mod body; -pub mod grass; -mod index; -mod install; -mod models; -mod named; -mod source; -mod textures; -mod title; +pub use archetypes::{ + archetype_assets, catalogue, collision, contents, map_types, model_catalogue, tables, vehicles, + world_collision, +}; +pub(crate) use archetypes::{models, textures}; +pub use authoring::{ + create, execute, generate, manifest_build, partition, plan, prefab, script_text, validate, + write, xml, +}; +pub(crate) use map::{beside, body, named}; +pub use map::{ + content_flags, doors, extension, extents, field, grass, group, keys, lights, map_data, profile, + scenario, sea, transform, wind, +}; +pub use streaming::{find, layers, manifest, placement, state, world_forest, world_index}; +pub(crate) use streaming::{index, install, source, title}; pub use beside::Beside; pub use body::{Body, BOXED_UNDECLARED, BOXED_UNNAMED, WORDS}; diff --git a/crates/domain/or-world-gta5/src/beside.rs b/crates/domain/or-world-gta5/src/map/beside.rs similarity index 100% rename from crates/domain/or-world-gta5/src/beside.rs rename to crates/domain/or-world-gta5/src/map/beside.rs diff --git a/crates/domain/or-world-gta5/src/body.rs b/crates/domain/or-world-gta5/src/map/body.rs similarity index 100% rename from crates/domain/or-world-gta5/src/body.rs rename to crates/domain/or-world-gta5/src/map/body.rs diff --git a/crates/domain/or-world-gta5/src/content_flags.rs b/crates/domain/or-world-gta5/src/map/content_flags.rs similarity index 100% rename from crates/domain/or-world-gta5/src/content_flags.rs rename to crates/domain/or-world-gta5/src/map/content_flags.rs diff --git a/crates/domain/or-world-gta5/src/doors/arc.rs b/crates/domain/or-world-gta5/src/map/doors/arc.rs similarity index 100% rename from crates/domain/or-world-gta5/src/doors/arc.rs rename to crates/domain/or-world-gta5/src/map/doors/arc.rs diff --git a/crates/domain/or-world-gta5/src/doors/find.rs b/crates/domain/or-world-gta5/src/map/doors/find.rs similarity index 100% rename from crates/domain/or-world-gta5/src/doors/find.rs rename to crates/domain/or-world-gta5/src/map/doors/find.rs diff --git a/crates/domain/or-world-gta5/src/doors/leaf.rs b/crates/domain/or-world-gta5/src/map/doors/leaf.rs similarity index 100% rename from crates/domain/or-world-gta5/src/doors/leaf.rs rename to crates/domain/or-world-gta5/src/map/doors/leaf.rs diff --git a/crates/domain/or-world-gta5/src/doors/mod.rs b/crates/domain/or-world-gta5/src/map/doors/mod.rs similarity index 100% rename from crates/domain/or-world-gta5/src/doors/mod.rs rename to crates/domain/or-world-gta5/src/map/doors/mod.rs diff --git a/crates/domain/or-world-gta5/src/doors/pair.rs b/crates/domain/or-world-gta5/src/map/doors/pair.rs similarity index 100% rename from crates/domain/or-world-gta5/src/doors/pair.rs rename to crates/domain/or-world-gta5/src/map/doors/pair.rs diff --git a/crates/domain/or-world-gta5/src/extension.rs b/crates/domain/or-world-gta5/src/map/extension.rs similarity index 100% rename from crates/domain/or-world-gta5/src/extension.rs rename to crates/domain/or-world-gta5/src/map/extension.rs diff --git a/crates/domain/or-world-gta5/src/extents.rs b/crates/domain/or-world-gta5/src/map/extents.rs similarity index 100% rename from crates/domain/or-world-gta5/src/extents.rs rename to crates/domain/or-world-gta5/src/map/extents.rs diff --git a/crates/domain/or-world-gta5/src/field.rs b/crates/domain/or-world-gta5/src/map/field.rs similarity index 100% rename from crates/domain/or-world-gta5/src/field.rs rename to crates/domain/or-world-gta5/src/map/field.rs diff --git a/crates/domain/or-world-gta5/src/grass.rs b/crates/domain/or-world-gta5/src/map/grass.rs similarity index 100% rename from crates/domain/or-world-gta5/src/grass.rs rename to crates/domain/or-world-gta5/src/map/grass.rs diff --git a/crates/domain/or-world-gta5/src/group.rs b/crates/domain/or-world-gta5/src/map/group.rs similarity index 100% rename from crates/domain/or-world-gta5/src/group.rs rename to crates/domain/or-world-gta5/src/map/group.rs diff --git a/crates/domain/or-world-gta5/src/keys.rs b/crates/domain/or-world-gta5/src/map/keys.rs similarity index 100% rename from crates/domain/or-world-gta5/src/keys.rs rename to crates/domain/or-world-gta5/src/map/keys.rs diff --git a/crates/domain/or-world-gta5/src/lights.rs b/crates/domain/or-world-gta5/src/map/lights.rs similarity index 100% rename from crates/domain/or-world-gta5/src/lights.rs rename to crates/domain/or-world-gta5/src/map/lights.rs diff --git a/crates/domain/or-world-gta5/src/map_data.rs b/crates/domain/or-world-gta5/src/map/map_data.rs similarity index 100% rename from crates/domain/or-world-gta5/src/map_data.rs rename to crates/domain/or-world-gta5/src/map/map_data.rs diff --git a/crates/domain/or-world-gta5/src/map/mod.rs b/crates/domain/or-world-gta5/src/map/mod.rs new file mode 100644 index 000000000..fef1b8a10 --- /dev/null +++ b/crates/domain/or-world-gta5/src/map/mod.rs @@ -0,0 +1,20 @@ +//! Map data (`.ymap`), field/key hashes, entities, doors, lights, grass, water, wind, draw profiles and bodies. + +pub(crate) mod beside; +pub(crate) mod body; +pub mod content_flags; +pub mod doors; +pub mod extension; +pub mod extents; +pub mod field; +pub mod grass; +pub mod group; +pub mod keys; +pub mod lights; +pub mod map_data; +pub(crate) mod named; +pub mod profile; +pub mod scenario; +pub mod sea; +pub mod transform; +pub mod wind; diff --git a/crates/domain/or-world-gta5/src/named.rs b/crates/domain/or-world-gta5/src/map/named.rs similarity index 100% rename from crates/domain/or-world-gta5/src/named.rs rename to crates/domain/or-world-gta5/src/map/named.rs diff --git a/crates/domain/or-world-gta5/src/profile.rs b/crates/domain/or-world-gta5/src/map/profile.rs similarity index 100% rename from crates/domain/or-world-gta5/src/profile.rs rename to crates/domain/or-world-gta5/src/map/profile.rs diff --git a/crates/domain/or-world-gta5/src/scenario.rs b/crates/domain/or-world-gta5/src/map/scenario.rs similarity index 100% rename from crates/domain/or-world-gta5/src/scenario.rs rename to crates/domain/or-world-gta5/src/map/scenario.rs diff --git a/crates/domain/or-world-gta5/src/sea.rs b/crates/domain/or-world-gta5/src/map/sea.rs similarity index 100% rename from crates/domain/or-world-gta5/src/sea.rs rename to crates/domain/or-world-gta5/src/map/sea.rs diff --git a/crates/domain/or-world-gta5/src/transform.rs b/crates/domain/or-world-gta5/src/map/transform.rs similarity index 100% rename from crates/domain/or-world-gta5/src/transform.rs rename to crates/domain/or-world-gta5/src/map/transform.rs diff --git a/crates/domain/or-world-gta5/src/wind.rs b/crates/domain/or-world-gta5/src/map/wind.rs similarity index 100% rename from crates/domain/or-world-gta5/src/wind.rs rename to crates/domain/or-world-gta5/src/map/wind.rs diff --git a/crates/domain/or-world-gta5/src/find.rs b/crates/domain/or-world-gta5/src/streaming/find/mod.rs similarity index 100% rename from crates/domain/or-world-gta5/src/find.rs rename to crates/domain/or-world-gta5/src/streaming/find/mod.rs diff --git a/crates/domain/or-world-gta5/src/find/neutral.rs b/crates/domain/or-world-gta5/src/streaming/find/neutral.rs similarity index 100% rename from crates/domain/or-world-gta5/src/find/neutral.rs rename to crates/domain/or-world-gta5/src/streaming/find/neutral.rs diff --git a/crates/domain/or-world-gta5/src/find/placed.rs b/crates/domain/or-world-gta5/src/streaming/find/placed.rs similarity index 100% rename from crates/domain/or-world-gta5/src/find/placed.rs rename to crates/domain/or-world-gta5/src/streaming/find/placed.rs diff --git a/crates/domain/or-world-gta5/src/index.rs b/crates/domain/or-world-gta5/src/streaming/index.rs similarity index 100% rename from crates/domain/or-world-gta5/src/index.rs rename to crates/domain/or-world-gta5/src/streaming/index.rs diff --git a/crates/domain/or-world-gta5/src/install.rs b/crates/domain/or-world-gta5/src/streaming/install.rs similarity index 100% rename from crates/domain/or-world-gta5/src/install.rs rename to crates/domain/or-world-gta5/src/streaming/install.rs diff --git a/crates/domain/or-world-gta5/src/layers.rs b/crates/domain/or-world-gta5/src/streaming/layers/mod.rs similarity index 100% rename from crates/domain/or-world-gta5/src/layers.rs rename to crates/domain/or-world-gta5/src/streaming/layers/mod.rs diff --git a/crates/domain/or-world-gta5/src/layers/read.rs b/crates/domain/or-world-gta5/src/streaming/layers/read.rs similarity index 100% rename from crates/domain/or-world-gta5/src/layers/read.rs rename to crates/domain/or-world-gta5/src/streaming/layers/read.rs diff --git a/crates/domain/or-world-gta5/src/manifest.rs b/crates/domain/or-world-gta5/src/streaming/manifest.rs similarity index 100% rename from crates/domain/or-world-gta5/src/manifest.rs rename to crates/domain/or-world-gta5/src/streaming/manifest.rs diff --git a/crates/domain/or-world-gta5/src/streaming/mod.rs b/crates/domain/or-world-gta5/src/streaming/mod.rs new file mode 100644 index 000000000..0e56e26ac --- /dev/null +++ b/crates/domain/or-world-gta5/src/streaming/mod.rs @@ -0,0 +1,13 @@ +//! Mounted GTA V world streaming: title, install, kept index, LOD forest, layers, search, placements and manifests. + +pub mod find; +pub(crate) mod index; +pub(crate) mod install; +pub mod layers; +pub mod manifest; +pub mod placement; +pub(crate) mod source; +pub mod state; +pub(crate) mod title; +pub mod world_forest; +pub mod world_index; diff --git a/crates/domain/or-world-gta5/src/placement.rs b/crates/domain/or-world-gta5/src/streaming/placement.rs similarity index 100% rename from crates/domain/or-world-gta5/src/placement.rs rename to crates/domain/or-world-gta5/src/streaming/placement.rs diff --git a/crates/domain/or-world-gta5/src/source.rs b/crates/domain/or-world-gta5/src/streaming/source.rs similarity index 100% rename from crates/domain/or-world-gta5/src/source.rs rename to crates/domain/or-world-gta5/src/streaming/source.rs diff --git a/crates/domain/or-world-gta5/src/state.rs b/crates/domain/or-world-gta5/src/streaming/state.rs similarity index 100% rename from crates/domain/or-world-gta5/src/state.rs rename to crates/domain/or-world-gta5/src/streaming/state.rs diff --git a/crates/domain/or-world-gta5/src/title.rs b/crates/domain/or-world-gta5/src/streaming/title.rs similarity index 100% rename from crates/domain/or-world-gta5/src/title.rs rename to crates/domain/or-world-gta5/src/streaming/title.rs diff --git a/crates/domain/or-world-gta5/src/world_forest.rs b/crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_forest.rs rename to crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs diff --git a/crates/domain/or-world-gta5/src/world_forest/read.rs b/crates/domain/or-world-gta5/src/streaming/world_forest/read.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_forest/read.rs rename to crates/domain/or-world-gta5/src/streaming/world_forest/read.rs diff --git a/crates/domain/or-world-gta5/src/world_index/kept.rs b/crates/domain/or-world-gta5/src/streaming/world_index/kept.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_index/kept.rs rename to crates/domain/or-world-gta5/src/streaming/world_index/kept.rs diff --git a/crates/domain/or-world-gta5/src/world_index.rs b/crates/domain/or-world-gta5/src/streaming/world_index/mod.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_index.rs rename to crates/domain/or-world-gta5/src/streaming/world_index/mod.rs diff --git a/crates/domain/or-world-gta5/src/world_index/mounted.rs b/crates/domain/or-world-gta5/src/streaming/world_index/mounted.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_index/mounted.rs rename to crates/domain/or-world-gta5/src/streaming/world_index/mounted.rs diff --git a/crates/domain/or-world-gta5/src/world_index/switching.rs b/crates/domain/or-world-gta5/src/streaming/world_index/switching.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_index/switching.rs rename to crates/domain/or-world-gta5/src/streaming/world_index/switching.rs diff --git a/crates/domain/or-world-gta5/src/world_index/tree.rs b/crates/domain/or-world-gta5/src/streaming/world_index/tree.rs similarity index 100% rename from crates/domain/or-world-gta5/src/world_index/tree.rs rename to crates/domain/or-world-gta5/src/streaming/world_index/tree.rs diff --git a/crates/domain/or-world-gta6/Cargo.toml b/crates/domain/or-world-gta6/Cargo.toml index afee23a89..39586d77f 100644 --- a/crates/domain/or-world-gta6/Cargo.toml +++ b/crates/domain/or-world-gta6/Cargo.toml @@ -6,11 +6,13 @@ authors.workspace = true license.workspace = true rust-version.workspace = true publish.workspace = true -description = "GTA VI's world behind the world contract: its index with its kept file, mount binding, scan and states, the maps streamed around a camera and what of them draws, its interiors, its occluders, its material record and its lights' law" +description = "GTA VI's world behind the world contract: its index with its kept file, mount binding, scan and states, the maps streamed around a camera and what of them draws, its interiors, its occluders, its material record, its lights' law, and its day's atmosphere, ephemeris, exposure, clouds, weather and wind" [dependencies] bytemuck.workspace = true glam.workspace = true +# The executable the day's variable table is read from. +memmap2.workspace = true serde.workspace = true serde_json.workspace = true thiserror.workspace = true @@ -19,7 +21,7 @@ tracing.workspace = true or-job.workspace = true # The readers of a map body, a model's material and an archive's bodies. or-io = { workspace = true, features = ["gta6", "meta"] } -# The mount: which packs register a map, and the day's variables. +# The mount: which packs register a map. or-title.workspace = true # The core: the reader pool, a view and a map's boxes. or-world.workspace = true diff --git a/crates/title/or-title/src/gta6_cloud.rs b/crates/domain/or-world-gta6/src/day/cloud.rs similarity index 100% rename from crates/title/or-title/src/gta6_cloud.rs rename to crates/domain/or-world-gta6/src/day/cloud.rs diff --git a/crates/title/or-title/src/gta6_day_tests.rs b/crates/domain/or-world-gta6/src/day/day_tests.rs similarity index 100% rename from crates/title/or-title/src/gta6_day_tests.rs rename to crates/domain/or-world-gta6/src/day/day_tests.rs diff --git a/crates/title/or-title/src/gta6_exposure.rs b/crates/domain/or-world-gta6/src/day/exposure.rs similarity index 98% rename from crates/title/or-title/src/gta6_exposure.rs rename to crates/domain/or-world-gta6/src/day/exposure.rs index 421ac289b..cd1bbe9ee 100644 --- a/crates/title/or-title/src/gta6_exposure.rs +++ b/crates/domain/or-world-gta6/src/day/exposure.rs @@ -9,9 +9,9 @@ use glam::Vec3; use or_io::gta5::data::timecycle::Keyframe; use or_io::gta6::timecycle::{FrameLight, DOME_TRANSITION}; -use crate::gta6_cloud::CloudLayer; -use crate::gta6_day_sun::{directional_light, Leader, LightTunables, LightVariables}; -use crate::gta6_sky::Atmosphere; +use super::cloud::CloudLayer; +use super::sky::Atmosphere; +use super::sun::{directional_light, Leader, LightTunables, LightVariables}; /// The least luminance a key value is divided by. const LEAST_LUMINANCE: f32 = 1e-6; @@ -289,5 +289,5 @@ pub fn light( } #[cfg(test)] -#[path = "gta6_exposure_tests.rs"] +#[path = "exposure_tests.rs"] mod tests; diff --git a/crates/title/or-title/src/gta6_exposure_tests.rs b/crates/domain/or-world-gta6/src/day/exposure_tests.rs similarity index 100% rename from crates/title/or-title/src/gta6_exposure_tests.rs rename to crates/domain/or-world-gta6/src/day/exposure_tests.rs diff --git a/crates/title/or-title/src/gta6_day_frame.rs b/crates/domain/or-world-gta6/src/day/frame.rs similarity index 99% rename from crates/title/or-title/src/gta6_day_frame.rs rename to crates/domain/or-world-gta6/src/day/frame.rs index 9a8ac9ca3..3d0ede327 100644 --- a/crates/title/or-title/src/gta6_day_frame.rs +++ b/crates/domain/or-world-gta6/src/day/frame.rs @@ -85,7 +85,7 @@ pub struct SamplePick { pub t: f32, } -/// The samples around sun angle x (radians, gta6_day_sun::sample_angle of the ephemeris sun SunDay::direction) in keys sorted ascending; the last key pairs with the first across 2π. +/// The samples around sun angle x (radians, sun::sample_angle of the ephemeris sun SunDay::direction) in keys sorted ascending; the last key pairs with the first across 2π. pub fn pick_samples(x: f32, keys: &[SampleKey]) -> Result { if keys.is_empty() { return Err(FrameError::EmptyTable); @@ -728,5 +728,5 @@ pub fn name_hash(name: &str) -> u32 { } #[cfg(test)] -#[path = "gta6_day_frame_tests.rs"] +#[path = "frame_tests.rs"] mod tests; diff --git a/crates/title/or-title/src/gta6_day_frame_tests.rs b/crates/domain/or-world-gta6/src/day/frame_tests.rs similarity index 100% rename from crates/title/or-title/src/gta6_day_frame_tests.rs rename to crates/domain/or-world-gta6/src/day/frame_tests.rs diff --git a/crates/title/or-title/src/gta6_day.rs b/crates/domain/or-world-gta6/src/day/mod.rs similarity index 98% rename from crates/title/or-title/src/gta6_day.rs rename to crates/domain/or-world-gta6/src/day/mod.rs index 5969c45c2..a70853018 100644 --- a/crates/title/or-title/src/gta6_day.rs +++ b/crates/domain/or-world-gta6/src/day/mod.rs @@ -17,16 +17,25 @@ use or_io::gta6::timecycle::{ }; use or_io::gta6::weather::{WeatherData, WeatherSet}; -use crate::gta6_day_frame::{ +pub mod cloud; +pub mod exposure; +pub mod frame; +pub mod sky; +pub mod sun; +pub mod vars; +pub mod weather; +pub mod wind; + +use self::exposure::{adapt, bodies, light, target_stops, Bodies, ExposureSettings}; +use self::frame::{ apply_mode2, eased_t, f32_to_half, name_hash, pick_samples, sample_curve_index, stored_half_value, SampleKey, }; -use crate::gta6_day_sun::{ +use self::sun::{ moon_cycle, moon_direction, sample_angle, sun_day, MoonTunables, SunTunables, DEFAULT_DAY_OF_YEAR, }; -use crate::gta6_day_vars::{read_executable_day, ExecutableDay}; -use crate::gta6_exposure::{adapt, bodies, light, target_stops, Bodies, ExposureSettings}; +use self::vars::{read_executable_day, ExecutableDay}; /// What a text of the day may inflate to; a longer one is passed over. const BODY_LIMIT: u64 = 16 << 20; @@ -613,5 +622,5 @@ pub fn read_day(archive: &Path, stop: &dyn Fn() -> bool) -> io::Result LightVariables { + pub fn from_frame(frame: &super::frame::TimecycleFrame) -> LightVariables { LightVariables { day_colour: Vec3::new(frame[0], frame[1], frame[2]), day_intensity: frame[3], @@ -685,5 +685,5 @@ fn unit_interval(value: f64) -> f64 { } #[cfg(test)] -#[path = "gta6_day_sun_tests.rs"] +#[path = "sun_tests.rs"] mod tests; diff --git a/crates/title/or-title/src/gta6_day_sun_tests.rs b/crates/domain/or-world-gta6/src/day/sun_tests.rs similarity index 100% rename from crates/title/or-title/src/gta6_day_sun_tests.rs rename to crates/domain/or-world-gta6/src/day/sun_tests.rs diff --git a/crates/title/or-title/src/gta6_day_vars.rs b/crates/domain/or-world-gta6/src/day/vars.rs similarity index 98% rename from crates/title/or-title/src/gta6_day_vars.rs rename to crates/domain/or-world-gta6/src/day/vars.rs index 84dd623d5..5081816d8 100644 --- a/crates/title/or-title/src/gta6_day_vars.rs +++ b/crates/domain/or-world-gta6/src/day/vars.rs @@ -5,7 +5,7 @@ use std::collections::HashMap; use std::path::Path; -use crate::gta6_day_frame::{TimecycleFrame, FRAME_FLOATS}; +use super::frame::{TimecycleFrame, FRAME_FLOATS}; /// The bytes of one entry of the variable table: index, name hash, default, kind, a flag, mode. const ENTRY: usize = 0x18; @@ -178,5 +178,5 @@ pub fn read_executable_day(archive: &Path) -> ExecutableDay { } #[cfg(test)] -#[path = "gta6_day_vars_tests.rs"] +#[path = "vars_tests.rs"] mod tests; diff --git a/crates/title/or-title/src/gta6_day_vars_tests.rs b/crates/domain/or-world-gta6/src/day/vars_tests.rs similarity index 100% rename from crates/title/or-title/src/gta6_day_vars_tests.rs rename to crates/domain/or-world-gta6/src/day/vars_tests.rs diff --git a/crates/title/or-title/src/gta6_day_weather.rs b/crates/domain/or-world-gta6/src/day/weather.rs similarity index 90% rename from crates/title/or-title/src/gta6_day_weather.rs rename to crates/domain/or-world-gta6/src/day/weather.rs index 557665d2d..ae9ba3215 100644 --- a/crates/title/or-title/src/gta6_day_weather.rs +++ b/crates/domain/or-world-gta6/src/day/weather.rs @@ -1,8 +1,8 @@ //! The weather's state: an automatic change and a queued weather layered on it, the per-weather modifier slots, the uniform pick of the next weather and its generator, the calendar lookup by days and a weather record's viewer fields. //! Not coded, because not read: the commit routines at the end of a change and of a queue, what the schedule selector's two indices mean, the generator's seed, and the slot strength when both weathers have a modifier. The wind a weather sets is the wind module's. -use crate::gta6_day_frame::QueuedModifier; -use crate::gta6_day_wind::WeatherWind; +use super::frame::QueuedModifier; +use super::wind::WeatherWind; /// Milliseconds a queued weather counts down per unit of dt; that the unit is a second is GTA V's, assumed. pub const MILLISECONDS_PER_DT: f32 = 1000.0; @@ -67,7 +67,7 @@ pub struct AutoTransition { pub elapsed: f32, } -/// The weathers and weight the base frame blends; gta6_day_frame::blend_weathers takes next = None exactly when prev == next (day 4.4). +/// The weathers and weight the base frame blends; frame::blend_weathers takes next = None exactly when prev == next (day 4.4). #[derive(Clone, Copy, Debug, PartialEq)] pub struct BlendInputs { /// The previous weather, A of the base blend. @@ -79,13 +79,13 @@ pub struct BlendInputs { } impl AutoTransition { - /// A change at weight 0 over `duration` units of dt (gta6_day_frame::AUTO_TRANSITION_DURATION); a negative or NaN duration is 0, which ends on the first step. + /// A change at weight 0 over `duration` units of dt (frame::AUTO_TRANSITION_DURATION); a negative or NaN duration is 0, which ends on the first step. pub fn start(from: u32, to: u32, duration: f32) -> AutoTransition { AutoTransition { from, to, weight: 0.0, - // A negative duration would hold gta6_day_frame::auto_transition_step at 0 for ever. + // A negative duration would hold frame::auto_transition_step at 0 for ever. duration: duration.max(0.0), elapsed: 0.0, } @@ -96,19 +96,18 @@ impl AutoTransition { self.weight >= 1.0 } - /// Elapsed units after a step of dt, the elapsed argument of gta6_day_frame::auto_transition_step. + /// Elapsed units after a step of dt, the elapsed argument of frame::auto_transition_step. pub fn elapsed_after(&self, dt: f32) -> f32 { self.elapsed + dt } - /// One step of dt, the weight from gta6_day_frame::auto_transition_step; a finished change is left as it is. + /// One step of dt, the weight from frame::auto_transition_step; a finished change is left as it is. pub fn advance(&mut self, dt: f32) { if self.finished() { return; } self.elapsed = self.elapsed_after(dt); - self.weight = - crate::gta6_day_frame::auto_transition_step(self.weight, self.elapsed, self.duration); + self.weight = super::frame::auto_transition_step(self.weight, self.elapsed, self.duration); } /// The base blend's inputs: from and to where below weather_count, else the weather kept held. @@ -173,15 +172,15 @@ impl QueuedWeather { } } - /// Milliseconds left after a step of dt, the first argument of gta6_day_frame::queued_weather_weight. + /// Milliseconds left after a step of dt, the first argument of frame::queued_weather_weight. pub fn left_after(&self, dt: f32) -> f32 { self.left_ms - MILLISECONDS_PER_DT * dt } - /// One step of dt, the weight from gta6_day_frame::queued_weather_weight; at weight 1 the weather commits. + /// One step of dt, the weight from frame::queued_weather_weight; at weight 1 the weather commits. pub fn advance(self, dt: f32) -> QueueStep { let left_ms: f32 = self.left_after(dt); - let weight: f32 = crate::gta6_day_frame::queued_weather_weight(left_ms, self.total_ms); + let weight: f32 = super::frame::queued_weather_weight(left_ms, self.total_ms); if weight >= 1.0 { return QueueStep::Commit(self.weather); } @@ -193,7 +192,7 @@ impl QueuedWeather { } } -/// Weather modifier slot k (0..7) as a queue entry, its order key base·1000 + 250 + k (gta6_day_frame::modifier_order_key); that base is the category index is inferred. +/// Weather modifier slot k (0..7) as a queue entry, its order key base·1000 + 250 + k (frame::modifier_order_key); that base is the category index is inferred. pub fn weather_slot_modifier(base: i32, slot: i32) -> QueuedModifier { QueuedModifier { category: base, @@ -280,7 +279,7 @@ pub fn pick_next_weather(day_list: &[u32], records: &[DayRecord], r1: f32, r2: f Some(entry.weather) } -/// Whether `weather` is in the schedule: walking day_list[(day % len + i) % len], the entry of that weather whose time is nearest `day_fraction` (gta6_day_sun::clock_day_fraction as f32); `day` counts days since 1970 (inferred). +/// Whether `weather` is in the schedule: walking day_list[(day % len + i) % len], the entry of that weather whose time is nearest `day_fraction` (sun::clock_day_fraction as f32); `day` counts days since 1970 (inferred). pub fn find_in_schedule( day_list: &[u32], records: &[DayRecord], @@ -332,5 +331,5 @@ pub fn find_in_schedule( } #[cfg(test)] -#[path = "gta6_day_weather_tests.rs"] +#[path = "weather_tests.rs"] mod tests; diff --git a/crates/title/or-title/src/gta6_day_weather_tests.rs b/crates/domain/or-world-gta6/src/day/weather_tests.rs similarity index 100% rename from crates/title/or-title/src/gta6_day_weather_tests.rs rename to crates/domain/or-world-gta6/src/day/weather_tests.rs diff --git a/crates/title/or-title/src/gta6_day_wind.rs b/crates/domain/or-world-gta6/src/day/wind.rs similarity index 99% rename from crates/title/or-title/src/gta6_day_wind.rs rename to crates/domain/or-world-gta6/src/day/wind.rs index b5dcccda0..c8742abf5 100644 --- a/crates/title/or-title/src/gta6_day_wind.rs +++ b/crates/domain/or-world-gta6/src/day/wind.rs @@ -6,8 +6,8 @@ use or_io::gta5::data::timecycle::Keyframe; use or_io::gta6::weather::WeatherData; use std::f32::consts::PI; -use crate::gta6_day_frame::{lerp, name_hash}; -use crate::gta6_day_vars::VarTable; +use super::frame::{lerp, name_hash}; +use super::vars::VarTable; /// Frame index of v1103, the weight that pulls the heading toward v1104. const HEADING_WEIGHT: usize = 1103; @@ -501,5 +501,5 @@ impl WindState { } #[cfg(test)] -#[path = "gta6_day_wind_tests.rs"] +#[path = "wind_tests.rs"] mod tests; diff --git a/crates/title/or-title/src/gta6_day_wind_tests.rs b/crates/domain/or-world-gta6/src/day/wind_tests.rs similarity index 100% rename from crates/title/or-title/src/gta6_day_wind_tests.rs rename to crates/domain/or-world-gta6/src/day/wind_tests.rs diff --git a/crates/domain/or-world-gta6/src/lib.rs b/crates/domain/or-world-gta6/src/lib.rs index e3d3f1c67..fff6c037e 100644 --- a/crates/domain/or-world-gta6/src/lib.rs +++ b/crates/domain/or-world-gta6/src/lib.rs @@ -1,8 +1,10 @@ //! GTA VI's world behind the world contract: the index of an install with its kept file, mount //! binding, scan and states, the maps streamed in around a camera with what of them draws, their -//! interiors and occluders, and a model's material record. +//! interiors and occluders, a model's material record, and the day's atmosphere, ephemeris, +//! exposure, clouds, weather and wind. pub mod ambient; +pub mod day; pub mod edit; pub mod find; pub mod index; diff --git a/crates/domain/or-world/tests/the_core_names_no_game.rs b/crates/domain/or-world/tests/the_core_names_no_game.rs index ea41707ea..034862352 100644 --- a/crates/domain/or-world/tests/the_core_names_no_game.rs +++ b/crates/domain/or-world/tests/the_core_names_no_game.rs @@ -381,6 +381,6 @@ fn the_forest_takes_how_a_parent_waits_from_the_policy() { "the forest states one title's rule as a constructor of its own again" ); // The one driver outside the core states its title's rule by the same policy value. - let outside = read("crates/domain/or-world-gta5/src/world_forest.rs"); + let outside = read("crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs"); assert!(outside.contains("Forest::waiting_for(Children::Stated)")); } diff --git a/crates/foundation/or-test-support/tests/no_test_leaves_a_folder_in_the_temporary_folder.rs b/crates/foundation/or-test-support/tests/no_test_leaves_a_folder_in_the_temporary_folder.rs index fae91702e..7d7382d13 100644 --- a/crates/foundation/or-test-support/tests/no_test_leaves_a_folder_in_the_temporary_folder.rs +++ b/crates/foundation/or-test-support/tests/no_test_leaves_a_folder_in_the_temporary_folder.rs @@ -30,7 +30,7 @@ const ALLOWED: &[(&str, &str)] = &[ "the folder a served run names for its scratch, which the run removes when it ends", ), ( - "src/state/game_pack.rs", + "src/state/game_pack/mod.rs", "where the game pack goes when the platform has no configuration folder", ), ( diff --git a/crates/io/or-io/src/codec/anim.rs b/crates/io/or-io/src/codec/anim/mod.rs similarity index 100% rename from crates/io/or-io/src/codec/anim.rs rename to crates/io/or-io/src/codec/anim/mod.rs diff --git a/crates/io/or-io/src/container/rpf/mod.rs b/crates/io/or-io/src/container/rpf/mod.rs index 29c410992..660cf8403 100644 --- a/crates/io/or-io/src/container/rpf/mod.rs +++ b/crates/io/or-io/src/container/rpf/mod.rs @@ -3,54 +3,12 @@ pub mod builder; pub mod crypto; pub mod defrag; pub mod entry; -#[cfg(feature = "gta6")] -pub mod gta6_archive; -#[cfg(feature = "gta6")] -pub mod gta6_chunk_table; -#[cfg(feature = "gta6")] -pub mod gta6_container_write; -#[cfg(feature = "gta6")] -pub mod gta6_content; -#[cfg(feature = "gta6")] -pub mod gta6_dependencies; -#[cfg(feature = "gta6")] -pub mod gta6_extract; -#[cfg(feature = "gta6")] -pub mod gta6_form_h; -#[cfg(feature = "gta6")] -pub mod gta6_image; -#[cfg(feature = "gta6")] -pub mod gta6_keygate; -#[cfg(feature = "gta6")] -pub mod gta6_kinds; -#[cfg(feature = "gta6")] -pub mod gta6_mount; -#[cfg(feature = "gta6")] -pub mod gta6_navigation_rows; -#[cfg(feature = "gta6")] -pub mod gta6_patch; -#[cfg(feature = "gta6")] -pub mod gta6_rpf; -#[cfg(feature = "gta6")] -pub mod gta6_strings; -#[cfg(feature = "gta6")] -pub mod gta6_write; pub mod header; mod layout; mod lzb16; pub mod oodle; mod reader; pub mod rpf9; -#[cfg(feature = "gta6")] -mod rpf9_first_entry; -#[cfg(feature = "gta6")] -pub mod rpf9_grow; -#[cfg(feature = "gta6")] -pub mod rpf9_scan; -#[cfg(feature = "gta6")] -pub mod rpf9_toc; -#[cfg(feature = "gta6")] -pub mod rpf9_write; pub mod rsc8; pub mod version; @@ -93,65 +51,70 @@ pub use entry::{ Compressor, FiPackEntry, FiPackEntryDirectory, FiPackEntryFile, FiPackEntryResource, FiPackEntryU, RpfBinaryEntry, RpfDirectoryEntry, RpfEntry, RpfEntryKind, RpfResourceEntry, }; +pub use header::{ + FiPackHeader, RpfEncryption, RpfHeader, RPF7_MAGIC, RPF_AES_MAGIC, RPF_DIRECTORY_OFFSET_MARKER, + RPF_FILE_ALIGNMENT, RPF_FILE_ALIGNMENT_SHIFT, RPF_MAX_RESOURCE_CONSUMED_SIZE, + RPF_NAME_OFFSET_MAX_SHIFT, RPF_NG_MAGIC, RPF_OPEN_MAGIC, RPF_TRAILING_PAD, +}; +pub use reader::BodyForm; #[cfg(feature = "gta6")] -pub use gta6_archive::{ +pub use rpf9::gta6_archive::{ Gta6Archive, Gta6Cipher, Gta6Entry, Gta6EntryExtra, Gta6NestedRow, NameResolver, GROUP_CHUNK_RECORD, GROUP_CIPHER, GROUP_CONTENT_HASH, GROUP_ENTRY_ROW, GROUP_ENTRY_ROW_20, GROUP_NAME32, GROUP_NAME64, }; #[cfg(feature = "gta6")] -pub use gta6_container_write::{Rpf9ArchiveWriter, Rpf9Piece, Rpf9Plan}; +pub use rpf9::gta6_container_write::{Rpf9ArchiveWriter, Rpf9Piece, Rpf9Plan}; #[cfg(feature = "gta6")] -pub use gta6_keygate::{decode_masked, encode_masked, gate_key, is_masked, MASKED_MAGIC}; +pub use rpf9::gta6_keygate::{decode_masked, encode_masked, gate_key, is_masked, MASKED_MAGIC}; #[cfg(feature = "gta6")] -pub use gta6_kinds::Gta6Kind; +pub use rpf9::gta6_kinds::Gta6Kind; #[cfg(feature = "gta6")] -pub use gta6_mount::{open_at, Gta6DecryptedBody, Gta6Mount}; +pub use rpf9::gta6_mount::{open_at, Gta6DecryptedBody, Gta6Mount}; #[cfg(feature = "gta6")] -pub use gta6_navigation_rows::{navigation_cell, navigation_cells, NAVIGATION_MESH}; +pub use rpf9::gta6_navigation_rows::{navigation_cell, navigation_cells, NAVIGATION_MESH}; #[cfg(feature = "gta6")] -pub use gta6_patch::{ +pub use rpf9::gta6_patch::{ plan_patch, write_patched_copy, write_planned_copy, BodyPatch, ChunkPatch, PatchPlan, PatchRefusal, PatchReport, }; #[cfg(feature = "gta6")] -pub use gta6_rpf::{ +pub use rpf9::gta6_rpf::{ debug_name_from_virtual, default_names_dir, shipped_dir, shipped_script_names_dir, substitute_platform_letter, Gta6Context, Rpf9Kind, Rpf9Place, GTA6_NAMES_ENV, GTA6_SCRIPT_NAMES_ENV, }; #[cfg(feature = "gta6")] -pub use gta6_write::{Rpf9Builder, Rpf9CipherCore}; -pub use header::{ - FiPackHeader, RpfEncryption, RpfHeader, RPF7_MAGIC, RPF_AES_MAGIC, RPF_DIRECTORY_OFFSET_MARKER, - RPF_FILE_ALIGNMENT, RPF_FILE_ALIGNMENT_SHIFT, RPF_MAX_RESOURCE_CONSUMED_SIZE, - RPF_NAME_OFFSET_MAX_SHIFT, RPF_NG_MAGIC, RPF_OPEN_MAGIC, RPF_TRAILING_PAD, -}; -pub use reader::BodyForm; -pub use rpf9::RPF9_MAGIC; -#[cfg(feature = "gta6")] -pub use rpf9::{rpf9_platform_of, Rpf9Header, RPF9_HEADER_SIZE}; +pub use rpf9::gta6_write::{Rpf9Builder, Rpf9CipherCore}; #[cfg(feature = "gta6")] -pub use rpf9_first_entry::rpf9_first_entry_end; +pub use rpf9::rpf9_grow::{grow_section, Rpf9GrowError, Rpf9Section}; #[cfg(feature = "gta6")] -pub use rpf9_grow::{grow_section, Rpf9GrowError, Rpf9Section}; +pub use rpf9::rpf9_scan::EMPTY_ARCHIVE_PLACEHOLDER; #[cfg(feature = "gta6")] -pub use rpf9_scan::EMPTY_ARCHIVE_PLACEHOLDER; -#[cfg(feature = "gta6")] -pub use rpf9_scan::{ +pub use rpf9::rpf9_scan::{ extract_rpf9_body, read_rpf9_body, seal_rpf9_scan, starts_stored_rpf9_resource, unseal_rpf9_scan, Rpf9Block, Rpf9BodyKind, Rpf9BodyReader, Rpf9Content, Rpf9Family, Rpf9Resource, Rpf9Role, Rpf9Scan, Rpf9ScanCarry, Rpf9ScanError, Rpf9ScanFind, Rpf9Signature, Rpf9Walk, Rpf9ZlibRun, RPF9_MISSING_RUN, RPF9_SLOT, }; #[cfg(feature = "gta6")] -pub use rpf9_scan::{rpf9_block_streams, rpf9_names_by_count_at, Rpf9NamesByCount}; +pub use rpf9::rpf9_scan::{rpf9_block_streams, rpf9_names_by_count_at, Rpf9NamesByCount}; #[cfg(feature = "gta6")] -pub use rpf9_toc::{ +pub use rpf9::rpf9_toc::{ GtaViKeys, Rpf9Group, Rpf9Toc, GTA6_EXE_ENV, GTA6_SNAPSHOT_ENV, GTA6_SNAPSHOT_FILE_NAME, }; #[cfg(feature = "gta6")] -pub use rpf9_write::write_rpf9_resource_capped; +pub use rpf9::rpf9_write::write_rpf9_resource_capped; +#[cfg(feature = "gta6")] +pub use rpf9::rpf9_write::{write_rpf9_resource, Rpf9Form, Rpf9Sections, Rpf9WriteError}; +pub use rpf9::RPF9_MAGIC; +#[cfg(feature = "gta6")] +pub use rpf9::{ + gta6_archive, gta6_chunk_table, gta6_container_write, gta6_content, gta6_dependencies, + gta6_extract, gta6_form_h, gta6_image, gta6_keygate, gta6_kinds, gta6_mount, + gta6_navigation_rows, gta6_patch, gta6_rpf, gta6_strings, gta6_write, rpf9_grow, rpf9_scan, + rpf9_toc, rpf9_write, +}; #[cfg(feature = "gta6")] -pub use rpf9_write::{write_rpf9_resource, Rpf9Form, Rpf9Sections, Rpf9WriteError}; +pub use rpf9::{rpf9_first_entry_end, rpf9_platform_of, Rpf9Header, RPF9_HEADER_SIZE}; pub use version::RpfVersion; diff --git a/crates/io/or-io/src/container/rpf/gta6_archive.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_archive.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/gta6_archive.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_archive.rs index 5fe5768c2..5eec9ae48 100644 --- a/crates/io/or-io/src/container/rpf/gta6_archive.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/gta6_archive.rs @@ -539,14 +539,16 @@ impl NameResolver { resolver } - /// Shared words supplemented by `dir`, or the folder [`super::GTA6_NAMES_ENV`] names. + /// Shared words supplemented by `dir`, or the folder [`super::gta6_rpf::GTA6_NAMES_ENV`] names. pub fn load_with_defaults(dir: Option<&Path>) -> Self { Self::load_with_sources(dir, None) } /// Loads external names, then the local cache and vocabulary, then the shared word candidates. pub fn load_with_sources(dir: Option<&Path>, local: Option<&Path>) -> Self { - let external = dir.map(Path::to_path_buf).or_else(super::default_names_dir); + let external = dir + .map(Path::to_path_buf) + .or_else(super::gta6_rpf::default_names_dir); let mut names = external.as_deref().map(Self::load).unwrap_or_default(); if let Some(local) = local { match cache::read_cache(local) { diff --git a/crates/io/or-io/src/container/rpf/gta6_archive_tests.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_archive_tests.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_archive_tests.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_archive_tests.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_chunk_table.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_chunk_table.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_chunk_table.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_chunk_table.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_container_build.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_container_build.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/gta6_container_build.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_container_build.rs index baf0ac09e..798d52dbb 100644 --- a/crates/io/or-io/src/container/rpf/gta6_container_build.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/gta6_container_build.rs @@ -16,7 +16,7 @@ use super::super::gta6_archive::{ GROUP_NAME64, }; use super::super::gta6_chunk_table::{author, Table as ChunkTable}; -use super::super::rpf9::RPF9_MAGIC; +use super::super::RPF9_MAGIC; use super::table::{Column, Table}; use super::ROW20_CHUNK_MODE; use super::{bad, headerless, push, round16, stored_chunked, Rpf9NewBody, Rpf9Piece, Rpf9Plan}; diff --git a/crates/io/or-io/src/container/rpf/gta6_container_deps.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_container_deps.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_container_deps.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_container_deps.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_container_table.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_container_table.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_container_table.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_container_table.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_container_write.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_container_write.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_container_write.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_container_write.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_container_write_tests.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_container_write_tests.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_container_write_tests.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_container_write_tests.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_content.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_content.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_content.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_content.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_dependencies.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_dependencies.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_dependencies.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_dependencies.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_dependencies_tests.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_dependencies_tests.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_dependencies_tests.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_dependencies_tests.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_extract.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_extract.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_extract.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_extract.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_form_h.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_form_h.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_form_h.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_form_h.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_image.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_image.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_image.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_image.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_keygate.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_keygate.rs similarity index 98% rename from crates/io/or-io/src/container/rpf/gta6_keygate.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_keygate.rs index 0ef88dfe6..b08b394c2 100644 --- a/crates/io/or-io/src/container/rpf/gta6_keygate.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/gta6_keygate.rs @@ -18,12 +18,12 @@ use crate::error::{Error, Result}; /// The masked snapshot for an Xbox build that `bundled-keys` embeds: inert until the user's own /// executable keys it (D18). #[cfg(feature = "bundled-keys")] -pub const BUNDLED_SNAPSHOT: &[u8] = include_bytes!("../../../data/gtavi_xboxsx_magic.dat"); +pub const BUNDLED_SNAPSHOT: &[u8] = include_bytes!("../../../../data/gtavi_xboxsx_magic.dat"); /// The masked snapshot for a PlayStation 5 build that `bundled-keys` embeds, the same rule as /// [`BUNDLED_SNAPSHOT`]'s. #[cfg(feature = "bundled-keys")] -pub const BUNDLED_PS5_SNAPSHOT: &[u8] = include_bytes!("../../../data/gtavi_ps5_magic.dat"); +pub const BUNDLED_PS5_SNAPSHOT: &[u8] = include_bytes!("../../../../data/gtavi_ps5_magic.dat"); /// The marker a masked snapshot opens with; a container that begins with it needs the executable. pub const MASKED_MAGIC: &[u8; 8] = b"ORGTAVIM"; diff --git a/crates/io/or-io/src/container/rpf/gta6_kinds.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_kinds.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_kinds.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_kinds.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_mount.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_mount.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/gta6_mount.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_mount.rs index 69b5b5fdb..bb635cf85 100644 --- a/crates/io/or-io/src/container/rpf/gta6_mount.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/gta6_mount.rs @@ -14,9 +14,9 @@ use crate::bytes::le; use super::gta6_archive::{Gta6Archive, Gta6Entry}; use super::gta6_chunk_table::Chunk; -use super::rpf9::{Rpf9Header, RPF9_HEADER_SIZE, RPF9_MAGIC}; use super::rpf9_scan::read_rpf9_body; use super::rpf9_toc::GtaViKeys; +use super::{Rpf9Header, RPF9_HEADER_SIZE, RPF9_MAGIC}; use crate::error::{Error, Result}; /// The content cipher type (type 17): an entry whose cipher record states it has a CTR-enciphered body diff --git a/crates/io/or-io/src/container/rpf/gta6_name_cache.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_name_cache.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_name_cache.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_name_cache.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_name_cache_tests.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_name_cache_tests.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_name_cache_tests.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_name_cache_tests.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_navigation_rows.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_navigation_rows.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_navigation_rows.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_navigation_rows.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_patch.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_patch.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/gta6_patch.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_patch.rs index c0bfb851c..29ddb0bc7 100644 --- a/crates/io/or-io/src/container/rpf/gta6_patch.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/gta6_patch.rs @@ -17,8 +17,8 @@ use super::gta6_archive::Gta6Entry; use super::gta6_chunk_table::{entry_chunks, Chunk}; use super::gta6_content::{decrypt_extent, framing_reject_reason}; use super::gta6_mount::{open_at, Gta6Mount}; -use super::rpf9::{Rpf9Header, RPF9_HEADER_SIZE}; use super::rpf9_toc::GtaViKeys; +use super::{Rpf9Header, RPF9_HEADER_SIZE}; use crate::error::Error; /// The content cipher type the reader opens; a body under any other is not re-enciphered. diff --git a/crates/io/or-io/src/container/rpf/gta6_patch_tests.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_patch_tests.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_patch_tests.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_patch_tests.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_rpf.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_rpf.rs similarity index 97% rename from crates/io/or-io/src/container/rpf/gta6_rpf.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_rpf.rs index 81b0d3ae3..66753cdcd 100644 --- a/crates/io/or-io/src/container/rpf/gta6_rpf.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/gta6_rpf.rs @@ -11,14 +11,14 @@ use std::io::{self, Cursor, Read, Seek, SeekFrom}; use std::path::{Path, PathBuf}; use std::sync::{Arc, OnceLock}; -use super::archive::{RpfArchive, RpfBackend, RpfSource}; -use super::crypto::{CryptoTarget, RpfCryptoProvider, TocDecryptOutcome}; -use super::entry::{Compressor, RpfBinaryEntry, RpfDirectoryEntry, RpfEntry}; +use super::super::archive::{RpfArchive, RpfBackend, RpfSource}; +use super::super::crypto::{CryptoTarget, RpfCryptoProvider, TocDecryptOutcome}; +use super::super::entry::{Compressor, RpfBinaryEntry, RpfDirectoryEntry, RpfEntry}; +use super::super::header::{RpfEncryption, RpfHeader}; +use super::super::layout::{Input, Toc}; +use super::super::reader::{read_at, BodyForm}; use super::gta6_archive::{Gta6Entry, NameResolver}; use super::gta6_mount::{open_at, Gta6Mount}; -use super::header::{RpfEncryption, RpfHeader}; -use super::layout::{Input, Toc}; -use super::reader::{read_at, BodyForm}; use super::rpf9_scan::RPF9_SLOT; use super::rpf9_toc::GtaViKeys; use crate::error::{Error, Result}; @@ -258,7 +258,7 @@ fn row_kind(entry: &Gta6Entry, type_code: Option, archive: bool) -> Option< } /// An opened RPF9's decrypted table and what its bodies are read with. -pub(super) struct Rpf9State { +pub(in crate::container::rpf) struct Rpf9State { mount: Gta6Mount, context: Arc, /// For each entry of the tree, its leaf; `u32::MAX` for a folder. @@ -269,7 +269,7 @@ pub(super) struct Rpf9State { } /// Read an RPF9's table into a tree of entries, with the state its bodies are read through. -pub(super) fn read(input: &Input) -> Result<(Toc, Rpf9State)> { +pub(in crate::container::rpf) fn read(input: &Input) -> Result<(Toc, Rpf9State)> { // The keys and names travel with the open: the provider carries the session, or there is none. let context = input.crypto.gta6_session().ok_or(Error::Rpf9TocEncrypted)?; let mut src = bytes_of(input.source)?; @@ -492,7 +492,11 @@ impl RpfArchive { } /// An RPF9 entry's body: deciphered and inflated, deciphered only, or as the archive holds it. - pub(super) fn rpf9_form(&self, entry_index: u32, form: BodyForm) -> Result> { + pub(in crate::container::rpf) fn rpf9_form( + &self, + entry_index: u32, + form: BodyForm, + ) -> Result> { let (state, leaf, entry) = self.rpf9_leaf(entry_index)?; let keys = &state.context.keys; match form { @@ -524,7 +528,10 @@ impl RpfArchive { } /// The RPF9 nested as file `entry_index` of this one, which reads through it. - pub(super) fn rpf9_nested(self: &Arc, entry_index: u32) -> Result { + pub(in crate::container::rpf) fn rpf9_nested( + self: &Arc, + entry_index: u32, + ) -> Result { let (_, leaf, _) = self.rpf9_leaf(entry_index)?; let offset = (leaf.offset.filter(|_| leaf.archive)).ok_or_else(|| Error::RpfBadEntry { message: format!("entry {entry_index} is not a nested archive"), @@ -628,7 +635,7 @@ pub mod row; #[cfg(test)] mod tests { - use super::super::reader::build_tree; + use super::super::super::reader::build_tree; use super::*; fn entry(index: u32, name: Option<&str>, class: u8) -> Gta6Entry { diff --git a/crates/io/or-io/src/container/rpf/gta6_rpf_row.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_rpf_row.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_rpf_row.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_rpf_row.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_strings.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_strings.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/gta6_strings.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_strings.rs diff --git a/crates/io/or-io/src/container/rpf/gta6_write.rs b/crates/io/or-io/src/container/rpf/rpf9/gta6_write.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/gta6_write.rs rename to crates/io/or-io/src/container/rpf/rpf9/gta6_write.rs index 6708774f8..1ffd254a5 100644 --- a/crates/io/or-io/src/container/rpf/gta6_write.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/gta6_write.rs @@ -18,8 +18,8 @@ use std::collections::HashMap; use crate::bytes::le; -use super::rpf9::Rpf9Header; use super::rpf9_toc::{GtaViKeys, Rpf9Toc}; +use super::Rpf9Header; use crate::error::{Error, Result}; /// The four output lanes of one T-box round and the input state bytes each consumes. `GROUPS[j]` diff --git a/crates/io/or-io/src/container/rpf/rpf9.rs b/crates/io/or-io/src/container/rpf/rpf9/mod.rs similarity index 93% rename from crates/io/or-io/src/container/rpf/rpf9.rs rename to crates/io/or-io/src/container/rpf/rpf9/mod.rs index af5410187..b197b6014 100644 --- a/crates/io/or-io/src/container/rpf/rpf9.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/mod.rs @@ -1,6 +1,52 @@ //! The header of RPF9, GTA VI's archive generation: 64 bytes in the clear, which state the platform //! the archive was built for, before an enciphered table of contents and names blob. +#[cfg(feature = "gta6")] +pub mod gta6_archive; +#[cfg(feature = "gta6")] +pub mod gta6_chunk_table; +#[cfg(feature = "gta6")] +pub mod gta6_container_write; +#[cfg(feature = "gta6")] +pub mod gta6_content; +#[cfg(feature = "gta6")] +pub mod gta6_dependencies; +#[cfg(feature = "gta6")] +pub mod gta6_extract; +#[cfg(feature = "gta6")] +pub mod gta6_form_h; +#[cfg(feature = "gta6")] +pub mod gta6_image; +#[cfg(feature = "gta6")] +pub mod gta6_keygate; +#[cfg(feature = "gta6")] +pub mod gta6_kinds; +#[cfg(feature = "gta6")] +pub mod gta6_mount; +#[cfg(feature = "gta6")] +pub mod gta6_navigation_rows; +#[cfg(feature = "gta6")] +pub mod gta6_patch; +#[cfg(feature = "gta6")] +pub mod gta6_rpf; +#[cfg(feature = "gta6")] +pub mod gta6_strings; +#[cfg(feature = "gta6")] +pub mod gta6_write; +#[cfg(feature = "gta6")] +mod rpf9_first_entry; +#[cfg(feature = "gta6")] +pub mod rpf9_grow; +#[cfg(feature = "gta6")] +pub mod rpf9_scan; +#[cfg(feature = "gta6")] +pub mod rpf9_toc; +#[cfg(feature = "gta6")] +pub mod rpf9_write; + +#[cfg(feature = "gta6")] +pub use rpf9_first_entry::rpf9_first_entry_end; + #[cfg(feature = "gta6")] use crate::bytes::le; diff --git a/crates/io/or-io/src/container/rpf/rpf9_first_entry.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_first_entry.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_first_entry.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_first_entry.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_grow.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_grow.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_grow.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_grow.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/kept.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/kept.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/kept.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/kept.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/mod.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/rpf9_scan.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/mod.rs index e25a03d05..8dc74d4eb 100644 --- a/crates/io/or-io/src/container/rpf/rpf9_scan.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/mod.rs @@ -10,8 +10,8 @@ use std::ops::Range; use crate::bytes::{be, le}; use flate2::{Decompress, FlushDecompress, Status}; -use super::rpf9::{Rpf9Header, RPF9_HEADER_SIZE, RPF9_MAGIC}; -use super::version::RSC8_MAGIC; +use super::super::version::RSC8_MAGIC; +use super::{Rpf9Header, RPF9_HEADER_SIZE, RPF9_MAGIC}; #[cfg(feature = "awc")] use crate::awc::{stream_table_offset, AwcChunkKind, AwcFile, AwcKey, AWC_MAGIC_LE}; use crate::gta6::platform::ScanStrategy; diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/names_by_count.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/names_by_count.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/names_by_count.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/names_by_count.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/raw_deflate.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/raw_deflate.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/raw_deflate.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/raw_deflate.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/stored.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/stored.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/stored.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/stored.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/stored_names.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/stored_names.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/stored_names.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/stored_names.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/tests/counted.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/counted.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/tests/counted.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/counted.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/tests/raw_streams.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/raw_streams.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/tests/raw_streams.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/raw_streams.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/tests/recount.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/recount.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/tests/recount.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/recount.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_scan/tests/stored.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/stored.rs similarity index 100% rename from crates/io/or-io/src/container/rpf/rpf9_scan/tests/stored.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/stored.rs diff --git a/crates/io/or-io/src/container/rpf/rpf9_toc.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_toc.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/rpf9_toc.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_toc.rs index a461cabac..1d75feefe 100644 --- a/crates/io/or-io/src/container/rpf/rpf9_toc.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/rpf9_toc.rs @@ -20,7 +20,7 @@ use crate::bytes::{be, le}; use super::gta6_extract; use super::gta6_keygate; use super::gta6_strings::StringCipher; -use super::rpf9::Rpf9Header; +use super::Rpf9Header; use crate::error::{Error, Result}; /// The environment variable that names a user's GTA VI key snapshot. diff --git a/crates/io/or-io/src/container/rpf/rpf9_write.rs b/crates/io/or-io/src/container/rpf/rpf9/rpf9_write.rs similarity index 99% rename from crates/io/or-io/src/container/rpf/rpf9_write.rs rename to crates/io/or-io/src/container/rpf/rpf9/rpf9_write.rs index 6681c5a18..804163e32 100644 --- a/crates/io/or-io/src/container/rpf/rpf9_write.rs +++ b/crates/io/or-io/src/container/rpf/rpf9/rpf9_write.rs @@ -10,10 +10,10 @@ use crate::bytes::le; use flate2::write::ZlibEncoder; use flate2::Compression; +use super::super::version::RSC8_MAGIC; use super::rpf9_scan::{ Rpf9BodyKind, Rpf9ScanFind, Rpf9ZlibRun, RPF9_SLOT, STREAM_CAP, STREAM_CAPS, }; -use super::version::RSC8_MAGIC; /// A section is cut into a head of whole pieces and a tail of the rest. const PIECE: usize = 0x1_0000; diff --git a/crates/io/or-io/src/gta5/bounds.rs b/crates/io/or-io/src/gta5/bounds/mod.rs similarity index 100% rename from crates/io/or-io/src/gta5/bounds.rs rename to crates/io/or-io/src/gta5/bounds/mod.rs diff --git a/crates/io/or-io/src/gta5/data/timecycle.rs b/crates/io/or-io/src/gta5/data/timecycle/mod.rs similarity index 100% rename from crates/io/or-io/src/gta5/data/timecycle.rs rename to crates/io/or-io/src/gta5/data/timecycle/mod.rs diff --git a/crates/io/or-io/src/gta5/data/water.rs b/crates/io/or-io/src/gta5/data/water/mod.rs similarity index 100% rename from crates/io/or-io/src/gta5/data/water.rs rename to crates/io/or-io/src/gta5/data/water/mod.rs diff --git a/crates/io/or-io/src/gta5/fragment.rs b/crates/io/or-io/src/gta5/fragment/mod.rs similarity index 100% rename from crates/io/or-io/src/gta5/fragment.rs rename to crates/io/or-io/src/gta5/fragment/mod.rs diff --git a/crates/io/or-io/src/gta6/anim_tests.rs b/crates/io/or-io/src/gta6/anim/anim_tests.rs similarity index 98% rename from crates/io/or-io/src/gta6/anim_tests.rs rename to crates/io/or-io/src/gta6/anim/anim_tests.rs index cae6fa7c6..653435d1a 100644 --- a/crates/io/or-io/src/gta6/anim_tests.rs +++ b/crates/io/or-io/src/gta6/anim/anim_tests.rs @@ -896,23 +896,23 @@ fn motion_at(bytes: &[u8], name: &str) -> usize { } pointer_at(bytes, entry + 8) } -#[path = "anim/clip_signature_tests.rs"] +#[path = "clip_signature_tests.rs"] mod clip_signature; -#[path = "anim/clip_signature_build_tests.rs"] +#[path = "clip_signature_build_tests.rs"] mod clip_signature_build; -#[path = "anim/motion_loop_tests.rs"] +#[path = "motion_loop_tests.rs"] mod motion_loop; -#[path = "anim/write_tests.rs"] +#[path = "write_tests.rs"] mod write; -#[path = "anim/write_derived_and_grown_tests.rs"] +#[path = "write_derived_and_grown_tests.rs"] mod write_derived_and_grown; -#[path = "anim/write_edit_tests.rs"] +#[path = "write_edit_tests.rs"] mod write_edit; -#[path = "anim/write_in_extent_tests.rs"] +#[path = "write_in_extent_tests.rs"] mod write_in_extent; -#[path = "anim/write_mapped_tests.rs"] +#[path = "write_mapped_tests.rs"] mod write_mapped; -#[path = "anim/write_relayout_tests.rs"] +#[path = "write_relayout_tests.rs"] mod write_relayout; -#[path = "anim/write_replace_tests.rs"] +#[path = "write_replace_tests.rs"] mod write_replace; diff --git a/crates/io/or-io/src/gta6/anim.rs b/crates/io/or-io/src/gta6/anim/mod.rs similarity index 100% rename from crates/io/or-io/src/gta6/anim.rs rename to crates/io/or-io/src/gta6/anim/mod.rs diff --git a/crates/io/or-io/src/gta6/bcpack.rs b/crates/io/or-io/src/gta6/bcpack/mod.rs similarity index 100% rename from crates/io/or-io/src/gta6/bcpack.rs rename to crates/io/or-io/src/gta6/bcpack/mod.rs diff --git a/crates/io/or-io/src/gta6/headerless/write_geometry.rs b/crates/io/or-io/src/gta6/headerless/write_geometry/mod.rs similarity index 100% rename from crates/io/or-io/src/gta6/headerless/write_geometry.rs rename to crates/io/or-io/src/gta6/headerless/write_geometry/mod.rs diff --git a/crates/io/or-io/src/gta6/script/project.rs b/crates/io/or-io/src/gta6/script/project/mod.rs similarity index 100% rename from crates/io/or-io/src/gta6/script/project.rs rename to crates/io/or-io/src/gta6/script/project/mod.rs diff --git a/crates/io/or-io/src/gta6/script/project_tests.rs b/crates/io/or-io/src/gta6/script/project/project_tests.rs similarity index 100% rename from crates/io/or-io/src/gta6/script/project_tests.rs rename to crates/io/or-io/src/gta6/script/project/project_tests.rs diff --git a/crates/io/or-io/src/meta/typed.rs b/crates/io/or-io/src/meta/typed/mod.rs similarity index 100% rename from crates/io/or-io/src/meta/typed.rs rename to crates/io/or-io/src/meta/typed/mod.rs diff --git a/crates/io/or-io/src/rel.rs b/crates/io/or-io/src/rel/mod.rs similarity index 100% rename from crates/io/or-io/src/rel.rs rename to crates/io/or-io/src/rel/mod.rs diff --git a/crates/io/or-io/tests/the_key_snapshot_is_in_the_tree_once.rs b/crates/io/or-io/tests/the_key_snapshot_is_in_the_tree_once.rs index 623f91479..0839210f2 100644 --- a/crates/io/or-io/tests/the_key_snapshot_is_in_the_tree_once.rs +++ b/crates/io/or-io/tests/the_key_snapshot_is_in_the_tree_once.rs @@ -24,14 +24,14 @@ const SNAPSHOTS: [Snapshot; 4] = [ Snapshot { file: "gtavi_xboxsx_magic.dat", bundled: "crates/io/or-io/data/gtavi_xboxsx_magic.dat", - embed: "crates/io/or-io/src/container/rpf/gta6_keygate.rs", + embed: "crates/io/or-io/src/container/rpf/rpf9/gta6_keygate.rs", sha1: "8c488ed36ce5e49874a2dfac873b7248d71568a1", len: 144_248, }, Snapshot { file: "gtavi_ps5_magic.dat", bundled: "crates/io/or-io/data/gtavi_ps5_magic.dat", - embed: "crates/io/or-io/src/container/rpf/gta6_keygate.rs", + embed: "crates/io/or-io/src/container/rpf/rpf9/gta6_keygate.rs", sha1: "5681c8fa6d48b277a02da03cc2349cfb89281f0d", len: 144_260, }, diff --git a/crates/io/or-media/src/opus.rs b/crates/io/or-media/src/opus/mod.rs similarity index 100% rename from crates/io/or-media/src/opus.rs rename to crates/io/or-media/src/opus/mod.rs diff --git a/crates/io/or-media/src/replace.rs b/crates/io/or-media/src/replace/mod.rs similarity index 100% rename from crates/io/or-media/src/replace.rs rename to crates/io/or-media/src/replace/mod.rs diff --git a/crates/runtime/or-renderer/src/game_shaders.rs b/crates/runtime/or-renderer/src/game_shaders.rs new file mode 100644 index 000000000..ec2aed526 --- /dev/null +++ b/crates/runtime/or-renderer/src/game_shaders.rs @@ -0,0 +1,21 @@ +//! The game's own shaders as `naga` modules, built into pipelines: linking the stages of a pass, and the layout a vertex stage's inputs and a pixel stage's outputs ask for. + +pub mod core; +pub mod geometry; +pub mod lighting; +pub mod post; +pub mod trace; + +pub(crate) use core::kept_dx12; +pub use core::{ + bindings, constants, engine, frame, link, mips, pack, pipeline, quad, samplers, screen, + stand_in, states, targets, +}; +#[cfg(test)] +pub(crate) use core::{synthetic, test_pack}; +pub use geometry::{drawable, effect_pass, fed, gta5, mesh, meshlets, model, sprite, store, trail}; +pub use lighting::{ + ambient, capsule_lights, coronas, deferred, distant_lights, dome, fog_volumes, light_volumes, + point_lights, shadow, sky, spot_lights, water, +}; +pub use post::{antialias, bloom, depth_fog, meter, resolve, tone}; diff --git a/crates/runtime/or-renderer/src/game_shaders/core.rs b/crates/runtime/or-renderer/src/game_shaders/core.rs new file mode 100644 index 000000000..cf1e296dc --- /dev/null +++ b/crates/runtime/or-renderer/src/game_shaders/core.rs @@ -0,0 +1,22 @@ +//! Shared infrastructure for the game's shader passes: packs, reflection, pipeline building, render states, constant buffers, targets, and helpers. + +pub mod bindings; +pub mod constants; +pub mod engine; +pub mod frame; +pub(crate) mod kept_dx12; +pub mod link; +pub mod mips; +pub mod pack; +pub mod pipeline; +pub mod quad; +pub mod samplers; +pub mod screen; +pub mod stand_in; +pub mod states; +pub mod targets; + +#[cfg(test)] +pub(crate) mod synthetic; +#[cfg(test)] +pub(crate) mod test_pack; diff --git a/crates/runtime/or-renderer/src/game_shaders/bindings.rs b/crates/runtime/or-renderer/src/game_shaders/core/bindings.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/bindings.rs rename to crates/runtime/or-renderer/src/game_shaders/core/bindings.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/bindings/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/bindings/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/bindings/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/bindings/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/constants.rs b/crates/runtime/or-renderer/src/game_shaders/core/constants.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/constants.rs rename to crates/runtime/or-renderer/src/game_shaders/core/constants.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/constants/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/constants/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/constants/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/constants/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/engine.rs b/crates/runtime/or-renderer/src/game_shaders/core/engine.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/engine.rs rename to crates/runtime/or-renderer/src/game_shaders/core/engine.rs index 60ea2b3ad..c83a25ec1 100644 --- a/crates/runtime/or-renderer/src/game_shaders/engine.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/engine.rs @@ -5,8 +5,8 @@ use std::collections::BTreeMap; use glam::{Mat4, Vec3, Vec4}; use or_io::gta5::shaders::spirv_pack::ConstantBuffer; -use super::constants::Filler; -use super::lighting::Lighting; +use crate::game_shaders::constants::Filler; +use crate::game_shaders::lighting::Lighting; /// A scene as the shared constant buffers see it: the camera, and either the light of a moment of the day or one sun and a flat ambient light. /// @@ -63,7 +63,7 @@ pub(crate) fn columns(m: Mat4) -> Vec { m.to_cols_array().to_vec() } -use super::mesh::BONES; +use crate::game_shaders::mesh::BONES; /// The bone matrices of a skeleton at rest: each is three registers, the rows of the identity. fn identity_bones() -> Vec { diff --git a/crates/runtime/or-renderer/src/game_shaders/engine/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/engine/tests.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/engine/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/engine/tests.rs index 9ebbb81f2..8d0ccc27a 100644 --- a/crates/runtime/or-renderer/src/game_shaders/engine/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/engine/tests.rs @@ -54,7 +54,7 @@ fn a_cut_out_surface_is_discarded_below_the_engines_alpha_references() { // ⚠ This holds the code to the feed notes, not to the game: the numbers are worked out here from the notes' rule. #[test] fn a_frame_fed_the_clock_states_the_timer_and_the_suns_rows_and_a_drawable_alone_keeps_its_own() { - use super::super::deferred::{lighting_values, Screen}; + use crate::game_shaders::deferred::{lighting_values, Screen}; let screen = Screen { width: 64, height: 64, diff --git a/crates/runtime/or-renderer/src/game_shaders/frame.rs b/crates/runtime/or-renderer/src/game_shaders/core/frame.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/frame.rs rename to crates/runtime/or-renderer/src/game_shaders/core/frame.rs index dd38b866e..acbca4f3c 100644 --- a/crates/runtime/or-renderer/src/game_shaders/frame.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/frame.rs @@ -4,7 +4,7 @@ use std::collections::BTreeMap; use wgpu::util::DeviceExt as _; -use super::pipeline::PassPipeline; +use crate::game_shaders::pipeline::PassPipeline; use crate::recorder::Noted; /// What a pass wrote to its first colour target. diff --git a/crates/runtime/or-renderer/src/game_shaders/frame/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/frame/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/frame/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/frame/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/kept_dx12.rs b/crates/runtime/or-renderer/src/game_shaders/core/kept_dx12.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/kept_dx12.rs rename to crates/runtime/or-renderer/src/game_shaders/core/kept_dx12.rs index 5151a567b..a09756843 100644 --- a/crates/runtime/or-renderer/src/game_shaders/kept_dx12.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/kept_dx12.rs @@ -13,8 +13,8 @@ use naga::back::hlsl; use naga::ShaderStage; use sha1::{Digest, Sha1}; -use super::bindings::{arrayed, BindingError}; -use super::pipeline::{entry_of, PipelineError}; +use crate::game_shaders::bindings::{arrayed, BindingError}; +use crate::game_shaders::pipeline::{entry_of, PipelineError}; /// Why writing HLSL or compiling DXIL for the Direct3D 12 stage cache failed. #[derive(Debug, thiserror::Error)] @@ -46,7 +46,7 @@ const DIGEST: usize = 20; const MOST: hlsl::ShaderModel = hlsl::ShaderModel::V6_6; /// The features a device is asked for where its adapter has them, to be handed a kept stage. -pub(super) const FEATURES: wgpu::Features = wgpu::Features::PASSTHROUGH_SHADERS; +pub(crate) const FEATURES: wgpu::Features = wgpu::Features::PASSTHROUGH_SHADERS; struct FolderState { folder: Option, @@ -119,7 +119,7 @@ thread_local! { } /// Keep the compiled stages in `folder`. -pub(super) fn keep_in(folder: PathBuf) { +pub(crate) fn keep_in(folder: PathBuf) { STATE.set(folder); } @@ -130,7 +130,7 @@ fn used_on(backend: wgpu::Backend, features: wgpu::Features) -> bool { /// The module `device` draws `module` with, one of `stages` (the vertex one, the pixel one): DXIL /// kept or compiled here under Direct3D 12, else the naga module as wgpu compiles it. -pub(super) fn shader( +pub(crate) fn shader( device: &wgpu::Device, module: &naga::Module, stages: (&naga::Module, &naga::Module), @@ -156,7 +156,7 @@ pub(super) fn shader( /// Forgets the stages this thread handed for the pass it built: where the device `refused` the /// pass and it was handed one, their files are deleted and `true` says to build it again in /// [`without`]. -pub(super) fn forget_handed(refused: bool) -> bool { +pub(crate) fn forget_handed(refused: bool) -> bool { let handed = HANDED.with(|handed| std::mem::take(&mut *handed.borrow_mut())); if !refused || handed.is_empty() { return false; @@ -173,7 +173,7 @@ pub(super) fn forget_handed(refused: bool) -> bool { /// `build` with no stage of this module; where it then builds, the device is taken to refuse /// them, in this session and the next ones, until its driver or the compiler changes. -pub(super) fn without(build: impl FnOnce() -> Result) -> Result { +pub(crate) fn without(build: impl FnOnce() -> Result) -> Result { OFF.with(|off| off.set(true)); let built = build(); OFF.with(|off| off.set(false)); @@ -580,7 +580,7 @@ fn store(file: &Path, bytes: &[u8]) { // ⚠ HLSL types a bare float literal as a double where no operand types it, so `floor(c ? 4.0 : // 3.0)` takes the double form, which DXIL has not for most of these functions, and DXC refuses // the stage. A named constant is written `static const float`. -pub(super) fn typed_literals(module: &mut naga::Module) { +pub(crate) fn typed_literals(module: &mut naga::Module) { use naga::{Expression as E, Literal, Span}; let naga::Module { types, diff --git a/crates/runtime/or-renderer/src/game_shaders/kept_dx12/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/kept_dx12/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/kept_dx12/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/kept_dx12/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/link.rs b/crates/runtime/or-renderer/src/game_shaders/core/link.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/link.rs rename to crates/runtime/or-renderer/src/game_shaders/core/link.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/link/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/link/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/link/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/link/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/mips.rs b/crates/runtime/or-renderer/src/game_shaders/core/mips.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/mips.rs rename to crates/runtime/or-renderer/src/game_shaders/core/mips.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/mips/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/mips/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/mips/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/mips/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/pack.rs b/crates/runtime/or-renderer/src/game_shaders/core/pack.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/pack.rs rename to crates/runtime/or-renderer/src/game_shaders/core/pack.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/pack/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/pack/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/pack/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/pack/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/pipeline.rs b/crates/runtime/or-renderer/src/game_shaders/core/pipeline.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/pipeline.rs rename to crates/runtime/or-renderer/src/game_shaders/core/pipeline.rs index a7c25a424..2ead56e42 100644 --- a/crates/runtime/or-renderer/src/game_shaders/pipeline.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/pipeline.rs @@ -7,8 +7,8 @@ use std::collections::BTreeMap; use naga::{Binding, BuiltIn, ScalarKind, ShaderStage, TypeInner}; use thiserror::Error; -use super::bindings::{requirements, BindingError, Requirement}; -use super::store::Matched; +use crate::game_shaders::bindings::{requirements, BindingError, Requirement}; +use crate::game_shaders::store::Matched; /// What a pass's modules cannot be built into a pipeline for. #[derive(Debug, Clone, Error, PartialEq, Eq)] diff --git a/crates/runtime/or-renderer/src/game_shaders/pipeline/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/pipeline/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/pipeline/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/pipeline/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/quad.rs b/crates/runtime/or-renderer/src/game_shaders/core/quad.rs similarity index 93% rename from crates/runtime/or-renderer/src/game_shaders/quad.rs rename to crates/runtime/or-renderer/src/game_shaders/core/quad.rs index 633bd03df..58cac2d52 100644 --- a/crates/runtime/or-renderer/src/game_shaders/quad.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/quad.rs @@ -7,14 +7,16 @@ use or_io::gta5::shaders::spirv_pack::ShaderStage; use or_io::gta5::shaders::spirv_pack::{ConstantBuffer, Pass, Program, SignatureElement}; use thiserror::Error; -use super::bindings::{Requirement, Resource}; -use super::engine::EngineConstants; -use super::frame::read_back; -pub use super::frame::Rendered; -use super::link::match_interpolation; -use super::pack::{GamePack, PackError}; -use super::pipeline::{build_pass_pipeline, entry_of, vertex_layout, PipelineDesc, PipelineError}; -use super::stand_in::{bind_groups_with, draw_vertices, Provided}; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::frame::read_back; +pub use crate::game_shaders::frame::Rendered; +use crate::game_shaders::link::match_interpolation; +use crate::game_shaders::pack::{GamePack, PackError}; +use crate::game_shaders::pipeline::{ + build_pass_pipeline, entry_of, vertex_layout, PipelineDesc, PipelineError, +}; +use crate::game_shaders::stand_in::{bind_groups_with, draw_vertices, Provided}; #[derive(Debug, Error)] pub enum QuadError { diff --git a/crates/runtime/or-renderer/src/game_shaders/quad/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/quad/tests.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/quad/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/quad/tests.rs index 872dbf715..e28575a5a 100644 --- a/crates/runtime/or-renderer/src/game_shaders/quad/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/quad/tests.rs @@ -1,7 +1,7 @@ use or_io::gta5::shaders::spirv_pack::{BindingClass, Reflection}; -use super::super::test_pack::{binding, element, gpu, variable, PackBuilder}; use super::*; +use crate::game_shaders::test_pack::{binding, element, gpu, variable, PackBuilder}; const VERTEX: &str = " struct Out { @builtin(position) position: vec4, @location(0) uv: vec2 } diff --git a/crates/runtime/or-renderer/src/game_shaders/samplers.rs b/crates/runtime/or-renderer/src/game_shaders/core/samplers.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/samplers.rs rename to crates/runtime/or-renderer/src/game_shaders/core/samplers.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/screen.rs b/crates/runtime/or-renderer/src/game_shaders/core/screen.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/screen.rs rename to crates/runtime/or-renderer/src/game_shaders/core/screen.rs index 03173c0cc..35dc2ccb8 100644 --- a/crates/runtime/or-renderer/src/game_shaders/screen.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/screen.rs @@ -7,16 +7,16 @@ use or_io::gta5::shaders::spirv_pack::{ConstantBuffer, Program, SignatureElement use thiserror::Error; use wgpu::util::DeviceExt; -use super::bindings::{Requirement, Resource}; -use super::constants::Uniform; -use super::link::match_interpolation; -use super::pack::{GamePack, PackError}; -use super::pipeline::{ +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::constants::Uniform; +use crate::game_shaders::link::match_interpolation; +use crate::game_shaders::pack::{GamePack, PackError}; +use crate::game_shaders::pipeline::{ build_pass_pipeline, entry_of, vertex_layout, vertex_streams, DrawState, PassPipeline, PipelineDesc, PipelineError, Streams, Target, }; -use super::quad::pair_of; -use super::stand_in::{bind_resources_with, Provided}; +use crate::game_shaders::quad::pair_of; +use crate::game_shaders::stand_in::{bind_resources_with, Provided}; #[derive(Debug, Error)] pub enum ScreenError { diff --git a/crates/runtime/or-renderer/src/game_shaders/screen/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/screen/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/screen/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/screen/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/stand_in.rs b/crates/runtime/or-renderer/src/game_shaders/core/stand_in.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/stand_in.rs rename to crates/runtime/or-renderer/src/game_shaders/core/stand_in.rs index 582446734..ccf34845f 100644 --- a/crates/runtime/or-renderer/src/game_shaders/stand_in.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/stand_in.rs @@ -4,9 +4,9 @@ use std::collections::BTreeMap; use wgpu::util::DeviceExt as _; -use super::bindings::{Requirement, Resource}; -use super::mips; -use super::pipeline::PassPipeline; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::mips; +use crate::game_shaders::pipeline::PassPipeline; /// The width and height of the targets a stand-in draw writes. pub const TARGET_SIZE: u32 = 4; diff --git a/crates/runtime/or-renderer/src/game_shaders/stand_in/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/stand_in/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/stand_in/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/stand_in/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/states.rs b/crates/runtime/or-renderer/src/game_shaders/core/states.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/states.rs rename to crates/runtime/or-renderer/src/game_shaders/core/states.rs index 1dbb195dd..255ea27bd 100644 --- a/crates/runtime/or-renderer/src/game_shaders/states.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/states.rs @@ -2,7 +2,7 @@ use or_io::gta5::shaders::render_state::{self as rs, sets_block, RenderState, StateBlock}; -use super::pipeline::{DrawState, Target}; +use crate::game_shaders::pipeline::{DrawState, Target}; /// Which of a pass's stated states a caller builds its pipeline from; the rest stay as the caller set them. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] diff --git a/crates/runtime/or-renderer/src/game_shaders/states/tests.rs b/crates/runtime/or-renderer/src/game_shaders/core/states/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/states/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/core/states/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/synthetic.rs b/crates/runtime/or-renderer/src/game_shaders/core/synthetic.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/synthetic.rs rename to crates/runtime/or-renderer/src/game_shaders/core/synthetic.rs index 94fc4c0f6..ce4233328 100644 --- a/crates/runtime/or-renderer/src/game_shaders/synthetic.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/synthetic.rs @@ -3,8 +3,8 @@ use or_io::gta5::shaders::spirv_pack::ShaderStage; use or_io::gta5::shaders::spirv_pack::{BindingClass, Reflection, SignatureElement}; -use super::mesh::{Coverage, Image, Material, Surface}; -use super::test_pack::{binding, element, variable, PackBuilder}; +use crate::game_shaders::mesh::{Coverage, Image, Material, Surface}; +use crate::game_shaders::test_pack::{binding, element, variable, PackBuilder}; pub(crate) const VERTEX: &str = " struct Out { @@ -477,11 +477,15 @@ pub(crate) fn sprite_pack(technique: &str, extra_input: Option<(&str, u32)>) -> }, ) .effect( - super::sprite::EFFECT, + crate::game_shaders::sprite::EFFECT, technique, &[(ShaderStage::Vertex, "vs"), (ShaderStage::Pixel, "ps")], ) - .default_of(super::sprite::EFFECT, "gSuperAlpha", &[1.0f32.to_bits(); 4]) + .default_of( + crate::game_shaders::sprite::EFFECT, + "gSuperAlpha", + &[1.0f32.to_bits(); 4], + ) .write() } @@ -551,7 +555,7 @@ pub(crate) fn trail_pack(technique: &str) -> tempfile::TempDir { }, ) .effect( - super::trail::EFFECT, + crate::game_shaders::trail::EFFECT, technique, &[(ShaderStage::Vertex, "vs"), (ShaderStage::Pixel, "ps")], ) @@ -630,7 +634,7 @@ pub(crate) fn model_pack(technique: &str, extra_input: Option<(&str, u32)>) -> t }, ) .effect( - super::model::EFFECT, + crate::game_shaders::model::EFFECT, technique, &[(ShaderStage::Vertex, "vs"), (ShaderStage::Pixel, "ps")], ) diff --git a/crates/runtime/or-renderer/src/game_shaders/targets.rs b/crates/runtime/or-renderer/src/game_shaders/core/targets.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/targets.rs rename to crates/runtime/or-renderer/src/game_shaders/core/targets.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/test_pack.rs b/crates/runtime/or-renderer/src/game_shaders/core/test_pack.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/test_pack.rs rename to crates/runtime/or-renderer/src/game_shaders/core/test_pack.rs index 23b4dafd4..f905e76cd 100644 --- a/crates/runtime/or-renderer/src/game_shaders/test_pack.rs +++ b/crates/runtime/or-renderer/src/game_shaders/core/test_pack.rs @@ -189,12 +189,12 @@ impl PackBuilder { } /// The pack baked from an install, which `OPENRAGE_GAME_PACK` names, or a recorded skip: the game's own shaders are the only thing that can say what their passes do. -pub fn real_pack(test: &str) -> Option { +pub fn real_pack(test: &str) -> Option { let Ok(root) = std::env::var("OPENRAGE_GAME_PACK") else { or_test_support::skip_install(test, format_args!("OPENRAGE_GAME_PACK names no pack")); return None; }; - Some(super::pack::GamePack::open(root).expect("the pack opens")) + Some(crate::game_shaders::pack::GamePack::open(root).expect("the pack opens")) } /// The machine's device and queue, or a recorded skip. @@ -224,10 +224,10 @@ pub fn gpu(test: &str) -> Option<(wgpu::Device, wgpu::Queue)> { pub fn draw_into( device: &wgpu::Device, queue: &wgpu::Queue, - target: &super::pipeline::Target, + target: &crate::game_shaders::pipeline::Target, size: u32, record: &mut dyn FnMut(&mut wgpu::RenderPass<'_>), -) -> super::frame::Rendered { +) -> crate::game_shaders::frame::Rendered { let attachment = |format: wgpu::TextureFormat| { device.create_texture(&wgpu::TextureDescriptor { label: None, @@ -276,5 +276,5 @@ pub fn draw_into( record(&mut pass); } queue.submit([encoder.finish()]); - super::frame::read_back(device, queue, &colour, target.colour, size) + crate::game_shaders::frame::read_back(device, queue, &colour, target.colour, size) } diff --git a/crates/runtime/or-renderer/src/game_shaders/geometry.rs b/crates/runtime/or-renderer/src/game_shaders/geometry.rs new file mode 100644 index 000000000..bd9a4803b --- /dev/null +++ b/crates/runtime/or-renderer/src/game_shaders/geometry.rs @@ -0,0 +1,12 @@ +//! Geometry and particle passes: drawables, meshes, GTA VI meshlets, entity draws, GPU mesh storage, and particle effects. + +pub mod drawable; +pub mod effect_pass; +pub mod fed; +pub mod gta5; +pub mod mesh; +pub mod meshlets; +pub mod model; +pub mod sprite; +pub mod store; +pub mod trail; diff --git a/crates/runtime/or-renderer/src/game_shaders/drawable.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/drawable.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/drawable.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/drawable.rs index 142849d78..cc6769171 100644 --- a/crates/runtime/or-renderer/src/game_shaders/drawable.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/drawable.rs @@ -11,7 +11,7 @@ use or_io::gta5::{DrawableTarget, FragDrawable, FragType}; use glam::{Mat4, Quat, Vec3}; -use super::mesh::{bounds, Coverage, Image, Material, Surface}; +use crate::game_shaders::mesh::{bounds, Coverage, Image, Material, Surface}; /// The `GrcFvfChannel` numbers of the first texture coordinate and the first colour. const FIRST_TEX_CHANNEL: u8 = 6; diff --git a/crates/runtime/or-renderer/src/game_shaders/drawable/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/drawable/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/drawable/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/drawable/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/effect_pass.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/effect_pass.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/effect_pass.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/effect_pass.rs index 8fa48104b..dfa2fec2d 100644 --- a/crates/runtime/or-renderer/src/game_shaders/effect_pass.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/effect_pass.rs @@ -8,18 +8,18 @@ use or_io::gta5::shaders::spirv_pack::{ConstantBuffer, Program, SignatureElement use or_io::hash::string_hash_str; use thiserror::Error; -use super::bindings::{Requirement, Resource}; -use super::constants::Filler; -use super::engine::EngineConstants; -use super::link::match_interpolation; -use super::mesh::Image; -use super::pack::{GamePack, PackError}; -use super::pipeline::{ +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::constants::Filler; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::link::match_interpolation; +use crate::game_shaders::mesh::Image; +use crate::game_shaders::pack::{GamePack, PackError}; +use crate::game_shaders::pipeline::{ build_pass_pipeline, entry_of, vertex_streams, DrawState, PassPipeline, PipelineDesc, PipelineError, Streams, Target, }; -use super::quad::pair_of; -use super::stand_in::{bind_resources_with, Provided}; +use crate::game_shaders::quad::pair_of; +use crate::game_shaders::stand_in::{bind_resources_with, Provided}; /// The textures a particle's pixel stage reads as its diffuse, by the name the game's reflection gives them: the particle effects' and the mesh effects'. const DIFFUSE: [&str; 2] = ["DiffuseTexSampler", "DiffuseSampler"]; @@ -377,9 +377,9 @@ impl EffectPass { kind.depth.clone().map(Provided::View) } // A depth is read as it is, by a sampler that blends nothing - Resource::Sampler { .. } if name.eq_ignore_ascii_case(SOFT_DEPTH) => { - Some(Provided::Sampler(super::samplers::point(device))) - } + Resource::Sampler { .. } if name.eq_ignore_ascii_case(SOFT_DEPTH) => Some( + Provided::Sampler(crate::game_shaders::samplers::point(device)), + ), _ => None, } }; diff --git a/crates/runtime/or-renderer/src/game_shaders/effect_pass/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/effect_pass/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/effect_pass/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/effect_pass/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/fed.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/fed.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/fed.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/fed.rs index e9c645390..8acdb830b 100644 --- a/crates/runtime/or-renderer/src/game_shaders/fed.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/fed.rs @@ -13,20 +13,20 @@ use or_world::model::VertexLayout; use or_world_gta5::wind::{self, TreeWind}; use wgpu::util::DeviceExt as _; -use super::bindings::{requirements, Requirement, Resource}; -use super::constants::Filler; -use super::engine::{columns, names, posed_bones, EngineConstants}; -use super::link::match_interpolation; -use super::mesh::scene::declared_states; -use super::mesh::{is_palette, missing, MeshError}; -use super::pack::{GamePack, PackError}; -use super::pipeline::{ +use crate::game_shaders::bindings::{requirements, Requirement, Resource}; +use crate::game_shaders::constants::Filler; +use crate::game_shaders::engine::{columns, names, posed_bones, EngineConstants}; +use crate::game_shaders::link::match_interpolation; +use crate::game_shaders::mesh::scene::declared_states; +use crate::game_shaders::mesh::{is_palette, missing, MeshError}; +use crate::game_shaders::pack::{GamePack, PackError}; +use crate::game_shaders::pipeline::{ build_pass_pipeline, entry_of, DrawState, PassPipeline, PipelineDesc, PipelineError, Target, }; -use super::quad::pair_of; -use super::samplers::{comparing, point, smooth}; -use super::stand_in::{bind_resources_with, declared_sampler, Provided}; -use super::store::{inputs_of, matched, Matched}; +use crate::game_shaders::quad::pair_of; +use crate::game_shaders::samplers::{comparing, point, smooth}; +use crate::game_shaders::stand_in::{bind_resources_with, declared_sampler, Provided}; +use crate::game_shaders::store::{inputs_of, matched, Matched}; pub mod arena; @@ -58,8 +58,8 @@ pub fn frame_names() -> &'static std::collections::BTreeSet<&'static str> { std::sync::OnceLock::new(); NAMES.get_or_init(|| { let engine = names().iter().copied(); - let of_the_frame = engine.chain(super::shadow::RECEIVED); - let of_the_screen = of_the_frame.chain(super::deferred::OF_THE_SCREEN); + let of_the_frame = engine.chain(crate::game_shaders::shadow::RECEIVED); + let of_the_screen = of_the_frame.chain(crate::game_shaders::deferred::OF_THE_SCREEN); of_the_screen.chain(OF_THE_GRASS).collect() }) } diff --git a/crates/runtime/or-renderer/src/game_shaders/fed/arena.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/fed/arena.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/fed/arena.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/fed/arena.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/fed/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/fed/tests.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/fed/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/fed/tests.rs index 1fbd6f83e..fed8b1cda 100644 --- a/crates/runtime/or-renderer/src/game_shaders/fed/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/fed/tests.rs @@ -1,12 +1,12 @@ use glam::{Mat4, Vec3}; use or_world::model::{Element, ElementFormat, Semantic, VertexLayout}; -use super::super::frame::Rendered; -use super::super::pipeline::Target; -use super::super::store::{Sizes, Store}; -use super::super::synthetic::pack_on_disk; -use super::super::test_pack::{draw_into, gpu, real_pack, variable}; use super::*; +use crate::game_shaders::frame::Rendered; +use crate::game_shaders::pipeline::Target; +use crate::game_shaders::store::{Sizes, Store}; +use crate::game_shaders::synthetic::pack_on_disk; +use crate::game_shaders::test_pack::{draw_into, gpu, real_pack, variable}; /// The variables GTA V's profile says the game sets for a draw. fn per_draw() -> Vec { @@ -355,7 +355,7 @@ fn no_pair_of_the_packs_world_techniques_sets_more_buffers_for_a_draw_than_a_lay let per_draw = per_draw(); // The most constant buffers a pair binds, and the most of them written for a draw. let (mut most, mut most_set) = (0, 0); - let names = [true, false].map(super::super::gta5::world_techniques); + let names = [true, false].map(crate::game_shaders::gta5::world_techniques); for effect in &manifest.effects { let techniques = (effect.techniques.iter()) .filter(|technique| names.iter().flatten().any(|name| *name == technique.name)); diff --git a/crates/runtime/or-renderer/src/game_shaders/gta5.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/gta5.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/gta5.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/gta5.rs index e78b9bcb4..a5f8b030e 100644 --- a/crates/runtime/or-renderer/src/game_shaders/gta5.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/gta5.rs @@ -6,7 +6,7 @@ use or_io::gta5::shaders::spirv_pack::{Effect, ShaderStage, SpirvPack}; use or_world::model::{Model, Semantic, TextureAsk, VertexLayout}; use or_world_gta5::{DrawnBy, Material, Materials}; -use super::store::{matched, signature_inputs, Lack}; +use crate::game_shaders::store::{matched, signature_inputs, Lack}; /// The record `model` carries, where it is a model of GTA V. pub fn materials(model: &Model) -> Option<&Materials> { diff --git a/crates/runtime/or-renderer/src/game_shaders/mesh.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/mesh.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/mesh.rs index bc0c31125..fc5c0484e 100644 --- a/crates/runtime/or-renderer/src/game_shaders/mesh.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh.rs @@ -6,12 +6,12 @@ use glam::{Mat4, Vec3}; use or_io::gta5::shaders::spirv_pack::{Effect, Pass, SignatureElement, Technique}; use thiserror::Error; -use super::engine::EngineConstants; -use super::frame::{Frame, Rendered}; -use super::pack::GamePack; -use super::pipeline::Target; -use super::quad::pair_of; -use super::stand_in::Provided; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::frame::{Frame, Rendered}; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::Target; +use crate::game_shaders::quad::pair_of; +use crate::game_shaders::stand_in::Provided; pub mod scene; diff --git a/crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs index dd780a0dd..066af7780 100644 --- a/crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs @@ -6,26 +6,26 @@ use std::sync::Arc; use or_io::gta5::shaders::spirv_pack::{ConstantBuffer, Program, RenderState}; use wgpu::util::DeviceExt; -use super::super::bindings::{Requirement, Resource}; -use super::super::constants::Uniform; -use super::super::deferred::GBUFFER_TARGETS; -use super::super::engine::EngineConstants; -use super::super::link::match_interpolation; -use super::super::pack::{GamePack, PackError}; -use super::super::pipeline::{ +use super::{ + bone_palette, is_named, is_palette, missing, sees_through, select_technique_at, + surface_vertices, Coverage, Image, Material, MeshError, Route, Surface, SHADOW_EFFECT, +}; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::constants::Uniform; +use crate::game_shaders::deferred::GBUFFER_TARGETS; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::link::match_interpolation; +use crate::game_shaders::pack::{GamePack, PackError}; +use crate::game_shaders::pipeline::{ build_pass_pipeline, entry_of, vertex_layout, DrawState, PassPipeline, PipelineDesc, PipelineError, Target, }; -use super::super::quad::pair_of; -use super::super::samplers::point; -use super::super::stand_in::{ +use crate::game_shaders::quad::pair_of; +use crate::game_shaders::samplers::point; +use crate::game_shaders::stand_in::{ bind_resources_with, declared_sampler, uniform_buffer, uploaded_view, Provided, }; -use super::super::states::{drawn_as, Taken}; -use super::{ - bone_palette, is_named, is_palette, missing, sees_through, select_technique_at, - surface_vertices, Coverage, Image, Material, MeshError, Route, Surface, SHADOW_EFFECT, -}; +use crate::game_shaders::states::{drawn_as, Taken}; /// The render states a surface's pipeline takes from what its pass states, in place of the value set by hand here: the face it culls. /// diff --git a/crates/runtime/or-renderer/src/game_shaders/mesh/scene/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene/tests.rs similarity index 95% rename from crates/runtime/or-renderer/src/game_shaders/mesh/scene/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene/tests.rs index a16304e6d..125d11f3b 100644 --- a/crates/runtime/or-renderer/src/game_shaders/mesh/scene/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene/tests.rs @@ -1,5 +1,5 @@ -use super::super::super::test_pack::gpu; use super::*; +use crate::game_shaders::test_pack::gpu; fn image(rgba: Vec) -> Image { Image { diff --git a/crates/runtime/or-renderer/src/game_shaders/mesh/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh/tests.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/mesh/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/mesh/tests.rs index 51d752583..a90f8bc89 100644 --- a/crates/runtime/or-renderer/src/game_shaders/mesh/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/mesh/tests.rs @@ -1,6 +1,6 @@ -use super::super::synthetic::{material, pack_on_disk, quad}; -use super::super::test_pack::gpu; use super::*; +use crate::game_shaders::synthetic::{material, pack_on_disk, quad}; +use crate::game_shaders::test_pack::gpu; /// A camera above the origin looking straight down, so a quad at height `z` is `5 - z` away. fn overhead() -> Camera { @@ -219,7 +219,7 @@ fn draw_scene( scene.record(&mut pass); } queue.submit([encoder.finish()]); - super::super::frame::read_back(device, queue, &colour, target.colour, SIZE) + crate::game_shaders::frame::read_back(device, queue, &colour, target.colour, SIZE) } fn overhead_engine() -> EngineConstants { @@ -607,7 +607,7 @@ fn the_record_of_a_frame_names_the_effect_and_the_technique_each_surface_was_dra let [pass] = &record.passes[..] else { panic!("one pass was begun, not {:?}", record.passes); }; - assert_eq!(pass.label, super::super::frame::FRAME_PASS); + assert_eq!(pass.label, crate::game_shaders::frame::FRAME_PASS); assert_eq!(pass.kind, PassKind::Render); let expected: Vec = (effects.iter()) .map(|effect| DrawRecord { @@ -629,11 +629,11 @@ mod stated { use or_io::gta5::shaders::render_state as rs; use or_io::gta5::shaders::spirv_pack::ShaderStage; - use super::super::super::frame::Frame; - use super::super::super::states::Taken; - use super::super::super::synthetic::pack_builder; use super::super::scene::PipelineCache; use super::*; + use crate::game_shaders::frame::Frame; + use crate::game_shaders::states::Taken; + use crate::game_shaders::synthetic::pack_builder; /// The synthetic pack with an effect `stating`, which draws as `synthetic` does by a pass that sets `states`. fn pack_stating(states: &[(u32, u32)]) -> tempfile::TempDir { diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/meshlets.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs index f423ac1b6..f62b6f9c0 100644 --- a/crates/runtime/or-renderer/src/game_shaders/meshlets.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs @@ -11,10 +11,10 @@ use glam::{Mat4, Vec3}; use naga::ShaderStage; use wgpu::util::DeviceExt; -use super::bindings::{arrayed, BindingError, Requirement, Resource}; -use super::mesh::Image; -use super::pipeline::{entry_of, fragment_targets_in, PipelineError, Target}; -use super::targets::render_target; +use crate::game_shaders::bindings::{arrayed, BindingError, Requirement, Resource}; +use crate::game_shaders::mesh::Image; +use crate::game_shaders::pipeline::{entry_of, fragment_targets_in, PipelineError, Target}; +use crate::game_shaders::targets::render_target; /// Why building, binding, or running a GTA VI meshlet pass failed. #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] @@ -24,7 +24,7 @@ pub enum MeshletError { #[error(transparent)] Bindings(#[from] BindingError), #[error(transparent)] - Trace(#[from] super::trace::PassError), + Trace(#[from] crate::game_shaders::trace::PassError), #[error("{0}")] DeviceValidation(String), #[error("{0}")] @@ -149,7 +149,7 @@ pub fn device_needs( // its occlusion samples a copy of the depth in floats of 32 bits. let kept = features & (wgpu::Features::PIPELINE_CACHE - | super::kept_dx12::FEATURES + | crate::game_shaders::kept_dx12::FEATURES | wgpu::Features::DUAL_SOURCE_BLENDING | wgpu::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | wgpu::Features::FLOAT32_FILTERABLE); @@ -397,7 +397,7 @@ pub struct MeshletScene { mask: SunMask, /// A writer of the mask in the place of the game's own resolve of the map: the game's walk /// over the model's arena, where one is set. - traced: std::cell::RefCell>, + traced: std::cell::RefCell>, /// The game's own lighting passes bound to the targets, where any is set. frame_light: std::cell::RefCell>, /// The per-device GPU histogram counter used by [`Self::kinds_held`]. @@ -434,7 +434,7 @@ pub const ROW: u32 = 256; /// the first after it, each the average of four of the one above. fn with_levels(width: u32, height: u32, rgba: &[u8], srgb: bool, colour: bool) -> (Vec, u32) { let levels = match colour { - true => super::mips::chain(width, height, rgba, srgb), + true => crate::game_shaders::mips::chain(width, height, rgba, srgb), false => Vec::new(), }; let mut texels = rgba.to_vec(); @@ -904,7 +904,7 @@ impl MeshletPipelines { /// Passes whose compiled form is kept in a file of `folder` between sessions, on a backend /// that has one to keep. pub fn kept_in(folder: PathBuf) -> Self { - super::kept_dx12::keep_in(folder.join("dx12")); + crate::game_shaders::kept_dx12::keep_in(folder.join("dx12")); Self { folder: Some(folder), ..Self::default() @@ -1035,8 +1035,8 @@ fn build_checked( let built = build(device, stages.clone(), compiled, forward, two_sided); let refused = pollster::block_on(validation.pop()).or(pollster::block_on(internal.pop())); tracing::info!(elapsed = ?started.elapsed(), refused = refused.is_some(), "a GTA VI pass was built for the device"); - if super::kept_dx12::forget_handed(refused.is_some()) { - return super::kept_dx12::without(|| { + if crate::game_shaders::kept_dx12::forget_handed(refused.is_some()) { + return crate::game_shaders::kept_dx12::without(|| { build_checked(device, stages, compiled, forward, two_sided) }); } @@ -1065,7 +1065,7 @@ fn stages_drawn( (_, Some(file)) | (Some(file), None) => stage_of(file)?, (None, None) => (*stages.1).clone(), }; - super::pipeline::position_w_as_direct3d(&mut fragment, info.backend); + crate::game_shaders::pipeline::position_w_as_direct3d(&mut fragment, info.backend); let vertex = match &aids.mesh { Some(file) => stage_of(file)?, None => (*stages.0).clone(), @@ -1114,8 +1114,8 @@ fn build( forward::dual_sourced(&mut fragment); } if device.adapter_info().backend == wgpu::Backend::Dx12 { - super::kept_dx12::typed_literals(&mut vertex); - super::kept_dx12::typed_literals(&mut fragment); + crate::game_shaders::kept_dx12::typed_literals(&mut vertex); + crate::game_shaders::kept_dx12::typed_literals(&mut fragment); } let mut targets = match &forward { Some(forward) => vec![Some(forward::target(forward))], @@ -1139,8 +1139,9 @@ fn build( bind_group_layouts: &layouts.iter().map(Option::as_ref).collect::>(), immediate_size: 0, }); - let shader = - |module: &naga::Module| super::kept_dx12::shader(device, module, (&vertex, &fragment)); + let shader = |module: &naga::Module| { + crate::game_shaders::kept_dx12::shader(device, module, (&vertex, &fragment)) + }; let vertex_entry = entry_of(&vertex, ShaderStage::Vertex)?; let fragment_entry = entry_of(&fragment, ShaderStage::Fragment)?; let vertex_module = shader(&vertex); diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/calls_tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/calls_tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/calls_tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/calls_tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/far_tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/far_tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/far_tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/far_tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/forward.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/forward.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/forward.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/forward.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/forward_frame.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/forward_frame.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/forward_frame.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/forward_frame.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/frame_around.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_around.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/frame_around.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_around.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/frame_cones.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_cones.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/frame_cones.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_cones.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/frame_covered.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_covered.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/frame_covered.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_covered.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/frame_light.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_light.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/frame_light.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_light.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/frame_shadow.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_shadow.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/frame_shadow.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_shadow.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/frame_steps.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_steps.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/frame_steps.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_steps.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/frame_tone.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_tone.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/frame_tone.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_tone.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/ground.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/ground.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/ground.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/ground.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/hair.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/hair.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/hair.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/hair.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/resolve.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/resolve.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/resolve.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/resolve.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/scene.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/scene.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/scene.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/scene.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/scene_tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/scene_tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/scene_tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/scene_tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/shared.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/shared.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/shared.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/shared.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/shared_tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/shared_tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/shared_tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/shared_tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/sun_mask.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/sun_mask.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/sun_mask.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/sun_mask.rs index 213065568..eb41b514c 100644 --- a/crates/runtime/or-renderer/src/game_shaders/meshlets/sun_mask.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/sun_mask.rs @@ -4,7 +4,7 @@ //! is lit through the mask the game's own program resolves ([`super::frame_shadow`]), which //! this one is copied into where the rays write it. -use super::super::targets::render_target; +use crate::game_shaders::targets::render_target; /// The format of the mask's one channel. const ROOTS: wgpu::TextureFormat = wgpu::TextureFormat::R32Float; diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/sun_shadow.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/sun_shadow.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/sun_shadow.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/sun_shadow.rs index 1814a7a8b..0749a6997 100644 --- a/crates/runtime/or-renderer/src/game_shaders/meshlets/sun_shadow.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/sun_shadow.rs @@ -4,9 +4,9 @@ use glam::{Mat4, Vec3}; -use super::super::shadow::{sphere_of, Fit}; -use super::super::targets::render_target; use super::Sky; +use crate::game_shaders::shadow::{sphere_of, Fit}; +use crate::game_shaders::targets::render_target; /// The texels a side of the tile, and the rows of the map: one a cascade of the game's. pub(super) const TILE: u32 = 1024; diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/traced.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/traced.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/traced.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/traced.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/meshlets/traced_tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/traced_tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/meshlets/traced_tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/traced_tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/model.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/model.rs similarity index 95% rename from crates/runtime/or-renderer/src/game_shaders/model.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/model.rs index 7d6380914..6a3d5992f 100644 --- a/crates/runtime/or-renderer/src/game_shaders/model.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/model.rs @@ -3,10 +3,12 @@ use glam::Vec3; use or_io::gta5::shaders::spirv_pack::SignatureElement; -use super::effect_pass::{EffectCache, EffectError, EffectKind, EffectPass, Layout, Shape}; -use super::engine::EngineConstants; -use super::pack::GamePack; -use super::pipeline::Target; +use crate::game_shaders::effect_pass::{ + EffectCache, EffectError, EffectKind, EffectPass, Layout, Shape, +}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::Target; /// The effect every particle model draws with. pub const EFFECT: &str = "ptfx_model"; diff --git a/crates/runtime/or-renderer/src/game_shaders/model/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/model/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/model/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/model/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/sprite.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/sprite.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/sprite.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/sprite.rs index f832deecb..d13759dc3 100644 --- a/crates/runtime/or-renderer/src/game_shaders/sprite.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/sprite.rs @@ -3,10 +3,12 @@ use glam::Vec3; use or_io::gta5::shaders::spirv_pack::SignatureElement; -use super::effect_pass::{EffectCache, EffectError, EffectKind, EffectPass, Layout, Shape}; -use super::engine::EngineConstants; -use super::pack::GamePack; -use super::pipeline::Target; +use crate::game_shaders::effect_pass::{ + EffectCache, EffectError, EffectKind, EffectPass, Layout, Shape, +}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::Target; /// The effect every sprite draws with. pub const EFFECT: &str = "ptfx_sprite"; diff --git a/crates/runtime/or-renderer/src/game_shaders/sprite/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/sprite/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/sprite/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/sprite/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/store.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/store.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/store.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/store.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/store/matched.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/store/matched.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/store/matched.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/store/matched.rs index 1e45933d7..ad9371d0a 100644 --- a/crates/runtime/or-renderer/src/game_shaders/store/matched.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/store/matched.rs @@ -4,7 +4,7 @@ use naga::{Binding, ScalarKind}; use or_io::gta5::shaders::spirv_pack::SignatureElement; use or_world::model::{Element, ElementFormat, Semantic, VertexLayout}; -use super::super::pipeline::{shape, PipelineError}; +use crate::game_shaders::pipeline::{shape, PipelineError}; /// What a vertex program reads at one location. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] diff --git a/crates/runtime/or-renderer/src/game_shaders/store/pages.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/store/pages.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/store/pages.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/store/pages.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/store/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/store/tests.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/store/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/store/tests.rs index 5b9eeea04..82b0c4f60 100644 --- a/crates/runtime/or-renderer/src/game_shaders/store/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/store/tests.rs @@ -2,9 +2,11 @@ use naga::ScalarKind; use or_world::model::{Element, ElementFormat as F, Mesh, Semantic, VertexLayout}; use wgpu::VertexFormat as V; -use super::super::pipeline::{build_pass_pipeline, entry_of, DrawState, PipelineDesc, Target}; -use super::super::test_pack::{draw_into, element as signed, gpu}; use super::*; +use crate::game_shaders::pipeline::{ + build_pass_pipeline, entry_of, DrawState, PipelineDesc, Target, +}; +use crate::game_shaders::test_pack::{draw_into, element as signed, gpu}; fn element(semantic: Semantic, format: F, offset: u32) -> Element { Element { diff --git a/crates/runtime/or-renderer/src/game_shaders/trail.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/trail.rs similarity index 95% rename from crates/runtime/or-renderer/src/game_shaders/trail.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/trail.rs index 1101218a4..81e7bf456 100644 --- a/crates/runtime/or-renderer/src/game_shaders/trail.rs +++ b/crates/runtime/or-renderer/src/game_shaders/geometry/trail.rs @@ -3,10 +3,12 @@ use glam::Vec3; use or_io::gta5::shaders::spirv_pack::SignatureElement; -use super::effect_pass::{EffectCache, EffectError, EffectKind, EffectPass, Layout, Shape}; -use super::engine::EngineConstants; -use super::pack::GamePack; -use super::pipeline::Target; +use crate::game_shaders::effect_pass::{ + EffectCache, EffectError, EffectKind, EffectPass, Layout, Shape, +}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::Target; /// The effect every trail draws with. pub const EFFECT: &str = "ptfx_trail"; diff --git a/crates/runtime/or-renderer/src/game_shaders/trail/tests.rs b/crates/runtime/or-renderer/src/game_shaders/geometry/trail/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/trail/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/geometry/trail/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/lighting.rs b/crates/runtime/or-renderer/src/game_shaders/lighting.rs index 777b01038..37bbfa505 100644 --- a/crates/runtime/or-renderer/src/game_shaders/lighting.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting.rs @@ -1,5 +1,19 @@ //! The light of one moment of the day as the shared constant buffer holds it: the sun or the moon, the ambient lights and the fog. +pub mod ambient; +pub mod capsule_lights; +pub mod coronas; +pub mod deferred; +pub mod distant_lights; +pub mod dome; +pub mod fog_volumes; +pub mod light_volumes; +pub mod point_lights; +pub mod shadow; +pub mod sky; +pub mod spot_lights; +pub mod water; + use std::f32::consts::PI; use glam::{Mat4, Vec3, Vec4}; diff --git a/crates/runtime/or-renderer/src/game_shaders/ambient.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/ambient.rs similarity index 95% rename from crates/runtime/or-renderer/src/game_shaders/ambient.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/ambient.rs index 7c5967bbf..5bd122179 100644 --- a/crates/runtime/or-renderer/src/game_shaders/ambient.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/ambient.rs @@ -2,15 +2,17 @@ use std::collections::BTreeMap; -use super::bindings::{Requirement, Resource}; -use super::deferred::{lighting_values, Inputs, Screen, DEPTH_STENCIL_FORMAT, GBUFFER_FORMAT}; -use super::engine::EngineConstants; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::samplers::{linear, point}; -use super::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space, Written}; -use super::stand_in::Provided; -use super::targets::render_target; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::deferred::{ + lighting_values, Inputs, Screen, DEPTH_STENCIL_FORMAT, GBUFFER_FORMAT, +}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::samplers::{linear, point}; +use crate::game_shaders::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space, Written}; +use crate::game_shaders::stand_in::Provided; +use crate::game_shaders::targets::render_target; use crate::recorder::Noted; const EFFECT: &str = "ssao"; diff --git a/crates/runtime/or-renderer/src/game_shaders/ambient/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/ambient/tests.rs similarity index 95% rename from crates/runtime/or-renderer/src/game_shaders/ambient/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/ambient/tests.rs index 75d52ee60..38e332c49 100644 --- a/crates/runtime/or-renderer/src/game_shaders/ambient/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/ambient/tests.rs @@ -1,13 +1,13 @@ use glam::{Mat4, Vec3, Vec4}; -use super::super::deferred::{ +use super::*; +use crate::game_shaders::deferred::{ hdr_target, ldr_target, stencil_clear, DeferredScene, DepthViews, GBuffer, ReflectionTarget, HDR_FORMAT, }; -use super::super::mesh::{Image, Material, Surface}; -use super::super::synthetic::quad; -use super::super::test_pack::{gpu, real_pack}; -use super::*; +use crate::game_shaders::mesh::{Image, Material, Surface}; +use crate::game_shaders::synthetic::quad; +use crate::game_shaders::test_pack::{gpu, real_pack}; const SIZE: u32 = 128; const NEAR: f32 = 0.1; @@ -158,17 +158,17 @@ fn ran( if let Some(error) = error { return Err(error.to_string().replace('\n', " | ")); } - let read = super::super::frame::read_back( + let read = crate::game_shaders::frame::read_back( device, queue, gbuffer.ambient_scales().texture(), - super::super::deferred::GBUFFER_FORMAT, + crate::game_shaders::deferred::GBUFFER_FORMAT, SIZE, ); let scales = (read.bytes.as_chunks::<4>().0.iter()) .map(|p| [p[0], p[1]]) .collect(); - let depth = super::super::frame::read_back( + let depth = crate::game_shaders::frame::read_back( device, queue, ambient.depth().texture(), diff --git a/crates/runtime/or-renderer/src/game_shaders/capsule_lights.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/capsule_lights.rs similarity index 93% rename from crates/runtime/or-renderer/src/game_shaders/capsule_lights.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/capsule_lights.rs index 760a4b4bd..c0de5ba09 100644 --- a/crates/runtime/or-renderer/src/game_shaders/capsule_lights.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/capsule_lights.rs @@ -2,10 +2,10 @@ use glam::Vec3; -use super::deferred::Inputs; -use super::light_volumes::LightVolumes; -use super::pack::GamePack; -use super::screen::ScreenError; +use crate::game_shaders::deferred::Inputs; +use crate::game_shaders::light_volumes::LightVolumes; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::screen::ScreenError; const EFFECT: &str = "capsule"; const TECHNIQUE: &str = "capsule"; diff --git a/crates/runtime/or-renderer/src/game_shaders/coronas.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/coronas.rs similarity index 92% rename from crates/runtime/or-renderer/src/game_shaders/coronas.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/coronas.rs index e129e5e77..546da18ec 100644 --- a/crates/runtime/or-renderer/src/game_shaders/coronas.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/coronas.rs @@ -5,14 +5,14 @@ use std::sync::atomic::{AtomicU32, Ordering}; use glam::Vec3; use or_io::gta5::shaders::spirv_pack::SignatureElement; -use super::deferred::{lighting_values, Screen, DEPTH_STENCIL_FORMAT}; -use super::distant_lights::dot; -use super::engine::EngineConstants; -use super::light_volumes::record_bytes; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; -use super::stand_in::Provided; +use crate::game_shaders::deferred::{lighting_values, Screen, DEPTH_STENCIL_FORMAT}; +use crate::game_shaders::distant_lights::dot; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::light_volumes::record_bytes; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::stand_in::Provided; const EFFECT: &str = "im"; const TECHNIQUE: &str = "corona"; @@ -146,8 +146,9 @@ impl Coronas { fn provide( depth: &wgpu::TextureView, - ) -> impl FnMut(&str, &super::bindings::Requirement) -> Option + '_ { - use super::bindings::Resource; + ) -> impl FnMut(&str, &crate::game_shaders::bindings::Requirement) -> Option + '_ + { + use crate::game_shaders::bindings::Resource; move |name, requirement| match (name, &requirement.resource) { (_, Resource::Sampler { .. }) => None, ("CoronasDepthMapSampler", _) => Some(Provided::View(depth.clone())), diff --git a/crates/runtime/or-renderer/src/game_shaders/deferred.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/deferred.rs similarity index 95% rename from crates/runtime/or-renderer/src/game_shaders/deferred.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/deferred.rs index 527091301..149eb1516 100644 --- a/crates/runtime/or-renderer/src/game_shaders/deferred.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/deferred.rs @@ -4,31 +4,31 @@ use std::collections::BTreeMap; use glam::Vec3; -use super::ambient::AmbientPass; -use super::antialias::AntiAliasPass; -use super::bindings::Requirement; -use super::bloom::BloomPass; -use super::capsule_lights::{CapsuleLight, CapsuleLights}; -use super::coronas::{Corona, CoronaLook, Coronas}; -use super::depth_fog::DepthFogPass; -use super::distant_lights::{DistantLight, DistantLights, SpriteLook}; -use super::dome::SkyPass; -use super::engine::EngineConstants; -use super::fog_volumes::{FogSky, FogVolume, FogVolumes}; -use super::mesh::scene::{MATERIAL_CLEAR, MATERIAL_TREE, MATERIAL_TYPE_MASK}; -use super::mesh::{bounds, Material, MeshScene, PipelineCache, Route, Surface}; -use super::meter::Meter; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::point_lights::{PointLight, PointLights}; -use super::resolve::ResolvePass; -use super::samplers::{point, smooth}; -use super::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space}; -use super::shadow::{sphere_of, Fit, ShadowPass}; -use super::spot_lights::{SpotLight, SpotLights}; -use super::stand_in::Provided; -use super::targets::render_target; -use super::tone::Tone; +use crate::game_shaders::ambient::AmbientPass; +use crate::game_shaders::antialias::AntiAliasPass; +use crate::game_shaders::bindings::Requirement; +use crate::game_shaders::bloom::BloomPass; +use crate::game_shaders::capsule_lights::{CapsuleLight, CapsuleLights}; +use crate::game_shaders::coronas::{Corona, CoronaLook, Coronas}; +use crate::game_shaders::depth_fog::DepthFogPass; +use crate::game_shaders::distant_lights::{DistantLight, DistantLights, SpriteLook}; +use crate::game_shaders::dome::SkyPass; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::fog_volumes::{FogSky, FogVolume, FogVolumes}; +use crate::game_shaders::mesh::scene::{MATERIAL_CLEAR, MATERIAL_TREE, MATERIAL_TYPE_MASK}; +use crate::game_shaders::mesh::{bounds, Material, MeshScene, PipelineCache, Route, Surface}; +use crate::game_shaders::meter::Meter; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::point_lights::{PointLight, PointLights}; +use crate::game_shaders::resolve::ResolvePass; +use crate::game_shaders::samplers::{point, smooth}; +use crate::game_shaders::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::shadow::{sphere_of, Fit, ShadowPass}; +use crate::game_shaders::spot_lights::{SpotLight, SpotLights}; +use crate::game_shaders::stand_in::Provided; +use crate::game_shaders::targets::render_target; +use crate::game_shaders::tone::Tone; /// The format of each colour target the G-buffer passes write. pub const GBUFFER_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8Unorm; @@ -199,7 +199,7 @@ impl ReflectionTarget { } /// Write `map`, which must have the size and the levels this was made for. - pub fn write(&self, queue: &wgpu::Queue, map: &super::sky::ReflectionMap) { + pub fn write(&self, queue: &wgpu::Queue, map: &crate::game_shaders::sky::ReflectionMap) { for (level, texels) in map.levels.iter().enumerate().take(self.levels as usize) { let (width, height) = map.size_of(level); let bytes: Vec = texels @@ -371,13 +371,13 @@ pub struct Inputs<'a> { } /// What the lighting pass binds under `name`: the target it reads, the sampler that goes with it, or nothing. -pub(super) fn provide( +pub(crate) fn provide( device: &wgpu::Device, inputs: &Inputs<'_>, name: &str, requirement: &Requirement, ) -> Option { - use super::bindings::Resource; + use crate::game_shaders::bindings::Resource; if matches!(requirement.resource, Resource::Sampler { .. }) { return match name { "ReflectionSampler" => Some(Provided::Sampler(smooth(device))), @@ -881,7 +881,7 @@ impl FramePasses { } /// Draw the stars and the moon's face from `textures`, which the install gives. - pub fn set_sky_textures(&mut self, textures: super::dome::SkyTextures) { + pub fn set_sky_textures(&mut self, textures: crate::game_shaders::dome::SkyTextures) { if let Some(sky) = &mut self.sky { sky.set_textures(textures); } @@ -898,7 +898,7 @@ impl FramePasses { &self, queue: &wgpu::Queue, engine: &EngineConstants, - sky: &super::sky::Sky, + sky: &crate::game_shaders::sky::Sky, far: f32, ) { if let Some(pass) = &self.sky { @@ -1124,7 +1124,7 @@ impl DeferredScene { ); let depth_only = Target { colour: GBUFFER_FORMAT, - depth: super::shadow::MAP_FORMAT, + depth: crate::game_shaders::shadow::MAP_FORMAT, depth_compare: wgpu::CompareFunction::Less, blend: None, colour_attachments: Some(0), @@ -1139,7 +1139,7 @@ impl DeferredScene { Route::Shadow, ); let sphere = bounds(surfaces).map(|(min, max)| sphere_of(min, max)); - let palette = super::mesh::bone_palette(surfaces); + let palette = crate::game_shaders::mesh::bone_palette(surfaces); Self { gbuffer, blended, diff --git a/crates/runtime/or-renderer/src/game_shaders/deferred/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/deferred/tests.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/deferred/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/deferred/tests.rs index ed366c482..10ce873b0 100644 --- a/crates/runtime/or-renderer/src/game_shaders/deferred/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/deferred/tests.rs @@ -1,11 +1,11 @@ use glam::{Mat4, Vec3}; -use super::super::lighting::Lighting; -use super::super::pack::GamePack; -use super::super::synthetic::quad; -use super::super::test_pack::{gpu, real_pack}; -use super::super::tone::{Tone, ToneSettings}; use super::*; +use crate::game_shaders::lighting::Lighting; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::synthetic::quad; +use crate::game_shaders::test_pack::{gpu, real_pack}; +use crate::game_shaders::tone::{Tone, ToneSettings}; /// The projection the viewport draws with: a nearer surface has the greater depth. fn reversed(fov_y: f32, aspect: f32, near: f32, far: f32) -> Mat4 { @@ -160,7 +160,7 @@ fn lit_frame_in( let reflection = ReflectionTarget::new(device, 4, 1); reflection.write( queue, - &super::super::sky::ReflectionMap { + &crate::game_shaders::sky::ReflectionMap { width: 4, height: 2, levels: vec![vec![[sky, sky, sky, 1.0]; 8]], @@ -171,7 +171,7 @@ fn lit_frame_in( let depth_view = depth.create_view(&Default::default()); let hdr_view = hdr.create_view(&Default::default()); let ldr_view = ldr_target(device, display, SIZE, SIZE); - let white = super::super::mesh::Image { + let white = crate::game_shaders::mesh::Image { width: 1, height: 1, rgba: vec![255; 4], @@ -330,7 +330,7 @@ fn lit_frame_in( return Err(error.to_string().replace('\n', " | ")); } let frame = |texture: &wgpu::Texture, format| { - super::super::frame::read_back(device, queue, texture, format, SIZE) + crate::game_shaders::frame::read_back(device, queue, texture, format, SIZE) }; let summed = frame(&hdr, HDR_FORMAT); let middle = (SIZE / 2 * SIZE + SIZE / 2) as usize; diff --git a/crates/runtime/or-renderer/src/game_shaders/distant_lights.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/distant_lights.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/distant_lights.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/distant_lights.rs index 4b3ab8d72..698e9b72a 100644 --- a/crates/runtime/or-renderer/src/game_shaders/distant_lights.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/distant_lights.rs @@ -7,13 +7,13 @@ use glam::Vec3; use or_io::gta5::shaders::spirv_pack::SignatureElement; use wgpu::util::DeviceExt; -use super::deferred::{lighting_values, Screen, DEPTH_STENCIL_FORMAT}; -use super::engine::EngineConstants; -use super::light_volumes::record_bytes; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; -use super::stand_in::Provided; +use crate::game_shaders::deferred::{lighting_values, Screen, DEPTH_STENCIL_FORMAT}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::light_volumes::record_bytes; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::stand_in::Provided; const EFFECT: &str = "im"; const TECHNIQUE: &str = "DistantLights"; diff --git a/crates/runtime/or-renderer/src/game_shaders/dome.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/dome.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/dome.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/dome.rs index d5c36c3e7..b1c415c09 100644 --- a/crates/runtime/or-renderer/src/game_shaders/dome.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/dome.rs @@ -6,15 +6,15 @@ use std::sync::OnceLock; use glam::{Mat3, Mat4, Vec3}; -use super::bindings::Resource; -use super::deferred::{DEPTH_STENCIL_FORMAT, HDR_FORMAT}; -use super::engine::EngineConstants; -use super::mesh::{Image, Material, MeshScene, PipelineCache, Route, Surface}; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::screen::{ScreenPass, ScreenPassDesc, Space}; -use super::sky::Sky; -use super::stand_in::Provided; +use crate::game_shaders::bindings::Resource; +use crate::game_shaders::deferred::{DEPTH_STENCIL_FORMAT, HDR_FORMAT}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::mesh::{Image, Material, MeshScene, PipelineCache, Route, Surface}; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::screen::{ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::sky::Sky; +use crate::game_shaders::stand_in::Provided; const EFFECT: &str = "sky_system"; diff --git a/crates/runtime/or-renderer/src/game_shaders/dome/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/dome/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/dome/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/dome/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/fog_volumes.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/fog_volumes.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/fog_volumes.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/fog_volumes.rs index 259edb1f6..eef89ecdf 100644 --- a/crates/runtime/or-renderer/src/game_shaders/fog_volumes.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/fog_volumes.rs @@ -6,12 +6,14 @@ use std::sync::Mutex; use glam::{EulerRot, Mat3, Mat4, Quat, Vec3}; use wgpu::util::DeviceExt; -use super::deferred::{lighting_values, provide, Inputs, Screen, DEPTH_STENCIL_FORMAT}; -use super::engine::{columns, EngineConstants}; -use super::light_volumes::{corner_value, record_bytes, sphere}; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::deferred::{ + lighting_values, provide, Inputs, Screen, DEPTH_STENCIL_FORMAT, +}; +use crate::game_shaders::engine::{columns, EngineConstants}; +use crate::game_shaders::light_volumes::{corner_value, record_bytes, sphere}; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; const EFFECT: &str = "vfx_fogvolume"; /// The technique for a sphere and the one for an ellipsoid, each with a pass for a camera outside the volume and one for a camera inside it. diff --git a/crates/runtime/or-renderer/src/game_shaders/fog_volumes/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/fog_volumes/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/fog_volumes/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/fog_volumes/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/light_volumes.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/light_volumes.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/light_volumes.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/light_volumes.rs index f750dcf90..8fb619510 100644 --- a/crates/runtime/or-renderer/src/game_shaders/light_volumes.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/light_volumes.rs @@ -7,14 +7,14 @@ use glam::Vec3; use or_io::gta5::shaders::spirv_pack::SignatureElement; use wgpu::util::DeviceExt; -use super::deferred::{ +use crate::game_shaders::deferred::{ lighting_values, over_what_was_drawn, provide, Inputs, Screen, DEPTH_STENCIL_FORMAT, }; -use super::engine::EngineConstants; -use super::mesh::scene::MATERIAL_CLEAR; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::mesh::scene::MATERIAL_CLEAR; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::screen::{vertex_inputs, ScreenError, ScreenPass, ScreenPassDesc, Space}; /// The pass that reads a light from a stream of its own, after the twenty-four that read one from the constants and the three that only mark the stencil. const INSTANCED: usize = 27; diff --git a/crates/runtime/or-renderer/src/game_shaders/light_volumes/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/light_volumes/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/light_volumes/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/light_volumes/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/point_lights.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/point_lights.rs similarity index 90% rename from crates/runtime/or-renderer/src/game_shaders/point_lights.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/point_lights.rs index 8f9efe6e5..eeeddf71d 100644 --- a/crates/runtime/or-renderer/src/game_shaders/point_lights.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/point_lights.rs @@ -2,10 +2,10 @@ use glam::Vec3; -use super::deferred::Inputs; -use super::light_volumes::LightVolumes; -use super::pack::GamePack; -use super::screen::ScreenError; +use crate::game_shaders::deferred::Inputs; +use crate::game_shaders::light_volumes::LightVolumes; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::screen::ScreenError; const EFFECT: &str = "point"; const TECHNIQUE: &str = "pointCM"; diff --git a/crates/runtime/or-renderer/src/game_shaders/point_lights/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/point_lights/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/point_lights/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/point_lights/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/shadow.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/shadow.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/shadow.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/shadow.rs index 59a8526b0..5f3e90b8b 100644 --- a/crates/runtime/or-renderer/src/game_shaders/shadow.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/shadow.rs @@ -4,17 +4,17 @@ use std::collections::BTreeMap; use glam::{Mat4, Vec3, Vec4}; -use super::bindings::{Requirement, Resource}; -use super::deferred::{ +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::deferred::{ lighting_values, over_what_was_drawn, Inputs, Screen, Sun, DEPTH_STENCIL_FORMAT, GBUFFER_FORMAT, }; -use super::engine::EngineConstants; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::samplers::{comparing, point}; -use super::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space}; -use super::stand_in::Provided; -use super::targets::render_target; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::samplers::{comparing, point}; +use crate::game_shaders::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::stand_in::Provided; +use crate::game_shaders::targets::render_target; use crate::recorder::Noted; const EFFECT: &str = "cascadeshadows_rendering"; @@ -385,7 +385,7 @@ impl ShadowPass { occlusion_query_set: None, multiview_mask: None, }); - pass.set_stencil_reference(super::mesh::scene::MATERIAL_CLEAR); + pass.set_stencil_reference(crate::game_shaders::mesh::scene::MATERIAL_CLEAR); self.render.record(&mut pass); } } diff --git a/crates/runtime/or-renderer/src/game_shaders/shadow/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/shadow/tests.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/shadow/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/shadow/tests.rs index 7b2fe120f..ac3e02294 100644 --- a/crates/runtime/or-renderer/src/game_shaders/shadow/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/shadow/tests.rs @@ -1,14 +1,14 @@ use glam::Vec4; -use super::super::deferred::{ +use super::*; +use crate::game_shaders::deferred::{ hdr_target, ldr_target, stencil_clear, DeferredScene, DepthViews, GBuffer, ReflectionTarget, HDR_FORMAT, }; -use super::super::lighting::Lighting; -use super::super::mesh::{Image, Material, Surface}; -use super::super::synthetic::quad; -use super::super::test_pack::{gpu, real_pack}; -use super::*; +use crate::game_shaders::lighting::Lighting; +use crate::game_shaders::mesh::{Image, Material, Surface}; +use crate::game_shaders::synthetic::quad; +use crate::game_shaders::test_pack::{gpu, real_pack}; const SIZE: u32 = 128; const NEAR: f32 = 0.1; @@ -158,7 +158,7 @@ fn kept( if let Some(error) = error { return Err(error.to_string().replace('\n', " | ")); } - let read = super::super::frame::read_back( + let read = crate::game_shaders::frame::read_back( device, queue, gbuffer.self_shadows().texture(), diff --git a/crates/runtime/or-renderer/src/game_shaders/sky.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/sky.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/sky.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/sky.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/sky/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/sky/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/sky/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/sky/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/spot_lights.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/spot_lights.rs similarity index 94% rename from crates/runtime/or-renderer/src/game_shaders/spot_lights.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/spot_lights.rs index d9d0ccb45..85fa4935a 100644 --- a/crates/runtime/or-renderer/src/game_shaders/spot_lights.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/spot_lights.rs @@ -2,10 +2,10 @@ use glam::Vec3; -use super::deferred::Inputs; -use super::light_volumes::LightVolumes; -use super::pack::GamePack; -use super::screen::ScreenError; +use crate::game_shaders::deferred::Inputs; +use crate::game_shaders::light_volumes::LightVolumes; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::screen::ScreenError; const EFFECT: &str = "spot"; const TECHNIQUE: &str = "spotCM"; diff --git a/crates/runtime/or-renderer/src/game_shaders/spot_lights/tests.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/spot_lights/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/spot_lights/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/spot_lights/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/water.rs b/crates/runtime/or-renderer/src/game_shaders/lighting/water.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/water.rs rename to crates/runtime/or-renderer/src/game_shaders/lighting/water.rs index 139de74e5..552cda459 100644 --- a/crates/runtime/or-renderer/src/game_shaders/water.rs +++ b/crates/runtime/or-renderer/src/game_shaders/lighting/water.rs @@ -1,6 +1,6 @@ //! What water reads that the game makes once for it: the row that says, for the cosine of the angle a ray meets the surface at, how much it reflects and how much foam shows, and the maps of its own dictionary. -use super::mesh::Image; +use crate::game_shaders::mesh::Image; /// The maps the game's water reads out of its own texture dictionary: the ripples of its surface, the foam laid over it, its fog and its noise. #[derive(Debug, Clone, Default)] diff --git a/crates/runtime/or-renderer/src/game_shaders/mod.rs b/crates/runtime/or-renderer/src/game_shaders/mod.rs deleted file mode 100644 index 217de0c5f..000000000 --- a/crates/runtime/or-renderer/src/game_shaders/mod.rs +++ /dev/null @@ -1,53 +0,0 @@ -//! The game's own shaders as `naga` modules, built into pipelines: linking the stages of a pass, and the layout a vertex stage's inputs and a pixel stage's outputs ask for. - -pub mod ambient; -pub mod antialias; -pub mod bindings; -pub mod bloom; -pub mod capsule_lights; -pub mod constants; -pub mod coronas; -pub mod deferred; -pub mod depth_fog; -pub mod distant_lights; -pub mod dome; -pub mod drawable; -pub mod effect_pass; -pub mod engine; -pub mod fed; -pub mod fog_volumes; -pub mod frame; -pub mod gta5; -mod kept_dx12; -pub mod light_volumes; -pub mod lighting; -pub mod link; -pub mod mesh; -pub mod meshlets; -pub mod meter; -pub mod mips; -pub mod model; -pub mod pack; -pub mod pipeline; -pub mod point_lights; -pub mod quad; -pub mod resolve; -pub mod samplers; -pub mod screen; -pub mod shadow; -pub mod sky; -pub mod spot_lights; -pub mod sprite; -pub mod stand_in; -pub mod states; -pub mod store; -pub mod targets; -pub mod tone; -pub mod trace; -pub mod trail; -pub mod water; - -#[cfg(test)] -pub(crate) mod synthetic; -#[cfg(test)] -pub(crate) mod test_pack; diff --git a/crates/runtime/or-renderer/src/game_shaders/post.rs b/crates/runtime/or-renderer/src/game_shaders/post.rs new file mode 100644 index 000000000..0b3ed9b06 --- /dev/null +++ b/crates/runtime/or-renderer/src/game_shaders/post.rs @@ -0,0 +1,8 @@ +//! Post-processing passes over a lit frame: exposure metering, bloom, depth fog, tone mapping, resolve, and anti-aliasing. + +pub mod antialias; +pub mod bloom; +pub mod depth_fog; +pub mod meter; +pub mod resolve; +pub mod tone; diff --git a/crates/runtime/or-renderer/src/game_shaders/antialias.rs b/crates/runtime/or-renderer/src/game_shaders/post/antialias.rs similarity index 88% rename from crates/runtime/or-renderer/src/game_shaders/antialias.rs rename to crates/runtime/or-renderer/src/game_shaders/post/antialias.rs index 6938e1123..9375eccd2 100644 --- a/crates/runtime/or-renderer/src/game_shaders/antialias.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/antialias.rs @@ -1,13 +1,13 @@ //! The game's anti-aliasing pass over the frame mapped to the screen: it reads each pixel and those around it, by the luminance the mapping left in alpha, and blends the pixels along an edge. -use super::bindings::{Requirement, Resource}; -use super::deferred::{lighting_values, Inputs, Screen, DEPTH_STENCIL_FORMAT}; -use super::engine::EngineConstants; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::samplers::linear; -use super::screen::{unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space}; -use super::stand_in::Provided; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::deferred::{lighting_values, Inputs, Screen, DEPTH_STENCIL_FORMAT}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::samplers::linear; +use crate::game_shaders::screen::{unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::stand_in::Provided; const EFFECT: &str = "postfx"; const TECHNIQUE: &str = "PostFx"; diff --git a/crates/runtime/or-renderer/src/game_shaders/antialias/tests.rs b/crates/runtime/or-renderer/src/game_shaders/post/antialias/tests.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/antialias/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/post/antialias/tests.rs index c446762d1..5ca9c2af6 100644 --- a/crates/runtime/or-renderer/src/game_shaders/antialias/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/antialias/tests.rs @@ -1,8 +1,8 @@ use glam::Mat4; -use super::super::deferred::{hdr_target, DepthViews, GBuffer, ReflectionTarget}; -use super::super::test_pack::{gpu, real_pack}; use super::*; +use crate::game_shaders::deferred::{hdr_target, DepthViews, GBuffer, ReflectionTarget}; +use crate::game_shaders::test_pack::{gpu, real_pack}; const SIZE: u32 = 64; const FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8Unorm; @@ -138,7 +138,7 @@ fn antialiased( if let Some(error) = error { return Err(error.to_string().replace('\n', " | ")); } - Ok(super::super::frame::read_back(device, queue, &out, FORMAT, SIZE).bytes) + Ok(crate::game_shaders::frame::read_back(device, queue, &out, FORMAT, SIZE).bytes) } #[cfg_attr( diff --git a/crates/runtime/or-renderer/src/game_shaders/bloom.rs b/crates/runtime/or-renderer/src/game_shaders/post/bloom.rs similarity index 96% rename from crates/runtime/or-renderer/src/game_shaders/bloom.rs rename to crates/runtime/or-renderer/src/game_shaders/post/bloom.rs index 7e7edd56d..d0b5809af 100644 --- a/crates/runtime/or-renderer/src/game_shaders/bloom.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/bloom.rs @@ -1,14 +1,16 @@ //! The game's bloom: the bright part of the lit frame, blurred at four sizes and put back over the frame it came from. -use super::bindings::{Requirement, Resource}; -use super::deferred::{Inputs, Screen, DEPTH_STENCIL_FORMAT, HDR_FORMAT}; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::samplers::{linear, point}; -use super::screen::{unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space, Written}; -use super::stand_in::Provided; -use super::targets::render_target; -use super::tone::Tone; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::deferred::{Inputs, Screen, DEPTH_STENCIL_FORMAT, HDR_FORMAT}; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::samplers::{linear, point}; +use crate::game_shaders::screen::{ + unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space, Written, +}; +use crate::game_shaders::stand_in::Provided; +use crate::game_shaders::targets::render_target; +use crate::game_shaders::tone::Tone; use crate::recorder::Noted; const EFFECT: &str = "postfx"; @@ -25,7 +27,7 @@ const ADD: usize = 94; const LEAST_INTENSITY: f32 = 0.001; /// The format of the exposure the bright pass reads, as the resolve holds it. -const ADAPTATION_FORMAT: wgpu::TextureFormat = super::meter::EXPOSURE_FORMAT; +const ADAPTATION_FORMAT: wgpu::TextureFormat = crate::game_shaders::meter::EXPOSURE_FORMAT; /// A target a step reads or writes: the frame itself, or one of the buffers of the bloom, at half, a quarter, an eighth or a sixteenth of the frame, each with a scratch one beside it for the blurs. #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/crates/runtime/or-renderer/src/game_shaders/bloom/tests.rs b/crates/runtime/or-renderer/src/game_shaders/post/bloom/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/bloom/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/post/bloom/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/depth_fog.rs b/crates/runtime/or-renderer/src/game_shaders/post/depth_fog.rs similarity index 89% rename from crates/runtime/or-renderer/src/game_shaders/depth_fog.rs rename to crates/runtime/or-renderer/src/game_shaders/post/depth_fog.rs index 7c64c5954..b0b44ee0c 100644 --- a/crates/runtime/or-renderer/src/game_shaders/depth_fog.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/depth_fog.rs @@ -2,15 +2,17 @@ //! //! ⚠ The rays of the sun through the fog are a pass of their own that is not run: the pass is told their strength is nought, which is what the game tells it where a day has none. -use super::bindings::{Requirement, Resource}; -use super::deferred::{lighting_values, Inputs, Screen, DEPTH_STENCIL_FORMAT, HDR_FORMAT}; -use super::engine::EngineConstants; -use super::mesh::scene::{MATERIAL_CLEAR, MATERIAL_TYPE_MASK}; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::samplers::point; -use super::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space}; -use super::stand_in::Provided; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::deferred::{ + lighting_values, Inputs, Screen, DEPTH_STENCIL_FORMAT, HDR_FORMAT, +}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::mesh::scene::{MATERIAL_CLEAR, MATERIAL_TYPE_MASK}; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::samplers::point; +use crate::game_shaders::screen::{ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::stand_in::Provided; pub const EFFECT: &str = "postfx"; pub const TECHNIQUE: &str = "PostFx"; diff --git a/crates/runtime/or-renderer/src/game_shaders/meter.rs b/crates/runtime/or-renderer/src/game_shaders/post/meter.rs similarity index 97% rename from crates/runtime/or-renderer/src/game_shaders/meter.rs rename to crates/runtime/or-renderer/src/game_shaders/post/meter.rs index 65086d752..85c4948a3 100644 --- a/crates/runtime/or-renderer/src/game_shaders/meter.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/meter.rs @@ -5,15 +5,15 @@ use std::collections::BTreeMap; use std::sync::Mutex; -use super::bindings::{Requirement, Resource}; -use super::deferred::{Inputs, DEPTH_STENCIL_FORMAT, HDR_FORMAT}; -use super::engine::EngineConstants; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::samplers::{linear, point}; -use super::screen::{unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space}; -use super::stand_in::Provided; -use super::targets::render_target; +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::deferred::{Inputs, DEPTH_STENCIL_FORMAT, HDR_FORMAT}; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::samplers::{linear, point}; +use crate::game_shaders::screen::{unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space}; +use crate::game_shaders::stand_in::Provided; +use crate::game_shaders::targets::render_target; use crate::recorder::Noted as _; const EFFECT: &str = "postfx"; diff --git a/crates/runtime/or-renderer/src/game_shaders/meter/tests.rs b/crates/runtime/or-renderer/src/game_shaders/post/meter/tests.rs similarity index 98% rename from crates/runtime/or-renderer/src/game_shaders/meter/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/post/meter/tests.rs index bb3c7003c..33a114b93 100644 --- a/crates/runtime/or-renderer/src/game_shaders/meter/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/meter/tests.rs @@ -1,9 +1,9 @@ use glam::Mat4; -use super::super::deferred::{ldr_target, DepthViews, GBuffer, ReflectionTarget}; -use super::super::frame::read_back; -use super::super::test_pack::{gpu, real_pack}; use super::*; +use crate::game_shaders::deferred::{ldr_target, DepthViews, GBuffer, ReflectionTarget}; +use crate::game_shaders::frame::read_back; +use crate::game_shaders::test_pack::{gpu, real_pack}; /// A side that takes the chain of any height the game holds none for, with one target between the quarter and the chain. const SIZE: u32 = 2048; diff --git a/crates/runtime/or-renderer/src/game_shaders/resolve.rs b/crates/runtime/or-renderer/src/game_shaders/post/resolve.rs similarity index 93% rename from crates/runtime/or-renderer/src/game_shaders/resolve.rs rename to crates/runtime/or-renderer/src/game_shaders/post/resolve.rs index d4fba8337..551d95654 100644 --- a/crates/runtime/or-renderer/src/game_shaders/resolve.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/resolve.rs @@ -1,18 +1,20 @@ //! The game's simple post-processing pass over a lit frame: the exposure, the filmic curve and the colour correction that bring the light to the screen. -use super::bindings::{Requirement, Resource}; -use super::deferred::{ +use crate::game_shaders::bindings::{Requirement, Resource}; +use crate::game_shaders::deferred::{ lighting_values, over_what_was_drawn, over_what_was_not_drawn, Inputs, Screen, DEPTH_STENCIL_FORMAT, }; -use super::engine::EngineConstants; -use super::mesh::scene::MATERIAL_CLEAR; -use super::pack::GamePack; -use super::pipeline::{DrawState, Target}; -use super::samplers::{linear, point}; -use super::screen::{unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space, Written}; -use super::stand_in::Provided; -use super::tone::Tone; +use crate::game_shaders::engine::EngineConstants; +use crate::game_shaders::mesh::scene::MATERIAL_CLEAR; +use crate::game_shaders::pack::GamePack; +use crate::game_shaders::pipeline::{DrawState, Target}; +use crate::game_shaders::samplers::{linear, point}; +use crate::game_shaders::screen::{ + unit_quad, ScreenError, ScreenPass, ScreenPassDesc, Space, Written, +}; +use crate::game_shaders::stand_in::Provided; +use crate::game_shaders::tone::Tone; /// The effect, the technique and the pass that map a frame to the screen with the one exposure and one curve: the simplified post-processing pass. const EFFECT: &str = "postfx"; @@ -22,7 +24,7 @@ const SIMPLE: usize = 65; const COMPOSITE: usize = 10; /// The format of the texel the passes read the exposure from. -const ADAPTATION_FORMAT: wgpu::TextureFormat = super::meter::EXPOSURE_FORMAT; +const ADAPTATION_FORMAT: wgpu::TextureFormat = crate::game_shaders::meter::EXPOSURE_FORMAT; /// The lit frame mapped to the screen by the game's own pass, where something was drawn. pub struct ResolvePass { @@ -137,7 +139,14 @@ impl ResolvePass { }, &mut |name, requirement| provide(device, inputs, &adaptation_view, name, requirement), )?; - let black = super::stand_in::uploaded_view(device, queue, 1, 1, &[0, 0, 0, 255], false); + let black = crate::game_shaders::stand_in::uploaded_view( + device, + queue, + 1, + 1, + &[0, 0, 0, 255], + false, + ); let composite = bloom.and_then(|bloom| { let built = |draw: DrawState| { let of = Composited { @@ -340,8 +349,9 @@ fn provide_composite( Resource::Sampler { .. }, "BloomSampler" | "MotionBlurSampler" | "HeatHazeSampler" | "SSLRSampler", ) => Some(Provided::Sampler(linear(device))), - _ => provide(device, of.inputs, of.adaptation, name, requirement) - .or_else(|| super::deferred::provide(device, of.inputs, name, requirement)), + _ => provide(device, of.inputs, of.adaptation, name, requirement).or_else(|| { + crate::game_shaders::deferred::provide(device, of.inputs, name, requirement) + }), } } diff --git a/crates/runtime/or-renderer/src/game_shaders/resolve/tests.rs b/crates/runtime/or-renderer/src/game_shaders/post/resolve/tests.rs similarity index 94% rename from crates/runtime/or-renderer/src/game_shaders/resolve/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/post/resolve/tests.rs index 29f86d7d8..614321ad7 100644 --- a/crates/runtime/or-renderer/src/game_shaders/resolve/tests.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/resolve/tests.rs @@ -1,10 +1,12 @@ use glam::Mat4; -use super::super::deferred::{ldr_target, DepthViews, GBuffer, ReflectionTarget, HDR_FORMAT}; -use super::super::test_pack::{gpu, real_pack}; -use super::super::tone::{Tone, ToneSettings}; use super::*; +use crate::game_shaders::deferred::{ + ldr_target, DepthViews, GBuffer, ReflectionTarget, HDR_FORMAT, +}; use crate::game_shaders::lighting::Lighting; +use crate::game_shaders::test_pack::{gpu, real_pack}; +use crate::game_shaders::tone::{Tone, ToneSettings}; const SIZE: u32 = 16; const SCREEN: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8Unorm; @@ -138,7 +140,7 @@ fn alpha_after(device: &wgpu::Device, queue: &wgpu::Queue, pack: &GamePack, to_s pass.record(&mut draw, false); } queue.submit([encoder.finish()]); - let read = super::super::frame::read_back(device, queue, &out, SCREEN, SIZE); + let read = crate::game_shaders::frame::read_back(device, queue, &out, SCREEN, SIZE); let middle = (SIZE / 2 * SIZE + SIZE / 2) as usize; assert!(read.bytes[middle * 4] > 0, "the pass drew over the middle"); read.bytes[middle * 4 + 3] diff --git a/crates/runtime/or-renderer/src/game_shaders/tone.rs b/crates/runtime/or-renderer/src/game_shaders/post/tone.rs similarity index 99% rename from crates/runtime/or-renderer/src/game_shaders/tone.rs rename to crates/runtime/or-renderer/src/game_shaders/post/tone.rs index f03dd8bab..8ed2efcbd 100644 --- a/crates/runtime/or-renderer/src/game_shaders/tone.rs +++ b/crates/runtime/or-renderer/src/game_shaders/post/tone.rs @@ -4,8 +4,8 @@ use std::collections::BTreeMap; use or_io::gta5::data::timecycle::Keyframe; -use super::lighting::Lighting; -use super::meter::Metering; +use crate::game_shaders::lighting::Lighting; +use crate::game_shaders::meter::Metering; /// The parameters of one filmic curve, as the game's tone mapping reads them. #[derive(Debug, Clone, Copy, PartialEq)] diff --git a/crates/runtime/or-renderer/src/game_shaders/tone/tests.rs b/crates/runtime/or-renderer/src/game_shaders/post/tone/tests.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/tone/tests.rs rename to crates/runtime/or-renderer/src/game_shaders/post/tone/tests.rs diff --git a/crates/runtime/or-renderer/src/game_shaders/trace/mod.rs b/crates/runtime/or-renderer/src/game_shaders/trace.rs similarity index 100% rename from crates/runtime/or-renderer/src/game_shaders/trace/mod.rs rename to crates/runtime/or-renderer/src/game_shaders/trace.rs diff --git a/crates/runtime/or-renderer/tests/shader_ledger.rs b/crates/runtime/or-renderer/tests/shader_ledger.rs index df3313c99..8ab47bd86 100644 --- a/crates/runtime/or-renderer/tests/shader_ledger.rs +++ b/crates/runtime/or-renderer/tests/shader_ledger.rs @@ -46,20 +46,23 @@ const VIEWPORT: &str = "crates/runtime/or-renderer/src/viewport.rs"; const BUILD: &str = "crates/runtime/or-renderer/src/viewport/build.rs"; const WORLD_PIPELINES: &str = "crates/runtime/or-renderer/src/world/pipelines.rs"; const PLAIN: &str = "crates/runtime/or-renderer/src/plain.rs"; -const MESHLETS: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets.rs"; -const AROUND: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/frame_around.rs"; -const CONES: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/frame_cones.rs"; -const COVERED: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/frame_covered.rs"; -const LIGHT: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/frame_light.rs"; -const SHADOW: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/frame_shadow.rs"; -const GROUND: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/ground.rs"; +const MESHLETS: &str = "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs"; +const AROUND: &str = + "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_around.rs"; +const CONES: &str = "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_cones.rs"; +const COVERED: &str = + "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_covered.rs"; +const LIGHT: &str = "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_light.rs"; +const SHADOW: &str = + "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/frame_shadow.rs"; +const GROUND: &str = "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/ground.rs"; const APP_FRAME_LIGHT: &str = "src/render/gta6_frame_light.rs"; -const HAIR: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/hair.rs"; +const HAIR: &str = "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/hair.rs"; /// The row that draws GTA VI's surfaces by its own programs. const SURFACES: &str = "R74o"; /// The row that feeds a GTA VI world's light by the game's own programs. const WORLD_LIGHT: &str = "R74p"; -const FORWARD: &str = "crates/runtime/or-renderer/src/game_shaders/meshlets/forward.rs"; +const FORWARD: &str = "crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/forward.rs"; const TRACE: &str = "crates/runtime/or-renderer/src/game_shaders/trace/pass.rs"; const FRAME_LIGHT: &str = "the frame-light branch"; diff --git a/crates/runtime/or-renderer/tests/the_frame_as_targets_and_passes.rs b/crates/runtime/or-renderer/tests/the_frame_as_targets_and_passes.rs index a2beb6a9a..ee4c3760e 100644 --- a/crates/runtime/or-renderer/tests/the_frame_as_targets_and_passes.rs +++ b/crates/runtime/or-renderer/tests/the_frame_as_targets_and_passes.rs @@ -32,42 +32,46 @@ enum Draws { /// Each source file that begins a render pass, a compute pass or a copy between textures, with /// how many places of each it holds. const SITES: [(&str, Draws, [usize; 3]); 21] = [ - ("game_shaders/ambient.rs", Draws::Frame, [1, 0, 0]), - ("game_shaders/bloom.rs", Draws::Frame, [1, 0, 0]), - ("game_shaders/dome.rs", Draws::Frame, [1, 0, 0]), - ("game_shaders/frame.rs", Draws::Apart, [3, 0, 0]), - ("game_shaders/meshlets.rs", Draws::Model, [2, 0, 0]), + ("game_shaders/core/frame.rs", Draws::Apart, [3, 0, 0]), + ("game_shaders/core/stand_in.rs", Draws::Apart, [2, 0, 0]), + // A helper of tests, compiled for them alone. + ("game_shaders/core/test_pack.rs", Draws::Apart, [1, 0, 0]), + ("game_shaders/geometry/meshlets.rs", Draws::Model, [2, 0, 0]), // The lit frame with the forward surfaces over it, and what each lets through of it. - ("game_shaders/meshlets/forward.rs", Draws::Model, [2, 0, 0]), + ( + "game_shaders/geometry/meshlets/forward.rs", + Draws::Model, + [2, 0, 0], + ), // The light from all around GTA VI's lighting programs read, written before they light. ( - "game_shaders/meshlets/frame_around.rs", + "game_shaders/geometry/meshlets/frame_around.rs", Draws::Model, [1, 0, 0], ), // The copies of the normals and of the depth the game's occlusion program reads. ( - "game_shaders/meshlets/frame_cones.rs", + "game_shaders/geometry/meshlets/frame_cones.rs", Draws::Model, [1, 0, 0], ), // The editor's count of the pixels nothing covers, which the meter is told to leave out. ( - "game_shaders/meshlets/frame_covered.rs", + "game_shaders/geometry/meshlets/frame_covered.rs", Draws::Model, [0, 1, 0], ), // The tables GTA VI's lighting programs read, each baked once a device, and the compute pass // that counts material kinds in the colour target into 32 bins on the GPU. ( - "game_shaders/meshlets/frame_light.rs", + "game_shaders/geometry/meshlets/frame_light.rs", Draws::Apart, [1, 1, 1], ), // The copy of the shadow's map the game's resolve of it samples, or of the traced rays' // mask into the mask the lighting reads. ( - "game_shaders/meshlets/frame_shadow.rs", + "game_shaders/geometry/meshlets/frame_shadow.rs", Draws::Model, [1, 0, 0], ), @@ -75,14 +79,16 @@ const SITES: [(&str, Draws, [usize; 3]); 21] = [ // that take each pixel's occlusion and resolve the sun's shadow, and that meter, expose // and tone the lit frame. ( - "game_shaders/meshlets/frame_steps.rs", + "game_shaders/geometry/meshlets/frame_steps.rs", Draws::Model, [1, 1, 0], ), + ("game_shaders/lighting/ambient.rs", Draws::Frame, [1, 0, 0]), + ("game_shaders/lighting/dome.rs", Draws::Frame, [1, 0, 0]), + ("game_shaders/lighting/shadow.rs", Draws::Frame, [2, 0, 0]), + ("game_shaders/post/bloom.rs", Draws::Frame, [1, 0, 0]), // The passes that measure a world's lit frame, and the copy of the exposure into each texel it is read from. - ("game_shaders/meter.rs", Draws::Frame, [1, 0, 1]), - ("game_shaders/shadow.rs", Draws::Frame, [2, 0, 0]), - ("game_shaders/stand_in.rs", Draws::Apart, [2, 0, 0]), + ("game_shaders/post/meter.rs", Draws::Frame, [1, 0, 1]), // The sun's mask of a model written by rays, a tile at a time. ("game_shaders/trace/pass.rs", Draws::Model, [0, 3, 1]), ("surface.rs", Draws::Apart, [1, 0, 0]), @@ -91,8 +97,6 @@ const SITES: [(&str, Draws, [usize; 3]); 21] = [ ("viewport/game_frame.rs", Draws::Frame, [4, 0, 1]), // A world's sea over the lit frame, and the copy of the frame it reads behind itself. ("viewport/world_water.rs", Draws::Frame, [1, 0, 1]), - // A helper of tests, compiled for them alone. - ("game_shaders/test_pack.rs", Draws::Apart, [1, 0, 0]), ]; /// The calls counted in a file, in the order of a site's three numbers: a pass is begun on the encoder, or by the recorder's method of it, which notes it and begins it. @@ -202,7 +206,7 @@ fn steps() -> Vec { times: Times::Fixed(4), ..step( "world.record_fed_cascade", - ("sun-shadow-cast", "game_shaders/shadow.rs"), + ("sun-shadow-cast", "game_shaders/lighting/shadow.rs"), "shadow map", Surfaces, From::Game, @@ -210,49 +214,49 @@ fn steps() -> Vec { }, step( "scene.record_shadow", - ("sun-shadow-cast", "game_shaders/shadow.rs"), + ("sun-shadow-cast", "game_shaders/lighting/shadow.rs"), "shadow map", Surfaces, From::Game, ), step( "passes.record_shadow_receive", - ("sun-shadow-receive", "game_shaders/shadow.rs"), + ("sun-shadow-receive", "game_shaders/lighting/shadow.rs"), "G-buffer 2, alpha", Screen, From::Game, ), step( "passes.record_ambient", - ("ssao-downscale", "game_shaders/ambient.rs"), + ("ssao-downscale", "game_shaders/lighting/ambient.rs"), "half depth", Screen, From::Game, ), step( "passes.record_ambient", - ("ssao-process", "game_shaders/ambient.rs"), + ("ssao-process", "game_shaders/lighting/ambient.rs"), "half occlusion", Screen, From::Game, ), step( "passes.record_ambient", - ("ssao-blur-x", "game_shaders/ambient.rs"), + ("ssao-blur-x", "game_shaders/lighting/ambient.rs"), "half occlusion", Screen, From::Game, ), step( "passes.record_ambient", - ("ssao-blur-y", "game_shaders/ambient.rs"), + ("ssao-blur-y", "game_shaders/lighting/ambient.rs"), "half occlusion", Screen, From::Game, ), step( "passes.record_ambient", - ("ssao-upscale", "game_shaders/ambient.rs"), + ("ssao-upscale", "game_shaders/lighting/ambient.rs"), "G-buffer 3, red and green", Screen, From::Game, @@ -298,7 +302,7 @@ fn steps() -> Vec { ), step( "passes.record_sky_noise", - ("sky-noise-pass", "game_shaders/dome.rs"), + ("sky-noise-pass", "game_shaders/lighting/dome.rs"), "cloud noise", Screen, From::Game, @@ -374,7 +378,7 @@ fn steps() -> Vec { times: Times::MeterPlan, ..step( "passes.record_meter", - ("viewport-exposure-pass", "game_shaders/meter.rs"), + ("viewport-exposure-pass", "game_shaders/post/meter.rs"), "exposure buffers, the exposure", Screen, From::Game, @@ -384,7 +388,7 @@ fn steps() -> Vec { times: Times::BloomPlan, ..step( "passes.record_bloom", - ("bloom", "game_shaders/bloom.rs"), + ("bloom", "game_shaders/post/bloom.rs"), "bloom buffers, lit frame", Screen, From::Game, diff --git a/crates/title/or-title/Cargo.toml b/crates/title/or-title/Cargo.toml index 6d18cc80d..fae189c1d 100644 --- a/crates/title/or-title/Cargo.toml +++ b/crates/title/or-title/Cargo.toml @@ -23,10 +23,6 @@ zip.workspace = true serde_json.workspace = true # The platform's configuration directory. dirs.workspace = true -# The day's sun, moon and light directions. -glam.workspace = true -# The executable the day's variable table is read from. -memmap2.workspace = true # Steam and the Rockstar launcher name an install in the registry. [target.'cfg(windows)'.dependencies] diff --git a/crates/title/or-title/src/lib.rs b/crates/title/or-title/src/lib.rs index 204f5ffeb..78284722e 100644 --- a/crates/title/or-title/src/lib.rs +++ b/crates/title/or-title/src/lib.rs @@ -10,16 +10,7 @@ pub mod config; pub mod dlc; pub mod game; pub mod gta5; -pub mod gta6_cloud; -pub mod gta6_day; -pub mod gta6_day_frame; -pub mod gta6_day_sun; -pub mod gta6_day_vars; -pub mod gta6_day_weather; -pub mod gta6_day_wind; -pub mod gta6_exposure; pub mod gta6_mount; -pub mod gta6_sky; pub mod install; pub mod mods; pub mod oiv; diff --git a/crates/tools/or-shader-front/src/rdna/tests.rs b/crates/tools/or-shader-front/src/rdna/tests/mod.rs similarity index 100% rename from crates/tools/or-shader-front/src/rdna/tests.rs rename to crates/tools/or-shader-front/src/rdna/tests/mod.rs diff --git a/crates/tools/or-shader-front/src/rdna/to_naga/trace.rs b/crates/tools/or-shader-front/src/rdna/to_naga/trace/mod.rs similarity index 100% rename from crates/tools/or-shader-front/src/rdna/to_naga/trace.rs rename to crates/tools/or-shader-front/src/rdna/to_naga/trace/mod.rs diff --git a/docs/direction/Clothing_Tool_Design.md b/docs/direction/Clothing_Tool_Design.md index a246ba5c2..ace391ffd 100644 --- a/docs/direction/Clothing_Tool_Design.md +++ b/docs/direction/Clothing_Tool_Design.md @@ -362,7 +362,7 @@ Wave F of [Workbench_Plan.md](Workbench_Plan.md) built the headless engine, in ` - **Against a resource that exists.** The plan of the server's clothing resource, 13,331 drawables and textures with 12 alternates among them, has exactly its files, the variation metadata of both peds in meaning and its creature metadata (`the_plan_of_a_reference_pack_matches_the_reference`, which takes the folder from `OPENRAGE_REFERENCE_PACK` and skips without it, the resource being in no repository). It was planned from an import of the folder in place, at `Depth::Stat`: nothing was read or written there. - **Shop metadata against the same resource.** The `data/_.meta` of each ped has the header the plan writes (`pedName`, `dlcName`, `fullDlcName`, `eCharacter`, `creatureMetaData`), every entry has the elements the plan's have in their order, every value of an element that is no index is one the resource writes, and every entry of the resource is the plan's, counting an entry listed twice twice and leaving the `uniqueNameHash` out: an entry the resource lists for a texture it has no file for is kept as stated and written back, and so is every element an import kept, `forcedComponents` among them, in `the_plan_states_the_shop_metadata_the_reference_registers_its_collections_with`. The plan has more entries than the resource lists, which leaves some drawables out of its shop. The comparison found that the plan wrote the bare `eCharacter` of the male files for the female ped too; the female shop files state `SCR_CHAR_MULTIPLAYER_F` in all 21 that the server's resources hold, the male ones the bare form in 19 and `SCR_CHAR_MULTIPLAYER_M` in 2 (counted by hand, no test holds the count), and the plan now writes the bare form for a male and the `_F` form for a female. The ids (`uniqueNameHash`) are not compared in that suite: the plan writes the ones an import read, which the next item holds to the resource. - **A shop's own metadata.** A server that left Durty Cloth Tool, or never used it, has shop files and entry ids of its own, so compatibility is not Durty's alone: `or_wardrobe::shop` reads them. It finds the files a resource's manifest registers as shop apparel data (a line ` '' ''`, whichever directive ends in `data_file`) and any file offered whose root element is `ShopPedApparel`, and resolves each entry to the texture of a garment by its ped, its `eCompType` or `eAnchorPoint`, its `localDrawableIndex` or `localPropIndex` and its `textureIndex`. The `uniqueNameHash` is kept as the text the file wrote, because a name the game hashes or a run of 12 hexadecimal digits does not fit 32 bits; it becomes the default id of that texture with the entry's `cost` and its other elements, and a build writes it back unchanged. An entry that points at no garment is kept in the pack and written back, and a ped with no garment at all but such entries still gets its shop file, registered in the manifest, with no variation metadata (`entries_kept_for_a_ped_that_has_no_garment_are_still_written_registered_and_verified`); a texture no entry names gets the build's name (Durty's when `durty_hashes` asks), and two entries claiming one id, case aside, are findings a waiver can set aside (`shop-entry-unplaced`, `shop-id-clash`). Another file the manifest registers with the shop, such as a server's own `.spak`, is carried unchanged under the line that registered it. Against the server's resource (`a_server_pack_with_its_own_shop_metadata_is_imported_and_written_back`, which takes the folder from `OPENRAGE_REFERENCE_PACK`, skips without it and only reads it; measured at `a2920ff2`): its 2 shop files state 11,138 entries, 11,063 of which resolve to a texture and 75 point at no garment; 73 garments have a texture no entry names; 9 ids are claimed by more than one entry; 5,213 ids do not fit 32 bits; the plan writes all 11,138 back with their ids and 380 more, named by the build, for textures no entry names; and a second import of the output, made over empty stand-ins for the models and textures so that none of its 4 GB is copied, resolves 11,443 of 11,518 entries, every id the first import resolved unchanged. Its 2 `.spak` files are carried. It ships no cloth, so what the game does with a cloth shipped while the metadata does not state `ownsCloth` is not measured and no import links one. -- **Edits and Undo.** [`or_wardrobe::edit`](../../crates/domain/or-wardrobe/src/edit.rs) makes every change a screen makes, and [Wardrobe_Parity.md](Wardrobe_Parity.md) says which of the incumbents' rows the Wardrobe has. `revise` reads the pack, changes it, writes it and keeps the pack as it was and as the change left it, and `undo_revision` writes the first back and is refused when the pack is no longer the second, so a screen takes any edit back without a rule of its own for it; `locate_texture` and `remove_texture` are the fixes of a texture that is not there, and `moved` says which garments took another place when one left or changed. A drop never adds a garment the pack already holds, which is one of the same ped and slot with the same model bytes and, where the drop brings textures, the same texture bytes, and its report names them (`a_folder_dropped_twice_adds_its_garments_once_and_the_second_drop_says_how_many_it_left`, `undo_after_the_fix_of_a_duplicate_restores_the_garment_the_fix_removed`). +- **Edits and Undo.** [`or_wardrobe::edit`](../../crates/domain/or-wardrobe/src/ops/edit.rs) makes every change a screen makes, and [Wardrobe_Parity.md](Wardrobe_Parity.md) says which of the incumbents' rows the Wardrobe has. `revise` reads the pack, changes it, writes it and keeps the pack as it was and as the change left it, and `undo_revision` writes the first back and is refused when the pack is no longer the second, so a screen takes any edit back without a rule of its own for it; `locate_texture` and `remove_texture` are the fixes of a texture that is not there, and `moved` says which garments took another place when one left or changed. A drop never adds a garment the pack already holds, which is one of the same ped and slot with the same model bytes and, where the drop brings textures, the same texture bytes, and its report names them (`a_folder_dropped_twice_adds_its_garments_once_and_the_second_drop_says_how_many_it_left`, `undo_after_the_fix_of_a_duplicate_restores_the_garment_the_fix_removed`). - **Operations on a garment.** Wave P20 adds the operations a creator does by hand, each a `Revision` that one Undo takes back whole. `or_wardrobe::replace` puts another file in the place of a model or a texture: the file is decompiled at the door into a source folder of the pack, which the garment names in place of the old one, so the name the garment ships under comes from the garment and every setting of it (place, pin, skin, tints, texture ids, flags, shop ids) stays, and an image makes the texture as a drop does; the file or source it replaced is not touched, so a garment that names it too keeps it, and a place held is given the file the same way (`a_replaced_model_is_a_source_the_garment_names_and_the_old_file_stays_where_it_was`, `a_model_another_garment_names_too_stays_with_that_garment`, `a_place_held_takes_the_model_it_is_given_and_undo_takes_the_source_out_again`). Undo names the old file again and takes the new source out, one step at a time (`a_second_replacement_leaves_the_first_and_undo_goes_back_one_step_at_a_time`); the file a replacement wrote over, which `or_wardrobe::rewrite` kept by hash, is the one thing the door no longer produces. `duplicate::to` copies garments to a ped with a copy of every file (a texture written over in place would change both garments), the flags and tints, no shop id, and the lowest free place of the slot (`a_jacket_is_copied_to_the_female_ped_with_its_files_and_flags_and_undo_takes_the_copy_out`); the copy ships the same model as the garment until its model is replaced, and no rule says so: the duplicate rule compares garments of one ped and slot, and a copy is made for the other ped. `edit::reorder` swaps the place of a garment with its neighbour's in its slot: free garments swap their order, and when either is pinned both are pinned at the places they swap to; the name the game sees changes for both and the next build's diff reports them by stable id (`two_garments_that_are_not_pinned_swap_their_places_and_stay_free`, `pinned_garments_swap_pins_so_each_is_where_it_was_asked_to_be`). `variations` adds a texture from a `.ytd`, takes one out, moves one to another letter (a letter is its place in the list, so moving renames the ones it passes) and tints one, each refusing a row that names a file the texture at that place no longer has (`moving_a_texture_renames_the_letters_it_passes_and_its_tint_and_flags_go_with_it`). `export` writes a garment's files, or one texture's, under the names a build gives them, which a drop reads again, and overwrites nothing (`the_files_of_a_garment_are_written_under_the_names_the_game_gives_them_and_a_drop_reads_them_again`). `edit::apply_all` makes an edit to a list, all or none, so one revision is one Undo for a removal, a ped or a slot of three garments (`three_garments_removed_together_come_back_together_with_one_undo`); the screen that picks a list is wave P21's. - **Import breadth.** Wave P22 changes what `edit::add_clothes` takes. A file whose extension is one `or_io::authoring::texture_import` reads (PNG, JPEG, TGA, BMP, TIFF, DDS, PSD, HDR, EXR) is a texture by that extension and is named as a `.ytd` is; one named as a texture is authored as a textures source of its variation (`or_source::create::author_textures`), which holds the pictures and no DDS and is compiled once in a scratch folder before it is kept, so a refusal of the compile (floating-point light with no rule to bring it down, a size a texture cannot have) leaves the picture out with the compile's sentence and the garment keeps its other textures (`a_dropped_image_becomes_an_authored_textures_source_of_its_garment_in_every_format_and_undo_takes_it_out`). The source states no platform; a build compiles it for Legacy, Enhanced or both. A picture that is named as no texture is left out and not given to the only model. `resolve` reads a name behind a chain of prefixes from its last name (`dlc^` and the like) and an image as a texture, and a file that opens with `FXAP` is left out by name in a drop and in an import. A duplicate, in `rules` and in a drop alike, needs the same ped, slot, model bytes and texture bytes. `add_clothes_watched` takes a `Watch` (an `or_job::Progress` and an `or_job::Cancel`): it counts the files it reads and the garments it copies, looks at the flag as it goes, and a drop that is stopped removes what it copied and writes nothing; the ceiling of a folder is a million files (`a_drop_says_how_far_it_has_got_and_ends_at_the_whole`). Dialog and header are the screen's ([Workbench_UX_Design.md](Workbench_UX_Design.md), What a drop takes in); the app's `resolve_garments` applies a ped and a slot to a list in one `Revision`. - **Tags, groups and search.** Wave P21 gives a garment two words of its own that a person writes and a build reads only through the inclusion rule of a build (wave P37, [the power features](#the-power-features-of-wave-p37)): `tags`, any number of them, and `group`, one name, both in `wardrobe.json` beside the label and only where somebody wrote them (they are not in `Meta`, which holds the engine's names). `edit::apply_all` makes `AddTag`, `RemoveTag` and `Group` to a list as it makes every edit, so a tag on three garments is one Undo; the same word in another case is the same tag and a tag of nothing is refused (`tags_and_a_group_are_set_over_a_list_all_or_none_and_a_pack_without_them_writes_none`), and a build of a pack is the build of the same pack without them (`a_build_is_the_same_with_tags_and_a_group_as_without`). `search::terms` is what a garment is found by, each word apart: its place, its slot, its name, the name a build gives its model (`search::game_name`, computed by the layout the build uses) and its group and tags; the list matches each word of a query, as letters in order, against one of them (`a_garment_is_found_by_its_place_slot_name_game_name_group_and_tags`). diff --git a/docs/direction/GTA_VI_Platforms_Plan.md b/docs/direction/GTA_VI_Platforms_Plan.md index 2e4c14d98..9a69bc54d 100644 --- a/docs/direction/GTA_VI_Platforms_Plan.md +++ b/docs/direction/GTA_VI_Platforms_Plan.md @@ -62,12 +62,12 @@ Read at `6b1dda52`. Each is a fact of one build written as a fact of the game. **The archive, in `or-io`.** -- `Rpf9Header::broken_rule` in `crates/io/or-io/src/container/rpf/rpf9.rs` holds one table of constants, the Xbox's, and every other rule there was measured on Xbox headers alone. `crates/io/or-io/src/container/rpf/gta6_container_build.rs` writes the Xbox letter and byte into every archive it builds. +- `Rpf9Header::broken_rule` in `crates/io/or-io/src/container/rpf/rpf9/mod.rs` holds one table of constants, the Xbox's, and every other rule there was measured on Xbox headers alone. `crates/io/or-io/src/container/rpf/rpf9/gta6_container_build.rs` writes the Xbox letter and byte into every archive it builds. - The platform letter is read and nothing in `or-io` decides by it; the app shows it in a row's extension, and falls back to the Xbox's where no table opened. The list of letters exists twice in `or-io` (`RAGE_PLATFORM_LETTERS` and a copy in the header's rules) and a third time as `Platform::extension_letter` in `or-title`. - RPF9 is no layout behind `RpfArchive`: it is a side state and a branch in each of `crates/io/or-io/src/container/rpf/reader.rs` and `crates/io/or-io/src/container/rpf/archive.rs` where the version is RPF9. -- A table's keys come from process state. `Gta6Context` in `crates/io/or-io/src/container/rpf/gta6_rpf.rs` is a global that reads environment variables once and keeps the result, errors included; the provider an archive is opened with is ignored for RPF9. The app keeps one key set for the process in `src/state/rpf9_table.rs` and gives it to that global, so two builds cannot be open at once, and the CLI loads keys through two functions that do the same. -- The key code names one build. `crates/io/or-io/src/container/rpf/gta6_extract.rs` lists a single build, reads it as a PE in one of two PE readers the tree holds, and keeps one cache file, `gtavi_keys_cache.dat`, for every install; `GtaViKeys` records no platform, and a snapshot is used without holding its recorded executable to the build it is used on. -- `crates/io/or-io/src/container/rpf/rpf9_scan.rs` is built on zlib heads from end to end, and the readers of `crates/io/or-io/src/container/rpf/gta6_mount.rs` and `crates/io/or-io/src/container/rpf/gta6_chunk_table.rs` assume zlib where a chunk is not stored. +- A table's keys come from process state. `Gta6Context` in `crates/io/or-io/src/container/rpf/rpf9/gta6_rpf.rs` is a global that reads environment variables once and keeps the result, errors included; the provider an archive is opened with is ignored for RPF9. The app keeps one key set for the process in `src/state/rpf9_table.rs` and gives it to that global, so two builds cannot be open at once, and the CLI loads keys through two functions that do the same. +- The key code names one build. `crates/io/or-io/src/container/rpf/rpf9/gta6_extract.rs` lists a single build, reads it as a PE in one of two PE readers the tree holds, and keeps one cache file, `gtavi_keys_cache.dat`, for every install; `GtaViKeys` records no platform, and a snapshot is used without holding its recorded executable to the build it is used on. +- `crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/mod.rs` is built on zlib heads from end to end, and the readers of `crates/io/or-io/src/container/rpf/rpf9/gta6_mount.rs` and `crates/io/or-io/src/container/rpf/rpf9/gta6_chunk_table.rs` assume zlib where a chunk is not stored. **Textures.** @@ -237,7 +237,7 @@ Each row ends on a check that fails today. Rows a to e need no key. R72a stands on nothing and R72b beside it. R72c needs R72b, R72d and R72e need R72a, R72f and R72g follow in either order, and R72j is last because it moves files every other row edits. -Rows a to e are built. What holds each: `a_header_that_mixes_two_platforms_or_states_an_unmeasured_one_is_refused_by_name` and, over the builds `OPENRAGE_GAME_ROOT` names, `every_archive_header_of_a_build_parses_and_states_its_build_s_one_platform`; the cases of `crates/title/or-title/tests/a_gta_vi_folder_is_not_gta_v.rs`; the tests of `crates/title/or-title/src/install/gta6_files.rs`; `a_texture_two_platforms_hold_reads_to_the_same_pixels_through_each_envelope`, which is install-gated; and the tests of `crates/io/or-io/src/container/rpf/rpf9_scan/tests/stored.rs`. Left of them: a PlayStation 5 pack saves only as the file it is, and an edit of one is refused; the modules that read an archive by its file name still do; and `InstallLayout` stands. +Rows a to e are built. What holds each: `a_header_that_mixes_two_platforms_or_states_an_unmeasured_one_is_refused_by_name` and, over the builds `OPENRAGE_GAME_ROOT` names, `every_archive_header_of_a_build_parses_and_states_its_build_s_one_platform`; the cases of `crates/title/or-title/tests/a_gta_vi_folder_is_not_gta_v.rs`; the tests of `crates/title/or-title/src/install/gta6_files.rs`; `a_texture_two_platforms_hold_reads_to_the_same_pixels_through_each_envelope`, which is install-gated; and the tests of `crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/tests/stored.rs`. Left of them: a PlayStation 5 pack saves only as the file it is, and an edit of one is refused; the modules that read an archive by its file name still do; and `InstallLayout` stands. ## Measurements still owed diff --git a/docs/direction/Project_Context.md b/docs/direction/Project_Context.md index 3d2710f44..b6d9d0a5d 100644 --- a/docs/direction/Project_Context.md +++ b/docs/direction/Project_Context.md @@ -392,7 +392,7 @@ The app takes `rodio` 0.22 (MIT OR Apache-2.0), which plays through `cpal`, with Windows-only dependency, because on Linux `cpal` needs the ALSA headers the hosted CI image lacks; a Linux build lists, exports and replaces streams and says it plays none. The output device opens at the first play, so drawing and tests open none, and playback sits behind the -`AudioSink` trait in `src/audio.rs`, which the state tests fill with a sink that records what it +`AudioSink` trait in `src/audio/mod.rs`, which the state tests fill with a sink that records what it was handed. Like every crate dependency it carries its own licence and is not listed in [LICENSE-third-party.md](../../LICENSE-third-party.md). diff --git a/docs/direction/Project_Model_Design.md b/docs/direction/Project_Model_Design.md index 456abe1e0..18196615f 100644 --- a/docs/direction/Project_Model_Design.md +++ b/docs/direction/Project_Model_Design.md @@ -20,7 +20,7 @@ It is the Visual Studio model with one level less: the solution and the project ## Where the project stands today -The project file is `.openrage-proj` at `PROJECT_SCHEMA` 3 (`src/state/project.rs`): a workspace, the open tabs and the member documents, beside a `vfs/` folder that the virtual filesystem reads ahead of the install. [R48](Roadmap.md#r48-projects) describes it as membership "across every editable type", so it is already untyped. A key a build does not know is carried and written back, which is what lets this model add keys without breaking an older file. +The project file is `.openrage-proj` at `PROJECT_SCHEMA` 3 (`src/state/project/mod.rs`): a workspace, the open tabs and the member documents, beside a `vfs/` folder that the virtual filesystem reads ahead of the install. [R48](Roadmap.md#r48-projects) describes it as membership "across every editable type", so it is already untyped. A key a build does not know is carried and written back, which is what lets this model add keys without breaking an older file. ## The questions it answers @@ -267,4 +267,4 @@ Superseded for ordering by [Workbench_Plan.md](Workbench_Plan.md); this table st ## Sources -[R48](Roadmap.md#r48-projects) and `src/state/project.rs` for the project as it is; [Clothing_Tool_Design.md](Clothing_Tool_Design.md) for the first module and the incumbents; Visual Studio's solution and project model as general knowledge; the owner's Vestium for a project that holds several packs. The manifest lines above are illustrative. +[R48](Roadmap.md#r48-projects) and `src/state/project/mod.rs` for the project as it is; [Clothing_Tool_Design.md](Clothing_Tool_Design.md) for the first module and the incumbents; Visual Studio's solution and project model as general knowledge; the owner's Vestium for a project that holds several packs. The manifest lines above are illustrative. diff --git a/docs/direction/Roadmap.md b/docs/direction/Roadmap.md index b7481e645..7350d0e9c 100644 --- a/docs/direction/Roadmap.md +++ b/docs/direction/Roadmap.md @@ -1327,7 +1327,7 @@ opened from it first, or by a hex or decimal hash of a name or of its stem under `Enter` opens the highlighted file through R24c's `walk_to`, opening every archive on its path as the tree does, and `Shift+Enter` or a Shift-click reveals it in Files instead. All, Base game and Mods overlay narrow the list to everything, to the install outside its `mods` folder, or to inside -it. The box reads the file index (`src/state/file_index.rs`): every file of the active install and +it. The box reads the file index (`src/state/file_index/mod.rs`): every file of the active install and of each install, folder and archive open in Files, nested archives included, walked off the UI thread through `or_title::install::crawl` and streamed, so a file is found before the walk ends, with the walk's progress where the results are listed; a first walk is the File index job of the @@ -2003,7 +2003,7 @@ gives the bytes cut to `limit`, but a resource read from an archive returns at l its header (`read_prefix` takes `limit.max(Rsc7::HEADER_LEN)`) and an entry decrypted whole, a `.ysc` in an encrypted archive, in full whatever the limit, which cannot matter for a `.ybn`. The retail equivalence test declares its own `FRONT` of 4,096 beside `BOUND_FRONT` in -`crates/domain/or-world-gta5/src/contents.rs`, which is private and which `ModelContents::read_bound` +`crates/domain/or-world-gta5/src/archetypes/contents.rs`, which is private and which `ModelContents::read_bound` reads, so lowering one leaves the evidence on the other; every "reads only the header" assertion measures the length of the bytes returned and not what the archive was asked for, so a read of the whole body that is then cut passes them, and nothing pins `read_at` bounded. The two retail-install @@ -3608,7 +3608,7 @@ rather than by `or-io`'s writer, must each decode to their source, and a decoder 0 and 1 in every block fails it. `crates/io/or-io/tests/awc_roundtrip.rs` records no multi-channel skip. -The app opens an `.awc` as its own kind (`src/audio.rs`, `src/state/opening_an_awc.rs`). The +The app opens an `.awc` as its own kind (`src/audio/mod.rs`, `src/state/opening_an_awc.rs`). The inspector lists each single-channel stream and a multi-channel container's interleaved source by name hash, codec, channel count, rate and length; plays one through `rodio` behind the `AudioSink` trait, on every platform; exports one to WAV; and replaces a stream from a 16-bit PCM WAV in the codec it has, through @@ -3787,7 +3787,7 @@ and item class. the index answers "which container holds this sound". **Where it stands.** The container reads and saves. `or_io::rel::RelFile` -(`crates/io/or-io/src/rel.rs`, behind the `rel` feature) keeps the data block verbatim, the name +(`crates/io/or-io/src/rel/mod.rs`, behind the `rel` feature) keeps the data block verbatim, the name table, the item index and the hash and pack tables, derives every length the file states, and refuses one the bytes do not bear out; a damaged item table is refused by name (`a_corrupted_item_table_is_refused_by_name`). An item is its key and its bytes, typed by its first @@ -5166,7 +5166,7 @@ a guest cannot take a Rust type across the boundary, so the host speaks `or_io:: model, which every declared format builds from its declarations (`Format::description`), and hands a guest that links `or-io` itself the file's bytes. `plugins/README.md` is where an author starts, and [Plugin_ABI.md](../reference/Plugin_ABI.md) is the contract. -The app embeds the host (`src/state/plugins.rs`) and `openrage-cli` does not; `or-plugin` stays +The app embeds the host (`src/state/plugins/mod.rs`) and `openrage-cli` does not; `or-plugin` stays for R44e to R47 by the owner's ruling of 2026-09-30 ([OD-AUDIT-KEEPS](Project_Context.md#the-plugin-host-the-registries-and-the-second-title-seams-stay-2026-09-30)). **Covers.** U-165, U-166, U-168, U-175, U-176, U-178, answered by @@ -5224,7 +5224,7 @@ are shown before it runs; how a grant is recorded and revoked; and what a user s refused. A refusal carries a stable key and the sentence a prompt would show, and unshown it makes a plugin that appears to work and does nothing. Embedding the host in the app is part of this row. -**Where it stands.** Done. `src/state/plugins.rs` embeds the host: a plugin is a directory of +**Where it stands.** Done. `src/state/plugins/mod.rs` embeds the host: a plugin is a directory of `plugin.json` and `plugin.wasm` under the configuration directory's `plugins`, run from Tools → Run plugin on the open document's described root. Before its first run a prompt lists what the manifest declares; the answer is kept in the preferences by plugin id and revoked in Settings → @@ -5424,7 +5424,7 @@ above and the unnumbered mesh-authoring row. edited file added to the project automatically; portable projects; and a project's copy of a file resolving ahead of the game's, so an edit renders without repacking. [Project_Model_Design.md](Project_Model_Design.md) proposes modules, outputs and links on top of it, [Workbench_UX_Design.md](Workbench_UX_Design.md) draws the screens around it and [Workbench_Plan.md](Workbench_Plan.md) orders the work. -**Where it stands.** The manifest, lifecycle and File-menu submenu are built (`src/state/project.rs`, +**Where it stands.** The manifest, lifecycle and File-menu submenu are built (`src/state/project/mod.rs`, `src/state/project_io.rs`); since #189 paths inside the project folder are relative, and `or_title::mount_shadow` mounts the project's `vfs/` folder ahead of the overlay and the install. The container is built in `crates/domain/or-project`: the file declares `modules` and `outputs`, a @@ -6314,7 +6314,7 @@ beside Extraction, since the machinery runs one job at a time; the Convert comma still says a whole folder converts with `openrage-cli convert retarget`, which names a command and not a flag, and R59t's test for flags in the app's words passes it; and `ConvertClash` still repeats four fields of `ExtractClash` and shares only the question's text, because one struct would -change the struct literals of three other files (`src/self_check.rs`, +change the struct literals of three other files (`src/self_check/mod.rs`, `src/state/settings_recents_and_small_editor_fixes.rs` and `src/state/search_results_that_open.rs`). @@ -6349,7 +6349,7 @@ assertion of `an_export_as_write_is_listed_as_an_export_and_cancel_export_reache `.filter(doing == doing).all(stopping)`, which passes on an empty set if the job leaves the list, though the find at its top shows the job was there; and `ConvertClash` repeats four fields of `ExtractClash` and shares only the question's text, one struct changing the struct literals of -`src/self_check.rs`, `src/state/settings_recents_and_small_editor_fixes.rs` and +`src/self_check/mod.rs`, `src/state/settings_recents_and_small_editor_fixes.rs` and `src/state/search_results_that_open.rs`. The question's per-frame cost over a large selection is [R59f](#r59f-performance-and-cache-tuning)'s. @@ -6757,7 +6757,7 @@ shortcuts; remembered dock layouts; a camera per document with each workspace a performance and cache tuning (R59a to R59f). Since the UX review of 2026-10-03 it also holds the shell's screenshots, commands, shortcuts, regions, tabs, workspaces, words, feedback and accessibility (R59g to R59z). **Where it stands.** Shortcuts predate the parts -(`src/ui/shortcuts.rs`). [R59a](#r59a-the-egui-034-deprecations), [R59b](#r59b-appearance-and-scale), +(`src/ui/shortcuts/mod.rs`). [R59a](#r59a-the-egui-034-deprecations), [R59b](#r59b-appearance-and-scale), [R59d](#r59d-the-layout-that-survives-a-restart) (`src/ui/dock_layout.rs`) and R59e are done; [R59c](#r59c-localisation-and-the-translation-pipeline) is open, its early start declined against a measured string count, and [R59f](#r59f-performance-and-cache-tuning) is open. R59g to R59w @@ -6990,7 +6990,7 @@ offered while it does nothing. owns (Space, the arrows, Home) act only in the panel under the pointer or with focus; `Ctrl+Y` redoes. -**Where it stands.** Done. `action_for_press` in `src/ui/shortcuts.rs` decides from winit's logical +**Where it stands.** Done. `action_for_press` in `src/ui/shortcuts/mod.rs` decides from winit's logical key, its physical key, the modifiers and whether a widget has keyboard focus. A letter or a punctuation mark matches the character its key types, ignoring case, and a key that types none matches by name; Shift does not count for a digit or a punctuation mark, whose character already @@ -7621,7 +7621,7 @@ once finds the row's menu. preference leave nothing in the owner's temporary folder or in the way of the next test, and a script's `game` step waits for its listing. -**Where it stands.** Done. `run` in `src/self_check.rs` holds a `ScratchToRemove` guard from its +**Where it stands.** Done. `run` in `src/self_check/mod.rs` holds a `ScratchToRemove` guard from its first line, so `openrage-self-check-` goes however the run ends, an early return and a panic's unwinding included (`a_self_check_refused_at_its_first_check_removes_its_scratch_folder`); a second test (removed 2026-10-09: Cranelift cannot unwind) ran a @@ -9683,7 +9683,7 @@ and the choice, kept on disk and rebuilt only where the install changed. It adds (`the_world_index_names_everything_a_real_install_lists`, 2026-11-26; [figures](../reference/Crate_Reference.md#domain-crates)), and the index names the copy of a file the title update patches, the one the mount opens. -`crates/domain/or-world-gta5/src/world_index.rs` reads every map, type file, manifest and bound an +`crates/domain/or-world-gta5/src/streaming/world_index/mod.rs` reads every map, type file, manifest and bound an archive at a time, answers the maps and carried bounds at a position and is kept on disk by each archive's stamp (`the_world_index_of_a_mount`), behind `openrage-cli world index` and `world at`. `DlcCutoff::Level` stops the mount at a pack of the DLC list and `MountOptions::mode` takes the map @@ -9759,7 +9759,7 @@ shaders costs over the whole map, for the plan's ruling 9 ([brief](World_Editor_Plan.md#the-day-sky-water-and-shadows-of-the-world-r70d)). **Where it stands.** The water file reads and saves; nothing draws it, and nothing feeds GTA V's -day to the world. `CWaterData` in `crates/io/or-io/src/gta5/data/water.rs` opens a `water.xml` into +day to the world. `CWaterData` in `crates/io/or-io/src/gta5/data/water/mod.rs` opens a `water.xml` into its water, calming and wave quads, keeps every element and attribute it does not type and writes them back, so an unchanged file saves to the bytes it came as and a changed value is written among them; a quad or a list the document did not hold is written with the document's own line endings @@ -9842,7 +9842,7 @@ registry; detail and the measured figures in [Crate_Reference.md](../reference/Crate_Reference.md#the-layers-of-a-gta-v-world), what a person sees in [GTA_V_World_Viewer.md](../features/GTA_V_World_Viewer.md#layers). -*The data.* `crates/domain/or-world-gta5/src/layers.rs` answers, within a radius of a place and +*The data.* `crates/domain/or-world-gta5/src/streaming/layers/mod.rs` answers, within a radius of a place and nearest first: the static collision by material, road nodes and links by kind, box occluders and occlude models, far lights, parked vehicles, time cycle zones, navmesh polygons and the boxes of the maps that stream. Only a file whose box meets the radius is opened, and what it gave is kept @@ -9890,7 +9890,7 @@ caller, and `openrage-cli world ground` answers a position box overlap and the ground, held on bounds built by hand (`crates/domain/or-world-gta5/tests/collision_queries.rs`, `crates/domain/or-world-gta5/tests/collision_world.rs`). -`crates/domain/or-world-gta5/src/world_collision.rs` is the caller that hands it a mount's: the static +`crates/domain/or-world-gta5/src/archetypes/world_collision.rs` is the caller that hands it a mount's: the static bounds the index names for a column, held under a budget of bytes, behind `openrage-cli world ground`, on mounts built by hand (`crates/domain/or-world-gta5/tests/the_ground_under_a_place_of_a_mount.rs`). Named and not loaded: @@ -9939,7 +9939,7 @@ a session for each pack it edits, written when the project is saved [on screen](Workbench_UX_Design.md#what-the-map-screen-builds), [timings](../reference/Crate_Reference.md#domain-crates)). And a map, a built entity, a type file and a base archetype made -with no donor and no snapshot (`crates/domain/or-world-gta5/src/create.rs`), behind +with no donor and no snapshot (`crates/domain/or-world-gta5/src/authoring/create.rs`), behind `openrage-cli world new-map` and `world archetypes`, which pass the rules of a pack (`a_map_and_a_type_file_made_from_nothing_enter_a_pack_and_break_none_of_its_rules`). @@ -10233,7 +10233,7 @@ drawn on a selected parking spot ([brief](World_Editor_Plan.md#parked-vehicles-zones-lights-and-occluders-r70o)). **Where it stands.** The data part is built: `crates/io/or-io/src/meta/typed/map_records.rs` types -these records as members of `CMapData` with save refusals, `crates/domain/or-world-gta5/src/map_data.rs` reads them as views, +these records as members of `CMapData` with save refusals, `crates/domain/or-world-gta5/src/map/map_data.rs` reads them as views, and the install suite passes on both (`every_map_of_an_install_reads_its_records_typed_states_the_members_typed_and_saves_to_its_fixed_point`, 2026-11-25; [the census and what is left](../reference/Crate_Reference.md#io-crates)). A @@ -10319,7 +10319,7 @@ its extents is split at the build, by area, its links carried across the parts installs; nothing ran in a game. A Map content hands a build `stream/_manifest.ymf`, stating for each map the type files `or-world`'s derivation finds (`a_build_writes_a_manifest_that_reads_back_naming_the_type_file_its_map_needs`), and the line -`this_is_a_map`. `crates/domain/or-world-gta5/src/manifest_build.rs` types it by the manifests of the +`this_is_a_map`. `crates/domain/or-world-gta5/src/authoring/manifest_build.rs` types it by the manifests of the game a content keeps (`openrage-cli maps keep-manifest`): a map one of them states keeps that entry (`a_map_taken_from_the_game_keeps_the_entry_the_game_states_where_the_derived_one_differs`), and a @@ -10361,7 +10361,7 @@ pack and is locked by the same sentence Left: the change set that turns the maps of a story pack on, for a pack loaded in the game to answer ([R70a](#r70a-what-the-game-loads)); the entry of a manifest an interior's type file is stated by; the line for the server's configuration; the split, which -`crates/domain/or-world-gta5/src/partition.rs` plans by level of detail and does not apply; one manifest +`crates/domain/or-world-gta5/src/authoring/partition.rs` plans by level of detail and does not apply; one manifest for two Map contents of a build, refused today as one path; keeping a manifest from the editor; and every stated map of an install ([the writer in full](../reference/Crate_Reference.md#domain-crates)). @@ -10520,7 +10520,7 @@ processes and decodes none. [↑ checklist](#phase-11--the-gta-v-world-editor) **What.** Presets of keys, with one that matches CodeWalker's, and the place of a binding in -`src/ui/shortcuts.rs`; the settings a mapper changes on one page (mouse sensitivity, field of view, +`src/ui/shortcuts/mod.rs`; the settings a mapper changes on one page (mouse sensitivity, field of view, an inverted vertical axis, the movement letters of the keyboard's layout, the ground grid, the snap steps and the layer radii), with Restore defaults; a panel's title carrying a sentence on its game term as its hover; the sentences of the map rules wrapped into the catalogs; a tour of the world; a @@ -10558,7 +10558,7 @@ this form. It draws nothing ([brief](World_Editor_Plan.md#a-changed-bound-and-a-changed-path-region-as-sources-r70w)). **Where it stands.** The source, the base and the cook are built in `or-source`, with no content -kind and no screen; the compare against the base is not. `crates/domain/or-source/src/bounds.rs` +kind and no screen; the compare against the base is not. `crates/domain/or-source/src/bounds/mod.rs` makes `.bounds.src` of a `.ybn`, its triangles as a glb and what a glb cannot say as `bounds.json`, and `crates/domain/or-source/src/paths.rs` makes `.paths.src` of a `.ynd`, one `paths.json` of its nodes, links and junctions. Each keeps the game's file as its base, is a row of @@ -10691,7 +10691,7 @@ the colours shown, copied, and its sheet. The grid of thumbnails waits for the p **Where it stands.** The data of the two lists is built, headless, and no screen calls it ([in full, with the figures](../reference/Crate_Reference.md#domain-crates)). -`crates/domain/or-world-gta5/src/model_catalogue.rs` lists an install's models from the world index alone, with +`crates/domain/or-world-gta5/src/archetypes/model_catalogue.rs` lists an install's models from the world index alone, with no file opened: each archetype once under the last type file to declare it, with its kind, box, sphere, level-of-detail distance, dictionaries, pack, the file that holds it and how often the maps place it, a page at a time with the total, by text, pack, kind, size and placed or never placed, @@ -10700,7 +10700,7 @@ that patches a pack holds is listed under that pack (`what_a_folder_that_patches_a_pack_holds_is_listed_under_that_pack_and_opened_from_the_update`). `crates/title/or-title/src/install/vehicles.rs` reads the vehicle data files a mount would load for each vehicle's model, game name, class and type as the file's text states them, and -`crates/domain/or-world-gta5/src/vehicles.rs` pages them by text, class, type and pack +`crates/domain/or-world-gta5/src/archetypes/vehicles.rs` pages them by text, class, type and pack (`the_vehicles_of_a_mount`, whose `a_filter_by_class_lists_the_vehicles_the_data_puts_in_that_class_and_no_other` is the first check of this row). `openrage-cli world models` and `world vehicles` print both. Both installs hold the @@ -10838,7 +10838,7 @@ renderer ([brief](Unified_World_Plan.md#one-session-one-host-panels-by-capabilit **Where it stands.** Begun out of the plan's order (coordinator, 2026-11-28): R71b's fourth part moved GTA VI's streamer and left its rewrite around the core's driver; this row did not wait. -Built: the app's seam, `src/state/world_session.rs`, through which the World screen, panel +Built: the app's seam, `src/state/world_session/mod.rs`, through which the World screen, panel and bridge read a session keyed by game, install and options (`the_active_install_decides_whose_world_is_opened_and_another_drops_the_one_held`). A registry title runs on the core's `Driver` (`two_sessions_share_no_state`). ⚠ GTA VI's session is a shell over its viewer, still one static. Left: that static, the host in @@ -11410,10 +11410,10 @@ Left: no person has compared the shots of the scripts in `scripts/shots/` before - **The pack.** The helper builds on the owner's Mac and bakes the Legacy install; the figures of 2026-11-30 are in [the pipeline's design](Shader_Pipeline_Design.md#what-a-bake-writes). `just game-pack` (`cargo xtask game-pack`, `crates/tools/xtask/src/game_pack.rs`) bakes it outside the tree and prints the `OPENRAGE_GAME_PACK` line ([the recipe](../guides/Development_Workflow.md#the-pack-of-the-games-shaders-for-tests)), and the provenance lint now refuses a translated module by its extension (`a_module_of_a_baked_shader_pack_staged_is_fatal`), seen refusing one staged from the baked pack. The tests of `or-renderer` and of the app that need a pack ran with it that day for the first time on this machine; 198 of the 199 tests of `or-renderer` pass with the device and the pack (`cargo nextest run -p or-renderer --profile all --features gpu-tests`, 2026-11-30), the one that fails being of a GTA VI model's meshlets, which reads no pack and fails the same without one. - **The census.** `or-shader-tool census` (`crates/tools/or-shader-tool/src/census.rs`, its rules held by `crates/tools/or-shader-tool/src/census/tests.rs`), with what it measured in [the pipeline's design](Shader_Pipeline_Design.md#what-the-effects-state). - **The states.** `Pass::states` in the manifest, as the engine's numbers (`crates/io/or-io/src/gta5/shaders/render_state.rs`), with `PACK_VERSION` at 5, and `drawn_as` in the renderer. A scene takes from its pass the face it culls, behind `a_state_taken_from_the_pass_leaves_the_shaded_frame_as_it_was_and_flipped_in_the_manifest_changes_it` on the baked pack and `a_drawable_in_shaded_is_the_same_frame_with_the_states_its_passes_state_as_with_those_set_by_hand` over the corpus; on the synthetic pack, `the_face_a_pass_says_it_culls_is_culled_only_where_the_scene_takes_it` and `what_a_pass_says_of_depth_blending_and_the_channels_it_writes_is_taken_state_by_state` show each kind of state read. -- **The cache.** `pack_folder` in `src/state/game_pack.rs`: a folder for the game and under it one for the build of its executable (`a_pack_is_kept_by_game_and_by_the_build_of_its_executable`, `the_one_folder_that_served_the_machine_is_ignored`). +- **The cache.** `pack_folder` in `src/state/game_pack/mod.rs`: a folder for the game and under it one for the build of its executable (`a_pack_is_kept_by_game_and_by_the_build_of_its_executable`, `the_one_folder_that_served_the_machine_is_ignored`). - **The recorder.** `or_renderer::recorder` (`crates/runtime/or-renderer/src/recorder.rs`): the passes of the Shaded frame of one drawable are begun through it and the draws of a scene's surfaces and of the frame's quads are noted with their effect and technique. `the_record_of_a_frame_names_the_effect_and_the_technique_each_surface_was_drawn_by` holds it on the synthetic pack, `the_record_of_a_drawable_in_shaded_names_the_effects_and_techniques_its_materials_state` on the baked pack and the corpus, and the `framerecord` step of a shots script writes it. -Left: the stencil, the blend, the depth comparison and the depth written are still set by hand in `crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs`, because what the passes state differs from it for some effect and taking it changes a frame ([which, and where](Shader_Pipeline_Design.md#what-the-effects-state)); the passes that light and map the frame keep every state by hand; and the recorder does not note the passes begun in the files [R74a](#r74a-the-rule-held-by-a-ledger-and-the-hand-written-world-shading-deleted) deletes, nor those of a GTA VI model. +Left: the stencil, the blend, the depth comparison and the depth written are still set by hand in `crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs`, because what the passes state differs from it for some effect and taking it changes a frame ([which, and where](Shader_Pipeline_Design.md#what-the-effects-state)); the passes that light and map the frame keep every state by hand; and the recorder does not note the passes begun in the files [R74a](#r74a-the-rule-held-by-a-ledger-and-the-hand-written-world-shading-deleted) deletes, nor those of a GTA VI model. **Depends on.** Nothing. @@ -11428,13 +11428,13 @@ Left: the stencil, the blend, the depth comparison and the depth written are sti **Where it stands.** Built, but for the viewport's Shaded scene, which still draws from buffers of its own, and for the second bridge, half of which is merged; both are listed last. The modules and every figure are in [the crate reference](../reference/Crate_Reference.md#what-the-store-holds-and-what-it-measured). - **The material.** The record a GTA V model carries in its `title` (`Materials` of `or_world_gta5`) holds each shader as its file states it: the hash of its name, its draw bucket byte as it is, every parameter that is no texture by the hash of its name and every texture by the hash of its sampler's with what a reader is asked for it by; and for each mesh which shader draws it, whether its model states it is skinned, and the bones its vertices' slots name (`a_material_carries_every_parameter_and_every_texture_its_file_states_and_how_its_mesh_is_skinned`, for both targets). The plain `Surface` of one colour map stays, for the plain modes. A mesh now keeps an element in every encoding a file states, where nine of the sixteen were left out of its layout (`a_geometry_whose_vertices_or_indices_are_not_whole_is_refused_with_its_reason`, 2026-12-01). -- **The store.** `crates/runtime/or-renderer/src/game_shaders/store.rs` holds a mesh's vertex bytes as the file has them, with its indices, in pages of the meshes of one layout; the allocator moved there from the app with its budget passed in as numbers. `matched` gives a pipeline its vertex buffers for a file layout and a vertex program, by semantic, at the file's offsets, in the device's own formats, with a width that differs left to the device, an element the device has no format for rewritten in its own bytes at upload and counted, and an input the file lacks fed from a buffer of one vertex and listed (`each_input_reads_the_files_element_of_its_meaning_at_the_files_offset`, `an_input_the_file_has_no_element_for_is_fed_its_default_and_listed`, `an_encoding_the_device_has_no_format_for_is_rewritten_in_its_own_bytes_and_no_other`). A vertex colour written into a model's file bytes reaches a program that outputs it, and read from the wrong offset does not (`a_vertex_colour_of_a_models_file_bytes_reaches_a_program_that_outputs_it`). +- **The store.** `crates/runtime/or-renderer/src/game_shaders/geometry/store.rs` holds a mesh's vertex bytes as the file has them, with its indices, in pages of the meshes of one layout; the allocator moved there from the app with its budget passed in as numbers. `matched` gives a pipeline its vertex buffers for a file layout and a vertex program, by semantic, at the file's offsets, in the device's own formats, with a width that differs left to the device, an element the device has no format for rewritten in its own bytes at upload and counted, and an input the file lacks fed from a buffer of one vertex and listed (`each_input_reads_the_files_element_of_its_meaning_at_the_files_offset`, `an_input_the_file_has_no_element_for_is_fed_its_default_and_listed`, `an_encoding_the_device_has_no_format_for_is_rewritten_in_its_own_bytes_and_no_other`). A vertex colour written into a model's file bytes reaches a program that outputs it, and read from the wrong offset does not (`a_vertex_colour_of_a_models_file_bytes_reaches_a_program_that_outputs_it`). - **The plain modes over the store.** A world's plain program reads the position, the normal and the first texture coordinate of a mesh's file bytes through the same `matched`, one set of pipelines a layout, and GTA V's models are no longer repacked: only their positions are decoded, for a pick (`a_mesh_drawn_from_its_files_bytes_is_the_mesh_the_world_once_repacked`, `a_mesh_arrives_with_its_files_bytes_and_the_maps_its_own_shader_binds`). GTA VI's vertex data lies in blocks of its own, so its meshes go to the same store as the vertices its decode gives. - **One plain program.** `PLAIN_SHADER` in `crates/runtime/or-renderer/src/plain.rs` draws the plain modes of a drawable and of a world by one `shade`, and the ledger holds one such module (`the_plain_modes_are_one_program`). A drawable's Wireframe, Solid, Material and channel frames are, pixel for pixel, those its own program drew (`every_plain_mode_of_a_drawable_is_drawn_as_the_program_it_once_had_of_its_own_drew_it`). - **Every map.** A fed world's pool takes every map a material binds, each by the hash of its sampler's name, sized and let go as the colour map is, and `OPENRAGE_WORLD_MAPS=colour` leaves the others out (`the_pool_takes_every_map_a_material_binds_where_the_budgets_say_so`). The device holds them, by the measure in the crate reference; nothing samples them until a world is drawn by the game's programs. - **One host, in part.** `src/render/viewport/world_host.rs` is what both bridges call for their budgets, a mesh of the store as the renderer draws it, a material made again when its map changes, and a frame's draws sorted, handed over and marked where picked. -Left: the two bridges are still two. Each has its own taking of what arrives, its own cull and layout (GTA VI's by chunks, with occlusion and swaps; a feed's by spheres), its own texture pool with its own rule for a map's size, its own letting go, and its own table of materials; GTA VI's alone waits for a model's maps before it tells it whole, and reaches its viewer where a feed's is handed a session. And the viewport's Shaded scene (`crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs`) still writes a vertex for every index, in floats, with bone slots of the whole scene: it draws from a decoded surface, not from a file's bytes, and a mesh of the store states its bones a geometry at a time, which is the buffer [R74d](#r74d-an-entity-drawn-as-the-game-draws-it) writes for a draw. So the first clause of the row's end is not shown. The plain modes of both worlds are the pictures they were (`just shots`, 2026-12-01, held to the shots of R74a's head of 2026-11-30): `scripts/shots/gta6_world_reference_compare.shots` holds every shot of GTA VI within its bounds and every dump alike, and each shot of `scripts/shots/gta5_world.shots` shows the same place in Material with the same draws by its dump, 1,423,387 or more of its 1,440,000 pixels the same, the rest where a map had reached another size when the shot was taken. +Left: the two bridges are still two. Each has its own taking of what arrives, its own cull and layout (GTA VI's by chunks, with occlusion and swaps; a feed's by spheres), its own texture pool with its own rule for a map's size, its own letting go, and its own table of materials; GTA VI's alone waits for a model's maps before it tells it whole, and reaches its viewer where a feed's is handed a session. And the viewport's Shaded scene (`crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs`) still writes a vertex for every index, in floats, with bone slots of the whole scene: it draws from a decoded surface, not from a file's bytes, and a mesh of the store states its bones a geometry at a time, which is the buffer [R74d](#r74d-an-entity-drawn-as-the-game-draws-it) writes for a draw. So the first clause of the row's end is not shown. The plain modes of both worlds are the pictures they were (`just shots`, 2026-12-01, held to the shots of R74a's head of 2026-11-30): `scripts/shots/gta6_world_reference_compare.shots` holds every shot of GTA VI within its bounds and every dump alike, and each shot of `scripts/shots/gta5_world.shots` shows the same place in Material with the same draws by its dump, 1,423,387 or more of its 1,440,000 pixels the same, the rest where a map had reached another size when the shot was taken. **Depends on.** [R74a](#r74a-the-rule-held-by-a-ledger-and-the-hand-written-world-shading-deleted) and [R74b](#r74b-a-pack-its-census-its-states-and-a-record-of-the-calls-a-frame-makes). @@ -11448,7 +11448,7 @@ Left: the two bridges are still two. Each has its own taking of what arrives, it **Where it stands.** Built for a world (2026-12-01); the viewport's one drawable still draws through its own scene. The figures of a city view are in [the crate reference](../reference/Crate_Reference.md#an-entity-drawn-as-the-game-draws-it-and-a-world-in-the-frame). -- **Buffers by class.** `crates/runtime/or-renderer/src/game_shaders/fed.rs` classes each constant buffer a pair of programs binds as written for a draw, once a frame or when its material is made, by the variables GTA V's profile says the game sets for a draw (`PER_DRAW` in `crates/domain/or-world-gta5/src/profile.rs`, which marks the products with the view) and by the names the engine gives a value (`a_buffer_is_of_the_class_of_the_most_frequent_thing_written_to_it`). A buffer is filled whole in its three layers, then the draw's values are written over their variables; three arenas hold them (`crates/runtime/or-renderer/src/game_shaders/fed/arena.rs`), and a material's groups are made once a pass. +- **Buffers by class.** `crates/runtime/or-renderer/src/game_shaders/geometry/fed.rs` classes each constant buffer a pair of programs binds as written for a draw, once a frame or when its material is made, by the variables GTA V's profile says the game sets for a draw (`PER_DRAW` in `crates/domain/or-world-gta5/src/map/profile.rs`, which marks the products with the view) and by the names the engine gives a value (`a_buffer_is_of_the_class_of_the_most_frequent_thing_written_to_it`). A buffer is filled whole in its three layers, then the draw's values are written over their variables; three arenas hold them (`crates/runtime/or-renderer/src/game_shaders/geometry/fed/arena.rs`), and a material's groups are made once a pass. - **Only the buffers written for a draw are bound at an offset a draw sets.** A pair of the Legacy pack's G-buffer and cascade techniques binds 13 constant buffers at most and a device's layout takes 8 such bindings; 5 of a pair at most are written for a draw (`no_pair_of_the_packs_world_techniques_sets_more_buffers_for_a_draw_than_a_layout_takes`, with `OPENRAGE_GAME_PACK`, 2026-12-01). The others lie at an offset their group is made with. - **One copy of the matrices an entity a view, and of the rest an entity.** Three entities of one mesh, each of a material of its own, land at their own places with their own scalars in two views of one frame, by a synthetic effect whose programs read registers as a translated program does; 9 copies are written, 6 of the matrices and 3 of the scalars (`entities_of_one_mesh_land_at_their_own_place_with_their_own_scalar_in_two_views_at_once`). Seen failing both ways the row names: with every draw given the first entity's offsets 1 of 3 is right in each view, and with the second view given the first view's copies none is right in the second (`a_draw_given_the_first_entitys_offsets_or_the_first_views_matrices_is_seen_to_be_wrong` keeps both faults). - **An arena that outgrows its buffer** as a material is bound, or as a frame is written, is made again before a group binds a run of it, and the groups that bound the old one are made again (`arenas_that_outgrow_their_buffers_as_materials_are_bound_and_as_a_frame_is_written_draw_the_same`); the first city view found this, as a group refused by the device. @@ -11467,9 +11467,9 @@ Left: an entity's bones are at rest, and what else the game sets for a draw is [ **Where it stands.** Built for the Legacy world but for what is listed last (2026-12-01). What it draws, what it lists and how it is checked without a window are in [the GTA V world viewer's document](../features/GTA_V_World_Viewer.md#shaded), and its modules and figures in [the crate reference](../reference/Crate_Reference.md#an-entity-drawn-as-the-game-draws-it-and-a-world-in-the-frame). -- **The technique rule** is `technique` of `crates/domain/or-world-gta5/src/profile.rs`, tested with no device: the G-buffer technique for the opaque buckets and the one that clips for the cutout bucket, their skinned twins, the material's own cascade technique and the one that reads a map where coverage is cut and the effect has it, and none for what blends, a decal and water (`a_draw_takes_the_technique_of_its_bucket_in_each_step`). +- **The technique rule** is `technique` of `crates/domain/or-world-gta5/src/map/profile.rs`, tested with no device: the G-buffer technique for the opaque buckets and the one that clips for the cutout bucket, their skinned twins, the material's own cascade technique and the one that reads a map where coverage is cut and the effect has it, and none for what blends, a decal and water (`a_draw_takes_the_technique_of_its_bucket_in_each_step`). - **The G-buffer.** `crates/runtime/or-renderer/src/world/fed.rs` issues one indexed draw for each mesh of each entity from the store, with the layout `matched` gives and the offsets of what the game sets for it, sorted by pipeline, material and page, inside the frame's own G-buffer pass. A square drawn as one drawable and the same square placed alone in a world fill the four targets alike, byte for byte, by three effects (`a_drawable_in_the_viewport_and_the_same_placed_alone_in_a_world_fill_the_same_gbuffer`, with the pack; seen failing with a material's parameters withheld, 458 pixels of a target). -- **Render state** is the pack's where a pass states it, block by block, over a table the profile states for the step (`GBUFFER_STATES`, `CASCADE_STATES`; `stated_over` in `crates/runtime/or-renderer/src/game_shaders/states.rs`). So a world's terrain and trees write the stencil material their passes state and test the depth as they state it; the viewport's one drawable keeps the states it had. +- **Render state** is the pack's where a pass states it, block by block, over a table the profile states for the step (`GBUFFER_STATES`, `CASCADE_STATES`; `stated_over` in `crates/runtime/or-renderer/src/game_shaders/core/states.rs`). So a world's terrain and trees write the stencil material their passes state and test the depth as they state it; the viewport's one drawable keeps the states it had. - **The cascades.** Four, fitted by `crates/runtime/or-renderer/src/world/shadow.rs`, each entity cast once into each cascade its sphere reaches by its own material's caster, with that cascade's matrices; the frame's own pass receives them. A square's shadow on a floor is as dark, within 6 of 765, as the one-tile shadow of the same two surfaces as one drawable, near and through the last cascade (`an_entity_of_a_world_shadows_another_below_it_by_its_own_caster_in_the_cascades`; seen failing with every cascade given the first one's matrices). The one depth of the tiles spans what the frame draws (`the_depth_of_the_tiles_spans_what_a_frame_draws_far_below_a_camera_in_the_air`): before it did, the ground under a camera 420 m up read as shadowed. - **Pipelines off the frame.** A worker builds each, keyed by its programs, its states, its step and the layout it reads; an entity one of whose meshes waits is left out whole until it comes (`a_frame_does_not_wait_for_a_pipeline_and_an_entity_is_drawn_once_its_own_is_built`; seen failing with the frame made to wait). - **Refusals.** A material whose pass cannot be picked or built is drawn by the pack's `default` effect with its own maps and parameters by name, listed with the reason and marked by an overlay where the panel's switch is on; with no such effect it is not drawn, and listed (`a_material_whose_pass_cannot_be_picked_is_drawn_by_the_default_effect_and_listed_or_not_drawn_and_listed`, `a_material_of_an_effect_the_pack_lacks_is_drawn_by_the_games_default_effect_and_marked_where_asked`). @@ -11492,7 +11492,7 @@ Left: the viewport's drawable keeps `select_pass_at`, its shared caster effect a - **How the frame reaches the screen came first.** The yellow and brown cast, the black shadows and the black far trees of the first Shaded shots were none of the feed: the frame the game's programs wrote was right, and was shown one decoding too dark. egui 0.34 takes a texel of a registered texture for the bytes it holds, and was handed the frame through the target's sRGB view; a pixel the last program wrote as 213 was seen as 170. A frame the game's programs drew, a world's or one drawable's, is now handed through the view that does not decode (`a_shaded_frame_of_the_games_programs_is_seen_as_the_bytes_their_last_program_wrote`, `a_drawable_in_shaded_is_seen_as_the_bytes_the_games_last_program_wrote`; both seen failing with the target's own view handed, 109 against 175). ⚠ A frame of OpenRage's own shaders is handed as it was, and is shown the same decoding too dark: that is put to the owner, not changed here. - **A real mesh, both ways.** A terrain piece, a tree and a wall of the install, each with its real maps, are lit alike as one drawable and placed alone in a world: no pixel of the terrain piece is apart by more than 6 of 255, 44 of the tree's 2,637 and 28 of the wall's 2,682 are, by 21 at most (`a_real_mesh_is_lit_alike_as_one_drawable_and_alone_in_a_world`, with the pack and the Legacy install, 2026-12-01; seen failing with the red and the blue of a vertex colour changed places in the world's bytes, 388 of the terrain's 672 pixels). So the store reads a file's vertex colours in the order one drawable's decoder does, and a map is read as its file stores it by both. -- **The per-draw values** are GTA V's profile's (`draw_values` in `crates/domain/or-world-gta5/src/profile.rs`), made of the one word an instance carries of its entity's file and of its fade: the scalars from the two ambient bytes where the archetype's flags ask for it (`an_entitys_ambient_bytes_scale_its_light_where_its_archetype_says_so`), the stipple and the technique that clips (`a_fading_entity_keeps_the_pixels_of_its_stipple_and_takes_the_technique_that_clips`), the tint row over the palette's height and the entity's scale (`an_entitys_tint_value_picks_the_row_of_its_palette_and_its_scale_is_read_off_its_matrix`), and the interior flag. The host writes them over the frame's (`a_draw_writes_an_entitys_scalars_stipple_interior_flag_tint_row_and_scale_over_the_frames`), and through the game's own programs an entity inside its band covers the share of pixels its stipple states and takes the ambient its byte scales (`an_entity_inside_its_fade_band_covers_the_share_of_pixels_its_stipple_states_and_takes_the_ambient_its_bytes_scale`, with the pack). A level's band is the visual settings' (`a_level_fades_over_the_band_the_visual_settings_state_for_it`). A palette is stored blue first and uncompressed, which the adapter did not read: every tinted material was tinted by a grey stand-in (`a_palette_stored_blue_first_is_read_red_first_and_one_stored_red_first_as_it_is`). +- **The per-draw values** are GTA V's profile's (`draw_values` in `crates/domain/or-world-gta5/src/map/profile.rs`), made of the one word an instance carries of its entity's file and of its fade: the scalars from the two ambient bytes where the archetype's flags ask for it (`an_entitys_ambient_bytes_scale_its_light_where_its_archetype_says_so`), the stipple and the technique that clips (`a_fading_entity_keeps_the_pixels_of_its_stipple_and_takes_the_technique_that_clips`), the tint row over the palette's height and the entity's scale (`an_entitys_tint_value_picks_the_row_of_its_palette_and_its_scale_is_read_off_its_matrix`), and the interior flag. The host writes them over the frame's (`a_draw_writes_an_entitys_scalars_stipple_interior_flag_tint_row_and_scale_over_the_frames`), and through the game's own programs an entity inside its band covers the share of pixels its stipple states and takes the ambient its byte scales (`an_entity_inside_its_fade_band_covers_the_share_of_pixels_its_stipple_states_and_takes_the_ambient_its_bytes_scale`, with the pack). A level's band is the visual settings' (`a_level_fades_over_the_band_the_visual_settings_state_for_it`). A palette is stored blue first and uncompressed, which the adapter did not read: every tinted material was tinted by a grey stand-in (`a_palette_stored_blue_first_is_read_red_first_and_one_stored_red_first_as_it_is`). - **The clock** feeds the timer and the light pass's time for a world, and a drawable alone keeps its own (`a_frame_fed_the_clock_states_the_timer_and_the_suns_rows_and_a_drawable_alone_keeps_its_own`). - **The weather file** is read typed in `crates/io/or-io/src/gta5/data/weather.rs` under the engine's names, and a world is as wet as its weather's rain states (`a_world_held_under_a_weather_is_as_wet_as_its_rain_times_one_and_a_half_at_most_one`); the five weathers a drawable's viewport offers come to the wetness their names gave (`a_world_is_as_wet_as_its_weathers_rain_states_and_a_drawable_under_rain_as_wet_as_before`). - **The visual settings** give the fade bands and the four ends of the dynamic bake (`the_ambient_a_baked_surface_keeps_is_between_the_ends_the_visual_settings_state`); the install's are the game's defaults but for the three far levels, which fade over 25 m. @@ -11513,10 +11513,10 @@ Left: the keyframe is one weather with no region and no modifier, since a sessio **Where it stands.** Built for the GTA V Legacy world but for the far lights seen from afar as sprites (2026-12-01): a Shaded frame is lit by the lights of its streamed models and by the far lights of its maps, each by the game's own pass for a light of its shape. -- **The lights of a model.** `model_lights` of `crates/domain/or-world-gta5/src/lights.rs` reads each light attribute of a drawable or a fragment when its model is decoded, where its bone stands at rest, and the model's record carries them with the box they are matched by. `entity_lights` lays them on each entity that draws the model: on through the hours its 24 bits state and turning over the last minute of an hour (`lit_at`), cut off over the ten metres before the distance its byte states or a thousand metres where it states none (`cutoff_fade`), reaching its falloff times the cycle's falloff multiplier out of doors (`reach`), and as faded as its entity. +- **The lights of a model.** `model_lights` of `crates/domain/or-world-gta5/src/map/lights.rs` reads each light attribute of a drawable or a fragment when its model is decoded, where its bone stands at rest, and the model's record carries them with the box they are matched by. `entity_lights` lays them on each entity that draws the model: on through the hours its 24 bits state and turning over the last minute of an hour (`lit_at`), cut off over the ten metres before the distance its byte states or a thousand metres where it states none (`cutoff_fade`), reaching its falloff times the cycle's falloff multiplier out of doors (`reach`), and as faded as its entity. - **The far lights of a map.** The two halves a map states are joined as before, and their bytes now count in what the game counts them in: an intensity of 48, a half angle of 180 degrees, a capsule of 140 m and a glow of 32 at the most a byte holds; each is drawn within the range of its map's category (150, 450 and 1,250 m, fading over the last 50), between seven in the evening and seven in the morning (`far_lights`). A far light whose number a light of a streamed model has is left out, so that no lamp is lit twice. The number is a hash of the entity's box in the world, in tenths of a metre, with the light's place among its model's (`light_id`). - **In the frame.** `src/render/viewport/world_lights.rs` gathers both for a frame, keeps what the view can show and the nearest 1,024, and hands each to the pass of its shape: a point, a cone, a segment. They are drawn in the pass that lights the frame, after the sun, one instanced draw a kind, as the game's own light volumes are (`a_lamp_of_a_world_lights_a_wall_within_its_reach_by_the_games_own_pass_and_nothing_past_it`, seen failing with the world's lights kept from the pass). The glow about a model's light is drawn by the corona pass after what blends: two and a half times its stated size and as bright as its light, by the cycle's sprite size and brightness and the settings' two scales (`corona`). -- **Held to the rules, not to the game.** A test a rule computes what the rule gives in other words than the code's, and each was seen failing with its rule changed: the hours and the last minute, the cutoff, the reach, the glow, what a byte of a far light counts in with the ranges, the hours the far lights are held, and the number (the tests of `crates/domain/or-world-gta5/src/lights.rs`). One holds a lamp to its hours and to the far light of its number giving way (`a_lamp_on_an_entity_is_lit_at_its_hours_where_its_entity_stands_and_a_far_light_of_its_number_gives_way`), and two the bridge (`a_lamp_is_handed_to_the_pass_of_its_shape_at_its_hours_where_the_view_can_show_it`, `a_far_light_gives_way_to_a_lamp_of_its_number_and_the_nearest_lights_are_kept_past_the_cap`). +- **Held to the rules, not to the game.** A test a rule computes what the rule gives in other words than the code's, and each was seen failing with its rule changed: the hours and the last minute, the cutoff, the reach, the glow, what a byte of a far light counts in with the ranges, the hours the far lights are held, and the number (the tests of `crates/domain/or-world-gta5/src/map/lights.rs`). One holds a lamp to its hours and to the far light of its number giving way (`a_lamp_on_an_entity_is_lit_at_its_hours_where_its_entity_stands_and_a_far_light_of_its_number_gives_way`), and two the bridge (`a_lamp_is_handed_to_the_pass_of_its_shape_at_its_hours_where_the_view_can_show_it`, `a_far_light_gives_way_to_a_lamp_of_its_number_and_the_nearest_lights_are_kept_past_the_cap`). - **Over the install.** By a street of the Legacy install at midnight the models in the selection carry 301 lights, 281 of them lit, the maps state 17,355 far lights of which 2,073 are lit, and 105 far lights give way to a streamed light of their number; no far light is lit that a streamed light has the number of, seen failing with 105 lit twice when a far light does not give way (`by_night_no_far_light_is_lit_where_a_light_of_a_streamed_model_stands_at_fixed_cameras`, with `OPENRAGE_GAME_ROOT` naming the install, 2026-12-01). That 105 match says the number is the game's for those lamps; it does not say every lamp is matched. - **The shots.** `scripts/shots/gta5_world_shaded.shots` has a second pass at midnight over its six stops. At the street 576 lights are drawn as volumes (46 points, 474 cones and 56 segments, of 279 lights of models and 2,066 far lights lit) and 12 glows, and a frame at rest took 193 ms where the same stop at noon took 149 ms, in one run of the development profile at 1,600 by 900 on a machine other work loaded (a load average of 45 to 65 on 30 cores; 2026-12-01, the dumps of that run). Streets and squares are lit under their lamps, trees stand lit, and windows glow by the G-buffer programs' own night emissive. @@ -11534,7 +11534,7 @@ Left, each listed in the panel. Not fed: what a light's flags state (indoors or **Where it stands.** The depth fog is built for the GTA V Legacy world, with [R74i](#r74i-water-by-the-water-effect); the cloud hats' two files are read and no hat is drawn; the reflection map is not started, and the programs it needs are found (2026-12-01). -- **The fog over depth.** The game's own pass for it is found by what it reads: of the 129 passes of the post effect's technique, four read the fog's registers, and the first of them is the one the game runs (`the_pass_the_sea_is_drawn_by_reads_the_map_of_the_sky_and_no_picture_drawn_for_its_reflection`, with `OPENRAGE_GAME_PACK` naming the Legacy pack). `crates/runtime/or-renderer/src/game_shaders/depth_fog.rs` runs it over a world's lit frame after the water and before the sky, fed the registers the day already fills, with the game's own states for it: blended by the alpha it writes, drawn where its quad at the fog's start is nearer than the frame, and nowhere the stencil says nothing was drawn. The recorder shows it in that place (`the_sea_of_a_world_is_drawn_by_the_water_effect_after_the_light_and_before_the_fog_and_the_sky`), and at each of the six stops of `scripts/shots/gta5_world_shaded.shots`. A drawable alone in the viewport is given none. +- **The fog over depth.** The game's own pass for it is found by what it reads: of the 129 passes of the post effect's technique, four read the fog's registers, and the first of them is the one the game runs (`the_pass_the_sea_is_drawn_by_reads_the_map_of_the_sky_and_no_picture_drawn_for_its_reflection`, with `OPENRAGE_GAME_PACK` naming the Legacy pack). `crates/runtime/or-renderer/src/game_shaders/post/depth_fog.rs` runs it over a world's lit frame after the water and before the sky, fed the registers the day already fills, with the game's own states for it: blended by the alpha it writes, drawn where its quad at the fog's start is nearer than the frame, and nowhere the stencil says nothing was drawn. The recorder shows it in that place (`the_sea_of_a_world_is_drawn_by_the_water_effect_after_the_light_and_before_the_fog_and_the_sky`), and at each of the six stops of `scripts/shots/gta5_world_shaded.shots`. A drawable alone in the viewport is given none. Left: the rays of the sun through the fog are a pass of their own that is not run, and the fog pass is told their strength is nought; no check holds a fogged pixel to a number, though one holds what blends to the fog the pass lays over what is opaque (`a_far_pane_of_glass_is_fogged_as_the_wall_beside_it_is`); the mapping of the cycle's fog variables onto the registers stays unverified, as it was. @@ -11555,11 +11555,11 @@ Left of the hats and the reflection: everything but the reading, each listed in **Where it stands.** The sea and the lakes of the GTA V Legacy world are drawn in Shaded by the game's water effect, and its rivers, pools and fountains by their own water effects; a river's foam is not, and the game's two-pass water is not built (2026-12-01). -- **Which pass.** The water effect has one technique of 20 passes. The game draws a flat sheet by one of two: where the water covers much of the picture, after a fog pass of the water's own and a composite, reflecting a picture of the world drawn for the purpose; where it covers little, in one pass that reads the frame behind the sheet, how far that lies, the water's fog map and the map of the sky. The one pass is the one drawn, since everything it reads can be given it (`SINGLE_PASS_FLAT` in `crates/domain/or-world-gta5/src/sea.rs`). +- **Which pass.** The water effect has one technique of 20 passes. The game draws a flat sheet by one of two: where the water covers much of the picture, after a fog pass of the water's own and a composite, reflecting a picture of the world drawn for the purpose; where it covers little, in one pass that reads the frame behind the sheet, how far that lies, the water's fog map and the map of the sky. The one pass is the one drawn, since everything it reads can be given it (`SINGLE_PASS_FLAT` in `crates/domain/or-world-gta5/src/map/sea.rs`). - **The sheets.** `sea_of` turns each quad of the level's water file into a sheet with the opacity of its corners, a half of a rectangle as the three corners its type keeps; `mesh_of` lays them out as the vertex program reads them (a place, a coordinate it does not read, the opacity in the colour), and `crates/runtime/or-renderer/src/world/water_fed.rs` puts the mesh in a store and draws the sheets the camera sees within 6,000 m, sheets that follow one another in one draw. The Legacy level states 504 quads and every one is a sheet: none is stated invisible, of the type the game leaves out, or without extent. - **In the frame.** After the lit frame and before the fog and the sky, over a copy of the lit frame, writing its depth and the game's own mark in the stencil, so that the sky leaves it be (`the_sea_of_a_world_is_drawn_by_the_water_effect_after_the_light_and_before_the_fog_and_the_sky`). - **The feed.** `crates/io/or-io/src/gta5/data/watertune.rs` reads the tuning file typed, and the weather file's reader the ripples of a weather. From them, the cycle and the clock: where the fog map lies over the level, how rough and wide the ripples are, the glint's strength and tightness, how much the water reflects, how far the sun pierces its fog, the water's two colours, the time, the size of the picture, and the cascades of the sun's shadow (`the_registers_of_the_water_are_what_the_tuning_the_weather_and_the_cycle_state`). The maps are the install's own: the two ripple maps, the foam, the fog map and the noise. -- **Rivers, pools and fountains.** They are meshes of a map whose materials are of the water bucket, and are drawn in the pass of the sea after its sheets (`Step::Water` of `crates/domain/or-world-gta5/src/profile.rs`), by the technique the game takes where no fog pass of the water runs first: `alt5_draw` for a river and a fountain, `alt6_draw` for a pool and shallow water, an effect having one of the two. The frame lends a material of the world what the sea reads: the copy of the lit frame, how far that lies, the map of the sky, the sun's shadow and the sea's maps that stand still, beside the registers the water programs share. Five effects are held to it on the pack, and a river's surface is another picture at another moment of the clock and the same at the same moment, seen failing with the flow register held at one moment (`a_river_and_a_pool_are_drawn_by_their_own_technique_with_the_sea_and_a_river_flows_with_the_clock`). At the six stops of `scripts/shots/gta5_world_shaded.shots` the 59 meshes of water effects that no step drew are drawn, and none is left of a bucket no step draws (2026-12-01, the dumps of that run). +- **Rivers, pools and fountains.** They are meshes of a map whose materials are of the water bucket, and are drawn in the pass of the sea after its sheets (`Step::Water` of `crates/domain/or-world-gta5/src/map/profile.rs`), by the technique the game takes where no fog pass of the water runs first: `alt5_draw` for a river and a fountain, `alt6_draw` for a pool and shallow water, an effect having one of the two. The frame lends a material of the world what the sea reads: the copy of the lit frame, how far that lies, the map of the sky, the sun's shadow and the sea's maps that stand still, beside the registers the water programs share. Five effects are held to it on the pack, and a river's surface is another picture at another moment of the clock and the same at the same moment, seen failing with the flow register held at one moment (`a_river_and_a_pool_are_drawn_by_their_own_technique_with_the_sea_and_a_river_flows_with_the_clock`). At the six stops of `scripts/shots/gta5_world_shaded.shots` the 59 meshes of water effects that no step drew are drawn, and none is left of a bucket no step draws (2026-12-01, the dumps of that run). - **A reader mended on the way.** The weather file of the install holds a comment with tags in it, and the scanner took the tags for elements, so that one weather of 17 was read and a world was dry under every weather but the first. A comment is now passed over whole (`a_comment_that_holds_tags_is_passed_over_and_the_types_after_it_are_read`, `the_seas_tuning_reads_and_a_weather_states_its_ripples`). Left, each listed in the panel. Stated limits: the water lies calm, since the game moves its height and its ripples outside its shaders, and the ripple maps given are the ones that stand still; it reflects the map of the sky and no picture of the world. Not drawn: a river's foam, whose programs read what the fog pass of the water leaves; the sea past the level's quads; the pack's own water file of an island. Not fed: the foam and the wet the simulation lays (the pass is given none), the wind on the ripples beyond the least its weather states, and the place of the moving grid, which a river's vertex program reads as nought. Not verified: the render states of a map's water, which no pass states beyond its blend and are taken as the sea's; the order of the corner bytes in far blocks, where the game's own code reads them otherwise than near, and that the copy read behind a sheet is taken before the sky where the game's is after its fog pass. No person has compared the shots with the game. @@ -11577,7 +11577,7 @@ Left, each listed in the panel. Stated limits: the water lies calm, since the ga **Where it stands.** Built for the GTA V Legacy world but for the game's cull of a grass list (2026-12-01): a tree is bent by the wind of its weather through the registers the game sets for a draw of a tree, and a grass list is one draw of each mesh of its model by the game's own instanced grass program, every tuft read from the list's own records. - **What this row was written to feed is not what the game feeds.** The row named the register that scales a tree's micro-movement. The tree programs of the Legacy pack take a vertex through one of two movements by how far over the water it stands: under it the old movement by the clock, which that register scales, and over it a bend by the wind handed in four vectors (17 effects of the pack read them, `or-shader-tool census` over the baked pack, 2026-12-01). The register that says how far over the water a vertex stands was given nothing, so every tree moved as one under water, at its effect's own strengths, whatever the weather: that is the foliage two shots differed by. -- **The wind.** `crates/domain/or-world-gta5/src/wind.rs` states what the game sets for a draw of a tree: the wind and three more turned from it by the tree's own generator of numbers, seeded by where it stands, each slower by a share the settings state; how far between a low and a high wind the leaves move; the tree's shift of phase; the speed a bend is not held back under; and the row that turns a vertex into its height over the water. The wind is the weather file's least for the session's weather, of the 12 m/s the game's strongest wind blows at, times the time cycle's multiplier, along the direction the game's wind begins with. `crates/io/or-io/src/gta5/data/branch_bend.rs` reads the settings file of the trees' wind typed, and the install's is loaded with the day (`the_settings_are_read_member_by_member_and_one_not_stated_is_the_games_own`). They are written for each entity with the buffers a draw sets, by name, so only a program that reads them takes them (`PER_DRAW` of `crates/domain/or-world-gta5/src/profile.rs`). +- **The wind.** `crates/domain/or-world-gta5/src/map/wind.rs` states what the game sets for a draw of a tree: the wind and three more turned from it by the tree's own generator of numbers, seeded by where it stands, each slower by a share the settings state; how far between a low and a high wind the leaves move; the tree's shift of phase; the speed a bend is not held back under; and the row that turns a vertex into its height over the water. The wind is the weather file's least for the session's weather, of the 12 m/s the game's strongest wind blows at, times the time cycle's multiplier, along the direction the game's wind begins with. `crates/io/or-io/src/gta5/data/branch_bend.rs` reads the settings file of the trees' wind typed, and the install's is loaded with the day (`the_settings_are_read_member_by_member_and_one_not_stated_is_the_games_own`). They are written for each entity with the buffers a draw sets, by name, so only a program that reads them takes them (`PER_DRAW` of `crates/domain/or-world-gta5/src/map/profile.rs`). - **Held on the pack.** A square of the `trees` effect whose vertices weigh the wind is another picture at another moment of the clock, by more pixels in a stronger wind, and another picture in another wind at one moment; one whose vertices weigh nothing is the same picture whatever the clock and the wind (`a_weighted_vertex_of_a_tree_moves_with_the_clock_by_more_in_a_stronger_wind_and_one_of_no_weight_stays`, seen failing with the four vectors not written, and with nothing of the wind handed to the draw, which is the state before this row). - **A grass list is a batch.** The game's grass program reads an instance's number and, by it, a record of 16 bytes from a buffer of the list's instances: the place as three 16-bit shares of the list's box, two bytes of the ground's normal, the colour, the scale and the shade, which are the bytes a map's file holds for an instance (`GrassList::raw_instances`, `an_instance_is_laid_as_the_games_programs_read_one_and_the_shared_turns_go_once_about`). The normal and the shade, which nothing read, are read. It reads eight turns and sizes every list shares from a buffer the game fills once, and for the list its box, its range of sizes and how far a tuft leans to the ground (`GrassList::draw_parameters`). `WorldBatch` of `crates/runtime/or-renderer/src/world/fed.rs` is such a list on the device, and a Shaded frame issues one draw of every instance of each mesh of its model, in the G-buffer and in each cascade, where each tuft was a draw of its own that read a record of noughts (2,467 such draws at the coast's stop of the base, into the cascades alone). - **Held on the pack.** One draw by the `grass_batch` effect of the three instances of a list, each drawn in its own colour where a plain mode stands it by the same record, and nothing at the corner of the box where a record of noughts would stand (`a_batch_of_grass_is_one_draw_of_every_instance_by_the_grass_effect_and_each_lands_where_its_record_puts_it`, seen failing with the list's buffer withheld). @@ -11598,7 +11598,7 @@ Left, each listed in the panel. Not fed: the game culls a list, thins it and shr **Where it stands.** Built for the GTA V Legacy world (2026-12-01): the forward surfaces, an exposure measured from the lit frame by the game's own passes, and the frame mapped to the screen by the game's composite pass. A drawable alone in the viewport keeps the exposure worked out for its light and the simple pass. -- **The exposure is measured by the game's passes, the curve and the steps among them.** The game works none of it out on the processor: its post effect has a pass that takes the luminance of a colour as it takes a mean, four that take means of blocks of texels, one that keeps the brightest of four, and a pass that reads the texel of the frame's luminance and the texel of the last frame's exposure and writes this frame's, by the curve of the visual settings and steps held between a least and a most. `crates/runtime/or-renderer/src/game_shaders/meter.rs` runs them over a world's lit frame before the bloom: a copy at half the size, the brightest of each four of that, the same again through as many targets as the game puts between a quarter of the frame and its chain, the chain the game holds for the frame's height (one for 1080, one for 900, one for any other), then the exposure, which is copied into the texel the bloom's bright pass and the pass that maps the frame read it from (`the_chain_is_the_one_the_game_holds_for_a_height_and_ends_at_one_texel`, `the_registers_hold_the_curve_the_bounds_and_the_steps_as_the_pass_reads_them`). None of these passes is among those Metal's compiler refuses. +- **The exposure is measured by the game's passes, the curve and the steps among them.** The game works none of it out on the processor: its post effect has a pass that takes the luminance of a colour as it takes a mean, four that take means of blocks of texels, one that keeps the brightest of four, and a pass that reads the texel of the frame's luminance and the texel of the last frame's exposure and writes this frame's, by the curve of the visual settings and steps held between a least and a most. `crates/runtime/or-renderer/src/game_shaders/post/meter.rs` runs them over a world's lit frame before the bloom: a copy at half the size, the brightest of each four of that, the same again through as many targets as the game puts between a quarter of the frame and its chain, the chain the game holds for the frame's height (one for 1080, one for 900, one for any other), then the exposure, which is copied into the texel the bloom's bright pass and the pass that maps the frame read it from (`the_chain_is_the_one_the_game_holds_for_a_height_and_ends_at_one_texel`, `the_registers_hold_the_curve_the_bounds_and_the_steps_as_the_pass_reads_them`). None of these passes is among those Metal's compiler refuses. - **Held on the pack.** A frame of one light measures that light's luminance, and one bright above and dark below the mean of the two; its exposure is what the curve gives it, held while the frame stays; when the frame goes dark the exposure climbs by the step the settings state for one frame's time, never back, and settles at the dark frame's and holds there; and a clock that stands still measures anew, at once (`a_bright_and_a_dark_frame_settle_at_the_exposures_the_curve_gives_them_and_hold_there`, seen failing with the pass that follows the last frame's never taken). In a frame of a world a dark wall is exposed for longer than a pale one, and a world under no day measures nothing (`a_world_under_a_day_is_exposed_by_what_its_lit_frame_measures_and_a_world_under_none_is_not`, seen failing with the measure switched off). - **The composite pass.** Of the technique's passes the eleventh is the one the game maps its frame by where it has no motion blur, no noise and no depth of field of its own: it adds the blurred light of the bloom, darkens the corners, maps by the filmic curve at the exposure, corrects the colour and raises the result to the screen's gamma. A world's frame under a day with a sky is mapped by it, the bloom's last step left to it, and fed the bloom's strength, the vignette the time cycle states and the gamma the game takes where a person set none (`the_composite_pass_is_handed_the_bloom_the_vignette_as_the_day_states_it_and_the_screens_gamma`); a day that states a vignette darkens a corner of the picture and leaves its middle, and one that states none leaves both (`a_world_under_a_day_is_mapped_by_the_composite_pass_which_darkens_its_corners_as_the_day_states`, seen failing with the simple pass kept). Metal's compiler takes it. @@ -11606,12 +11606,12 @@ Left of the post chain, each listed in the panel. Fed nought, at which each does The forward surfaces: -- **Decals** are laid over the G-buffer after its surfaces, each by its own effect's technique of the G-buffer, tested against the depth and writing none, every target blended by the decal's alpha and written in the channels its pass's masks name; where a pass states none, by the masks `DECAL_STATES` of `crates/domain/or-world-gta5/src/profile.rs` gives the step (`a_decal_over_a_wall_changes_the_targets_its_pass_writes_where_its_alpha_covers_and_no_other`, seen failing with every mask forced to all). +- **Decals** are laid over the G-buffer after its surfaces, each by its own effect's technique of the G-buffer, tested against the depth and writing none, every target blended by the decal's alpha and written in the channels its pass's masks name; where a pass states none, by the masks `DECAL_STATES` of `crates/domain/or-world-gta5/src/map/profile.rs` gives the step (`a_decal_over_a_wall_changes_the_targets_its_pass_writes_where_its_alpha_covers_and_no_other`, seen failing with every mask forced to all). - **What blends** (glass, cables, what glows and blends or is added) is drawn over the lit frame the farthest first by its forward technique for a surface no light reaches, blended as its pass states and by its entity's alpha, and fed the cascades of the sun's shadow, the map of what is reflected and the size of the screen (`a_window_is_drawn_by_its_glass_effect_after_the_lit_frame_and_the_wall_behind_shows_through_it`, `what_blends_is_blended_as_its_pass_states_and_by_its_entitys_alpha`, `what_blends_reads_the_suns_shadow_of_the_cascades_for_itself`). An opaque surface that glows needs no pass: its program of the G-buffer writes how much (`a_surface_that_glows_writes_how_much_into_the_gbuffer_by_its_own_program`). - **A parent gives way to its children once they are whole**, where it gave way as they faded in: by the game's stipple two that fade at once leave pixels bare, which is what dotted the far trees and bushes at rest (`a_parent_stays_whole_while_its_children_fade_in_and_fades_out_once_they_are_whole`). At the lake's stop 127 of the 402 instances in view were children inside such a cross-fade and 8 their parents (2026-12-01, a count of the fades a frame was handed, taken once and not kept in the tree). - **At the six stops** of `scripts/shots/gta5_world_shaded.shots` (2026-12-01 at `10f5e2d76`, [the figures](../reference/Crate_Reference.md#an-entity-drawn-as-the-game-draws-it-and-a-world-in-the-frame)), 16,225 meshes are drawn by their own effect, 1,000 of them decals and 74 what blends; 2 by the default effect; none is refused; and 59, all of water effects, are of a bucket no step draws yet. -Left of the forward surfaces: the rule that picks among the forward techniques by the number of lights is in no note, so the one for no light is drawn and the panel lists it as unverified; what blends is fed no ray of the fog and no light of a model (`FORWARD_NOT_FED`), and takes the day's fog by its own programs: measured on the pack, a far pane of glass and the wall beside it lose the same share to the fog, 0.90 of each under one fog, with the variable that scales a forward program's fog left at nought, and at one the pane is lost to a colour 26 of 765 away from the wall's (`a_far_pane_of_glass_is_fogged_as_the_wall_beside_it_is`, 2026-12-01; no note states what the game sets that variable to); a mirror, whose programs read a view of the world no pass draws, is drawn by the default effect and listed; a material of the bucket that blends by a copy of the frame is not drawn and is counted; far tree cards are left out and counted, since their materials state an alpha reference of nought and the frame has neither the coverage of a multisampled target nor the sub-sampled alpha that cut them in the game, and drawn whole each is a rectangle over its hill (`left_out` of `crates/domain/or-world-gta5/src/profile.rs`; 1,916 meshes of the two far tree effects at the six stops, every one stating nought, 2026-12-01 by the dumps of `scripts/shots/gta5_world_shaded.shots`). The sub-sampled alpha was looked for in the pack: every far tree effect has its technique of the G-buffer, whose program drops a texel under a tenth of alpha always and every other pixel of one under three quarters; the pass that mends the pixels dropped was not found by name, the one pass of the post effect that reads the alpha of four neighbours states no state of its own, and no file states what the engine sets for it or which rows take the technique, so it is not run; decals are issued in the order that changes pipelines least, where the game's is the order of its lists; the band of 25 m that three levels fade over is laid outward from their distance, where the game ends every band 20 m past it; a child that is still fading in time does not hold its parent whole; with no sky, a frame shows its background wherever nothing opaque was drawn, whatever blends there; a tile of a lake's bed is stippled over nothing where it stands in its fade band, since the levels below it hold no bed there for it to fade over (at the country stop the tile is of the high level, 239 m away and 0.52 opaque, and no level draws a bed in the middle of the lake; picked and dumped once on 2026-12-01), which the lake drawn over it hides; and no person has compared the shots with the game. The viewport's one drawable draws its decals and what blends as it did. +Left of the forward surfaces: the rule that picks among the forward techniques by the number of lights is in no note, so the one for no light is drawn and the panel lists it as unverified; what blends is fed no ray of the fog and no light of a model (`FORWARD_NOT_FED`), and takes the day's fog by its own programs: measured on the pack, a far pane of glass and the wall beside it lose the same share to the fog, 0.90 of each under one fog, with the variable that scales a forward program's fog left at nought, and at one the pane is lost to a colour 26 of 765 away from the wall's (`a_far_pane_of_glass_is_fogged_as_the_wall_beside_it_is`, 2026-12-01; no note states what the game sets that variable to); a mirror, whose programs read a view of the world no pass draws, is drawn by the default effect and listed; a material of the bucket that blends by a copy of the frame is not drawn and is counted; far tree cards are left out and counted, since their materials state an alpha reference of nought and the frame has neither the coverage of a multisampled target nor the sub-sampled alpha that cut them in the game, and drawn whole each is a rectangle over its hill (`left_out` of `crates/domain/or-world-gta5/src/map/profile.rs`; 1,916 meshes of the two far tree effects at the six stops, every one stating nought, 2026-12-01 by the dumps of `scripts/shots/gta5_world_shaded.shots`). The sub-sampled alpha was looked for in the pack: every far tree effect has its technique of the G-buffer, whose program drops a texel under a tenth of alpha always and every other pixel of one under three quarters; the pass that mends the pixels dropped was not found by name, the one pass of the post effect that reads the alpha of four neighbours states no state of its own, and no file states what the engine sets for it or which rows take the technique, so it is not run; decals are issued in the order that changes pipelines least, where the game's is the order of its lists; the band of 25 m that three levels fade over is laid outward from their distance, where the game ends every band 20 m past it; a child that is still fading in time does not hold its parent whole; with no sky, a frame shows its background wherever nothing opaque was drawn, whatever blends there; a tile of a lake's bed is stippled over nothing where it stands in its fade band, since the levels below it hold no bed there for it to fade over (at the country stop the tile is of the high level, 239 m away and 0.52 opaque, and no level draws a bed in the middle of the lake; picked and dumped once on 2026-12-01), which the lake drawn over it hides; and no person has compared the shots with the game. The viewport's one drawable draws its decals and what blends as it did. **Depends on.** [R74f](#r74f-the-day-and-each-entity-fed-as-the-game-feeds-them). diff --git a/docs/direction/Shaded_World_Plan.md b/docs/direction/Shaded_World_Plan.md index 42fbb6b50..bc6fd07e1 100644 --- a/docs/direction/Shaded_World_Plan.md +++ b/docs/direction/Shaded_World_Plan.md @@ -38,7 +38,7 @@ One Shaded path draws a drawable in the viewport and a world: a store that holds ### One store, a model as its file lays it -The core's `Mesh` already carries the game's vertex bytes with their layout. The store uploads those bytes and the indices into pages shared by every mesh of one layout, which `crates/runtime/or-renderer/src/game_shaders/store/pages.rs` allocates, and gives a pipeline a vertex layout made by matching the file's elements to the program's inputs by semantic, each in the device's own format for what the file holds. An element the device has no format for is converted at upload, that element alone, and counted. No vertex is expanded to floats and no index is expanded to a vertex. +The core's `Mesh` already carries the game's vertex bytes with their layout. The store uploads those bytes and the indices into pages shared by every mesh of one layout, which `crates/runtime/or-renderer/src/game_shaders/geometry/store/pages.rs` allocates, and gives a pipeline a vertex layout made by matching the file's elements to the program's inputs by semantic, each in the device's own format for what the file holds. An element the device has no format for is converted at upload, that element alone, and counted. No vertex is expanded to floats and no index is expanded to a vertex. This replaces the world's packed vertex of three attributes, which drops the vertex colours that carry ambient, tint, emissive and wind, and it is what the viewport's scene moves to from `surface_vertices`, which writes a vertex for every index, all in floats. @@ -47,7 +47,7 @@ This replaces the world's packed vertex of three attributes, which drops the ver A stage of a game program has one set that holds its constant buffers, samplers and textures side by side, and one constant buffer mixes values of three kinds: the effect's defaults and the material's parameters, the engine's values of the frame, and the values the game sets for a draw. The plan follows that shape and does not pretend a simpler one. - A material keeps what the file states: every parameter and every sampler of its instance data, by name. The GTA V adapter hands it over in the model's title record, which the renderer's GTA V module reads, as GTA VI's is read today. -- `Filler` in `crates/runtime/or-renderer/src/game_shaders/constants.rs` fills a buffer by name in its three layers, as it does for one drawable. +- `Filler` in `crates/runtime/or-renderer/src/game_shaders/core/constants.rs` fills a buffer by name in its three layers, as it does for one drawable. - Each constant buffer of a program is of one class, by the most frequent thing written to it: per draw, per frame, or still. A buffer of a class is a run of one shared device buffer bound at an offset, so a material's group is made once and the offsets move. - Textures come from the streaming pool by sampler name, and a sampler's state from the effect, as `declared_states` already reads it. @@ -104,17 +104,17 @@ One test replaces the lint that read one extension. It finds every shader module | What | Where | Row | |---|---|---| -| The GTA V world's invented look: sun, ambient, exposure, the tint that stands for ambient, gradient sky, sun disc, far-light sprites, level water of one colour, glow by lists of names | `src/render/viewport/world_plain.rs`, the renderer's plain sky, the look of `crates/domain/or-world-gta5/src/install.rs`, the sky module of `or-world-gta5`, the glow lists of `crates/domain/or-world-gta5/src/models.rs`, the sky's and the frame's facts of `crates/domain/or-world/src/model.rs` | R74a | +| The GTA V world's invented look: sun, ambient, exposure, the tint that stands for ambient, gradient sky, sun disc, far-light sprites, level water of one colour, glow by lists of names | `src/render/viewport/world_plain.rs`, the renderer's plain sky, the look of `crates/domain/or-world-gta5/src/streaming/install.rs`, the sky module of `or-world-gta5`, the glow lists of `crates/domain/or-world-gta5/src/archetypes/models.rs`, the sky's and the frame's facts of `crates/domain/or-world/src/model.rs` | R74a | | GTA VI's hand port: the families, G-buffer, cast, glow and blended stages of `WORLD_SHADER`, its water, far stand-ins and their bake, terrain shadow, sky table, stars and discs, temporal pass, meter, grade, bloom, sharpen, room masks, lamps, and the arithmetic that feeds only them | `crates/runtime/or-renderer/src/world/`; the viewport's post chain with its shaders and maths, and its meter; the sky table, the stars and discs, the grade and the room masks of `crates/runtime/or-renderer/src/game_shaders/`; the app's world material bridge; the feeders of `src/state/gta6_worldview/` nothing else reads | R74a | | GTA VI's day turned into GTA V's variables, and the GTA VI world's use of a GTA V pack | `frame_keyframe` of `crates/io/or-io/src/gta6/timecycle.rs`, the eight-shell fit of the light law of `or-world-gta6` | R74a | | The pick's multiplier inside surface shading | the instance record's picked flag and the tint the world's program multiplied by | R74a | | Code no frame reaches | the renderer's stencil module, the unused arithmetic of the world's light maths | R74a | -| The world's packed vertex and the viewport's expanded buffers | the world's vertex of three attributes in `crates/runtime/or-renderer/src/world/pipelines.rs`, the buffers of `crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs` | R74c | +| The world's packed vertex and the viewport's expanded buffers | the world's vertex of three attributes in `crates/runtime/or-renderer/src/world/pipelines.rs`, the buffers of `crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs` | R74c | | The viewport's two plain shaders as two | `crates/runtime/or-renderer/src/viewport.rs`, what R74a left of the world's | R74c | | The viewport's fallback of Shaded to the Material shader | `crates/runtime/or-renderer/src/viewport.rs` | R74e | -| Render state set by hand where the pack states it | `crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs` and its neighbours | R74b | +| Render state set by hand where the pack states it | `crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs` and its neighbours | R74b | | `render_deferred` as a function | `crates/runtime/or-renderer/src/viewport/game_frame.rs` | R74l | -| The hand-written resolve of a GTA VI model, already deleted on `agent/gta6-frame-light` | `crates/runtime/or-renderer/src/game_shaders/meshlets/resolve.rs` | when that branch lands | +| The hand-written resolve of a GTA VI model, already deleted on `agent/gta6-frame-light` | `crates/runtime/or-renderer/src/game_shaders/geometry/meshlets/resolve.rs` | when that branch lands | After R74a no hand-written program shades a world, in any mode but the plain ones. What R74a deletes of GTA VI is a picture people use today; its reference shots are kept in the pull request as the record of what the game's programs must reach. @@ -126,10 +126,10 @@ Pages and their allocator, the texture pool with its sizing and eviction, budget | Need | What already does it | |---|---| -| Constants by name, in layers | `Filler`, `crates/runtime/or-renderer/src/game_shaders/constants.rs` | -| Engine registers, the day's light, fog, tone | `crates/runtime/or-renderer/src/game_shaders/engine.rs`, `crates/runtime/or-renderer/src/game_shaders/lighting.rs`, `crates/runtime/or-renderer/src/game_shaders/tone.rs` | -| A pipeline from a pass, its layouts and what each group holds | `PassPipeline` and `vertex_streams` in `crates/runtime/or-renderer/src/game_shaders/pipeline.rs` | -| A sampler's declared state | `declared_states` in `crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs` | +| Constants by name, in layers | `Filler`, `crates/runtime/or-renderer/src/game_shaders/core/constants.rs` | +| Engine registers, the day's light, fog, tone | `crates/runtime/or-renderer/src/game_shaders/core/engine.rs`, `crates/runtime/or-renderer/src/game_shaders/lighting.rs`, `crates/runtime/or-renderer/src/game_shaders/post/tone.rs` | +| A pipeline from a pass, its layouts and what each group holds | `PassPipeline` and `vertex_streams` in `crates/runtime/or-renderer/src/game_shaders/core/pipeline.rs` | +| A sampler's declared state | `declared_states` in `crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs` | | Many records through a game program | the light volumes, distant lights and coronas of `game_shaders` | | Shadow receive, occlusion, deferred lighting, dome, fog volumes, bloom, resolve, antialiasing | the modules of `game_shaders` that run for one drawable | | The timecycle, visual settings, water quads, light attributes, LOD lights | `crates/io/or-io/src/gta5/data/`, `crates/io/or-io/src/gta5/drawable.rs`, `crates/title/or-title/src/install/timecycle.rs` | diff --git a/docs/direction/Shaded_World_Technical_Plan.md b/docs/direction/Shaded_World_Technical_Plan.md index f4a8bf4bd..1fdf16e09 100644 --- a/docs/direction/Shaded_World_Technical_Plan.md +++ b/docs/direction/Shaded_World_Technical_Plan.md @@ -13,7 +13,7 @@ A game program is run as the bake wrote it. Nothing here rewrites a module after | Piece | Crate | Where | Stands on | |---|---|---|---| | The pack's states, the census, the recorder | `or-io`, `or-shader-tool`, `or-renderer` | fields of the manifest in `crates/io/or-io/src/gta5/shaders/spirv_pack.rs`; a verb beside `bake-pack`; a recorder in the renderer | `GrcEffectPass` | -| The store | `or-renderer` | a module under `crates/runtime/or-renderer/src/game_shaders/` | the core's `Mesh`, the pages the app's bridge allocated, which are `crates/runtime/or-renderer/src/game_shaders/store/pages.rs` since R74c | +| The store | `or-renderer` | a module under `crates/runtime/or-renderer/src/game_shaders/` | the core's `Mesh`, the pages the app's bridge allocated, which are `crates/runtime/or-renderer/src/game_shaders/geometry/store/pages.rs` since R74c | | The draw | `or-renderer` | the `World` of `crates/runtime/or-renderer/src/world.rs`, its key changed | `PassPipeline`, `Filler` | | The frame's steps | `or-renderer` | `crates/runtime/or-renderer/src/viewport/game_frame.rs` | `render_deferred` | | The feed and the profile | `or-world`, `or-world-gta5` | a profile module in each | `WorldLook`, `Feed` | @@ -97,7 +97,7 @@ Off by default; a test or a shots script turns it on for a frame and reads it. E ### The cache -The cache folder gains two levels: the game, and the fingerprint of the install's executable that `src/state/game_pack.rs` already takes. +The cache folder gains two levels: the game, and the fingerprint of the install's executable that `src/state/game_pack/mod.rs` already takes. ## The store (R74c) @@ -129,7 +129,7 @@ impl Store { } ``` -- A page holds meshes of one file layout. The allocator is the one the app's bridge had, moved into the renderer (`crates/runtime/or-renderer/src/game_shaders/store/pages.rs`) with its budget passed in as numbers. As built, a layout's first page is a whole one halved eight times and each after it twice the one before, since every layout has pages of its own and a page is device memory whether a mesh fills it or not. +- A page holds meshes of one file layout. The allocator is the one the app's bridge had, moved into the renderer (`crates/runtime/or-renderer/src/game_shaders/geometry/store/pages.rs`) with its budget passed in as numbers. As built, a layout's first page is a whole one halved eight times and each after it twice the one before, since every layout has pages of its own and a page is device memory whether a mesh fills it or not. - A pipeline's vertex layout is built for a pair of file layout and program: for each input of the vertex program, the file element of that semantic and index, at the file's offset, in the device format that reads the file's encoding as the float or integer the program declares. `vertex_streams` gives the program's inputs; a new function gives the match. - An element in an encoding the device has no format for is rewritten in place at upload to the nearest one it has, and the count is kept by format. - A program input the file has no element for is fed from a one-vertex buffer of that semantic's default, stepped per instance, so the pipeline still builds; the mesh is listed as lacking the stream. As built, that buffer's stride is nought, which has the device read the one vertex for every vertex and every instance of a draw. @@ -162,7 +162,7 @@ impl DrawBuffers { pub fn push(&mut self, queue, bytes: &[u8]) -> u32 /* aligned Still buffers live in one buffer written when a material is made; per-frame ones in one written once a frame for each material in view; per-draw ones in the arena above, one copy for each entity in each view. Every one is bound with a dynamic offset, which `Resource::layout_entry` takes as an argument, so a bind group is made once for a material in a pass and only offsets change between draws. -As built (2026-12-01, `crates/runtime/or-renderer/src/game_shaders/fed.rs`), only the per-draw buffers are bound with a dynamic offset: a pair of the Legacy pack's world techniques binds 13 constant buffers at most, a device's layout takes 8 dynamic ones, and 5 at most of a pair are per draw. A still buffer and a per-frame one lie at an offset their bind group is made with, a per-frame one in a run of its own that is written again each frame a draw binds it. A bind group is made again when the arena it binds is made again, larger. +As built (2026-12-01, `crates/runtime/or-renderer/src/game_shaders/geometry/fed.rs`), only the per-draw buffers are bound with a dynamic offset: a pair of the Legacy pack's world techniques binds 13 constant buffers at most, a device's layout takes 8 dynamic ones, and 5 at most of a pair are per draw. A still buffer and a per-frame one lie at an offset their bind group is made with, a per-frame one in a run of its own that is written again each frame a draw binds it. A bind group is made again when the arena it binds is made again, larger. ### Views @@ -178,7 +178,7 @@ Draws sort by this key, so the pipeline, then the material's groups, then the pa ### Its tests -- Default tier: the synthetic pack of `crates/runtime/or-renderer/src/game_shaders/synthetic.rs` gains an effect whose programs read their constants the way a translated program does, as an array of vectors at registers, with the world matrix in a per-draw buffer and a scalar read in the pixel stage. Entities of one mesh, in the camera's view and a second view at once, each land at their place with their own scalar. Seen failing with every draw given the first entity's offset, and with the second view given the first view's copies. +- Default tier: the synthetic pack of `crates/runtime/or-renderer/src/game_shaders/core/synthetic.rs` gains an effect whose programs read their constants the way a translated program does, as an array of vectors at registers, with the world matrix in a per-draw buffer and a scalar read in the pixel stage. Entities of one mesh, in the camera's view and a second view at once, each land at their place with their own scalar. Seen failing with every draw given the first entity's offset, and with the second view given the first view's copies. - Slow tier, on the baked pack: a fixed city view is drawn; the draws, the bytes of the arena and the frame time are recorded. ## The world in the frame (R74e) @@ -191,9 +191,9 @@ A function of the profile, tested without a device: fn technique(step: Step, bucket: u8, entity: EntityFlags, material: &MaterialFacts) -> Option<&'static str> ``` -It is new, not a lift: `select_pass_at` in `crates/runtime/or-renderer/src/game_shaders/mesh.rs` is a preference list keyed on route, skinning and coverage, with no tint, fade or entity input. The new rule covers what that list covers, and the viewport moves to it, so one rule serves both; the old list is deleted when the viewport's frames are unchanged under the new one. +It is new, not a lift: `select_pass_at` in `crates/runtime/or-renderer/src/game_shaders/geometry/mesh.rs` is a preference list keyed on route, skinning and coverage, with no tint, fade or entity input. The new rule covers what that list covers, and the viewport moves to it, so one rule serves both; the old list is deleted when the viewport's frames are unchanged under the new one. -As built (2026-12-01) the rule is `technique` in `crates/domain/or-world-gta5/src/profile.rs`, and a world alone draws by it. The viewport keeps `select_pass_at`: under the rule a cutout of one drawable would cast by its own technique that reads its map, where it casts whole by the shared caster effect today, so its frames would not stay as they are. +As built (2026-12-01) the rule is `technique` in `crates/domain/or-world-gta5/src/map/profile.rs`, and a world alone draws by it. The viewport keeps `select_pass_at`: under the rule a cutout of one drawable would cast by its own technique that reads its map, where it casts whole by the shared caster effect today, so its frames would not stay as they are. For GTA V Legacy it returns the G-buffer group for an opaque row, the alpha-clip group for a cutout or a fading entity, the tint variants where the drawable has a palette, the material's own cascade caster in the cascade step (the textured one where coverage is cut), and the forward groups for blended rows. The viewport's use of one shared caster effect for every material goes with it. diff --git a/docs/direction/Shader_Pipeline_Design.md b/docs/direction/Shader_Pipeline_Design.md index b07ca4532..b477743d3 100644 --- a/docs/direction/Shader_Pipeline_Design.md +++ b/docs/direction/Shader_Pipeline_Design.md @@ -217,13 +217,13 @@ Over the `win32_40_final` folder of the Legacy install on 2026-11-30 (`census`, - **Instancing.** 17 technique names hold `instanced`. Their 1,168 passes all bind a geometry stage, 17 distinct programs, each of which writes what it is given and the index of a viewport, and binds no constant buffer. No name is both of the G-buffer and instanced, and every effect with an instanced technique has the technique of that name without the word. 10 effects read the number of the instance in a pass of a vertex and a pixel stage: six of the grass, one batch effect and three of the particles; 190 more declare it and read it in none. Hull and domain stages are bound by 1,309 passes, all of tessellated names, and 7 other passes bind a geometry stage, in the bokeh blur and one radar technique. - **Render states.** 11,705 of the 14,876 passes set no render state of any of the three blocks the engine makes of them, the rasterizer, the depth and stencil, and the blend; 352 set one of the rasterizer, 1,475 one of the depth and stencil, and 2,506 one of the blend. Of the 220 passes of the G-buffer technique 127 set none, and of the 218 of the cascade techniques 210. A pass that sets none of a block leaves it to whoever draws, which no file states, so the manifest carries what a pass states (`Pass::states`, for which the pack's version rose to 5) and cannot carry the rest. -One function of the renderer turns a pass's states into what a pipeline is built from, `drawn_as` of `crates/runtime/or-renderer/src/game_shaders/states.rs`, block by block, a block one state sets being whole with its other fields at the engine's defaults. A scene of surfaces takes one of them from its pass, `TAKEN` of `crates/runtime/or-renderer/src/game_shaders/mesh/scene.rs`: the face the pass says it culls. It is held by a frame of the game's own effects that is the same with it as with the value set by hand, and that changes when the state is flipped in the manifest (`a_state_taken_from_the_pass_leaves_the_shaded_frame_as_it_was_and_flipped_in_the_manifest_changes_it`), and by the drawables of the corpus drawn both ways (`a_drawable_in_shaded_is_the_same_frame_with_the_states_its_passes_state_as_with_those_set_by_hand`). ⚠ The rest stays set by hand because, for some effect, the pass states something else than the hand does, so taking it changes a frame, which is a decision and not a refactor: the stencil, where the passes of the terrain, the trees and the grass write a material of their own and every surface is given the default here; the blend, where a pass that adds is alpha-blended here, the water's passes state no blending and the sun's blends its alpha as its colour; the depth comparison, strictly nearer in the passes that state one and as near here; the depth of the three G-buffer passes that say they write none; and the depth of what blends over the lit frame, which is drawn into a pass that only reads the depth, so that a pass saying it writes there is refused by the device. The passes that light and map the frame, which are drawn as quads, keep every state by hand. +One function of the renderer turns a pass's states into what a pipeline is built from, `drawn_as` of `crates/runtime/or-renderer/src/game_shaders/core/states.rs`, block by block, a block one state sets being whole with its other fields at the engine's defaults. A scene of surfaces takes one of them from its pass, `TAKEN` of `crates/runtime/or-renderer/src/game_shaders/geometry/mesh/scene.rs`: the face the pass says it culls. It is held by a frame of the game's own effects that is the same with it as with the value set by hand, and that changes when the state is flipped in the manifest (`a_state_taken_from_the_pass_leaves_the_shaded_frame_as_it_was_and_flipped_in_the_manifest_changes_it`), and by the drawables of the corpus drawn both ways (`a_drawable_in_shaded_is_the_same_frame_with_the_states_its_passes_state_as_with_those_set_by_hand`). ⚠ The rest stays set by hand because, for some effect, the pass states something else than the hand does, so taking it changes a frame, which is a decision and not a refactor: the stencil, where the passes of the terrain, the trees and the grass write a material of their own and every surface is given the default here; the blend, where a pass that adds is alpha-blended here, the water's passes state no blending and the sun's blends its alpha as its colour; the depth comparison, strictly nearer in the passes that state one and as near here; the depth of the three G-buffer passes that say they write none; and the depth of what blends over the lit frame, which is drawn into a pass that only reads the depth, so that a pass saying it writes there is refused by the device. The passes that light and map the frame, which are drawn as quads, keep every state by hand. A frame's calls are recorded as it is drawn by `or_renderer::recorder`: inside `recording`, each pass begun through it is noted by its label and each draw by a game program under it, with the effect, the technique and the instances, and nothing is noted outside one. The `framerecord` step of a shots script writes it as JSON. ## Baked from the app -The editor never loads the translator, which is C++: the app runs `or-shader-tool` as a process and reads the pack it writes. `src/state/game_pack.rs` finds the helper (`OPENRAGE_SHADER_TOOL`, else the file beside the editor), asks it `pack-identity`, which says in one JSON line which translator and legalizer would write a pack now, and starts a bake when the pack under the configuration folder is missing or was written by someone else, or from another build of the game: the build is named by the size and age of the executable, which `bake-pack` records as the pack's `source_build_hash`. The pack of an install is in `shader-pack`, in a folder named after the game and under it one named after that build (`pack_folder`), so two installs each keep theirs; the one folder `shader-pack/game` that served the machine before is neither read nor removed. A bake runs as `bake-pack INSTALL --out ROOT --build-hash HASH --progress`, whose stdout is one `pack_protocol::Event` a line (`reading`, `progress` with the programs done and to do, then `finished`), the type shared by the helper that writes it and the app that reads it, and a log line among them is passed over. It is one job in the job list (`JobKind::GamePackBake`) that can be stopped, which kills the process; a helper that is missing, or was built without its translator, is a status that says so and not a failure to retry; `Automate ▸ Bake game shaders` bakes it again, and a pack named by `OPENRAGE_GAME_PACK` is read and never baked over. Through the real helper, a controller baked the Legacy pack for the folder above, 4,970 programs, in 5.4 seconds on an Apple M4 Pro, and a second controller found it current and started nothing (a run on `91419492` with this change, which the unit tests cannot repeat without an install). The tests stand a script in for the helper, so they run where there is a shell and not on Windows, which this was not run on; and `cargo xtask dist` now builds the helper beside the editor in each package (in `Contents/MacOS` of the app, where the editor looks), as a macOS universal binary joined with `lipo`: the x86_64 and the arm64 builds each compile their C++ in about 40 seconds and say the same translator and legalizer (at `ad11c04c` with this change). A helper that will not build is left out with a warning, since a package without it still opens every asset, and `--require-helper` makes that fatal; the Windows and Linux builds of the C++ were not run. +The editor never loads the translator, which is C++: the app runs `or-shader-tool` as a process and reads the pack it writes. `src/state/game_pack/mod.rs` finds the helper (`OPENRAGE_SHADER_TOOL`, else the file beside the editor), asks it `pack-identity`, which says in one JSON line which translator and legalizer would write a pack now, and starts a bake when the pack under the configuration folder is missing or was written by someone else, or from another build of the game: the build is named by the size and age of the executable, which `bake-pack` records as the pack's `source_build_hash`. The pack of an install is in `shader-pack`, in a folder named after the game and under it one named after that build (`pack_folder`), so two installs each keep theirs; the one folder `shader-pack/game` that served the machine before is neither read nor removed. A bake runs as `bake-pack INSTALL --out ROOT --build-hash HASH --progress`, whose stdout is one `pack_protocol::Event` a line (`reading`, `progress` with the programs done and to do, then `finished`), the type shared by the helper that writes it and the app that reads it, and a log line among them is passed over. It is one job in the job list (`JobKind::GamePackBake`) that can be stopped, which kills the process; a helper that is missing, or was built without its translator, is a status that says so and not a failure to retry; `Automate ▸ Bake game shaders` bakes it again, and a pack named by `OPENRAGE_GAME_PACK` is read and never baked over. Through the real helper, a controller baked the Legacy pack for the folder above, 4,970 programs, in 5.4 seconds on an Apple M4 Pro, and a second controller found it current and started nothing (a run on `91419492` with this change, which the unit tests cannot repeat without an install). The tests stand a script in for the helper, so they run where there is a shell and not on Windows, which this was not run on; and `cargo xtask dist` now builds the helper beside the editor in each package (in `Contents/MacOS` of the app, where the editor looks), as a macOS universal binary joined with `lipo`: the x86_64 and the arm64 builds each compile their C++ in about 40 seconds and say the same translator and legalizer (at `ad11c04c` with this change). A helper that will not build is left out with a warning, since a package without it still opens every asset, and `--require-helper` makes that fatal; the Windows and Linux builds of the C++ were not run. ## Phases and gates diff --git a/docs/direction/Unified_World_Plan.md b/docs/direction/Unified_World_Plan.md index dc9fc9ae7..cfbebcc20 100644 --- a/docs/direction/Unified_World_Plan.md +++ b/docs/direction/Unified_World_Plan.md @@ -38,7 +38,7 @@ At `9fdf0fee` the World screen's viewer is `src/state/gta6_worldview/` (55 files GTA V's world is headless: `openrage-cli world` reaches it and no screen draws it. -At `9fdf0fee` its model is the modules of `crates/domain/or-world/src/` outside the core's (12,996 lines); the index of an install with its kept file and mount source is `crates/domain/or-world-gta5/src/world_index.rs` and its folder; the streaming driver and its map reader are `crates/domain/or-world-gta5/src/world_forest.rs` and its folder; and the edit vocabularies with their session are `crates/domain/or-maps/src/` (22,178 lines). +At `9fdf0fee` its model is the modules of `crates/domain/or-world/src/` outside the core's (12,996 lines); the index of an install with its kept file and mount source is `crates/domain/or-world-gta5/src/streaming/world_index/mod.rs` and its folder; the streaming driver and its map reader are `crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs` and its folder; and the edit vocabularies with their session are `crates/domain/or-maps/src/` (22,178 lines). - **`or-world` is GTA V's model with a core beside it.** Its header states two invariants the core respects: nothing there copies the tree a reader produced, and nothing keys on a field's spelling. - **Three edit vocabularies are bound to the project**: entities in `crates/domain/or-maps/src/operation.rs`, roads in `crates/domain/or-maps/src/roads/operation.rs` and collision in `crates/domain/or-maps/src/collision.rs`, each with named operations, inverses and digest guards. The session of `crates/domain/or-maps/src/operation/session.rs` is opened over a project folder and writes at a flush. A collision operation's inverse is whole files, and an entity removal renumbers a second file. `or-maps` depends on `or-project` and `or-source`, which the core cannot. @@ -72,15 +72,15 @@ Each row is a duplicate the programme ends, at `9fdf0fee`: | What | GTA V | GTA VI | |---|---|---| -| The index of an install | `crates/domain/or-world-gta5/src/world_index.rs` | `src/state/gta6_worldview/index.rs` and five neighbours | -| A kept file of rows, checked against the archives' size and time | `crates/domain/or-world-gta5/src/world_index/kept.rs` | `src/state/gta6_worldview/index_keep.rs`, and a second in `src/state/gta6_world_fill.rs` | -| The driver around the forest, which both share (`Forest` of `crates/domain/or-world/src/streaming.rs`): wanted maps, read, insert, select, instances | `crates/domain/or-world-gta5/src/world_forest.rs` | `src/state/gta6_worldview/stream.rs` and its neighbours | -| What is switched on at an hour | `crates/domain/or-world-gta5/src/state.rs` | `src/state/gta6_worldview/index_states.rs` | -| A map's extents grown to hold an entity | `crates/domain/or-maps/src/edit.rs`, `crates/domain/or-world-gta5/src/extents.rs` | `src/state/gta6_map_extents.rs` | -| Removing an entity and repairing links across maps | `crates/domain/or-world-gta5/src/execute.rs`, `crates/domain/or-maps/src/delete.rs` | `crates/io/or-io/src/gta6/map_grow.rs`, `src/state/gta6_map_entity.rs` | +| The index of an install | `crates/domain/or-world-gta5/src/streaming/world_index/mod.rs` | `src/state/gta6_worldview/index.rs` and five neighbours | +| A kept file of rows, checked against the archives' size and time | `crates/domain/or-world-gta5/src/streaming/world_index/kept.rs` | `src/state/gta6_worldview/index_keep.rs`, and a second in `src/state/gta6_world_fill.rs` | +| The driver around the forest, which both share (`Forest` of `crates/domain/or-world/src/streaming.rs`): wanted maps, read, insert, select, instances | `crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs` | `src/state/gta6_worldview/stream.rs` and its neighbours | +| What is switched on at an hour | `crates/domain/or-world-gta5/src/streaming/state.rs` | `src/state/gta6_worldview/index_states.rs` | +| A map's extents grown to hold an entity | `crates/domain/or-maps/src/edit.rs`, `crates/domain/or-world-gta5/src/map/extents.rs` | `src/state/gta6_map_extents.rs` | +| Removing an entity and repairing links across maps | `crates/domain/or-world-gta5/src/authoring/execute.rs`, `crates/domain/or-maps/src/delete.rs` | `crates/io/or-io/src/gta6/map_grow.rs`, `src/state/gta6_map_entity.rs` | | The undo of the Map screen | `src/state/workbench/maps.rs` | the document's own steps | | The box scene of the Map screen | `crates/domain/or-maps/src/scene.rs` | `src/state/gta6_map.rs` | -| A map body read for its nodes, its occluders and its lights | one read, of `crates/domain/or-world-gta5/src/map_data.rs` | three loops with three pools: the forest's, the occluders' and the lights' | +| A map body read for its nodes, its occluders and its lights | one read, of `crates/domain/or-world-gta5/src/map/map_data.rs` | three loops with three pools: the forest's, the occluders' and the lights' | ## The shape @@ -218,9 +218,9 @@ The core's `Capability` has the nine values below; what is chosen at open is an | Capability | GTA V | GTA VI | RDR2, expected | |---|---|---|---| -| A height of the ground | yes, from the bounds `crates/domain/or-world-gta5/src/world_collision.rs` streams | yes, from the install's height map (`ground_under`) | unmeasured | +| A height of the ground | yes, from the bounds `crates/domain/or-world-gta5/src/archetypes/world_collision.rs` streams | yes, from the install's height map (`ground_under`) | unmeasured | | A collision query with hits and overlaps | yes: `crates/domain/or-world/src/collision/` | no | unmeasured | -| Placement rows and find | yes: `crates/domain/or-world-gta5/src/find.rs` | rows for one archive; no search | no | +| Placement rows and find | yes: `crates/domain/or-world-gta5/src/streaming/find/mod.rs` | rows for one archive; no search | no | | A weather gate on what streams | yes | none found | unmeasured | | An edit store | yes, in a project | yes, over a document | no | | A base to compare with, put back to and merge against | yes | no | no | @@ -263,7 +263,7 @@ Most of it exists in the world files of `src/render/viewport/` and in `crates/ru A profile is what a game states so that the host can run its programs: data and pure functions in the adapter, with no type of the graphics library. It is not in the contract yet; R71f adds it to the opened world, and a world that states none draws in the fallback. - **Where its programs come from**, the translator that lowers them, by name, and the key a lowered program is cached under. -- **What it needs of the device**, in the shape `device_needs` of `crates/runtime/or-renderer/src/game_shaders/meshlets.rs` has; a device that lacks it gets the fallback and the reason. +- **What it needs of the device**, in the shape `device_needs` of `crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs` has; a device that lacks it gets the fallback and the reason. - **Its frame**: named targets with their formats, and a list of steps over them, each of a kind the host knows. - **How a material binds**: which programs draw it in which pass, with its blend, depth and cull state, or a refusal with its reason. - **Its feed**: each frame, the values of its constants, by reflection name for GTA V and by binding and name hash for GTA VI (`FeedName`). @@ -275,7 +275,7 @@ GTA V states a vertex buffer laid out by the vertex stage's inputs, a material a A dome and light volumes are a kept mesh and a list, which a kind states. The frame holds no pass that is a step of no kind: the measure of 2026-11-27 counted five such, the exposure's meter and the World screen's shadow cast by tile, rooms' lamps, terrain shadow and history, and all five are deleted ([ruling 5](#asked-of-the-owner)). -The translators stay tools: the profile names its translator and the app hands the host one for each name, as `src/state/gta6_shader_translator.rs` and the helper process of `src/state/game_pack.rs` do today. +The translators stay tools: the profile names its translator and the app hands the host one for each name, as `src/state/gta6_shader_translator.rs` and the helper process of `src/state/game_pack/mod.rs` do today. ### The fallback @@ -359,7 +359,7 @@ A row is one programme part, lands in the parts its brief lists, and ends on a c - **R71d and R71b's first part run together**, and R71i beside the drawing rows. - **R71d lands before R71b's second part**, which rebases its lines of the workspace manifest, the lock file and the registry. So GTA VI's own loop is deleted only after both adapters call the core's driver. -- **R71a edited two files the branches of R70 change**: in `crates/domain/or-world/src/streaming.rs` how a parent waits became the enum `Children`, which `Forest::waiting_for` takes, and the constructor call in `crates/domain/or-world-gta5/src/world_forest.rs` passes `Children::Stated` ([ruling 7](#asked-of-the-owner)). +- **R71a edited two files the branches of R70 change**: in `crates/domain/or-world/src/streaming.rs` how a parent waits became the enum `Children`, which `Forest::waiting_for` takes, and the constructor call in `crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs` passes `Children::Stated` ([ruling 7](#asked-of-the-owner)). Rules for every row: no window is opened, and a screen is checked on `just shots` and `just self-check --viewport`; documents travel with the code; a moved test keeps its body; and a format's read path changed by a move runs that format's slow suite. @@ -373,11 +373,11 @@ Taken on 2026-11-27 on the owner's Mac, with no code path of a screen or a verb ### The GTA V world behind the contract, and one kept file (R71d) -Read [the contract](#the-contract) with `crates/domain/or-world/src/fake.rs`, an adapter whole in one file, `crates/domain/or-world-gta5/src/world_index.rs` with its folder, `crates/domain/or-world-gta5/src/world_forest.rs`, `crates/title/or-title/src/vfs/game_mount.rs` and the fixtures of `crates/domain/or-depends/tests/`. +Read [the contract](#the-contract) with `crates/domain/or-world/src/fake.rs`, an adapter whole in one file, `crates/domain/or-world-gta5/src/streaming/world_index/mod.rs` with its folder, `crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs`, `crates/title/or-title/src/vfs/game_mount.rs` and the fixtures of `crates/domain/or-depends/tests/`. - **Builds.** or-world-gta5 as a new crate over the core, `or-depends`, `or-io` and `or-title`. What the kit asks of it is in [what an adapter writes](#what-an-adapter-writes-to-pass-the-kit). - *Its title and indexer*: an id, both games' ids, the options (the level by the mount's cutoff, story or multiplayer), the layers through the mount's options, the keys of the opening; rows for each archive, a link that leaves the mount's own tables on the index, and a version of its rules. - - *Its map reader*: that of `crates/domain/or-world-gta5/src/world_forest/read.rs`, as a body that states its occluders and lights, says in one call what draws each node, and lays out its entities and lists; its interiors are bodies of their own, each read from the body that places it. + - *Its map reader*: that of `crates/domain/or-world-gta5/src/streaming/world_forest/read.rs`, as a body that states its occluders and lights, says in one call what draws each node, and lays out its entities and lists; its interiors are bodies of their own, each read from the body that places it. - *Its policy*: `Children::Stated` and `streams_in`; the clock and weather of a map as a `Gate` on its row; its state groups as switches; its capabilities, with the words an instance carries. - *Its models*: what names a model and its textures, as asset keys and asks grouped by dictionary. ⚠ The kit's rule `every_model_a_selection_draws_with_reads_whole` asks that each model the scene draws with reads whole, with its textures. Names alone do not pass it, so this row brings forward from R71e the decode of a drawable to the core's model, for the models the hand-built install holds or gains; the dictionary's entry, the fragment, the second target, the dictionary of textures read once and the surface by sampler names stay R71e's. - *What the contract lacks and this row adds*: a height of the ground and a collision query as methods a capability gates; the kit's second tier, over the hand-built install of `or-depends`' fixtures; and the registry crate with its first line. @@ -388,7 +388,7 @@ Read [the contract](#the-contract) with `crates/domain/or-world/src/fake.rs`, an ### The GTA VI world behind the contract (R71b) -Read [GTA_VI_World_Viewer.md](../features/GTA_VI_World_Viewer.md), `src/state/gta6_worldview/mod.rs`, `select_asking` in `src/state/gta6_worldview/stream.rs`, `src/state/gta6_worldview/model.rs` with `meshes_at` of `src/render/gta6_drawable.rs`, `src/self_check/shots/compare.rs`, and the shots steps of [Development_Workflow.md](../guides/Development_Workflow.md#screenshots). +Read [GTA_VI_World_Viewer.md](../features/GTA_VI_World_Viewer.md), `src/state/gta6_worldview/mod.rs`, `select_asking` in `src/state/gta6_worldview/stream.rs`, `src/state/gta6_worldview/model.rs` with `meshes_at` of `src/render/gta6_drawable/mod.rs`, `src/self_check/shots/compare.rs`, and the shots steps of [Development_Workflow.md](../guides/Development_Workflow.md#screenshots). It lands in five parts, each on its own check: @@ -396,7 +396,7 @@ It lands in five parts, each on its own check: 2. **The closed move.** By the closure of imports at `9fdf0fee`, 13 files can leave the app before the selecting half. Seven change in imports alone: the reader pool, to the core, its workers keeping their open files in the core's `Worker`; `src/state/gta6_worldview/index_types.rs`, `src/state/gta6_worldview/lights_lod.rs` and `src/state/gta6_worldview/lights_index.rs`, to `or-io`; the lights' law and variables and the material, to the adapter. Six follow after two cuts: the index with its kept file, mount binding, scan and states, and the occluders. The cuts: the block of `src/state/gta6_worldview/index.rs` that implements a method of the app's `Viewer` (`land_and_water`) stays in the app, and the mount binding takes the configuration folder and the keys from the `Opening`. The adapter's title, its registry line and the slow tier's keys land here. 3. **The kept file.** The index goes onto the core's mechanism: rows for each archive with names unresolved, its tables derived across archives in the one section `whole` writes, and a `link` that makes the ids and leaves GTA VI's own tables on the index for its readers. `fresh_game.json` is one of the other inputs, with its stamp. The first open deletes the old kept file of that install, moves `fresh_game.json` from its old place and shows the rebuild's progress, whose time is recorded: a change of the rules' version costs every user that rebuild. 4. **The selecting half.** The two symbols it takes from the renderer move below it; then `src/state/gta6_worldview/stream.rs` with its five child modules, the interiors and the room walk move, the block of `src/state/gta6_worldview/stream_grass.rs` on `Viewer` staying in the app. The world thread is rewritten around the core's `Driver` and enters the core with the pool: `want` on the thread, the reads in the pool, `give`, `settle`, and the interiors it waits for read from the placing body and given back. Of `select_asking` the mechanics every title shares are the driver's already; GTA VI's rules (held codes, time archetypes, batch levels that hide a parent's instances, cards that hand off to trees, the walk that marks an instance as casting only) go to its rows' gates, its body's `draws` and `lay`, and its policy. The occluders and the lights leave their own loops and pools for the one read of a body. `crates/domain/or-world/src/streaming_rules.rs` moves to the adapter but for the two functions the forest calls. -5. **The outputs.** The 18 other files. The model reader returns the core's `Model`: the vertex decode of `src/render/gta6_drawable.rs` goes below the app, and `meshes_at` stays, calling down, with its skinning. The texture reader answers batched asks, and `src/state/gta6_texture_index.rs` goes with it. The sky, wind, water and terrain files return frame facts and feed the rest by name; their blocks on `Viewer` stay in the app. The kit's test file lands here, its rule on models needing this reader. +5. **The outputs.** The 18 other files. The model reader returns the core's `Model`: the vertex decode of `src/render/gta6_drawable/mod.rs` goes below the app, and `meshes_at` stays, calling down, with its skinning. The texture reader answers batched asks, and `src/state/gta6_texture_index.rs` goes with it. The sky, wind, water and terrain files return frame facts and feed the rest by name; their blocks on `Viewer` stay in the app. The kit's test file lands here, its rule on models needing this reader. - **Deletes.** `src/state/gta6_worldview/index_keep.rs`; the GTA VI streamer's own loop around the forest; the occluders' and the lights' loops and pools; the block that opens an archive for a worker, written once in place of six times. - **Check.** After each part the shots, dumps and digests of part 1 match, with no candidate line. No test of the viewer is deleted, and the pull request lists each restated. After part 3 a second start opens no archive and an edit of `fresh_game.json` rebuilds. After part 4 one caller of the forest's `select` is left outside tests. After part 5 [the kit](#what-an-adapter-writes-to-pass-the-kit) passes over a world built by hand, as the viewer's tests build rows and bodies. The tests of `src/state/gta6_edit_tests.rs` and the Map screen's pass with no body changed. @@ -411,7 +411,7 @@ Read `src/render/viewport/world.rs` and its neighbours, `crates/runtime/or-rende It lands in four parts, each on the shots, dumps and digests of R71b: 1. **The session** of [the app](#the-app); `viewer()` gone from every call site and the shots steps addressed to a session; the five single-valued statics made fields of a session or of the opened install; the fallback-only switch, with its shot added to the script; the core's `Pose` in place of the panel's own; the architecture tests of the host and the app, with their ledgers. -2. **The host.** The bridge's mechanics moved to `or-renderer` a module at a time, beginning with `src/render/viewport/world_budget.rs` and the pages, which are `crates/runtime/or-renderer/src/game_shaders/store/pages.rs` since [R74c](Roadmap.md#r74c-one-store-with-a-model-as-its-file-lays-it); occlusion typed on the core's occluders; the selection's instances carrying their node; the bridge reduced to handing a session to the host. +2. **The host.** The bridge's mechanics moved to `or-renderer` a module at a time, beginning with `src/render/viewport/world_budget.rs` and the pages, which are `crates/runtime/or-renderer/src/game_shaders/geometry/store/pages.rs` since [R74c](Roadmap.md#r74c-one-store-with-a-model-as-its-file-lays-it); occlusion typed on the core's occluders; the selection's instances carrying their node; the bridge reduced to handing a session to the host. 3. **The panels and the preferences**, by capability and slot, the old preferences read once. 4. **The fake title drawn**, by the self-check and by a test of `or-renderer` that fails when the frame paints nothing, the renderer's test packs made reachable outside its tests. @@ -424,7 +424,7 @@ After part 1 the other GTA VI sessions resume ([ruling 10](#asked-of-the-owner)) ### The GTA V world drawn in the fallback pass (R71e) -Read `crates/runtime/or-renderer/src/world.rs`, `crates/runtime/or-renderer/src/game_shaders/drawable.rs`, and [the Gen8 and Gen9 section](../reference/Crate_Reference.md#gen8-and-gen9-enhanced-is-a-separate-target) of the crate reference. +Read `crates/runtime/or-renderer/src/world.rs`, `crates/runtime/or-renderer/src/game_shaders/geometry/drawable.rs`, and [the Gen8 and Gen9 section](../reference/Crate_Reference.md#gen8-and-gen9-enhanced-is-a-separate-target) of the crate reference. - **Builds.** The rest of the decode R71d began for its fixture: a drawable, a drawable dictionary's entry and a fragment to the core's model, for both targets, each by its file's own RSC7 version; a texture dictionary read once for the asks it holds; a material's fallback surface by its sampler names. The World room for a GTA V install, read only. - **Check.** A synthetic world of parent and child levels draws the level the rules select at each distance, in real frames with no window. Over each install, at R71d's cameras, the instances drawn are those of the file R71d captured, and every model not drawn has a named reason. The frame over the city is measured on the owner's machine and its budget recorded. The data contract is frozen here, citing what R71m found of RDR2. @@ -434,15 +434,15 @@ Read `crates/runtime/or-renderer/src/world.rs`, `crates/runtime/or-renderer/src/ Read the manifests of `or-depends` and `or-maps`, and `crates/domain/or-depends/src/resolve.rs`. -- **Builds.** One mechanical commit on `main` between waves, with no other lane open on the three crates. The GTA V modules of `or-world` move with `git mv`. The splits: `crates/domain/or-world-gta5/src/collision/bound.rs` and the half of the collision set that faces a bound go to the adapter, and the box type is lifted out of `crates/domain/or-world-gta5/src/extents.rs` into the core; the placement convention of `crates/domain/or-world/src/transform.rs` goes, and `scale_of` and `placed_corners` stay; the scene's types go to the core and its builder stays in `or-maps`. The world half of `or-depends` moves with the catalogue, the tables, the contents, the two types of the resolver its index names and `crates/domain/or-world-gta5/src/test_fixtures/tests_support.rs`, so that the resolver left behind imports the adapter and no ring forms; the script forms of `crates/domain/or-world-gta5/src/script_text.rs` and the filename rule of an area's bounds go with it, and the place parser and the manipulator go to the core, which ends the edge from `or-depends` to `or-maps`. `WorldForest` becomes a thin wrapper over the core's driver with its public surface as it is, GTA V's index is kept by the core's mechanism, and each file moved leaves the ledgers of the core's architecture test. -- **Deletes.** `crates/domain/or-world-gta5/src/world_index/kept.rs`; GTA V's own loop inside `WorldForest`; the include by path of `or-depends`' fixtures into `or-cli`. +- **Builds.** One mechanical commit on `main` between waves, with no other lane open on the three crates. The GTA V modules of `or-world` move with `git mv`. The splits: `crates/domain/or-world-gta5/src/archetypes/collision/bound.rs` and the half of the collision set that faces a bound go to the adapter, and the box type is lifted out of `crates/domain/or-world-gta5/src/map/extents.rs` into the core; the placement convention of `crates/domain/or-world/src/transform.rs` goes, and `scale_of` and `placed_corners` stay; the scene's types go to the core and its builder stays in `or-maps`. The world half of `or-depends` moves with the catalogue, the tables, the contents, the two types of the resolver its index names and `crates/domain/or-world-gta5/src/test_fixtures/tests_support.rs`, so that the resolver left behind imports the adapter and no ring forms; the script forms of `crates/domain/or-world-gta5/src/authoring/script_text.rs` and the filename rule of an area's bounds go with it, and the place parser and the manipulator go to the core, which ends the edge from `or-depends` to `or-maps`. `WorldForest` becomes a thin wrapper over the core's driver with its public surface as it is, GTA V's index is kept by the core's mechanism, and each file moved leaves the ledgers of the core's architecture test. +- **Deletes.** `crates/domain/or-world-gta5/src/streaming/world_index/kept.rs`; GTA V's own loop inside `WorldForest`; the include by path of `or-depends`' fixtures into `or-cli`. - **Check.** The tests of `crates/domain/or-world-gta5/tests/the_forest_of_a_mount.rs`, `crates/domain/or-world-gta5/tests/the_world_index_of_a_real_install.rs` and the world suites of `or-cli` pass with no body changed, none deleted. `cargo tree` shows no ring. One world kept-file format is left in the tree. The slow tier holds every install suite it held, under its new key. - **Must not touch.** What a GTA V file reads or writes as. - **Not known.** Which of the two GTA V deletions with renumbering survives; R71l settles it. ### The render profile and the programs of GTA V Legacy (R71f) -Read [Shader_Pipeline_Design.md](Shader_Pipeline_Design.md), `crates/runtime/or-renderer/src/viewport/game_frame.rs`, `crates/runtime/or-renderer/src/game_shaders/mesh.rs` with its scene, and `src/state/game_pack.rs`. +Read [Shader_Pipeline_Design.md](Shader_Pipeline_Design.md), `crates/runtime/or-renderer/src/viewport/game_frame.rs`, `crates/runtime/or-renderer/src/game_shaders/geometry/mesh.rs` with its scene, and `src/state/game_pack/mod.rs`. It lands in three parts: @@ -466,7 +466,7 @@ Read [Shader_Definition_Database.md](../features/Shader_Definition_Database.md) ### The programs of GTA VI over a world (R71h) -Read [what a build's programs come to](../features/GTA_VI_Builds.md#what-a-builds-programs-come-to), [what the graphics library cannot run](#what-the-graphics-library-cannot-run), `crates/runtime/or-renderer/src/game_shaders/meshlets.rs`, `src/render/gta6_meshlets.rs` and `src/state/gta6_shaders.rs`. +Read [what a build's programs come to](../features/GTA_VI_Builds.md#what-a-builds-programs-come-to), [what the graphics library cannot run](#what-the-graphics-library-cannot-run), `crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs`, `src/render/gta6_meshlets.rs` and `src/state/gta6_shaders.rs`. - **Builds.** GTA VI's profile: its targets and steps; its surface pass over the host's pages as storage buffers; a transform for each instance, which nothing feeds today; the bindings only the game fills, named; the buffer fitting Metal needs, applied where the app builds a pass; and an encoder its fallback surfaces write its targets with, where today such a surface is drawn after the resolve. Then its lighting: by its own programs if the bindings the game fills can be named, and by named passes if not, which the measure makes the likelier. - **Deletes.** A family of the fallback's shader once every supported backend draws every material that used it; the renderer's mapping of a material onto a family with the last of them. diff --git a/docs/direction/Workbench_Plan.md b/docs/direction/Workbench_Plan.md index ba8698844..7946437cf 100644 --- a/docs/direction/Workbench_Plan.md +++ b/docs/direction/Workbench_Plan.md @@ -167,7 +167,7 @@ Does not do: the clothing model (wave F), anything in the app. ### Wave C: the project container -Read [Project_Model_Design.md](Project_Model_Design.md) in full, the project file code in `src/state/project.rs` and the project cases in `src/state/the_front_door.rs`. +Read [Project_Model_Design.md](Project_Model_Design.md) in full, the project file code in `src/state/project/mod.rs` and the project cases in `src/state/the_front_door.rs`. Build, in a new domain crate (the working name is or-project), so that the app and the CLI share it: diff --git a/docs/direction/Workbench_UX_Design.md b/docs/direction/Workbench_UX_Design.md index a6a30ca46..ccd71e277 100644 --- a/docs/direction/Workbench_UX_Design.md +++ b/docs/direction/Workbench_UX_Design.md @@ -156,7 +156,7 @@ Two steps, as Visual Studio does. Step one is the template gallery; the right si | Status bar | Game switcher, workspace, path, jobs | Adds the project name, which opens the recent list (each recent project the command the File menu and the palette hold). The Build button is not in it: the window has one, at the right of the menu bar, with its state dot and a word inside it (Not built, Building…, Built, Failed, or the count of the plan's problems). The workspace is not written in the status bar, since the buttons above show it, and the install's folder reads Game folder: with its path; the count reads tabs open, and the Log entry says what it counts (Log · 1 error); with no document open the hint is the screen's (what a drop there does and the command that does it) | `src/ui/panels/status_bar.rs` | | Files and Outline panels | Left column | Project panel (Content and Builds) with Outline as a tab beside it in the Project workspace | `src/ui/panels/registry.rs` | | Start page | Installs, open from disk, recents, keys | Buttons, cards, installs, keys | `src/ui/panels/game_picker.rs` | -| Project file | Workspace, tabs, members | Content, builds and shown buttons as added keys; unknown keys are still carried | `src/state/project.rs` | +| Project file | Workspace, tabs, members | Content, builds and shown buttons as added keys; unknown keys are still carried | `src/state/project/mod.rs` | The edit mode banner needs the explanation: it protects the base game. Showing Read only above a project file that is being edited would be false, and a false word in that corner teaches people to ignore it when it matters. @@ -853,4 +853,4 @@ The same day the owner also asked for the project system to be implemented prope ## Sources -The OpenRage tree at `a9b7cb96`: the menu bar in `src/ui/panels/menu.rs`, the start page in `src/ui/panels/game_picker.rs`, the workspaces in `src/ui/dock.rs`, the status bar in `src/ui/panels/status_bar.rs` and the project file in `src/state/project.rs`. The incumbents are described in [Clothing_Tool_Design.md](Clothing_Tool_Design.md). Visual Studio's new-project flow and project menu are used from general knowledge. The mockups of this design were drawn in the conversation that produced it and are not committed. +The OpenRage tree at `a9b7cb96`: the menu bar in `src/ui/panels/menu.rs`, the start page in `src/ui/panels/game_picker.rs`, the workspaces in `src/ui/dock.rs`, the status bar in `src/ui/panels/status_bar.rs` and the project file in `src/state/project/mod.rs`. The incumbents are described in [Clothing_Tool_Design.md](Clothing_Tool_Design.md). Visual Studio's new-project flow and project menu are used from general knowledge. The mockups of this design were drawn in the conversation that produced it and are not committed. diff --git a/docs/direction/Workbench_Views_Design.md b/docs/direction/Workbench_Views_Design.md index dc8317f46..1428c248d 100644 --- a/docs/direction/Workbench_Views_Design.md +++ b/docs/direction/Workbench_Views_Design.md @@ -70,7 +70,7 @@ The strip is the bound. Ctrl+1 to Ctrl+9 reach nine workspaces, the palette and Every door that exists for the Wardrobe is the door of the next view, and none is new. -- **New project…** (File, the start page and the palette; it has no default key, and Ctrl+N is unbound, as `new_session_and_maximize_are_listed_and_unbound` in `src/ui/shortcuts.rs` holds) offers a template, and a project of one kind of content opens on that kind's screen while one of several opens on Project (ruling R8, built as `workspace_for` in `src/state/front_door/new_project.rs`). The draft keeps it and asks the owner to confirm it as a ruling. +- **New project…** (File, the start page and the palette; it has no default key, and Ctrl+N is unbound, as `new_session_and_maximize_are_listed_and_unbound` in `src/ui/shortcuts/mod.rs` holds) offers a template, and a project of one kind of content opens on that kind's screen while one of several opens on Project (ruling R8, built as `workspace_for` in `src/state/front_door/new_project.rs`). The draft keeps it and asks the owner to confirm it as a ruling. - **A click on a Content row** suggests the content's screen, and **Open in** lists every workspace, each saying under its name why it cannot show the content and opening anyway (`where_content_opens`). - **A double click in the Assets table** opens a file in the workspace of its kind: a weapon's model opens in Model, a `.ypt` in Particle, a `.ymap` in Data. From there Open in offers the view. - **The strip** offers a task screen only while the project holds its content, and the palette and View ▸ Workspace reach every workspace. @@ -125,7 +125,7 @@ The header holds Add weapons, a filter by group and by name, the build chooser a What the kind contributes to a plan: the model and texture files at `stream/`, the metadata files with the `data_file` lines that register them, each weapon's name as a claim of its own kind, figures (weapons, components, bytes of textures, estimated memory) and an item per weapon and component, so that a rename is a move in the build's diff. -Typed metadata is the first piece of work and the one that decides the rest. The tree declares the ped variation family and the world family by hand, found by the name hash each document's own type table stores (`crates/io/or-io/src/meta/typed/ped.rs`, `crates/io/or-io/src/meta/typed.rs`), and no weapon family: `crates/io/or-io/src/meta/binary/root_types.rs` lists `CVfxWeaponInfoMgr`, the root of the effects a weapon names, and no root for a weapon's info. Weapon metadata opens today in the Visual panel of the Data workspace, with the names a local snapshot gives it and `hash_XXXXXXXX` without one. The family is declared as the ped family was: names from the engine through the corpus, the testimony and the local layout references (D15 of [OR_IO_Specification.md](OR_IO_Specification.md)), a writer that grows an array, and a fixed point checked over every weapon file of the installs. ⚠ The staged metadata corpus holds no file of a weapon's info (its listing of 2026-10-19 has `vfxweaponinfo`, `weaponevents` and `weapontasks` among its `.ymt` files), so the measurement is made on a mounted install, as the world family's was ([R32](Roadmap.md#r32-world-data-ymap-ytyp-and-interiors)), and the wave says which suites that makes install-gated. +Typed metadata is the first piece of work and the one that decides the rest. The tree declares the ped variation family and the world family by hand, found by the name hash each document's own type table stores (`crates/io/or-io/src/meta/typed/ped.rs`, `crates/io/or-io/src/meta/typed/mod.rs`), and no weapon family: `crates/io/or-io/src/meta/binary/root_types.rs` lists `CVfxWeaponInfoMgr`, the root of the effects a weapon names, and no root for a weapon's info. Weapon metadata opens today in the Visual panel of the Data workspace, with the names a local snapshot gives it and `hash_XXXXXXXX` without one. The family is declared as the ped family was: names from the engine through the corpus, the testimony and the local layout references (D15 of [OR_IO_Specification.md](OR_IO_Specification.md)), a writer that grows an array, and a fixed point checked over every weapon file of the installs. ⚠ The staged metadata corpus holds no file of a weapon's info (its listing of 2026-10-19 has `vfxweaponinfo`, `weaponevents` and `weapontasks` among its `.ymt` files), so the measurement is made on a mounted install, as the world family's was ([R32](Roadmap.md#r32-world-data-ymap-ytyp-and-interiors)), and the wave says which suites that makes install-gated. Rules, as data in the shape of `crates/domain/or-addonped/src/rules.rs`. The ones this draft proposes are the ones an existing check already supports, and each is added only with its measurement. @@ -144,7 +144,7 @@ Rules, as data in the shape of `crates/domain/or-addonped/src/rules.rs`. The one | Reused as they are | Added | |---|---| | Project, Outline, Problems, Build, History, Jobs and Log, in the layout of `wardrobe_layout` | A list of weapons and components (`src/ui/panels/wardrobe/list.rs` is the precedent) | -| The viewport, the skeleton overlay and the bone editing of the Model workspace | An assembled-weapon panel, over a pure query from the pack and a choice to the models and textures worn, tested without a renderer as `crates/domain/or-wardrobe/src/dress.rs` is | +| The viewport, the skeleton overlay and the bone editing of the Model workspace | An assembled-weapon panel, over a pure query from the pack and a choice to the models and textures worn, tested without a renderer as `crates/domain/or-wardrobe/src/shop/dress.rs` is | | The Visual metadata editor, for any field the Weapon panel has not laid out, and presets, which apply one weapon's chosen fields to a selection in one step (`src/state/presets.rs`) | A Weapon panel, over the typed family | | Texture replacement from an image, with its rules, and Replace geometry… for a model | Rules, a verifier and the `openrage-cli` verbs, as a kind's crate has them | @@ -254,7 +254,7 @@ The Maps view serves a person who makes a map: placements, the types they place, +-------------------------------------------------------------------------------------------+ ``` -The left column has the Project panel and a tree of the map sets the project holds: a map name names a set of files that `MapGroup` merges (`crates/domain/or-world-gta5/src/group.rs`), so the tree lists sets, then files, then the entities, archetypes and interiors each holds, virtualised like the Assets table. The middle is a plan: each entity as a box at its extents, coloured by level of detail, with an interior drawn by its rooms, drawn by the egui painter so that it needs no streamed model. The right panel is the selection: the entity or archetype through the typed world views, with the reference pickers the inspector already has for archetypes and rooms, and a Uses and Used by pair from the dependency index. The bottom has the same tabs as the other task screens. +The left column has the Project panel and a tree of the map sets the project holds: a map name names a set of files that `MapGroup` merges (`crates/domain/or-world-gta5/src/map/group.rs`), so the tree lists sets, then files, then the entities, archetypes and interiors each holds, virtualised like the Assets table. The middle is a plan: each entity as a box at its extents, coloured by level of detail, with an interior drawn by its rooms, drawn by the egui painter so that it needs no streamed model. The right panel is the selection: the entity or archetype through the typed world views, with the reference pickers the inspector already has for archetypes and rooms, and a Uses and Used by pair from the dependency index. The bottom has the same tabs as the other task screens. The 3D scene, placed models drawn where the map puts them, is the second stage and not part of the first cut. It needs the resolver to find each archetype's files and a streamer that loads them, and nothing in the tree measures how many models a map asks for; the plan view answers most questions a creator has before that. @@ -272,12 +272,12 @@ The 3D scene, placed models drawn where the map puts them, is the second stage a | The kind says | It comes from | |---|---| -| What a map set holds and what loads before it | `MapGroup` and the derivation of `_manifest.ymf` in `crates/domain/or-world-gta5/src/manifest.rs`; over a mounted Legacy install the derived lists match the shipped manifest in 8,964 of 10,603 maps (R32, #129) | -| What the engine trusts that the reader does not enforce: an index past its array, a cycle in the parent chain, a child count that is wrong, an interior's parallel arrays | `crates/domain/or-world-gta5/src/validate.rs`, the verb `openrage-cli world check` and the gate `write::refuse_if_broken` | -| How far a stored extent is from the recomputed one | `crates/domain/or-world-gta5/src/extents.rs` | -| Which type file declares an archetype, and whether its drawable exists | `crates/domain/or-world-gta5/src/archetypes.rs` and the resolver in `crates/domain/or-depends` | -| Archetypes made from drawables, in bulk | `openrage-cli world archetypes`, `crates/domain/or-world-gta5/src/generate.rs` (`what_an_archetype_takes_from_its_drawable`) | -| A map made and deleted without breaking a link | `crates/domain/or-world-gta5/src/execute.rs`; 9,113 Legacy and 9,079 Enhanced deletes keep every link (`executing_a_plan_keeps_every_link`, at `c33ae1c1`) | +| What a map set holds and what loads before it | `MapGroup` and the derivation of `_manifest.ymf` in `crates/domain/or-world-gta5/src/streaming/manifest.rs`; over a mounted Legacy install the derived lists match the shipped manifest in 8,964 of 10,603 maps (R32, #129) | +| What the engine trusts that the reader does not enforce: an index past its array, a cycle in the parent chain, a child count that is wrong, an interior's parallel arrays | `crates/domain/or-world-gta5/src/authoring/validate.rs`, the verb `openrage-cli world check` and the gate `write::refuse_if_broken` | +| How far a stored extent is from the recomputed one | `crates/domain/or-world-gta5/src/map/extents.rs` | +| Which type file declares an archetype, and whether its drawable exists | `crates/domain/or-world-gta5/src/archetypes/resolve.rs` and the resolver in `crates/domain/or-depends` | +| Archetypes made from drawables, in bulk | `openrage-cli world archetypes`, `crates/domain/or-world-gta5/src/authoring/generate.rs` (`what_an_archetype_takes_from_its_drawable`) | +| A map made and deleted without breaking a link | `crates/domain/or-world-gta5/src/authoring/execute.rs`; 9,113 Legacy and 9,079 Enhanced deletes keep every link (`executing_a_plan_keeps_every_link`, at `c33ae1c1`) | What it contributes to a plan: the map files at `stream/` with the manifest lines that register type files, each archetype name and each map name as a claim (the model design already gives an archetype as its example of a name the game resolves once), figures for entities, archetypes and estimated memory, and an item per map set and archetype. The build reload extends to `.ymap`, `.ytyp` and `.ymf` by the hook above. @@ -297,7 +297,7 @@ What it contributes to a plan: the map files at `stream/` with the manifest line **The bar.** The repository names CodeWalker, CodeX and OpenIV as the tools OpenRage replaces and lists, for the world editor, picking, gizmos and snaps, markers, a thumbnail browser and pawn modes, and for interiors portals, room bounds and rooms rebuilt from shell geometry (R47); that list is an inventory kept on the owner's machine and not in a clone ([Roadmap.md](Roadmap.md#inputs-outside-the-tree)), so this draft cannot say which tool has which. The bar is that the first group stays a plugin that can be written against the Map view's overlay, and that OpenRage holds itself to what it can check from the files alone: every map of a project checked at once for what the engine trusts, a manifest derived and compared, a delete that keeps every link, `openrage-cli world check` in CI, and a build that reloads each file it wrote. -**Not in the tree yet.** What [the subsection below](#what-wave-p44-built-for-maps) lists as left: the placed models of the 3D scene, a map made from nothing on the Map screen (`crates/domain/or-world-gta5/src/create.rs` makes one for `openrage-cli world new-map`), an edit of a room or a portal, and a singleplayer DLC cell that says *Yes*. +**Not in the tree yet.** What [the subsection below](#what-wave-p44-built-for-maps) lists as left: the placed models of the 3D scene, a map made from nothing on the Map screen (`crates/domain/or-world-gta5/src/authoring/create.rs` makes one for `openrage-cli world new-map`), an edit of a room or a portal, and a singleplayer DLC cell that says *Yes*. ### What wave P44 built for Maps @@ -309,7 +309,7 @@ Steps M1 and M2 of [the order below](#the-order-it-could-be-built-in), the place - **The content.** `or-maps` is the crate of [the shape above](#what-a-kind-of-content-hands-to-a-build) and `ModuleKind::Maps` its kind, `maps` in the project file, with `maps.json` in its folder: the map sets of the module, each with a stable id, the sources it is made of, its waivers and the names a person typed for the hashes a map keeps. `or_content::kinds` lists it, so the editor and `openrage-cli` plan it alike. A map file is a source of the metadata form (`.metadata.src`, made by `or_source::metadata`), and a build ships its cooked file at `stream/`; a model and a texture dictionary ship there too. The reload hook that Views listed (`readers.rs`) reads a built `.ymap` and `.ytyp` as their typed root. - **The rules.** Twenty-six, as data (`or_maps::RULES`, each a code, a severity and whether a waiver can set it aside). Errors, which no waiver mends: a source that leaves the folder, is missing or cannot be cooked, a file that does not read as a map or a type file, two sources cooking to one file, a LOD parent that is not in the map, a parent cycle or a child count the entities do not give, an interior that attaches an entity past its list or names a room it lacks, far lights whose arrays differ or an occlude model that states another count of bytes than it holds, which a save of the typed map refuses (`records-broken`), and a waiver with no reason. Warnings: an entity whose link into its parent map is past the entities that map holds in the pack, an entity that counts fewer LOD children than the entities of the pack's map files name it as their parent (`lod-children-uncounted`, which a removal alone in a parent map leaves, and which fires on 1 map of the Legacy install and 6 of the Enhanced one), a map file that holds entities and states another name than its file's, since the game and the maps under it know a map by its file (`map-named-otherwise`), a map whose far lights are another count than the distant lights of the map it names as parent in the pack (`far-lights-out-of-step`), two archetypes of the set with one name, an entity that places an archetype no type file of the set declares and the game does not know, two entities at one archetype, position and rotation, two entities with one guid, extents that do not hold the entities a map places (an entity of an archetype the set does not declare is judged by where it stands, so the shortfall is then a lower bound), a bounding box with its minimum above its maximum, a source named by two sets or by none, and a waiver naming no rule. Notes: an archetype the set does not declare (the game or another pack may), a model no archetype names, an archetype whose asset no model holds, and a module with no map set. Which of them fire on the game's own files was measured, and a rule that fires on a tenth of the game's maps only warns: over 19,392 Legacy maps `entity-twice` fires on 8, `guid-twice` on 4, `archetype-undeclared` on 53 and `extents-short` on 939, and over 19,956 Enhanced maps on 8, 4, 48 and 994 (2026-11-26), and `hierarchy-broken`, `interior-broken` and `bounds-inverted` fire on none; `parent-link-broken`, `map-named-otherwise`, `records-broken` and `far-lights-out-of-step` fire on none either, the first three held by the suite: no map file that states another name than its file's holds an entity, and with a map found by its file no link into a parent map is past its end, where found by the name a file states `parent-link-broken` fired on 1,432 of the Legacy maps (2026-11-25); `archetype-twice`, `archetype-without-model` and `file-twice` fire on the set and not on a map, since the measurement lays every type file and 2,000 maps into one set, so a name two archives hold collides, and no count of maps is claimed for them (`what_the_rules_say_of_the_install`, which holds `entity-twice`, `guid-twice`, `hierarchy-broken` and `archetype-undeclared` to a hundredth of the maps or fewer). `the_rules_fire_on_a_map_built_to_break_them` builds one map for each rule from synthetic files and finds each at its place; the three rules added by the review of 2026-11-26 are held by `a_record_of_a_map_that_a_save_refuses_is_a_finding_of_its_own_rule_and_not_of_the_lod_hierarchy`, `a_map_of_far_lights_is_held_to_the_distant_lights_of_the_map_it_names_as_parent_in_the_pack` and `an_entity_taken_out_of_a_map_renumbers_the_links_of_the_maps_under_its_file_and_of_no_other`. - **Where a source ships, and the cells.** A cooked `.ymap` and `.ytyp` ship at `stream/`. A FiveM resource ships them. A singleplayer DLC is locked by `cannot_ship`, derived as ruled (V6) from what the content hands over: a `.ymap` is a file the pack is told no type for, and the sentence names it (`a_singleplayer_dlc_cell_is_derived_from_what_the_content_hands_over`), which is what the measurement above says should be the case, since the game finds a DLC's `.ymap` files in an archive that the DLC registers and the generated pack has none. A `.ytyp` that the manifest registers as `DLC_ITYP_REQUEST` outside every archive locks it the same way, in `cannot_ship` and in the plan of a singleplayer DLC alike, because 684 of the 685 `.ityp` names the install registers are the `.ytyp` of a nested archive (`a_type_file_that_would_sit_loose_locks_a_singleplayer_dlc`). An `.oiv` ships what the plan lists, and a Maps content is handed to it laid out as the pack, installed inside the `dlc.rpf` the package adds and locked by what locks the pack (`an_oiv_of_a_maps_content_installs_the_pack_a_singleplayer_dlc_is_and_is_locked_as_one`); a manifest line of a content that is no pack is named in a note of the plan, since a package has no manifest. No build says a map loads in game, and the verifier says only that each source reached its place, that each file reads again as its root and that the manifest registers it. Since [R70q](Roadmap.md#r70q-a-build-a-server-and-a-story-install-take) a build asked for a singleplayer DLC lays the files out as the packs of two installs were measured to: the cell says yes to a content of type files and models, and stays locked for a content with a map, by a sentence that names the change set no pack of the installs shows (`the_cell_of_a_singleplayer_dlc_says_yes_to_type_files_and_models_and_no_to_a_map_for_what_turns_it_on`); a map file is no longer listed as a file to give a type. -- **Source edits.** `or_maps::edit` changes what an entity or an archetype says in the source: it cooks the source to bytes, opens the typed root, changes a member and saves the root, and `or_source::metadata::replace` writes the canonical XML back, refusing an edit whose XML does not compile back to itself and writing through a temporary file, so that a refusal leaves the source as it was (`a_pose_that_is_not_a_number_is_refused_and_the_source_is_as_it_was`). A move, a turn and a scale are stored the way the file stores them: a rotation as the conjugate quaternion for an entity and as it is for an interior instance, and a scale as `scaleXY` and `scaleZ` (`turning_and_scaling_are_stored_the_way_the_file_stores_them`). An entity or an archetype that the screen adds is a copy of one the file holds, with a guid or a name of its own (`add_new_entity` and `add_new_archetype` add one that is no copy, which no screen calls), and an entity that is taken out renumbers the LOD links (`an_entity_is_added_as_a_copy_with_a_guid_of_its_own_and_taken_out_with_the_links_renumbered`). A pose or an entity written from the screen also grows the extents the map states, `entitiesExtents` and `streamingExtents`, to hold every entity whose archetype a type file of the set declares, in the same write and so the same step of Undo, and never shrinks them (`or_maps::edit::grow_extents` over the boxes the type files of the sets that name the source declare; `an_entity_moved_or_added_past_the_extents_grows_them_in_the_same_step`), because the game streams a map by them and `extents-short` would otherwise fire on any edit that moves an entity out of the box the file stated. Each of these edits is an operation of `or_maps::operation`, data with an inverse that the screen and `openrage-cli maps apply` apply through one function ([R70h](Roadmap.md#r70h-one-vocabulary-of-world-edits)). A map made from nothing is `crates/domain/or-world-gta5/src/create.rs`, for `openrage-cli world new-map` and not yet for the screen. +- **Source edits.** `or_maps::edit` changes what an entity or an archetype says in the source: it cooks the source to bytes, opens the typed root, changes a member and saves the root, and `or_source::metadata::replace` writes the canonical XML back, refusing an edit whose XML does not compile back to itself and writing through a temporary file, so that a refusal leaves the source as it was (`a_pose_that_is_not_a_number_is_refused_and_the_source_is_as_it_was`). A move, a turn and a scale are stored the way the file stores them: a rotation as the conjugate quaternion for an entity and as it is for an interior instance, and a scale as `scaleXY` and `scaleZ` (`turning_and_scaling_are_stored_the_way_the_file_stores_them`). An entity or an archetype that the screen adds is a copy of one the file holds, with a guid or a name of its own (`add_new_entity` and `add_new_archetype` add one that is no copy, which no screen calls), and an entity that is taken out renumbers the LOD links (`an_entity_is_added_as_a_copy_with_a_guid_of_its_own_and_taken_out_with_the_links_renumbered`). A pose or an entity written from the screen also grows the extents the map states, `entitiesExtents` and `streamingExtents`, to hold every entity whose archetype a type file of the set declares, in the same write and so the same step of Undo, and never shrinks them (`or_maps::edit::grow_extents` over the boxes the type files of the sets that name the source declare; `an_entity_moved_or_added_past_the_extents_grows_them_in_the_same_step`), because the game streams a map by them and `extents-short` would otherwise fire on any edit that moves an entity out of the box the file stated. Each of these edits is an operation of `or_maps::operation`, data with an inverse that the screen and `openrage-cli maps apply` apply through one function ([R70h](Roadmap.md#r70h-one-vocabulary-of-world-edits)). A map made from nothing is `crates/domain/or-world-gta5/src/authoring/create.rs`, for `openrage-cli world new-map` and not yet for the screen. - **Placement.** The manipulator is `or_world::gizmo`, pure maths over the scene, with no renderer: a ray through a pixel, the handle of an arrow, a ring, a plane square or the centre under it, the drag that moves, turns or scales along it, the pick of an entity by its box and the ground under it. It reaches the viewport as lines in the overlay list that plugins already draw through, in `src/render/map_overlay.rs`, so the renderer is untouched, and its keys and pointer are read by the scene panel. The scene is `or_maps::scene`, built over `or-world`'s placement rules (`Placement::Entity` stores the conjugate rotation and `Placement::InteriorInstance` stores it as it is, and a scale is `scaleXY` with `scaleZ`) with the box of each archetype, and the scan that reads the pack builds it with the rest. A person picks an entity in the list, the plan or the scene, drags an arrow or a ring, and one drag is one step of the pack's Undo that writes the source. Snaps are the grid, which the person sets in metres, a turn step in degrees, a scale step and the ground, which puts the entity on the highest box under it or on a height the person sets, and Ctrl held inverts the first. Every handle has a keyboard alternative: the position, the rotation about X, Y and Z in degrees and the two scales are fields that take what is typed, and the arrow keys, Page Up and Page Down and the brackets move and turn the entity selected by the grid step (`moving_an_entity_with_the_manipulator_writes_the_new_position_and_one_undo_restores_it`, `a_ring_turns_and_the_centre_scales_and_each_is_one_step`, `a_typed_position_and_the_arrow_keys_do_what_the_handles_do`). The plan is a second place to drag, along the ground. - **Headless.** `openrage-cli maps list`, `validate` and `verify` (`a_map_pack_is_listed_and_validated_and_a_word_that_is_no_command_is_a_usage_error`, `a_build_of_maps_is_read_back_against_the_sets_and_a_tampered_one_fails`); the plan and the build are `openrage-cli project`. - **The screen (M2).** One row of the table of task screens, a template (`Template::Maps`), a chip of the start page, nine commands and four panels (Maps, Scene, Plan and Selection), with its empty state, its drop and French. `the_maps_screen_on_screen` drives the screen through real frames, with a drag of the pointer on the manipulator, and every control is a row of [the control inventory](Workbench_UX_Design.md#control-inventory). @@ -378,7 +378,7 @@ Not a kind of its own: a prop is an archetype and its drawable, and an interior - **Content kind.** The Map content. - **Template.** *Props pack*: the Map content with the archetype generator as its first action, one FiveM resource, opens on Map. - **Reuses.** All of the Maps view, and the Model and Texture workspaces for the props themselves. -- **Adds.** An *Interior* layer in the plan, and the generator as a button: `openrage-cli world archetypes` takes bounds from the drawable and asks for the level-of-detail distance and the texture dictionary that no drawable records (`crates/domain/or-world-gta5/src/generate.rs`). +- **Adds.** An *Interior* layer in the plan, and the generator as a button: `openrage-cli world archetypes` takes bounds from the drawable and asks for the level-of-detail distance and the texture dictionary that no drawable records (`crates/domain/or-world-gta5/src/authoring/generate.rs`). - **Builds.** As Maps. - **Empty state.** The Map one, with *Add props…* (drawables and textures, the archetypes generated) in place of the second button. - **Edited here, elsewhere.** Here: archetypes, interiors' rooms and portals as data. Elsewhere, in a plugin: building an interior from shell geometry (R47). Elsewhere, in another tool: the models. @@ -394,7 +394,7 @@ Not a kind of its own: a prop is an archetype and its drawable, and an interior +-------------------------------------------------------------------+ ``` -The tree opens an `.awc` as its own kind with a stream list, playback, WAV export and replacement of a stream from a 16-bit PCM WAV (`src/audio.rs`), reads the audio metadata as typed items (`crates/io/or-io/src/rel/game_object.rs`) and answers which container holds a sound (`crates/domain/or-depends/src/audio.rs`, `openrage-cli awc which`). A weapon's sound settings and a vehicle's are `.rel` items, so Audio is the second half of both and arrives after them. +The tree opens an `.awc` as its own kind with a stream list, playback, WAV export and replacement of a stream from a 16-bit PCM WAV (`src/audio/mod.rs`), reads the audio metadata as typed items (`crates/io/or-io/src/rel/game_object.rs`) and answers which container holds a sound (`crates/domain/or-depends/src/audio.rs`, `openrage-cli awc which`). A weapon's sound settings and a vehicle's are `.rel` items, so Audio is the second half of both and arrives after them. - **Content kind.** None at first, as for Particles: the `.awc` and `.rel` files are compiled files kept whole. Later `audio`, with an `.audio.src` of WAV files and a stream table (planned), once a fixed point is measured. - **Template.** *Audio pack*: the Files content, one FiveM resource. @@ -427,7 +427,7 @@ The Animation workspace plays a clip bound to a skeleton from another document a ### Graphics packs -The tree parses the time table and the weather cycles of an install (`crates/io/or-io/src/gta5/data/timecycle.rs`), and the renderer draws the sky, the lighting and the tone from them (`crates/runtime/or-renderer/src/game_shaders/lighting.rs`). A value can be set in memory and nothing writes a file back. A graphics pack is three things: timecycle and weather data, replaced textures, and the visual settings. [Wardrobe_Parity.md](Wardrobe_Parity.md) calls graphics packs a parked label with no design, and this section is the design's first lines and not a plan. +The tree parses the time table and the weather cycles of an install (`crates/io/or-io/src/gta5/data/timecycle/mod.rs`), and the renderer draws the sky, the lighting and the tone from them (`crates/runtime/or-renderer/src/game_shaders/lighting.rs`). A value can be set in memory and nothing writes a file back. A graphics pack is three things: timecycle and weather data, replaced textures, and the visual settings. [Wardrobe_Parity.md](Wardrobe_Parity.md) calls graphics packs a parked label with no design, and this section is the design's first lines and not a plan. ```text +- Graphics - harbour_look --------------------------------------+ diff --git a/docs/direction/World_Editor_Parity.md b/docs/direction/World_Editor_Parity.md index 7c49eaf32..854afeeac 100644 --- a/docs/direction/World_Editor_Parity.md +++ b/docs/direction/World_Editor_Parity.md @@ -52,13 +52,13 @@ Seeing the map, moving through it and finding a thing in it. The world drawn is | Capability | For | Against | Verdict | Row | |---|---|---|---|---| | The whole map in 3D with its models, textures, interiors and levels of detail | Every other row stands on it; the streaming rules and the world renderer exist today and draw a GTA VI install | The largest row; GTA V's mount, index and materials are not GTA VI's, and the viewer is one for the whole app today (`src/state/gta6_worldview/mod.rs`), where an install's tab and a project's tab need one each | Take | R70b, R70c | -| Shadows, water, sky and an hour of the day | For GTA VI the World screen is lit today from the install's timecycle and weather, casts the sun's shadow in four cascades (`crates/runtime/or-renderer/src/world/shadow.rs`) and draws a sky and water; GTA V's timecycle is parsed today (`crates/io/or-io/src/gta5/data/timecycle.rs`), which NodeRunner does not read | No reader of GTA V's `water.xml`; which parts of the day are GTA VI's alone is not written down; the cost of every material through the game's own shaders over a whole map is unmeasured | Adapt: GTA V's files feed what the World screen has | R70d | +| Shadows, water, sky and an hour of the day | For GTA VI the World screen is lit today from the install's timecycle and weather, casts the sun's shadow in four cascades (`crates/runtime/or-renderer/src/world/shadow.rs`) and draws a sky and water; GTA V's timecycle is parsed today (`crates/io/or-io/src/gta5/data/timecycle/mod.rs`), which NodeRunner does not read | No reader of GTA V's `water.xml`; which parts of the day are GTA VI's alone is not written down; the cost of every material through the game's own shaders over a whole map is unmeasured | Adapt: GTA V's files feed what the World screen has | R70d | | The map as of a level of DLC | A server pins a build of the game; the mount takes a level to stop at today (`DlcCutoff` in `crates/title/or-title/src/vfs/game_mount.rs`), and `openrage-cli` takes it as `--dlc`, by pack or by build number | Every call of the app mounts every pack, and no index is keyed by the level | Have: the screen passes the level and the index is keyed by it | R70b | | The map as story mode or as multiplayer | The two load different maps, and a server runs the second | Nothing in the tree makes this choice for GTA V | Take | R70b | -| Maps only a script requests, with the alternatives of one place hidden | Without it two versions of an apartment draw in one place; for GTA VI the World panel lists script-managed groups with a filter today, and `crates/domain/or-world-gta5/src/state.rs` says which maps the game requests at an hour and a weather | NodeRunner hides by naming rules, and a rule by name is a guess | Adapt: a list the person toggles, grouped by the manifest's own groups, with a naming rule only as a default the list states | R70f | +| Maps only a script requests, with the alternatives of one place hidden | Without it two versions of an apartment draw in one place; for GTA VI the World panel lists script-managed groups with a filter today, and `crates/domain/or-world-gta5/src/streaming/state.rs` says which maps the game requests at an hour and a weather | NodeRunner hides by naming rules, and a rule by name is a guess | Adapt: a list the person toggles, grouped by the manifest's own groups, with a naming rule only as a default the list states | R70f | | One field that finds a name, a hash, a map, a type, a pasted position or a command | The palette, the name index and Go to File exist today | With a file open the key of Go to File puts the focus in the field of Files, and a model placed many times has no one place to go to | Adapt: one palette with places among its results, listed under the field of Files too; a model's row goes to the nearest placement and steps through the rest | R70e | | A position typed as two numbers, with its height estimated | A script may print a position as two numbers | Needs the ground under a point | Take | R70e, over R70g | -| Layers for what the game hides: roads, navmesh, scenario points, collision, rooms and portals, occluders, parked vehicles, timecycle zones and far lights | A mapper debugs with them; roads, navmesh, scenario regions, rooms, portals, box occluders and bounds are read today | A map's timecycle modifiers were only counted and its far lights only tested for presence, and a parked vehicle gave a position and one length; the data part of R70o has since typed all three, and `crates/domain/or-world-gta5/src/map_data.rs` reads each with every member the installs state; each layer is a draw path to keep fast | Take, with presets named after a task | R70f | +| Layers for what the game hides: roads, navmesh, scenario points, collision, rooms and portals, occluders, parked vehicles, timecycle zones and far lights | A mapper debugs with them; roads, navmesh, scenario regions, rooms, portals, box occluders and bounds are read today | A map's timecycle modifiers were only counted and its far lights only tested for presence, and a parked vehicle gave a position and one length; the data part of R70o has since typed all three, and `crates/domain/or-world-gta5/src/map/map_data.rs` reads each with every member the installs state; each layer is a draw path to keep fast | Take, with presets named after a task | R70f | | The levels of detail shown one at a time | A mapper looks at the far city alone | | Take, as layers | R70f | | A radius for a layer, set in the panel and in the settings | A layer over the whole map costs the frame | | Take | R70f, R70v | | A box for each object, with a mark where its model is unknown | Shows what is placed where nothing draws | One box would stand both for a model still loading and for an archetype no file answers | Adapt: a box is what an object draws as in both cases, the two differ by their outline and a glyph, and the second is a finding | R70c | @@ -117,7 +117,7 @@ A deletion of a game object and what follows from it. The chain across files is | Capability | For | Against | Verdict | Row | |---|---|---|---|---| -| A deletion that takes the far models and corrects the child counts of their parents | Without it the far model stays; `WorkingSet` in `crates/domain/or-world-gta5/src/execute.rs` repairs every link across files today (`executing_a_plan_keeps_every_link`) | It rewrites maps the person did not touch; the working set writes a shrunk array only where a schema snapshot is staged, which a user's machine lacks, and the typed edit of `or-maps` renumbers inside one file | Take, with each file named before it happens, carried over the typed roots | R70k | +| A deletion that takes the far models and corrects the child counts of their parents | Without it the far model stays; `WorkingSet` in `crates/domain/or-world-gta5/src/authoring/execute.rs` repairs every link across files today (`executing_a_plan_keeps_every_link`) | It rewrites maps the person did not touch; the working set writes a shrunk array only where a schema snapshot is staged, which a user's machine lacks, and the typed edit of `or-maps` renumbers inside one file | Take, with each file named before it happens, carried over the typed roots | R70k | | What goes, what stays and why, shown before the deletion | The person confirms a preview and not a question | | Take | R70k | | The collision of a deleted building removed from the bounds of its area | Without it a wall nobody sees stays | Which polygons belong to a building is a geometric judgement, and a changed bound has no source form today | Take, as a proposal the person edits and confirms, file by file | R70l, over R70w | | The collision of low slabs and decals kept, with a switch that takes the ground too | A person who digs a basement needs the ground gone | | Take, off by default | R70l | @@ -183,7 +183,7 @@ Finding the doors of a building and saying what a script needs of them, in R70n. | Capability | For | Against | Verdict | Row | |---|---|---|---|---| -| Every door of a building found, paired when double | A server locks doors by script | NodeRunner knows a door by its model's name, and a name the index lacks is a door missed | Adapt: first by the door extension an archetype carries, typed today (`crates/domain/or-world-gta5/src/extension.rs`), then by name, saying how many models had no name | R70n | +| Every door of a building found, paired when double | A server locks doors by script | NodeRunner knows a door by its model's name, and a name the index lacks is a door missed | Adapt: first by the door extension an archetype carries, typed today (`crates/domain/or-world-gta5/src/map/extension.rs`), then by name, saying how many models had no name | R70n | | Copy for a door script, in the forms servers use | A script developer asks for it | The forms belong to other projects and change | Take, as templates kept as data (ruling 10) | R70n | | The arc a door opens through, and whether furniture blocks it | Catches a door that cannot open | A reading of the game's tuning | Take | R70n | | A door opened and closed in the view | The arc is judged in its place | | Take: on a double click, stopping where its arc is blocked | R70n | @@ -265,7 +265,7 @@ The library of props and the doors a mapping enters by are R70j. | A watched folder that takes each new export | The loop a modeller works in; a file watcher exists today (`src/state/file_watcher.rs`) | It takes what the row above reads | Waits (ruling 5), with the row above | R70j | | A game file written out as that XML, with its textures as DDS, to open in Blender | How a mapper takes a game building into Blender with the add-on they have | Reading lands as sources and keeps no XML; writing makes the XML an output OpenRage must keep compatible, which reopens the ruling of 2026-09-22 more widely than reading does; `openrage-cli mesh export` writes glTF, which carries no collision and no type file | Leave | | | A report after each import of what does not find what | The import report panel and the rules exist today | | Have: the report gains the map rules | R70j | -| Files locked by a server's asset escrow recognised, kept whole and drawn as a box | A build no longer fails on them; the Wardrobe's import names such a file today and leaves it out (`crates/domain/or-wardrobe/src/import.rs`) | They are never decrypted | Take | R70j | +| Files locked by a server's asset escrow recognised, kept whole and drawn as a box | A build no longer fails on them; the Wardrobe's import names such a file today and leaves it out (`crates/domain/or-wardrobe/src/intake/import.rs`) | They are never decrypted | Take | R70j | ## Projects and shipping @@ -391,7 +391,7 @@ Keys, hints, settings and the windows around the world. [World_Editor_UX_Design. | Capability | For | Against | Verdict | Row | |---|---|---|---|---| -| Keys that can be changed | Built today: a binding is changed, cleared and reset in Settings and kept in the preferences (`src/ui/shortcuts.rs`) | A world tool needs a key that means something else on another screen | Have: a conflict is one key for two commands read in one place (`Place` in `src/ui/commands/table.rs`) | R70v | +| Keys that can be changed | Built today: a binding is changed, cleared and reset in Settings and kept in the preferences (`src/ui/shortcuts/mod.rs`) | A world tool needs a key that means something else on another screen | Have: a conflict is one key for two commands read in one place (`Place` in `src/ui/commands/table.rs`) | R70v | | Presets of keys, with one that matches CodeWalker's | Presets were left open on 2026-10-03; a mapper who comes from CodeWalker keeps the same keys | Settings offers presets today (`src/ui/shortcuts/presets.rs`), and CodeWalker's holds one binding until its tools have commands | Take | R70v | | A bar that says at every moment what the pointer and the keys do for the tool in hand | How the keys are learnt | The status bar has a hint only for a window with nothing open today (`src/ui/panels/status_bar.rs`) | Take: the hints change while a handle is dragged and while the camera flies, and the bar gives the camera's position and the edition | R70i | | A right click on an object opens a short menu: go to, copy the position, delete, edit the model | A right click in the viewport opens a menu today, and every menu draws from the command registry (`every_context_menu_draws_from_the_registry`) | The right button also flies the camera | Take: a click released where it was pressed opens the menu, and held it flies | R70i | @@ -417,7 +417,7 @@ What NodeRunner's settings hold, against what OpenRage keeps today. The World sc | Reflections on water | None; GTA V's water is not drawn | Adapt: part of the preset for a modest machine, with no switch of its own | R70c, R70d | | The distance of fog | The install's timecycle sets the fog | Adapt: the hour and the weather decide it, as in the game, and no setting does | R70d | | The distance shadows reach | None | Take | R70d | -| Texture filtering | A material's filter is the one its sampler states (`crates/runtime/or-renderer/src/game_shaders/stand_in.rs`) | Leave: no setting overrides the game's own | | +| Texture filtering | A material's filter is the one its sampler states (`crates/runtime/or-renderer/src/game_shaders/core/stand_in.rs`) | Leave: no setting overrides the game's own | | | Which graphics card draws | The app asks for the high-performance one (`src/app/gpu.rs`) | Leave: it stays the app's | | | Vertical sync | On, set by the app (`src/app/gpu.rs`) | Leave: it stays the app's | | | The video memory kept for the map | The budgets of the texture caches are preferences (`texture_cache_mib`, `gpu_texture_mib`) | Have | | diff --git a/docs/direction/World_Editor_Plan.md b/docs/direction/World_Editor_Plan.md index 9234b0e90..d34a2fa4a 100644 --- a/docs/direction/World_Editor_Plan.md +++ b/docs/direction/World_Editor_Plan.md @@ -39,21 +39,21 @@ What a row can stand on, and what is absent. The paths are the ones to read firs | Capability | In the tree | Missing | |---|---|---| -| Reading and writing `.ymap` and `.ytyp` | The typed world family in `or_io::meta`, the views of `crates/domain/or-world`, a canonical XML that compiles back. `crates/domain/or-world-gta5/src/create.rs` makes a map, an entity, a type file and a base archetype from nothing, written as PSO. An interior's rooms, portals, entity sets and time cycle modifiers are typed (`crates/io/or-io/src/meta/typed/interior.rs`), a save refuses a broken interior, and a record copied from another file is conformed to the class this file states or refused by name | A record made from nothing in an RBM file, whose class would carry a signature word nothing derives, and an interior, a room or a portal made so; the Map screen still adds by copy. Some world files do not reach their XML fixed point ([R32](Roadmap.md#r32-world-data-ymap-ytyp-and-interiors)) | +| Reading and writing `.ymap` and `.ytyp` | The typed world family in `or_io::meta`, the views of `crates/domain/or-world`, a canonical XML that compiles back. `crates/domain/or-world-gta5/src/authoring/create.rs` makes a map, an entity, a type file and a base archetype from nothing, written as PSO. An interior's rooms, portals, entity sets and time cycle modifiers are typed (`crates/io/or-io/src/meta/typed/interior.rs`), a save refuses a broken interior, and a record copied from another file is conformed to the class this file states or refused by name | A record made from nothing in an RBM file, whose class would carry a signature word nothing derives, and an interior, a room or a portal made so; the Map screen still adds by copy. Some world files do not reach their XML fixed point ([R32](Roadmap.md#r32-world-data-ymap-ytyp-and-interiors)) | | Moving, adding and deleting an entity or an archetype | `or_maps::edit`, with the level-of-detail links renumbered inside one file and the extents grown in the same step. `or_maps::operation` names each as an operation with an inverse that states what it applies to, and a session of it holds the sources of a pack open and writes them once, which the Map screen does for each pack it edits, writing at the save of the project (`src/state/workbench/maps_session.rs`). `crates/domain/or-maps/src/first_edit.rs` imports the map of an object the game placed as a source and edits it, taken back whole (`openrage-cli maps edit-game`). Seventeen operations of the same vocabulary edit the rooms, portals, entity sets, time cycle modifiers and entities of an interior a type file declares (`crates/domain/or-maps/src/operation/interior.rs`, `openrage-cli maps interior`) | An operation is no step of the project's History; a link into a parent map is left alone by an operation that takes one entity out, and renumbered only by a planned deletion; no occluder, parked vehicle or light; no screen edits an interior, and none of the game is imported by a first edit | -| Maps that load together, and the manifest of a set | `MapGroup`, `crates/domain/or-world-gta5/src/manifest.rs`, `openrage-cli world manifest`. A Maps content writes `_manifest.ymf` from the manifests of the game it keeps (`crates/domain/or-world-gta5/src/manifest_build.rs`), with a derived entry for a map none of them states, its flags by a rule every entry of two installs follows | The lists a derivation does not give, the entry an interior's type file is stated by, and a manifest for a content that keeps none | -| Creating and deleting a map with every link kept across files | `WorkingSet` in `crates/domain/or-world-gta5/src/execute.rs`. `crates/domain/or-maps/src/delete.rs` takes an entity out with its chain of far models across the map files a pack holds as sources, over the typed roots and with no schema snapshot, behind `openrage-cli maps delete` and the Map screen's Delete, which does the plan as one step of Undo | A map created or deleted is reached from `openrage-cli world` only, and written only where a schema snapshot is staged, which is no user's machine; a deletion reaches a map of the game that is not a source yet only as the first edit of an object, which no screen plans, and the Map screen shows no preview of the one it does | -| Which maps the game requests at an hour and a weather, or only by script | `crates/domain/or-world-gta5/src/state.rs`; the GTA VI World panel lists the script-managed groups | No screen uses it for GTA V | +| Maps that load together, and the manifest of a set | `MapGroup`, `crates/domain/or-world-gta5/src/streaming/manifest.rs`, `openrage-cli world manifest`. A Maps content writes `_manifest.ymf` from the manifests of the game it keeps (`crates/domain/or-world-gta5/src/authoring/manifest_build.rs`), with a derived entry for a map none of them states, its flags by a rule every entry of two installs follows | The lists a derivation does not give, the entry an interior's type file is stated by, and a manifest for a content that keeps none | +| Creating and deleting a map with every link kept across files | `WorkingSet` in `crates/domain/or-world-gta5/src/authoring/execute.rs`. `crates/domain/or-maps/src/delete.rs` takes an entity out with its chain of far models across the map files a pack holds as sources, over the typed roots and with no schema snapshot, behind `openrage-cli maps delete` and the Map screen's Delete, which does the plan as one step of Undo | A map created or deleted is reached from `openrage-cli world` only, and written only where a schema snapshot is staged, which is no user's machine; a deletion reaches a map of the game that is not a source yet only as the first edit of an object, which no screen plans, and the Map screen shows no preview of the one it does | +| Which maps the game requests at an hour and a weather, or only by script | `crates/domain/or-world-gta5/src/streaming/state.rs`; the GTA VI World panel lists the script-managed groups | No screen uses it for GTA V | | A 3D scene with a manipulator | The Map screen: Scene, Plan, Selection, `or_maps::gizmo`, a grid step and the ground of boxes. Its edits and its Undo go through a session of the pack, written when the project is saved, and its steps are its own stack of operations and their inverses, in memory (`src/state/workbench/maps.rs`). The Scene also serves a scanned GTA VI map body (`src/state/gta6_map.rs`) | Boxes, no model; one set of a project; the ground is the highest box, not collision | -| A whole map streamed and drawn | The rules of `crates/domain/or-world/src/streaming.rs`, the instanced draws of `crates/runtime/or-renderer/src/world.rs`, the fly camera of `crates/runtime/or-renderer/src/fly.rs`, the budgets and the occluder buffer beside `src/state/gta6_worldview/`. `crates/domain/or-world-gta5/src/world_forest.rs` streams a GTA V install's maps for a view and selects their entities by those rules, with no screen (`openrage-cli world select`). For GTA VI also the install's day, the sun's shadow in cascades (`crates/runtime/or-renderer/src/world/shadow.rs`), the game's lighting passes, lamps, a sky and water ([the day](../features/GTA_VI_World_Viewer.md#the-modes)) | Drawn for a GTA VI install only: nothing feeds the renderer the models of GTA V. World is a workspace on the rail while a GTA VI folder is set, with one viewer for the app (`src/state/gta6_worldview/mod.rs`) | -| The game's picture for GTA V | The Shaded viewport draws one model with GTA V's own passes, the install's timecycle, its sky and its water pass | One shadow tile, the sun alone. Nothing feeds GTA V's day to the world or draws its water: `crates/io/or-io/src/gta5/data/water.rs` reads and saves a `water.xml`, held on documents written by hand and on the water files of two installs | -| Collision | `crates/domain/or-world/src/collision/` answers a ray, a swept sphere, a box overlap and the ground over the bounds its caller hands it; `BvhCollider` in `crates/runtime/or-simulation/src/collision.rs` casts a ray at one bound, for particles; `crates/io/or-io/src/gta5/bounds/build.rs` builds and rebuilds a bound; `crates/domain/or-source/src/bounds.rs` holds a changed bound as a source over the game's file. `crates/domain/or-world-gta5/src/world_collision.rs` hands the query the static bounds of a mount's column under a budget of bytes, behind `openrage-cli world ground`. `crates/domain/or-world-gta5/src/doors/` finds the doors of a set of maps and opens each through its arc against the query and the boxes near it, behind `openrage-cli maps doors`, of a project's map sets or of one map file of a mounted install. `crates/domain/or-maps/src/collision.rs` proposes the polygons under a placed object and takes them out, retypes or moves them (`openrage-cli maps collision`) | The collision of an interior and of a placed prop, which the entity's placement puts in the world; a screen that asks the query; a door's tuning; a screen that edits a polygon; the compare of a bound's source with its base | +| A whole map streamed and drawn | The rules of `crates/domain/or-world/src/streaming.rs`, the instanced draws of `crates/runtime/or-renderer/src/world.rs`, the fly camera of `crates/runtime/or-renderer/src/fly.rs`, the budgets and the occluder buffer beside `src/state/gta6_worldview/`. `crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs` streams a GTA V install's maps for a view and selects their entities by those rules, with no screen (`openrage-cli world select`). For GTA VI also the install's day, the sun's shadow in cascades (`crates/runtime/or-renderer/src/world/shadow.rs`), the game's lighting passes, lamps, a sky and water ([the day](../features/GTA_VI_World_Viewer.md#the-modes)) | Drawn for a GTA VI install only: nothing feeds the renderer the models of GTA V. World is a workspace on the rail while a GTA VI folder is set, with one viewer for the app (`src/state/gta6_worldview/mod.rs`) | +| The game's picture for GTA V | The Shaded viewport draws one model with GTA V's own passes, the install's timecycle, its sky and its water pass | One shadow tile, the sun alone. Nothing feeds GTA V's day to the world or draws its water: `crates/io/or-io/src/gta5/data/water/mod.rs` reads and saves a `water.xml`, held on documents written by hand and on the water files of two installs | +| Collision | `crates/domain/or-world/src/collision/` answers a ray, a swept sphere, a box overlap and the ground over the bounds its caller hands it; `BvhCollider` in `crates/runtime/or-simulation/src/collision.rs` casts a ray at one bound, for particles; `crates/io/or-io/src/gta5/bounds/build.rs` builds and rebuilds a bound; `crates/domain/or-source/src/bounds/mod.rs` holds a changed bound as a source over the game's file. `crates/domain/or-world-gta5/src/archetypes/world_collision.rs` hands the query the static bounds of a mount's column under a budget of bytes, behind `openrage-cli world ground`. `crates/domain/or-world-gta5/src/map/doors/` finds the doors of a set of maps and opens each through its arc against the query and the boxes near it, behind `openrage-cli maps doors`, of a project's map sets or of one map file of a mounted install. `crates/domain/or-maps/src/collision.rs` proposes the polygons under a placed object and takes them out, retypes or moves them (`openrage-cli maps collision`) | The collision of an interior and of a placed prop, which the entity's placement puts in the world; a screen that asks the query; a door's tuning; a screen that edits a polygon; the compare of a bound's source with its base | | Roads, navmesh, scenario points | `.ynd` and `.ynv` owned and saved, the navmesh drawn, scenario regions typed; `crates/domain/or-source/src/paths.rs` holds a changed `.ynd` as a source, in a form that awaits the owner's word. `crates/domain/or-maps/src/roads/` edits the road graph of a folder of such sources by operations with inverses, each stating the set of documents it applies to, and holds its rules, behind `openrage-cli maps roads` | Roads and scenario points are not drawn, and no screen edits a road; a node disabled, which the file states no state for, and the lanes of a link, which its word does not name; an edit of a scenario point; the compare of a path region's source with its base | -| What a map holds besides entities | `crates/io/or-io/src/meta/typed/map_records.rs` types a map's parked vehicles, box occluders, occlude models, time cycle modifiers and both families of far lights as members of `CMapData`, as every RBM map of two installs states them, and a save refuses far lights out of step and an occlude model whose count misses its bytes; `crates/domain/or-world-gta5/src/map_data.rs` reads each as a view | A record in a map made from nothing, or in a file that holds none of its kind; an operation, a rule and a screen for any of them | -| Which file answers a name | `crates/domain/or-depends`: the type file of an archetype, what a map needs, the maps that place a model, a map's bounds by the manifest's groups and otherwise by filename (`crates/domain/or-depends/src/resolve.rs`). `crates/domain/or-world-gta5/src/world_index.rs` answers the maps and the carried bounds at a position and in a column and is kept on disk, in a file of its own for a level of DLC that `openrage-cli world index`, `at`, `ground`, `find` and `select` mount at. `crates/io/or-io/src/cache_loader.rs` reads the game's cache files, which state each map's extents, each interior and each bound; no index uses them. The index keeps the gate of the group that requests a map, and `crates/domain/or-world-gta5/src/find.rs` answers what a person typed (`openrage-cli world find`). From the kept index alone `crates/domain/or-world-gta5/src/model_catalogue.rs` lists the install's models a page at a time, and `crates/domain/or-world-gta5/src/vehicles.rs` the vehicles its vehicle data files state (`openrage-cli world models` and `world vehicles`) | An index keyed by story or multiplayer, since a mode takes or leaves change sets and the index reads none; a mode for `world index` and `world at`, and a level for `maps doors --game` | +| What a map holds besides entities | `crates/io/or-io/src/meta/typed/map_records.rs` types a map's parked vehicles, box occluders, occlude models, time cycle modifiers and both families of far lights as members of `CMapData`, as every RBM map of two installs states them, and a save refuses far lights out of step and an occlude model whose count misses its bytes; `crates/domain/or-world-gta5/src/map/map_data.rs` reads each as a view | A record in a map made from nothing, or in a file that holds none of its kind; an operation, a rule and a screen for any of them | +| Which file answers a name | `crates/domain/or-depends`: the type file of an archetype, what a map needs, the maps that place a model, a map's bounds by the manifest's groups and otherwise by filename (`crates/domain/or-depends/src/resolve.rs`). `crates/domain/or-world-gta5/src/streaming/world_index/mod.rs` answers the maps and the carried bounds at a position and in a column and is kept on disk, in a file of its own for a level of DLC that `openrage-cli world index`, `at`, `ground`, `find` and `select` mount at. `crates/io/or-io/src/cache_loader.rs` reads the game's cache files, which state each map's extents, each interior and each bound; no index uses them. The index keeps the gate of the group that requests a map, and `crates/domain/or-world-gta5/src/streaming/find/mod.rs` answers what a person typed (`openrage-cli world find`). From the kept index alone `crates/domain/or-world-gta5/src/archetypes/model_catalogue.rs` lists the install's models a page at a time, and `crates/domain/or-world-gta5/src/archetypes/vehicles.rs` the vehicles its vehicle data files state (`openrage-cli world models` and `world vehicles`) | An index keyed by story or multiplayer, since a mode takes or leaves change sets and the index reads none; a mode for `world index` and `world at`, and a level for `maps doors --game` | | The install as the game reads it | `crates/title/or-title/src/vfs/`: the mount, the mods overlay, a project's shadow folder; `crates/title/or-title/src/dlc/`: the DLC list and its change sets. The mount takes a level of DLC to stop at (`DlcCutoff` in `crates/title/or-title/src/vfs/game_mount.rs`; `--dlc` in `openrage-cli`, by pack or build number, and `DlcCutoff::Level`, by a pack's name in the DLC list) and the map as story or multiplayer (`MountOptions::mode`), both set by `openrage-cli dlc-list`, `maps edit-game` and the verbs of `world` over an install, of which `index` and `at` take the level alone | The app always mounts every pack and sets no mode; no server's resources as a layer | | A project, its sources, its build | Content and Builds, a FiveM resource, a story pack, an `.oiv`, rules, History, links, the plan and its claims ([Project_Model_Design.md](Project_Model_Design.md)). A build packs a nested archive for any path through an archive's name, and a Maps content hands a story pack its maps inside one of the level's folder and each type file with its models inside one of the props folder, as the packs of two installs keep theirs (`crates/domain/or-maps/src/layout.rs`). `crates/domain/or-project/src/resource.rs` checks one resource folder as a server reads it, `crates/domain/or-project/src/server.rs` reads the resources of a server together and says what a build would write again, `crates/domain/or-project/src/place.rs` reads a zip as a place to adopt from, which `crates/domain/or-maps/src/mapping.rs` reports and adopts, `crates/domain/or-maps/src/changes.rs` says what a map changed of its base, `crates/domain/or-maps/src/put_back.rs` plans what puts one entity back as that base has it (`openrage-cli maps put-back`), and `crates/domain/or-maps/src/merge.rs` merges two copies of one map against the game's file (`openrage-cli maps merge`) | The story pack is locked for a content with a map, for the change set that turns its maps on, which no pack of either install shows for a pack that starts, and for a type file that declares an interior; no build asks the scan of a server, and no screen shows it, the report of a mapping, what a map changed, a plan that puts an entity back or a merge | -| Keys and places | A key is changed and kept in the preferences (`src/ui/shortcuts.rs`), one key for one command of a place (`Place` in `src/ui/commands/table.rs`); a row of the table can bind by where a key sits, and Settings offers presets of keys (`src/ui/shortcuts/presets.rs`). The GTA VI viewer lists places computed from its index and copies a camera line | A command bound by where its key sits, since no row is yet; the keys of CodeWalker's tools and camera in its preset, which holds one binding; a place a person saves | +| Keys and places | A key is changed and kept in the preferences (`src/ui/shortcuts/mod.rs`), one key for one command of a place (`Place` in `src/ui/commands/table.rs`); a row of the table can bind by where a key sits, and Settings offers presets of keys (`src/ui/shortcuts/presets.rs`). The GTA VI viewer lists places computed from its index and copies a camera line | A command bound by where its key sits, since no row is yet; the keys of CodeWalker's tools and camera in its preset, which holds one binding; a place a person saves | | A ped that moves | The Animation workspace and the dressed ped of the Wardrobe | A cutscene played, a point of life, a person who walks | | Proof that the game loads a file | No build says so ([held back](Workbench_Plan.md#held-back)). The sheet of what a person saw is `crates/domain/or-project/src/acceptance.json`, with its procedure in [In_Game_Acceptance.md](../guides/In_Game_Acceptance.md); the Build tab, `openrage-cli project build` and `wardrobe build` say which kinds of file of a build nobody saw the game load | Every result; a line for each kind a row writes; a second condition for a line an extension does not tell | @@ -93,7 +93,7 @@ A project holds sources and no compiled game file. A map the project owns is a s - **The kept file is the base.** What changed is a comparison of two files, which R70y lists. R70r merges another resource's copy three ways and, when a title update changes the game's file under a source, raises a finding with the merge that carries the changes across. - **A repository leaves it out by default.** A changed game map is a source taken from the game: the project's managed block of `.gitignore` names it, Check before sharing lists it and `openrage-cli project check-sharing` exits 1 on it ([commit policy](Source_Format_Design.md#commit-policy)). A clone opens without its changed maps until the project's owner turns on Commit sources taken from the game in Properties. Whether that stands is [ruling 17](#rulings-asked-of-the-owner); the toast of a first edit and the guide say it. - **Some maps cannot become a source.** Only a file whose XML reaches its fixed point becomes one; R70h refuses by name the first edit of an object in a map that does not. -- **New objects go to a map of the project** (R70h), named in the header as the map that receives. A map past what one stream should hold is split at the build ([R70q](#a-build-a-server-and-a-story-install-take-r70q)): `crates/domain/or-world-gta5/src/partition.rs` plans a split by level of detail and applies nothing, and a split by area is new. +- **New objects go to a map of the project** (R70h), named in the header as the map that receives. A map past what one stream should hold is split at the build ([R70q](#a-build-a-server-and-a-story-install-take-r70q)): `crates/domain/or-world-gta5/src/authoring/partition.rs` plans a split by level of detail and applies nothing, and a split by area is new. - **An object of an interior is in a type file.** It is an entry of the interior's archetype, in the interior's frame, attached to a room. Its first edit imports the type file that declares the interior, and a new object placed inside joins that archetype and the room under the pointer. Until [R70m](#interiors-r70m) merges, a tool refuses an object of an interior. - **A bound and a path region have no source form.** An import keeps a `.ybn` and a `.ynd` whole ([how an import writes](Source_Format_Design.md#how-an-import-writes)). [R70w](#a-changed-bound-and-a-changed-path-region-as-sources-r70w) builds the form the rows that change collision and roads write to. @@ -192,7 +192,7 @@ Checks ([R70a](Roadmap.md#r70a-what-the-game-loads)): the sample builds headless ### The GTA V world index (R70b) -Read `crates/title/or-title/src/vfs/game_mount.rs` for the cutoff, `crates/domain/or-depends/src/resolve.rs`, `crates/io/or-io/src/cache_loader.rs`, `crates/domain/or-world-gta5/src/state.rs`, and `src/state/gta6_worldview/index_keep.rs`, which keeps the GTA VI viewer's scan. +Read `crates/title/or-title/src/vfs/game_mount.rs` for the cutoff, `crates/domain/or-depends/src/resolve.rs`, `crates/io/or-io/src/cache_loader.rs`, `crates/domain/or-world-gta5/src/streaming/state.rs`, and `src/state/gta6_worldview/index_keep.rs`, which keeps the GTA VI viewer's scan. Build the index of a mounted GTA V install: every map with its extents, parent and the group that requests it; every archetype with its type file and box; and two queries by position, the maps and the bounds. One bound overlaps many maps, so the bounds at a position come from the record the cache files keep of each bound, checked against the bounds themselves in the install suite. Pass the mount's cutoff from the screen, add the choice of story or multiplayer to `or-title`, and key the index by what the install holds, the cutoff and the choice. Keep it on disk and rebuild only what changed. Add `openrage-cli world at`, which answers a position, and `openrage-cli world index`, which builds and reports it. @@ -226,9 +226,9 @@ Checks ([R70e](Roadmap.md#r70e-find-anything-and-go-there)): each form of a posi ### Layers of what the game hides (R70f) -Read `src/render/navmesh.rs`, `crates/domain/or-world-gta5/src/map_data.rs` for what is read and what is only counted, and [what streams](../features/GTA_VI_World_Viewer.md#the-hour-and-what-streams) on the World panel. +Read `src/render/navmesh.rs`, `crates/domain/or-world-gta5/src/map/map_data.rs` for what is read and what is only counted, and [what streams](../features/GTA_VI_World_Viewer.md#the-hour-and-what-streams) on the World panel. -Build the layers, each drawn within its radius: road nodes and links by category, navmesh by category, scenario points with their heading, collision by material and by version over the bounds R70g keeps near the camera, rooms and portals, occluder boxes and occlusion meshes with a preview of what they hide, the levels of detail, and sound zones and fixed emitters, each sound played when selected. Parked vehicles, timecycle zones and far lights are drawn once the data part of R70o types them. Add the presets, the pick order, and the list of maps only a script requests: the World panel's section of script-managed groups, fed for GTA V from `crates/domain/or-world-gta5/src/state.rs`, with a stated naming rule for two versions of one place. +Build the layers, each drawn within its radius: road nodes and links by category, navmesh by category, scenario points with their heading, collision by material and by version over the bounds R70g keeps near the camera, rooms and portals, occluder boxes and occlusion meshes with a preview of what they hide, the levels of detail, and sound zones and fixed emitters, each sound played when selected. Parked vehicles, timecycle zones and far lights are drawn once the data part of R70o types them. Add the presets, the pick order, and the list of maps only a script requests: the World panel's section of script-managed groups, fed for GTA V from `crates/domain/or-world-gta5/src/streaming/state.rs`, with a stated naming rule for two versions of one place. Checks ([R70f](Roadmap.md#r70f-layers-of-what-the-game-hides)): each layer draws a synthetic file's records at their places in real frames; a preset shows the layers it names and no other; a layer off costs no draw. @@ -242,7 +242,7 @@ Checks ([R70g](Roadmap.md#r70g-collision-as-a-query)): each primitive of a bound ### One vocabulary of world edits (R70h) -Read `crates/domain/or-maps/src/edit.rs`, the header of `crates/domain/or-world-gta5/src/execute.rs`, `crates/domain/or-world-gta5/src/generate.rs`, [what project history builds](Workbench_UX_Design.md#what-project-history-builds), the Undo of [the Map screen](Workbench_UX_Design.md#what-the-map-screen-builds) and the open clause of R62. +Read `crates/domain/or-maps/src/edit.rs`, the header of `crates/domain/or-world-gta5/src/authoring/execute.rs`, `crates/domain/or-world-gta5/src/authoring/generate.rs`, [what project history builds](Workbench_UX_Design.md#what-project-history-builds), the Undo of [the Map screen](Workbench_UX_Design.md#what-the-map-screen-builds) and the open clause of R62. Build the operations, each with its inverse and a form as data; an inverse carries the extents its operation replaced. Carry the working set's renumbering across files, for a create, a delete and a delete with its chain, over the typed roots, so that it saves with no schema snapshot. Add `openrage-cli maps apply`. @@ -256,7 +256,7 @@ Checks ([R70h](Roadmap.md#r70h-one-vocabulary-of-world-edits)): every operation ### Selecting and moving in the world (R70i) -Read `crates/domain/or-world/src/gizmo.rs`, [what the Map screen builds](Workbench_UX_Design.md#what-the-map-screen-builds), `src/ui/commands/target.rs`, `src/ui/shortcuts.rs`, and [R69g](Roadmap.md#r69g-one-details-panel) and R69h, whose Details panel and one Undo the row draws in. +Read `crates/domain/or-world/src/gizmo.rs`, [what the Map screen builds](Workbench_UX_Design.md#what-the-map-screen-builds), `src/ui/commands/target.rs`, `src/ui/shortcuts/mod.rs`, and [R69g](Roadmap.md#r69g-one-details-panel) and R69h, whose Details panel and one Undo the row draws in. Build the pick by pixel, through an id pass, with its second click; the rectangle that takes what is visible; the group move; the choice of axes; copy, paste and duplicate, with the duplicate that repeats the last offset; the snap to another object's box; the swap of a model; the drop to the ground and the follow, over R70g. Draw the manipulator in the world. Build the line that offers a project, the toast of the first edit, Edit in the project from a read-only World tab, the hints of each tool in the status bar, the menu of a right click on an object, and the double click that opens its model. @@ -276,7 +276,7 @@ Checks ([R70j](Roadmap.md#r70j-a-library-of-props-and-what-comes-in)): the Libra ### Removing what the game placed (R70k) -Read `crates/domain/or-world-gta5/src/group.rs` for `MapGroup`, and `delete_subtree` in `crates/domain/or-world-gta5/src/execute.rs`. +Read `crates/domain/or-world-gta5/src/map/group.rs` for `MapGroup`, and `delete_subtree` in `crates/domain/or-world-gta5/src/authoring/execute.rs`. Build the deletion's preview and its operation over R70h: the chain across files, the parents' counts, each file touched named before the step. Add the copy of the script line that hides a model, the flag for objects that cannot be told from a twin, which are left, and the rule for a door left where a building was deleted. The building's collision is R70l's and its occluders R70o's: until they land, the preview says both stay. @@ -306,7 +306,7 @@ Checks ([R70m](Roadmap.md#r70m-interiors)): the declared members are the ones th ### Doors (R70n) -Read `crates/domain/or-world-gta5/src/extension.rs`, which types the door extension, and R70g. +Read `crates/domain/or-world-gta5/src/map/extension.rs`, which types the door extension, and R70g. Build the search of doors, first by the door extension an archetype carries, counted over an install, then by model name, saying how many models had no name. Build the pairing; the copy forms as templates, among them the door tuning entry and the line that gives it to a model; the arc and the clearance over R70g; a door that opens in the view and stops where its arc is blocked; the zone in which a door opens by itself, drawn, with its tuning read; and the fitted replacement. Build the door rules: a door model of the project whose archetype lacks what the game's doors carry, measured on the install first; a game door moved or deleted, since a lock script finds a door by model and position; two doors at one place; a door whose arc is blocked. @@ -314,7 +314,7 @@ Checks ([R70n](Roadmap.md#r70n-doors)): two leaves that face each other pair and ### Parked vehicles, zones, lights and occluders (R70o) -Read `crates/domain/or-world-gta5/src/map_data.rs` and [what a kind of content costs](../reference/Crate_Reference.md#what-a-kind-of-content-costs). +Read `crates/domain/or-world-gta5/src/map/map_data.rs` and [what a kind of content costs](../reference/Crate_Reference.md#what-a-kind-of-content-costs). Build the data part first: parked vehicles, timecycle zones, far lights and occluders declared in the typed world family of `or-io`. Then build their place, move, size and fields, the far lights' two maps kept in step, and occlusion meshes drawn and removed as boxes are. Build the occluder fit as a proposal, which for an interior puts thin boxes in its outer walls and leaves its portals to the outside free, and from the association of R70l the proposal of the occluders over a deleted building. Build the occluder rules: a box that reaches outside its building, that a road or a pavement crosses, that overlaps an interior, that is too small to hide anything, or that lies mostly inside another. Draw a game vehicle on a selected parking spot, and copy a zone's centre for a script. @@ -322,7 +322,7 @@ Checks ([R70o](Roadmap.md#r70o-parked-vehicles-zones-lights-and-occluders)): the ### Roads, scenario points and the navmesh (R70p) -Read `crates/io/or-io/src/gta5/path_region.rs`, where a link names its far node by region and index, `crates/domain/or-world-gta5/src/scenario.rs`, the risk of [R33](Roadmap.md#r33-paths-navmesh-scenarios-and-tracks) and the form of R70w. +Read `crates/io/or-io/src/gta5/path_region.rs`, where a link names its far node by region and index, `crates/domain/or-world-gta5/src/map/scenario.rs`, the risk of [R33](Roadmap.md#r33-paths-navmesh-scenarios-and-tracks) and the form of R70w. Build the edit of a road node's fields and lanes, and nodes and links added and removed. Removing a node renumbers its region, so every region that names a renumbered node is written in the same step and named before it, and a node another region names is disabled and not deleted. Build the edit of a scenario point, in regions that exist, with its chain following. Build the rules: a vehicle node with no link, a link to a missing node, a link the other node does not return, a vehicle link with no lane, a road node linked to a footpath node, a node or a scenario point above the ground or under a surface, a scenario point left on a deleted object, a building added on walkable ground, and a deleted building whose floors stay in the navmesh. No navmesh is authored. @@ -330,7 +330,7 @@ Checks ([R70p](Roadmap.md#r70p-roads-scenario-points-and-the-navmesh)): an edite ### A build a server and a story install take (R70q) -Read [Dlc_Pack_Creation.md](../features/Dlc_Pack_Creation.md#what-is-verified), [what the targets build](Project_Model_Design.md#what-the-targets-build), `crates/domain/or-world-gta5/src/manifest.rs` and `crates/domain/or-world-gta5/src/partition.rs`. +Read [Dlc_Pack_Creation.md](../features/Dlc_Pack_Creation.md#what-is-verified), [what the targets build](Project_Model_Design.md#what-the-targets-build), `crates/domain/or-world-gta5/src/streaming/manifest.rs` and `crates/domain/or-world-gta5/src/authoring/partition.rs`. Build, in a map's contribution, the manifest of its maps and the line that declares the resource a map, and show after a build the line for the server's configuration. For a story pack, hand the maps and the type files over at a path through an archive's name, which the build already packs as a nested archive, registers and counts (`a_path_through_an_archives_name_is_packed_as_that_nested_archive`). The row adds that path in the Map content, the contents the install's packs state when they register an archive of maps, and a type file named inside that archive; then the cell unlocks ([ruling 15](#rulings-asked-of-the-owner)). Split a map past its extents at the build: `partition.rs` plans the split by level of detail and nothing applies it, and the split by area and the links carried across the parts are new. @@ -374,9 +374,9 @@ Checks ([R70u](Roadmap.md#r70u-working-together)): the driver merges two branche ### The keys, settings and guide of a mapper (R70v) -Read `src/ui/shortcuts.rs`, `src/state/front_door/template.rs`, [Workbench_Guide.md](../guides/Workbench_Guide.md) and [Interface_Languages.md](../guides/Interface_Languages.md). +Read `src/ui/shortcuts/mod.rs`, `src/state/front_door/template.rs`, [Workbench_Guide.md](../guides/Workbench_Guide.md) and [Interface_Languages.md](../guides/Interface_Languages.md). -Build presets of keys, with one that matches CodeWalker's, and the place of a binding in `src/ui/shortcuts.rs`, where a conflict is today one key for two commands of the whole table. Build the settings a mapper changes on one page: mouse sensitivity, field of view, an inverted vertical axis, the movement letters of the keyboard's layout, the ground grid, the snap steps and the layer radii, with Restore defaults. Give a panel's title a sentence on its game term as its hover. Wrap the sentences of the map rules into the catalogs, which a library crate's sentences are not today. Build a tour of the world, a chapter of the guide and a Map template that opens on the world. +Build presets of keys, with one that matches CodeWalker's, and the place of a binding in `src/ui/shortcuts/mod.rs`, where a conflict is today one key for two commands of the whole table. Build the settings a mapper changes on one page: mouse sensitivity, field of view, an inverted vertical axis, the movement letters of the keyboard's layout, the ground grid, the snap steps and the layer radii, with Restore defaults. Give a panel's title a sentence on its game term as its hover. Wrap the sentences of the map rules into the catalogs, which a library crate's sentences are not today. Build a tour of the world, a chapter of the guide and a Map template that opens on the world. Checks ([R70v](Roadmap.md#r70v-the-keys-settings-and-guide-of-a-mapper)): no preset binds one key to two commands of one place; every step of the tour points at a control that is drawn; each setting of the page changes what it names in a frame drawn with no window; a finding of a map rule draws in French. diff --git a/docs/direction/World_Editor_UX_Design.md b/docs/direction/World_Editor_UX_Design.md index c68a7660f..67ec05093 100644 --- a/docs/direction/World_Editor_UX_Design.md +++ b/docs/direction/World_Editor_UX_Design.md @@ -155,9 +155,9 @@ Stand on the ground, Remove entity and Add an entity are the commands the Map sc ### What the matcher has to change (R70i, R70v) -- **A binding by where the key sits (R70i).** A binding by character reads a press by the character it types and falls back to the key's position only when that character has no name (`key_of` in `src/ui/shortcuts.rs`). ⚠ On an AZERTY keyboard the fourth key of the digit row types an apostrophe, which reads as the Quote key and never as 4, so a tool bound to the character would be dead there without Shift. Today a row of the command table can say that its keys name a position (`by_position` in `src/ui/commands/table.rs`), and such a binding answers the key at that place whatever it types. No row says so yet: the five tools will. A hint and Settings name such a key by what it types once a press has shown it, and before that by its place on a US keyboard, said as such. +- **A binding by where the key sits (R70i).** A binding by character reads a press by the character it types and falls back to the key's position only when that character has no name (`key_of` in `src/ui/shortcuts/mod.rs`). ⚠ On an AZERTY keyboard the fourth key of the digit row types an apostrophe, which reads as the Quote key and never as 4, so a tool bound to the character would be dead there without Shift. Today a row of the command table can say that its keys name a position (`by_position` in `src/ui/commands/table.rs`), and such a binding answers the key at that place whatever it types. No row says so yet: the five tools will. A hint and Settings name such a key by what it types once a press has shown it, and before that by its place on a US keyboard, said as such. - **Shift with a digit (R70i).** A binding by character ignores Shift for a digit (`shift_picks_the_character`), so Shift with a digit cannot set what the digit goes to. Today a binding by position reads Shift, so a digit and Shift with it are two bindings. Until a bookmark's key is bound that way, a bookmark is saved from the box, and Alt with a digit goes to it. -- **A place for a binding (R70v).** Today a conflict is one key for two commands read in one place (`taken_by` in `src/ui/shortcuts.rs`): a row of the table names its place, two panels share a key, and a command the key dispatcher reads shares with none. Settings offers presets of keys over that rule (`src/ui/shortcuts/presets.rs`); the one for a person who knows CodeWalker's keys holds only what a command of today's table can take, and gains the tools' keys with the tools. +- **A place for a binding (R70v).** Today a conflict is one key for two commands read in one place (`taken_by` in `src/ui/shortcuts/mod.rs`): a row of the table names its place, two panels share a key, and a command the key dispatcher reads shares with none. Settings offers presets of keys over that rule (`src/ui/shortcuts/presets.rs`); the one for a person who knows CodeWalker's keys holds only what a command of today's table can take, and gains the tools' keys with the tools. - **Keys read outside the table (R70i).** The Map scene reads F, Escape, the arrows and the brackets itself today. R70i makes them rows of the table, so the page of keyboard shortcuts lists them. A field being typed in keeps its keys today (`the_focused_field_keeps`), so a digit typed into Details never changes the tool. diff --git a/docs/features/GTA_VI_Builds.md b/docs/features/GTA_VI_Builds.md index afc78c3cd..325e8cc17 100644 --- a/docs/features/GTA_VI_Builds.md +++ b/docs/features/GTA_VI_Builds.md @@ -2,16 +2,16 @@ What OpenRage reads, edits and saves of a GTA VI build, Xbox Series or PlayStation 5, what it refuses and why, and how far each part was checked against a real build. -GTA VI is a title of its own (`crates/title/or-title/src/game/profiles.rs`) with no declared format: nothing of it is a `#[record]` declaration, because there is no source to name a field by. Its readers are ordinary code in `crates/io/or-io/src/gta6/`, behind `or-io`'s `gta6` feature, and a name there says the role a field was measured to play. The archive is read from its table by `crates/io/or-io/src/container/rpf/gta6_rpf.rs` and the files beside it, and scanned where no key is held. The layouts themselves are in the gitignored docs/extra/ tier and are not repeated here. +GTA VI is a title of its own (`crates/title/or-title/src/game/profiles.rs`) with no declared format: nothing of it is a `#[record]` declaration, because there is no source to name a field by. Its readers are ordinary code in `crates/io/or-io/src/gta6/`, behind `or-io`'s `gta6` feature, and a name there says the role a field was measured to play. The archive is read from its table by `crates/io/or-io/src/container/rpf/rpf9/gta6_rpf.rs` and the files beside it, and scanned where no key is held. The layouts themselves are in the gitignored docs/extra/ tier and are not repeated here. ## A PlayStation 5 build A PlayStation 5 build is a build of its own (`Gta6Ps5`), known by the title id its package states, and it reads through the same readers as the Xbox Series build: the rest of this document describes both, and this section says where they differ. [GTA_VI_Platforms_Plan.md](../direction/GTA_VI_Platforms_Plan.md) has the design. - **A file states its platform.** An archive's header and a texture pack's directory each hold the platform's letter, and a reader takes what differs by platform from `crates/io/or-io/src/gta6/platform.rs`, never from the install. -- **Each build is read with its own keys.** The keys come out of the build's own executable, `eboot.bin` here, and they are handed to the open: an archive opens with `RpfArchive::open_with` and the `Gta6Context` of its build, and no reader takes keys from the process or the environment (`crates/io/or-io/src/container/rpf/gta6_rpf.rs`). Two builds open at once, each read with its own keys (`two_builds_open_at_once_each_reading_with_its_own_session`). The app picks the keys by the platform letter an archive's header states (`src/state/rpf_archive_open.rs`), and the CLI has one loader for either build (`crates/tools/or-cli/src/gta6/keys.rs`). +- **Each build is read with its own keys.** The keys come out of the build's own executable, `eboot.bin` here, and they are handed to the open: an archive opens with `RpfArchive::open_with` and the `Gta6Context` of its build, and no reader takes keys from the process or the environment (`crates/io/or-io/src/container/rpf/rpf9/gta6_rpf.rs`). Two builds open at once, each read with its own keys (`two_builds_open_at_once_each_reading_with_its_own_session`). The app picks the keys by the platform letter an archive's header states (`src/state/rpf_archive_open.rs`), and the CLI has one loader for either build (`crates/tools/or-cli/src/gta6/keys.rs`). - **Most archives come as a pair**, `X.rpf` and `X_concat.rpf`, which `crates/title/or-title/src/install/gta6_files.rs` lists side by side. They are two whole archives: every row's body lies in the file that holds the row, so no row of `X.rpf` names a body in `X_concat.rpf`, and a `_concat` holds nothing but nested archives, each of which mounts. `crates/io/or-io/tests/gta6_pairs_rule.rs` holds the rule over the build's 40 archives, 19 of them a `_concat` in 16 pairs. -- **A body is stored with no coder, or as raw DEFLATE.** Where the Xbox Series build stores a body as zlib chunks, this one stores it as it is. A headerless resource is a zero slot and then its two sections, whose length its row states; a row whose type code sets bit 8 holds the two sections as raw DEFLATE streams instead, which the build's acceleration and script rows do; and a sized row with no chunk table whose stored size is its real size is read by that size (`crates/io/or-io/src/container/rpf/gta6_mount.rs`, `crates/io/or-io/src/container/rpf/gta6_kinds.rs`). With no key, a scan names the stored bodies by their first bytes (`crates/io/or-io/src/container/rpf/rpf9_scan/stored.rs`). ⚠ Such a body has an end only where its row or its bytes state one. +- **A body is stored with no coder, or as raw DEFLATE.** Where the Xbox Series build stores a body as zlib chunks, this one stores it as it is. A headerless resource is a zero slot and then its two sections, whose length its row states; a row whose type code sets bit 8 holds the two sections as raw DEFLATE streams instead, which the build's acceleration and script rows do; and a sized row with no chunk table whose stored size is its real size is read by that size (`crates/io/or-io/src/container/rpf/rpf9/gta6_mount.rs`, `crates/io/or-io/src/container/rpf/rpf9/gta6_kinds.rs`). With no key, a scan names the stored bodies by their first bytes (`crates/io/or-io/src/container/rpf/rpf9/rpf9_scan/stored.rs`). ⚠ Such a body has an end only where its row or its bytes state one. - **Every kind reads as on the Xbox Series.** `crates/io/or-io/tests/gta6_two_build_census.rs` opens both builds in one process, counts every row of every archive at any depth by its kind and reads a sample of each kind's bodies: every table opens and every sampled body reads on both, with no difference between them. The builds differ in what they ship: this one holds 40 archives where the Xbox Series holds 22, and twice the acceleration rows, in packs of two widths. - **Its script programs read.** A compiled script there is the same headerless resource, enciphered and held as raw DEFLATE, and it deciphers and inflates to the sections its row states. The container is the one both builds share: the reader selects the build id and native-anchor stamp from the build the file states at header +0x1C, so all 746 programs of this build read as the Xbox Series build's 746 do, and decode to the same instruction totals under the one opcode table (`crates/io/or-io/tests/gta6_script_programs.rs`). Only those two per-executable stamps differ; a build neither of them names is refused by name. - **Its shader packs are the same container with another binding layout, and are refused.** Its `shaders.rpf` holds two `SGD5` effect containers as the Xbox Series one does. The Xbox Series build's open, 26,503 programs and 932 effects whose streams inflate to `DXBC` containers; this build's are refused by name at their first binding layout, whose head states a count that is not its record count (88 for 28 records), so its programs are not reached. `crates/io/or-io/tests/gta6_shader_packs.rs` holds both. @@ -22,18 +22,18 @@ A PlayStation 5 build is a build of its own (`Gta6Ps5`), known by the title id i An RPF9 archive's header is in the clear, and its table of contents is enciphered with keys that are in the game's executable. OpenRage ships no key: it reads them out of the user's own executable, and [GTA_VI_Modding.md](../guides/GTA_VI_Modding.md#give-openrage-your-executables-keys) gives the steps. With them, an archive opens behind `RpfArchive` as `RpfVersion::Rpf9` and is browsed as a GTA V archive is. -- **One Files tree.** An archive the app opens is a folder of the Files tree, a nested archive is a folder in it, and a double-click opens an entry (`src/state/rpf_archive_open.rs`). An entry is read through its row's chunk table (`crates/io/or-io/src/container/rpf/gta6_mount.rs`, `crates/io/or-io/src/container/rpf/gta6_chunk_table.rs`), and an enciphered one is deciphered on a worker with the content key (`crates/io/or-io/src/container/rpf/gta6_content.rs`). -- **Names.** A row names its entry by the 64-bit hash of its path. The tree shows the text where OpenRage holds a name that hashes to it, and the hash otherwise; the names are a folder of names `OPENRAGE_GTA6_NAMES` names, or with none named the folder a package ships beside the executable from `assets/gta6_names/vocabulary.txt`, the table `hashes mine` writes into the configuration folder and the harvest kept there ([below](#names-naming-rules-and-use-labels)), read into one cache there (`crates/io/or-io/src/container/rpf/gta6_name_cache.rs`), then, in the app, the names of the default hash index (the installed schema snapshot's, the public names and the parser names), each under its path hash, and last the bundled words, plain words in `or-io`'s data files with no path, hash or game file extension. [GTA_VI_Modding.md](../guides/GTA_VI_Modding.md#names) says where each is kept. -- **Kinds.** A row states what its entry is, a 24-byte row by its class byte and a 20-byte row by its resource type code (`crates/io/or-io/src/container/rpf/gta6_kinds.rs`). The tree and the Files table show each row's kind, and the filter matches a kind's words and the GTA V extension of the same kind. The Inspector shows a selected entry's kind, its stored and real sizes, whether it is enciphered, the shape of its row and, where no name is held, its name hash (`src/ui/panels/inspector/rpf9_entry.rs`). +- **One Files tree.** An archive the app opens is a folder of the Files tree, a nested archive is a folder in it, and a double-click opens an entry (`src/state/rpf_archive_open.rs`). An entry is read through its row's chunk table (`crates/io/or-io/src/container/rpf/rpf9/gta6_mount.rs`, `crates/io/or-io/src/container/rpf/rpf9/gta6_chunk_table.rs`), and an enciphered one is deciphered on a worker with the content key (`crates/io/or-io/src/container/rpf/rpf9/gta6_content.rs`). +- **Names.** A row names its entry by the 64-bit hash of its path. The tree shows the text where OpenRage holds a name that hashes to it, and the hash otherwise; the names are a folder of names `OPENRAGE_GTA6_NAMES` names, or with none named the folder a package ships beside the executable from `assets/gta6_names/vocabulary.txt`, the table `hashes mine` writes into the configuration folder and the harvest kept there ([below](#names-naming-rules-and-use-labels)), read into one cache there (`crates/io/or-io/src/container/rpf/rpf9/gta6_name_cache.rs`), then, in the app, the names of the default hash index (the installed schema snapshot's, the public names and the parser names), each under its path hash, and last the bundled words, plain words in `or-io`'s data files with no path, hash or game file extension. [GTA_VI_Modding.md](../guides/GTA_VI_Modding.md#names) says where each is kept. +- **Kinds.** A row states what its entry is, a 24-byte row by its class byte and a 20-byte row by its resource type code (`crates/io/or-io/src/container/rpf/rpf9/gta6_kinds.rs`). The tree and the Files table show each row's kind, and the filter matches a kind's words and the GTA V extension of the same kind. The Inspector shows a selected entry's kind, its stored and real sizes, whether it is enciphered, the shape of its row and, where no name is held, its name hash (`src/ui/panels/inspector/rpf9_entry.rs`). - **The tree's actions.** A single click opens a row in the preview tab, read on the load worker as a double-click reads it, and Copy hash gives the 64-bit path hash the table states, in the `0x` form the filter finds a row by (`src/state/rpf9_tree_actions.rs`). - **Extract and save from the tree.** Extract writes a row's body as the open reads it, a clear headerless resource in the loose form OpenRage reopens (`src/state/rpf9_tree_verbs.rs`). A document opened from a row of an archive opened on its own saves into that row, on a worker, as a GTA V entry's document saves into its archive (`src/state/rpf9_tree_bind.rs`). The tree's edits are never written into the archive they were read from: Save as… writes them to a new file, as [How an edit is saved](#how-an-edit-is-saved) says. -- **Finding a file.** Go to File finds a file anywhere in an install and in each folder and archive Files shows, nested archives included, from an index of paths walked off the UI thread and kept between runs, and a query is answered on a thread of its own, so typing never waits for it (`src/state/file_index.rs`). A file is found by words its path holds, in any order and any case, or by a word that is a hash of its name, a GTA VI row's 64-bit hash as its table states it among them; a file a hash names sorts first. The filters are `kind:` a kind as Files names it, exactly or else in part, `ext:` an extension, `hash:` the start of a name hash in hex, `in:` an archive by its name, with or without `.rpf`, or by the end of its path, and `size:>N` and `size:N` and `size: --technique deferred_drawmeshlets,deferredalphaclip_drawmeshlets --draw --fed --msl --fit`, which opens the adapter with no surface: of the 748 pairs of the two techniques the binder hands the renderer 476, and the Metal device creates a pipeline of 413 of them and draws with each. It refuses 63: 52 whose vertex stage binds more buffers than wgpu's Metal backend gives a pipeline's vertex stage (`--fit` writes all 476 within the count, as text no device has built), 10 whose pixel stage Metal's compiler rejects (`no matching constructor for initialization of 'metal::gradient2d'`, on a line that samples one texture of an array by gradients), and one whose compile the system's compiler service dropped. The 272 not handed over are the binder's own refusals: 124 place instances by records only the game fills, 81 pick a resource by a number the game sets, 55 loop up to a number only the game fills, 10 are too large to have been checked on a software adapter, and 2 write targets whose contents are not established. Every one of the small container's 2,906 units, its 1,699 programs and 1,207 pairs, is created and drawn on the same device. The renderer's own builder of such a pass holds there too, over stages built by hand: the 44 tests of `game_shaders::meshlets` pass on that device (`cargo nextest run -p or-renderer --features gpu-tests --profile all --lib -E 'test(/meshlets/)'`). The adapter offers arrays of textures and none of buffers (`BUFFER_ARRAYS` in `crates/runtime/or-renderer/src/game_shaders/meshlets.rs`), so a pass that binds an array of buffers is not one it builds. +**A Metal device builds those passes.** `or-shader-tool rdna-devices --technique deferred_drawmeshlets,deferredalphaclip_drawmeshlets --draw --fed --msl --fit`, which opens the adapter with no surface: of the 748 pairs of the two techniques the binder hands the renderer 476, and the Metal device creates a pipeline of 413 of them and draws with each. It refuses 63: 52 whose vertex stage binds more buffers than wgpu's Metal backend gives a pipeline's vertex stage (`--fit` writes all 476 within the count, as text no device has built), 10 whose pixel stage Metal's compiler rejects (`no matching constructor for initialization of 'metal::gradient2d'`, on a line that samples one texture of an array by gradients), and one whose compile the system's compiler service dropped. The 272 not handed over are the binder's own refusals: 124 place instances by records only the game fills, 81 pick a resource by a number the game sets, 55 loop up to a number only the game fills, 10 are too large to have been checked on a software adapter, and 2 write targets whose contents are not established. Every one of the small container's 2,906 units, its 1,699 programs and 1,207 pairs, is created and drawn on the same device. The renderer's own builder of such a pass holds there too, over stages built by hand: the 44 tests of `game_shaders::meshlets` pass on that device (`cargo nextest run -p or-renderer --features gpu-tests --profile all --lib -E 'test(/meshlets/)'`). The adapter offers arrays of textures and none of buffers (`BUFFER_ARRAYS` in `crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs`), so a pass that binds an array of buffers is not one it builds. **The lighting is not the build's for want of what feeds it.** `openrage-cli rpf scan-rdna-bind --technique TiledLighting` finds the technique that lights a frame in four effects, and both its stages translate in all four. Its pixel stage reads one binding the view fills, seven or eight samplers, and from 50 to 58 bindings only the game fills; its vertex stage reads four more and the words of a draw. Counted by stage across the four effects that is 64 distinct bindings, each known by the hash of its name and nothing more. What is missing is therefore named, and none of it is translation: diff --git a/docs/features/GTA_V_World_Viewer.md b/docs/features/GTA_V_World_Viewer.md index a9ac25dd4..eaf86f4b3 100644 --- a/docs/features/GTA_V_World_Viewer.md +++ b/docs/features/GTA_V_World_Viewer.md @@ -159,7 +159,7 @@ with each reason, and how many shaders are still being built. them by the coverage of a multisampled frame or, with no multisampling, by its sub-sampled alpha and a pass after it; the frame here has neither, so a material of a far tree effect that states no alpha to cut under is not drawn (`left_out` in - `crates/domain/or-world-gta5/src/profile.rs`, + `crates/domain/or-world-gta5/src/map/profile.rs`, `a_far_tree_card_that_states_no_alpha_to_cut_under_is_left_out_of_the_frame_and_listed`), and the panel counts them. The far hills are bare of trees until one of the two is built. - **The sea and the lakes** are drawn by the game's water effect: each quad of the level's water @@ -175,7 +175,7 @@ with each reason, and how many shaders are still being built. - **A river, a pool and a fountain** are meshes of a map with water shaders of their own, and are drawn in the pass of the sea, after its sheets, by the technique the game takes for them where no fog pass of the water runs first: one for a river and a fountain, another for a pool and - shallow water (`WATER_TECHNIQUES` in `crates/domain/or-world-gta5/src/profile.rs`). Each reads + shallow water (`WATER_TECHNIQUES` in `crates/domain/or-world-gta5/src/map/profile.rs`). Each reads the registers the sea reads, the copy of the lit frame and how far that lies, the map of the sky, the sun's shadow and the sea's maps that stand still, and a river the two times its flow map is read at, which follow the clock diff --git a/docs/features/Viewport_Shading_Modes.md b/docs/features/Viewport_Shading_Modes.md index 296c0df7c..04a0a787f 100644 --- a/docs/features/Viewport_Shading_Modes.md +++ b/docs/features/Viewport_Shading_Modes.md @@ -102,7 +102,7 @@ subtract by eye, so it turns a debug view into a wrong one. Shaded draws the open `.ydr`, `.yft` or selected `.ydd` entry with the game's own passes. Its pill is always offered; where no SPIR-V pack is read (`OPENRAGE_GAME_PACK`, else the folder of the game and of the build of its executable in `shader-pack` under the configuration folder, where the helper bakes it) its tooltip says to bake one (Automate ▸ Bake game shaders) and it draws as Material, and a restart opens in Material when the pack is gone. The pack is the one `or-shader-tool bake-pack` writes ([Shader_Pipeline_Design.md](../direction/Shader_Pipeline_Design.md#meshes-with-materials)), which the app has the helper bake in the background once a game is set ([how](../direction/Shader_Pipeline_Design.md#baked-from-the-app)). A preferences file written before the mode took this name keeps the key `game`, which reads as Shaded, as the key `shaded` of the deferred mode does. -`src/render/game_scene.rs` extracts the active drawable's most detailed level as an interchange scene with no textures of its own, (a vehicle is drawn with its wheels: it ships one wheel model, the left front's (and a left rear as well for a bike or a truck), in a physics child, and `fragment_wheels` puts it at every wheel bone of the skeleton with the bone's own transform, turned half about the vertical on the far side of the vehicle, the way the game dresses a vehicle with the wheel it ships; the wheel has no shader group and indexes the vehicle's) finds each texture a material names through `texture_resolution::resolve`, as a mesh's diffuse is found, and turns the scene into the surfaces and materials `or_renderer::game_shaders::drawable::surfaces_of` returns. The bridge prepares them once for each `MeshCacheKey` with `ViewportRenderer::prepare_deferred`, which draws as the game does: what is opaque is written by each effect's `deferred_draw` pass to four G-buffer targets and to the viewport's depth and stencil (the stencil holds the material, and a pixel nothing drew keeps the value the lighting skips); where the sun shines the surfaces are drawn from it as depth into one tile of the game's cascade map, by the depth-only passes of its `cascadeshadows` effect, and the game's `cascadeshadows_rendering` pass multiplies what reaches each pixel into the self-shadow in the alpha of the G-buffer; the game's `ssao` passes then darken the ambient scales of the G-buffer where other surfaces stand close around a pixel (the downscaled depth, the sampling, two blurs that keep the edges of depth, and the upscale that multiplies them in, at the strength of the day's `ssao_inten`), and the game's own `directional` pass reads them and lights the frame, by the sun where it shines and by the ambient light alone where it does not; what blends is drawn into the lit frame with the effect's forward pass (and marks the stencil as what is opaque does, except for what is seen through (the glass of a window or a vehicle, the blur of a rotor) where something opaque is drawn, since a pane over nothing that marked it would be mapped to the screen as black in place of letting the background show through, and the rotor blur of a helicopter would be a black star), the bright part of the frame is blurred at four sizes by the game's own bloom passes and added back to it (and, round what was drawn, to the background), and the frame is mapped by the game's `postfx` pass (`pp_simple`) to a target of its own, which the game's anti-aliasing pass of the same effect (`pp_AA`, FXAA, reading the luminance the mapping leaves in alpha) draws to the screen, and the lines and the models are drawn over that. Where the pack has no such passes, or the device refuses them, the bridge prepares a `MeshScene` instead (`ViewportRenderer::game_target`: its colour, and its reversed depth, one at the near plane), and each surface is lit by its own forward pass. A surface whose effect the pack lacks, or that has no pass the route draws, is left out and listed in the pill's tooltip. Without a scene, as when no drawable is open, the mode draws as Material does, rather than a blank viewport. +`src/render/game_scene/mod.rs` extracts the active drawable's most detailed level as an interchange scene with no textures of its own, (a vehicle is drawn with its wheels: it ships one wheel model, the left front's (and a left rear as well for a bike or a truck), in a physics child, and `fragment_wheels` puts it at every wheel bone of the skeleton with the bone's own transform, turned half about the vertical on the far side of the vehicle, the way the game dresses a vehicle with the wheel it ships; the wheel has no shader group and indexes the vehicle's) finds each texture a material names through `texture_resolution::resolve`, as a mesh's diffuse is found, and turns the scene into the surfaces and materials `or_renderer::game_shaders::drawable::surfaces_of` returns. The bridge prepares them once for each `MeshCacheKey` with `ViewportRenderer::prepare_deferred`, which draws as the game does: what is opaque is written by each effect's `deferred_draw` pass to four G-buffer targets and to the viewport's depth and stencil (the stencil holds the material, and a pixel nothing drew keeps the value the lighting skips); where the sun shines the surfaces are drawn from it as depth into one tile of the game's cascade map, by the depth-only passes of its `cascadeshadows` effect, and the game's `cascadeshadows_rendering` pass multiplies what reaches each pixel into the self-shadow in the alpha of the G-buffer; the game's `ssao` passes then darken the ambient scales of the G-buffer where other surfaces stand close around a pixel (the downscaled depth, the sampling, two blurs that keep the edges of depth, and the upscale that multiplies them in, at the strength of the day's `ssao_inten`), and the game's own `directional` pass reads them and lights the frame, by the sun where it shines and by the ambient light alone where it does not; what blends is drawn into the lit frame with the effect's forward pass (and marks the stencil as what is opaque does, except for what is seen through (the glass of a window or a vehicle, the blur of a rotor) where something opaque is drawn, since a pane over nothing that marked it would be mapped to the screen as black in place of letting the background show through, and the rotor blur of a helicopter would be a black star), the bright part of the frame is blurred at four sizes by the game's own bloom passes and added back to it (and, round what was drawn, to the background), and the frame is mapped by the game's `postfx` pass (`pp_simple`) to a target of its own, which the game's anti-aliasing pass of the same effect (`pp_AA`, FXAA, reading the luminance the mapping leaves in alpha) draws to the screen, and the lines and the models are drawn over that. Where the pack has no such passes, or the device refuses them, the bridge prepares a `MeshScene` instead (`ViewportRenderer::game_target`: its colour, and its reversed depth, one at the near plane), and each surface is lit by its own forward pass. A surface whose effect the pack lacks, or that has no pass the route draws, is left out and listed in the pill's tooltip. Without a scene, as when no drawable is open, the mode draws as Material does, rather than a blank viewport. The game's last program writes what a screen shows, encoded for it already, and egui takes a texel of a texture it is handed for the bytes it holds: a frame the game's programs drew is handed to it through the view of the target that does not decode (`a_drawable_in_shaded_is_seen_as_the_bytes_the_games_last_program_wrote`). Until 2026-12-01 it was handed through the target's sRGB view, and seen one decoding too dark. ⚠ A frame of the other modes is still handed that way. diff --git a/docs/guides/Development_Workflow.md b/docs/guides/Development_Workflow.md index 3c9206df5..4967072a9 100644 --- a/docs/guides/Development_Workflow.md +++ b/docs/guides/Development_Workflow.md @@ -587,8 +587,8 @@ with no program of its own is the standard program's), and until those passes ar built the model is drawn as Material; `lit=all` builds the pass of every kind that has one whatever the targets hold, and `light=FILE` draws the standard material's pass with a pixel stage of WGSL of one's own, such as one `openrage-cli rpf scan-frame-pass … --wgsl` -wrote. `Aids` in `crates/runtime/or-renderer/src/game_shaders/meshlets.rs` reads it, and -`crates/runtime/or-renderer/src/game_shaders/trace/mod.rs` reads the traced words. +wrote. `Aids` in `crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs` reads it, and +`crates/runtime/or-renderer/src/game_shaders/trace.rs` reads the traced words. ⚠ A translated program that never ends resets the display driver of a hardware adapter. `OPENRAGE_SOFTWARE_ADAPTER=1` draws a script, a self-check and the diff --git a/docs/guides/GTA_VI_Modding.md b/docs/guides/GTA_VI_Modding.md index f90e47c6b..d7b287460 100644 --- a/docs/guides/GTA_VI_Modding.md +++ b/docs/guides/GTA_VI_Modding.md @@ -113,7 +113,7 @@ Refused by name, and nothing written: an offset at which no instruction starts, ### What fits today -The patch writer deflates a changed chunk with each of zlib's levels and, where none fits its stored size, with an optimal parse (zopfli), but only on a chunk no larger inflated than `OPTIMAL_CAP` in `crates/io/or-io/src/container/rpf/gta6_patch.rs`, because the parse's time grows with the chunk; it runs over a chunk in parts of 64 KiB, each with the 32 KiB before it as its window, and a larger chunk's refusal names the cap and says that the optimal parse was not tried on it. That cap is what `rpf9 fits` and `rpf9 patch` use; a save from the app runs the parse only on chunks of up to 256 KiB, since the app's plan does not yet report its progress or stop, and the parse takes minutes over a chunk of several MiB. A stream shorter than its stored size is filled with empty blocks or followed by zeros, which the reader and the game pass over. What fits: +The patch writer deflates a changed chunk with each of zlib's levels and, where none fits its stored size, with an optimal parse (zopfli), but only on a chunk no larger inflated than `OPTIMAL_CAP` in `crates/io/or-io/src/container/rpf/rpf9/gta6_patch.rs`, because the parse's time grows with the chunk; it runs over a chunk in parts of 64 KiB, each with the 32 KiB before it as its window, and a larger chunk's refusal names the cap and says that the optimal parse was not tried on it. That cap is what `rpf9 fits` and `rpf9 patch` use; a save from the app runs the parse only on chunks of up to 256 KiB, since the app's plan does not yet report its progress or stop, and the parse takes minutes over a chunk of several MiB. A stream shorter than its stored size is filled with empty blocks or followed by zeros, which the reader and the game pass over. What fits: - a chunk the edit leaves alone, whose stored bytes are kept as they are; - a chunk the game stored without compression, which takes any content of its exact length; @@ -136,7 +136,7 @@ From the app, a save is a rebuilt archive whenever one row keeps it from being p - **A row renamed, removed or added in the tree**: the row "is renamed", "is removed" or "is added", since each changes the signed table. - **A body of another length**: the row is so many bytes, not the size its row states, and so many bytes over or short. A headerless resource states no real size, so its row is held to the length of the body it stores, and a loose form that does not read as a resource from its start is named for that. - **A chunk that does not fit**: a chunk of the row deflates at best to so many bytes by the tree's deflater and by the optimal parse, and neither fits its stored size, so many bytes over; past the save's cap, the message says that the optimal parse was not tried on it. -- **A row the patch writer will not write in place**, by its refusal (`PatchRefusal` in `crates/io/or-io/src/container/rpf/gta6_patch.rs`): a nested archive itself, whose rows are patched instead; a row under a cipher OpenRage does not encipher; a row with no chunk table whose body is neither one stream nor one stored body that reads back the same; and a row whose table states no body or does not read. +- **A row the patch writer will not write in place**, by its refusal (`PatchRefusal` in `crates/io/or-io/src/container/rpf/rpf9/gta6_patch.rs`): a nested archive itself, whose rows are patched instead; a row under a cipher OpenRage does not encipher; a row with no chunk table whose body is neither one stream nor one stored body that reads back the same; and a row whose table states no body or does not read. A save is refused, and nothing is written, for an archive moved into the tree from another, which the GTA VI writer does not add. In the CLI, the verbs below lay a table out again, and each that rewrote a table says that its signature is stale and that the game refuses the archive. diff --git a/docs/reference/Crate_Reference.md b/docs/reference/Crate_Reference.md index 50b8c7c3f..b18ab5d57 100644 --- a/docs/reference/Crate_Reference.md +++ b/docs/reference/Crate_Reference.md @@ -43,7 +43,7 @@ lists the edges. `or_cli::run` is all of `src/cli_main.rs`; `openrage-cli photo` draws with the editor's renderer, so it starts the `openrage` beside it as `openrage --photo`, `src/photo/mod.rs`, rather than `or-cli` depending on a renderer) and on `or-shader-tool`, which - `src/state/game_pack.rs` drives so that no rendering crate depends on a + `src/state/game_pack/mod.rs` drives so that no rendering crate depends on a build tool. The app depends on every domain crate, `or-wardrobe` among them: the Wardrobe workspace plans and edits clothing through it (`src/state/workbench/wardrobe.rs`), and it reads `or-content` for the kinds of content to plan, adopt and start, so that it and `openrage-cli` @@ -363,7 +363,7 @@ by the suite of the records of a map, below. Left in the interior records: whether a shipped interior with no room states the room class is not measured (the refusal above is tested on a layout a test took the class out of); a portal that has not four corners is left to the rule `interior-broken` and is not refused at the save; and the read views of -`crates/domain/or-world-gta5/src/map_types.rs` still read the value tree, held to the typed records by +`crates/domain/or-world-gta5/src/archetypes/map_types.rs` still read the value tree, held to the typed records by `the_read_views_of_an_interior_read_what_the_typed_records_read`. `or-maps` still builds the first entity of an empty map and the first archetype of an empty type file and copies neither, and where the donor was made from nothing the record built is to the byte the copy @@ -1308,7 +1308,7 @@ place for in `Scene::dropped`. `import` pairs a file with a drawable by the name pairs by position (`ImportNames` states the names a caller knows), and cuts a mesh that overflows a geometry into several (`ImportReport::splits`). -**or-maps.** The maps engine, headless: the map files a person streams into the game, as content of a project, whose design is [Workbench_Views_Design.md](../direction/Workbench_Views_Design.md#maps). It has the shape of `or-particles`. `model` is `maps.json`, the file of a maps content (each map set with a stable id, a name, the sources it is made of as folders of the module, and the names a person typed for the hashes a map keeps, with the waivers); `layout` says where a source lands in a resource (at `stream/`, the one place a FiveM resource has) and in a singleplayer DLC (the maps and their manifest inside the nested archive of the level's folder the pack registers as map data, and each type file inside an archive of the props folder named for it, with the models and textures its archetypes name, asked for by an `.ityp` name stating props, as `how_the_packs_of_an_install_carry_their_maps` measured the packs of two installs to keep theirs); `facts` looks at each source (what it cooks to, what the map file places and the type file declares through `or-world`'s views of the typed roots `CMapData` and `CMapTypes`, with an interior's rooms and portals read off the document by `or-world`'s read views, which a test holds to the typed records of `or-io`); `rules` is the table `RULES` (twenty-six, each a code, a severity and whether a waiver can set a finding aside) and `check` applies it, a map being the file its source cooks to, known by the hash of that file's name whatever name the map states (`facts::map_name`: 473 map files of each install state the name of another, and none of them holds an entity), which the deletion, the comparison, the manifest and the notes of an operation follow too (`a_link_into_a_parent_map_leads_into_the_file_called_so_and_never_into_one_that_states_its_name`, `a_map_is_stated_in_the_manifest_by_the_name_of_its_file_whatever_name_it_states`); `plan` hands a build one `Contribution` (the cooked `.ymap` and `.ytyp` files and the models and textures at `stream/`, the manifest of the maps, the line that declares a FiveM resource a map, the figures and an item for each map set), laid out for the kind of build that takes it (`Shape`: a singleplayer DLC and the pack an `.oiv` installs take one layout, and the cell of each is locked by the same sentence, `an_oiv_of_a_maps_content_installs_the_pack_a_singleplayer_dlc_is_and_is_locked_as_one`); `manifest` is the `_manifest.ymf` of the content's maps, written by `or_world_gta5::manifest_build` from the manifests of the game the content keeps in its `manifests` folder (`keep`), with a derived entry for a map none of them states and a note for each map nothing is written for; `verify` reads a built resource back against the model, the manifest of the maps included; `adopt` is the recogniser `MapPack` and its `start_module`; and `import` makes sources of game files (a `.ymap` or `.ytyp` as a metadata source, the rest through the general import), refusing with its reason a file no source form holds. `mapping` is a mapping that comes in as a folder or a zip (`or_project::place`): `analyse` finds its resources and loose stream folders and says, with nothing written, what an adoption makes of each file (`Becomes`: a source of which kind, a manifest of the game's maps, a file kept whole, a file an asset escrow locks, which is told by its first four bytes and handed to no reader, a file refused with the reason, an archive left out), whether a build carries each line of the manifest, and what `rules` says of the map files, type files and models as one set; two files that would be one source folder (a map file and a type file of one name) are told apart there, the second kept whole with the reason; `check` says what stops an adoption before it writes (the root named, the folder it is made in, the length of its paths there); and `adopt`, which asks `check` first, makes a project of one of them in a folder that is new or empty, the map files, type files, models and textures as sources of a maps content and every other file kept whole at its place, removing what it made when it cannot finish. Five modules are the placement: `edit` changes what an entity or an archetype says in its source (it cooks the source, opens the typed root, changes a member, saves the root and writes the canonical XML back through `or_source::metadata::replace`, which refuses an XML that does not compile back to itself; an entity or an archetype that is added is a copy, and `add_new_entity` and `add_new_archetype` add one that is no copy, with the members the file's own class states), `operation` names each of those changes as an `Operation`, data whose JSON states a format name and a schema, with `apply`, which does one to the sources of a pack and returns the operation that puts them back byte for byte, and `apply_all`, which does a list or none of it and writes nothing on a dry run (an inverse carries the record, the LOD links and the extents it replaces, and is the XML as it was when it is not proven to save the file as it was, on the file as edited and, unless it holds by construction, on the file the new XML cooks to as well; the first entity or archetype of a file that holds none is built with what the donor states and is no copy; an entity of an archetype no type file of the pack declares is held by the extents where it stands, which `Applied::notes` says, and `Done::notes` in a session; an entity taken out of or put into a map alone leaves the LOD links of the map files under it on other entities, which the same notes say for each such file unless the list holds its renumbering, and which the rule `lod-children-uncounted` or `parent-link-broken` then reports; an entity at or after one a container LOD of the file names is neither taken out nor put in; a source that leaves the folder of the pack is refused, and a rotation is stored at length one). An operation may state `expects`, the SHA-256 of the XML its source is to hold (`digest_of`), and is refused with `Error::Stale` when the source holds another: every inverse states the digest of what its operation wrote, so an inverse applied after another edit of its source is refused, and a step of the Map screen's Undo is the operation and its inverse with no copy of the XML. `Session` (`crates/domain/or-maps/src/operation/session.rs`) holds the sources of a pack open as their typed roots, so that an edit costs no XML: `Session::apply` changes a root and writes nothing, the boxes of the type files are read once and read again after a type file is edited, and `Session::flush` writes the XML of every source that changed through the same guard, all or none, which is byte for byte what `apply` writes operation by operation; a session dropped with operations unwritten flushes, and can only log a refusal. ⚠ A session that refused an operation since its last flush writes nothing when dropped and logs it, since what it did before the refusal may be part of a list that is sound only whole: `Session::apply_all` does a list or takes back what it did of it, `Session::discard` lets a session go unwritten, and `delete::apply_in` does a planned deletion through a session. What a save or the guard refuses is refused at the flush, which names the first operation it could not write (`Error::Unwritten`). An inverse is given with no save where it holds by construction and is proven at the flush, and is done as `apply` does it where it does not (XML typed by hand, an insertion that claims a child another entity has, a name a type file declares twice, the last record of a class taken out of a file). ⚠ A state the session has not written has no XML to hash, so its inverse states a token that only that session accepts; `Written` gives the digest of what a flush wrote, and an operation that states the digest of an XML is refused while its source holds operations the session has not written. `delete` plans taking entities out of the map files of a pack with their chain of far models (`plan` follows each LOD link, inside a file and, where `flags` bit 3 is set, into the map the file names as parent, and says as a `Deletion` what goes, which is the entities chosen, what stands under them and each parent left with no child; which parents stay with their count of children lowered; which chosen entities are left because another of their archetype stands at their pose and the chain of no other chosen entity takes them; what the sources do not hold of a chain; every file written with what changes in it; the list of operations that does it, `remove_entities`, `set_num_children` and `renumber_for_removed`, whose inverses put every file back and which a session takes like the others (`remove_entities` holds by construction unless a class leaves the file with what it takes, and `insert_entities` is done as `apply` does it); and each model a script line would hide instead. It reads the sources of the pack and no other map, so a map that is not among them keeps its links, a parent that counts children no source holds stays, it skips a source that can be no map file and refuses one that does not open and may be one, and it refuses to take an entity out of a file that carries container LODs or out of a map two files each hold entities of), `scene` is a map set as the boxes its entities place, with `or-world`'s placement rules, and `gizmo` is the manipulator's maths with no renderer: a ray through a pixel, the handles, a drag that moves, turns or scales, the snaps, the pick of a box and the ground under it. Two modules are what a search field and the clipboard take: `place` reads what a person pastes as a position with an optional heading (a call of numbers as Lua and C# write one, a table that names x, y and z with its braces or without, bare numbers, a call or brackets behind what a line of a script assigns them to, the line a metadata source states a position by, with a comma read as a decimal comma only between semicolons), as a hash in hexadecimal, unsigned or signed, or as text, refusing a number no map stores, and spells a hash each way with the name a lookup the caller passes knows; `script_text` writes a position and a list of named objects as Lua, JSON and C# from the templates of `crates/domain/or-world-gta5/src/script_forms.json`, which a file of the same shape extends with no code, with the heading in degrees that `edit`'s pose gives, refusing a number that is not finite and more decimals than a 32-bit number has, and the line that hides a model within a radius of a position from the `hide_model` template of a form, by the hash of its name (the call the built-in forms write has not been run in a game). Two modules are the doors of a set, over `or_world_gta5::doors`: `doors` reads the name patterns that say a model is a door from `crates/domain/or-maps/src/door_patterns.json`, a starting guess a person extends, surveys a set into one row a door, reading an archetype two type files declare from the first as the scene and the extents do (what found it, what its box reads as, the other leaf of its double door, which is never held against its arc, how far it opens each way and on what it stops), names each source of the set that is not there or does not cook, and holds the rows to the table `DOOR_RULES`, whose codes `rule_of` knows so that a waiver of the pack names them; `door_text` writes a selection of doors, a double door once and whole, through the templates of `crates/domain/or-maps/src/door_forms.json`, where a form named after another project's door script states that it is unverified and begins what it writes with a comment that says so, and a form that could not is refused. `sample` writes small synthetic map files, type files and manifests for tests, which hold no game content. It depends on `or-io`, `or-world`, `or-project` and `or-source` and on no renderer or UI, and `openrage-cli maps` lists, validates and verifies it, applies a list of operations to it, plans or applies a deletion, keeps a manifest of the game for it and lists its doors. +**or-maps.** The maps engine, headless: the map files a person streams into the game, as content of a project, whose design is [Workbench_Views_Design.md](../direction/Workbench_Views_Design.md#maps). It has the shape of `or-particles`. `model` is `maps.json`, the file of a maps content (each map set with a stable id, a name, the sources it is made of as folders of the module, and the names a person typed for the hashes a map keeps, with the waivers); `layout` says where a source lands in a resource (at `stream/`, the one place a FiveM resource has) and in a singleplayer DLC (the maps and their manifest inside the nested archive of the level's folder the pack registers as map data, and each type file inside an archive of the props folder named for it, with the models and textures its archetypes name, asked for by an `.ityp` name stating props, as `how_the_packs_of_an_install_carry_their_maps` measured the packs of two installs to keep theirs); `facts` looks at each source (what it cooks to, what the map file places and the type file declares through `or-world`'s views of the typed roots `CMapData` and `CMapTypes`, with an interior's rooms and portals read off the document by `or-world`'s read views, which a test holds to the typed records of `or-io`); `rules` is the table `RULES` (twenty-six, each a code, a severity and whether a waiver can set a finding aside) and `check` applies it, a map being the file its source cooks to, known by the hash of that file's name whatever name the map states (`facts::map_name`: 473 map files of each install state the name of another, and none of them holds an entity), which the deletion, the comparison, the manifest and the notes of an operation follow too (`a_link_into_a_parent_map_leads_into_the_file_called_so_and_never_into_one_that_states_its_name`, `a_map_is_stated_in_the_manifest_by_the_name_of_its_file_whatever_name_it_states`); `plan` hands a build one `Contribution` (the cooked `.ymap` and `.ytyp` files and the models and textures at `stream/`, the manifest of the maps, the line that declares a FiveM resource a map, the figures and an item for each map set), laid out for the kind of build that takes it (`Shape`: a singleplayer DLC and the pack an `.oiv` installs take one layout, and the cell of each is locked by the same sentence, `an_oiv_of_a_maps_content_installs_the_pack_a_singleplayer_dlc_is_and_is_locked_as_one`); `manifest` is the `_manifest.ymf` of the content's maps, written by `or_world_gta5::manifest_build` from the manifests of the game the content keeps in its `manifests` folder (`keep`), with a derived entry for a map none of them states and a note for each map nothing is written for; `verify` reads a built resource back against the model, the manifest of the maps included; `adopt` is the recogniser `MapPack` and its `start_module`; and `import` makes sources of game files (a `.ymap` or `.ytyp` as a metadata source, the rest through the general import), refusing with its reason a file no source form holds. `mapping` is a mapping that comes in as a folder or a zip (`or_project::place`): `analyse` finds its resources and loose stream folders and says, with nothing written, what an adoption makes of each file (`Becomes`: a source of which kind, a manifest of the game's maps, a file kept whole, a file an asset escrow locks, which is told by its first four bytes and handed to no reader, a file refused with the reason, an archive left out), whether a build carries each line of the manifest, and what `rules` says of the map files, type files and models as one set; two files that would be one source folder (a map file and a type file of one name) are told apart there, the second kept whole with the reason; `check` says what stops an adoption before it writes (the root named, the folder it is made in, the length of its paths there); and `adopt`, which asks `check` first, makes a project of one of them in a folder that is new or empty, the map files, type files, models and textures as sources of a maps content and every other file kept whole at its place, removing what it made when it cannot finish. Five modules are the placement: `edit` changes what an entity or an archetype says in its source (it cooks the source, opens the typed root, changes a member, saves the root and writes the canonical XML back through `or_source::metadata::replace`, which refuses an XML that does not compile back to itself; an entity or an archetype that is added is a copy, and `add_new_entity` and `add_new_archetype` add one that is no copy, with the members the file's own class states), `operation` names each of those changes as an `Operation`, data whose JSON states a format name and a schema, with `apply`, which does one to the sources of a pack and returns the operation that puts them back byte for byte, and `apply_all`, which does a list or none of it and writes nothing on a dry run (an inverse carries the record, the LOD links and the extents it replaces, and is the XML as it was when it is not proven to save the file as it was, on the file as edited and, unless it holds by construction, on the file the new XML cooks to as well; the first entity or archetype of a file that holds none is built with what the donor states and is no copy; an entity of an archetype no type file of the pack declares is held by the extents where it stands, which `Applied::notes` says, and `Done::notes` in a session; an entity taken out of or put into a map alone leaves the LOD links of the map files under it on other entities, which the same notes say for each such file unless the list holds its renumbering, and which the rule `lod-children-uncounted` or `parent-link-broken` then reports; an entity at or after one a container LOD of the file names is neither taken out nor put in; a source that leaves the folder of the pack is refused, and a rotation is stored at length one). An operation may state `expects`, the SHA-256 of the XML its source is to hold (`digest_of`), and is refused with `Error::Stale` when the source holds another: every inverse states the digest of what its operation wrote, so an inverse applied after another edit of its source is refused, and a step of the Map screen's Undo is the operation and its inverse with no copy of the XML. `Session` (`crates/domain/or-maps/src/operation/session.rs`) holds the sources of a pack open as their typed roots, so that an edit costs no XML: `Session::apply` changes a root and writes nothing, the boxes of the type files are read once and read again after a type file is edited, and `Session::flush` writes the XML of every source that changed through the same guard, all or none, which is byte for byte what `apply` writes operation by operation; a session dropped with operations unwritten flushes, and can only log a refusal. ⚠ A session that refused an operation since its last flush writes nothing when dropped and logs it, since what it did before the refusal may be part of a list that is sound only whole: `Session::apply_all` does a list or takes back what it did of it, `Session::discard` lets a session go unwritten, and `delete::apply_in` does a planned deletion through a session. What a save or the guard refuses is refused at the flush, which names the first operation it could not write (`Error::Unwritten`). An inverse is given with no save where it holds by construction and is proven at the flush, and is done as `apply` does it where it does not (XML typed by hand, an insertion that claims a child another entity has, a name a type file declares twice, the last record of a class taken out of a file). ⚠ A state the session has not written has no XML to hash, so its inverse states a token that only that session accepts; `Written` gives the digest of what a flush wrote, and an operation that states the digest of an XML is refused while its source holds operations the session has not written. `delete` plans taking entities out of the map files of a pack with their chain of far models (`plan` follows each LOD link, inside a file and, where `flags` bit 3 is set, into the map the file names as parent, and says as a `Deletion` what goes, which is the entities chosen, what stands under them and each parent left with no child; which parents stay with their count of children lowered; which chosen entities are left because another of their archetype stands at their pose and the chain of no other chosen entity takes them; what the sources do not hold of a chain; every file written with what changes in it; the list of operations that does it, `remove_entities`, `set_num_children` and `renumber_for_removed`, whose inverses put every file back and which a session takes like the others (`remove_entities` holds by construction unless a class leaves the file with what it takes, and `insert_entities` is done as `apply` does it); and each model a script line would hide instead. It reads the sources of the pack and no other map, so a map that is not among them keeps its links, a parent that counts children no source holds stays, it skips a source that can be no map file and refuses one that does not open and may be one, and it refuses to take an entity out of a file that carries container LODs or out of a map two files each hold entities of), `scene` is a map set as the boxes its entities place, with `or-world`'s placement rules, and `gizmo` is the manipulator's maths with no renderer: a ray through a pixel, the handles, a drag that moves, turns or scales, the snaps, the pick of a box and the ground under it. Two modules are what a search field and the clipboard take: `place` reads what a person pastes as a position with an optional heading (a call of numbers as Lua and C# write one, a table that names x, y and z with its braces or without, bare numbers, a call or brackets behind what a line of a script assigns them to, the line a metadata source states a position by, with a comma read as a decimal comma only between semicolons), as a hash in hexadecimal, unsigned or signed, or as text, refusing a number no map stores, and spells a hash each way with the name a lookup the caller passes knows; `script_text` writes a position and a list of named objects as Lua, JSON and C# from the templates of `crates/domain/or-world-gta5/src/authoring/script_forms.json`, which a file of the same shape extends with no code, with the heading in degrees that `edit`'s pose gives, refusing a number that is not finite and more decimals than a 32-bit number has, and the line that hides a model within a radius of a position from the `hide_model` template of a form, by the hash of its name (the call the built-in forms write has not been run in a game). Two modules are the doors of a set, over `or_world_gta5::doors`: `doors` reads the name patterns that say a model is a door from `crates/domain/or-maps/src/door_patterns.json`, a starting guess a person extends, surveys a set into one row a door, reading an archetype two type files declare from the first as the scene and the extents do (what found it, what its box reads as, the other leaf of its double door, which is never held against its arc, how far it opens each way and on what it stops), names each source of the set that is not there or does not cook, and holds the rows to the table `DOOR_RULES`, whose codes `rule_of` knows so that a waiver of the pack names them; `door_text` writes a selection of doors, a double door once and whole, through the templates of `crates/domain/or-maps/src/door_forms.json`, where a form named after another project's door script states that it is unverified and begins what it writes with a comment that says so, and a form that could not is refused. `sample` writes small synthetic map files, type files and manifests for tests, which hold no game content. It depends on `or-io`, `or-world`, `or-project` and `or-source` and on no renderer or UI, and `openrage-cli maps` lists, validates and verifies it, applies a list of operations to it, plans or applies a deletion, keeps a manifest of the game for it and lists its doors. ⚠ An operation is not yet a step of the project's History. The Map screen holds a session for each pack it edits (`src/state/workbench/maps_session.rs`), so an edit and an Undo of the screen cost an operation on a root, and saving the project is the flush, on the thread that asks for it; until then the screen lays what the session holds over what its scan read of the disk, on the frame's thread: an entity moved or put back is said again in place (`entity_fact_of`), and after anything else the file is saved from its root and read as a scan reads one. On a synthetic map of 20,000 entities a move of the screen took 33 ms and the first one, which opens the source and reads it whole, 3.9 s; a file read whole was 0.85 s to save and 0.46 s to read, a flush of six moves took 16 s and saving the project after one more move 11.9 s, in the test profile on an Apple M5 Ultra under a load average of 60 to 80 (`one_move_on_the_map_screen_is_timed_on_a_synthetic_map_of_twenty_thousand_entities`, 2026-11-26, an ignored timing run by name). ⚠ That machine was some ten times slower that night than when the figures at the end of this paragraph were taken: the library's own timing, run minutes before under a load average of 74, gave 29.6 s for one bare edit of the same map and 39 s for one flush. A session kept open that long reads the map sets again before each edit (`reread_model`), names the sources something else wrote under it (`changed_on_disk`), and reads one again or keeps what it holds over the file (`read_again`, `keep_over_the_disk`; `a_source_changed_on_disk_under_a_session_is_named_and_read_again_or_kept_over_the_disk`), and `delete::plan_in` plans a deletion over the map files as the session holds them, each the map of the file its source cooks to (`Session::held_map` gives that file's name with the root; `a_deletion_planned_in_a_session_is_of_the_files_as_the_session_holds_them`, `a_map_file_held_open_counts_the_container_lods_its_bytes_carry`). An inverse that holds by construction is proven on the file as edited in memory; one that does not is proven again on the file cooked from the XML written, which is the file it is applied to, and is the XML as it was when that fails. The two files differ: a file read again names no class it holds no record of and saves no record of one, so the last entity of a map file or the last archetype of a type file is put back by the XML, in a session as one by one (`the_last_record_of_a_class_taken_out_of_a_file_is_put_back_by_the_xml`, and for several taken out at once `a_map_file_emptied_of_its_entities_gets_them_back_from_the_inverse_of_what_emptied_it`), and a file emptied that way takes its next record built from nothing, which a PSO file lays out and an RBM file, as the samples are, refuses for the signature nothing derives. The first entity or archetype of a file that holds none is built and no copy, so it is saved at the operation in a session too and never held to be sure; each of the five operations of a deletion refuses before its first change, since a session keeps the root an operation was refused on; and what the session, the deletion and an operation over a pack that holds too little were each built without is held through the others in `crates/domain/or-maps/tests/a_session_takes_a_chain_deletion_and_a_pack_that_holds_too_little.rs`. A game map is unmeasured. On a synthetic map of 20,000 entities, whose source is 11.7 MB of XML, one pose edit took 2.4 s one by one, and through a session 0.83 ms a step with one flush of 2.2 s for the drag, in the release profile on an Apple M5 Ultra under a load average of 70 (3.0 s, 1.2 ms and 2.5 s in the dev profile under a load average of 79); the flush is the XML that `or_source::metadata` exports, compiles back and exports again, and the operation with its inverse is 3,108 bytes of JSON where two copies of the XML are 23.4 MB (`one_pose_edit_is_timed_on_synthetic_maps_of_two_thousand_and_twenty_thousand_entities`, 2026-11-25, an ignored timing run by name). @@ -1417,7 +1417,7 @@ the resource. does not know is carried and refused by a plan, so an older build opens a newer file (`an_older_build_carries_the_new_keys_and_a_newer_file_opens_in_this_one`). - ⚠ The editor's session (`workspace`, `open`, `active`) stays in - `src/state/project.rs`, which reads the container through this crate; a file + `src/state/project/mod.rs`, which reads the container through this crate; a file `Project::create` writes opens in the editor as an empty session. The editor writes `workspace` as the file stated it and leaves the documents outside the project's folder out of the shared file, in `src/state/project/machine.rs`. @@ -1680,7 +1680,7 @@ collision as a query: a `BoundCollider` is one bound's shapes under a tree built once, a `CollisionSet` holds colliders by key with the transform that places each, and the set answers a ray, a swept sphere, a box overlap and the ground under a point in world space. What reads one of `or-io`'s declared bounds into -those shapes is this crate's (`crates/domain/or-world-gta5/src/collision/bound.rs`): +those shapes is this crate's (`crates/domain/or-world-gta5/src/archetypes/collision/bound.rs`): `collision::bound_collider` builds on the core's `BoundCollider::of_shapes`, which refuses a shape that is not sound whoever hands it (`a_collider_of_shapes_refuses_a_shape_that_is_no_number_and_names_its_piece`); the ground asked at a height the query itself answered, with no rise, is the same ground, since what lies within a rounding of the top of the probe is looked for first @@ -2026,15 +2026,15 @@ Left for the rows that follow: the world thread around the driver and the reader - **The title.** `Gta5Title` is the title `gta5`, for the games `gta-v-legacy` and `gta-v-enhanced`. Its options are the pack of the DLC list the mount stops at, by name (`LEVEL`), and the map as story or as multiplayer (`MODE`); with neither, every pack and every change set. A world takes one layer, the install's own overlay folder, which the mount reads an archive at a time, and with none it reads the install alone. A game that is not its own, an option it does not take and any other layer are refused (`a_world_of_another_game_an_option_it_does_not_take_and_a_layer_it_cannot_mount_are_refused`). The keys of an opening are none for an install built by hand, a keys cache, or the user's executable. - **The opened world.** `Gta5World` owns its `MountedGame`; `Gta5World::over` takes a mount a caller made with keys of its own. It states a height of the ground, a collision query, placement rows, a weather gate and water, and two words an instance: the name of the archetype, then the level in the low byte with why the instance stands as a box above it (`BOXED_UNNAMED`, `BOXED_UNDECLARED`). Its policy is GTA V's: a parent waits for exactly the children it states, and a map streams in by its box grown by the distance it is asked for ahead (`streams_in`). - **The index, through the core's kept file.** `rows` reads one root archive as a mount of its own with `WorldIndex::build` and writes what `WorldIndex::seal` makes of it, with the folder that patches the archive; `link` unseals each section and joins them with `Kept::joined`, which `or-depends` gained for it, then states a row for each map in the index's order: its name, its box where its file read, its parent as a row, and its gate. A map a group lets in by the clock or the weather is a `Gate::When`; one that only a request lets in, or whose group names no weather, is held behind a switch of the map's own name. What the link made rides on the index as `Linked`. The joined rows are byte for byte the index `or-depends` builds of the mount (`the_rows_joined_from_the_kept_sections_are_the_index_or_depends_builds_of_the_mount`). ⚠ An archive keeps its stamp at every level of DLC, where `MountedWorld` drops it: a world at a level has a kept file of its own, so two levels share no index, and a second start reads no archive at either (`two_levels_of_one_install_share_no_index_and_no_kept_file`, `a_second_start_reads_no_archive_and_an_archive_that_changed_is_the_one_read_again`). ⚠ A file of an archive that does not open leaves its row unread until the archive changes, where `or-depends`' own kept file reads the archive again at every start. -- **Bodies.** `Body` is a map or an interior as `or_world_gta5::world_forest::read` reads one, which is public for it, with each parent's key turned from the map's name to its row. An interior is a body of its own, read from the body that places it. ⚠ An entity of an interior whose archetype no type file declares draws as far as the instance does under a view that scales no distance, where `WorldForest` takes the view that brought the interior in. Beside its entities a map's body states what `crates/domain/or-world-gta5/src/beside.rs` makes of the map (`Beside`): its box occluders, each as the rows that take the unit cube to it; its occlude models, each as points and triangles; and its far lights. ⚠ A box's turn is stored the other way round from the names of its two numbers. ⚠ A far light is stated in two halves, its kind, direction, reach and hours in the map and where it stands and its colour in the map that map names as its parent, so a map of far lights has its parent read with it, the parent states none by itself, and a light whose other half is absent or whose type the contract has no kind for is counted in `lights_unread`. A far light has no distance to fade by; the scale of a cone's bytes and of a capsule's, and colour and intensity as a byte over the most it holds, are not measured against the game. A map's grass lists are read by `crates/domain/or-world-gta5/src/grass.rs` (`GrassList::read`) from the members the file's own type table names, with no typed record of `or-io`: the list's box, its archetype, its distance and its scale range, and of each instance three 16-bit shares of the box, three bytes of colour and a byte of scale. `Body` adds a node for each list after its entities, a box of `Kind::Grass` that draws within the list's distance of the box's middle grown by half its diagonal, and `lay` lays every instance of a list the selection draws, upright and unturned, at the size between the two numbers of the scale range by its scale byte and tinted by its colour, a byte over the most it holds, its sphere about where it stands and as wide as the far corner of its archetype's box, since a tuft stands on its origin (`a_grass_list_reads_each_instance_as_its_file_packs_it_and_stands_it_inside_its_box`, `a_grass_list_is_a_box_drawn_within_its_distance_and_lays_each_instance_it_states`). A list whose box is the wrong way round or is no place is not read. ⚠ What the game makes of the scale byte, of the two bytes of an instance's ground normal and of its `Ao` byte is not measured, and the last two are read by nothing. ⚠ `WorldForest` lays out no grass list, so the comparison of the adapter with it (`crates/domain/or-world-gta5/tests/compare/mod.rs`) leaves the instances of a list, and a model lists alone draw with, out of what the two are held to. A list that does not read, or whose archetype no model draws, is counted with the prop lists in `Beside::lists`; no member of a prop list is read (`a_grass_list_whose_instance_states_a_member_no_number_fits_is_not_read`, `a_map_holds_the_grass_lists_that_read_and_counts_the_rest_with_its_prop_lists`). Measured on 2026-11-29 by `every_grass_list_of_an_install_reads_by_the_members_the_adapter_names` (slow tier, `crates/domain/or-world-gta5/tests/what_a_map_holds_besides_entities.rs`): on Legacy 88,267 of 88,267 grass lists of 19,392 map files read, holding 38,427,099 instances, and on Enhanced 88,331 of 88,331 of 19,956 map files, holding 38,467,941; on both a list holds 1,023 instances at the most, states a distance from 30 to 100 m, and its scale range lies within 0.2 to 1.65. No light of an archetype is stated either: the index keeps no extension of an archetype, and the lights a drawable carries have no place in the core's model. An interior's body states nothing beside its entities. +- **Bodies.** `Body` is a map or an interior as `or_world_gta5::world_forest::read` reads one, which is public for it, with each parent's key turned from the map's name to its row. An interior is a body of its own, read from the body that places it. ⚠ An entity of an interior whose archetype no type file declares draws as far as the instance does under a view that scales no distance, where `WorldForest` takes the view that brought the interior in. Beside its entities a map's body states what `crates/domain/or-world-gta5/src/map/beside.rs` makes of the map (`Beside`): its box occluders, each as the rows that take the unit cube to it; its occlude models, each as points and triangles; and its far lights. ⚠ A box's turn is stored the other way round from the names of its two numbers. ⚠ A far light is stated in two halves, its kind, direction, reach and hours in the map and where it stands and its colour in the map that map names as its parent, so a map of far lights has its parent read with it, the parent states none by itself, and a light whose other half is absent or whose type the contract has no kind for is counted in `lights_unread`. A far light has no distance to fade by; the scale of a cone's bytes and of a capsule's, and colour and intensity as a byte over the most it holds, are not measured against the game. A map's grass lists are read by `crates/domain/or-world-gta5/src/map/grass.rs` (`GrassList::read`) from the members the file's own type table names, with no typed record of `or-io`: the list's box, its archetype, its distance and its scale range, and of each instance three 16-bit shares of the box, three bytes of colour and a byte of scale. `Body` adds a node for each list after its entities, a box of `Kind::Grass` that draws within the list's distance of the box's middle grown by half its diagonal, and `lay` lays every instance of a list the selection draws, upright and unturned, at the size between the two numbers of the scale range by its scale byte and tinted by its colour, a byte over the most it holds, its sphere about where it stands and as wide as the far corner of its archetype's box, since a tuft stands on its origin (`a_grass_list_reads_each_instance_as_its_file_packs_it_and_stands_it_inside_its_box`, `a_grass_list_is_a_box_drawn_within_its_distance_and_lays_each_instance_it_states`). A list whose box is the wrong way round or is no place is not read. ⚠ What the game makes of the scale byte, of the two bytes of an instance's ground normal and of its `Ao` byte is not measured, and the last two are read by nothing. ⚠ `WorldForest` lays out no grass list, so the comparison of the adapter with it (`crates/domain/or-world-gta5/tests/compare/mod.rs`) leaves the instances of a list, and a model lists alone draw with, out of what the two are held to. A list that does not read, or whose archetype no model draws, is counted with the prop lists in `Beside::lists`; no member of a prop list is read (`a_grass_list_whose_instance_states_a_member_no_number_fits_is_not_read`, `a_map_holds_the_grass_lists_that_read_and_counts_the_rest_with_its_prop_lists`). Measured on 2026-11-29 by `every_grass_list_of_an_install_reads_by_the_members_the_adapter_names` (slow tier, `crates/domain/or-world-gta5/tests/what_a_map_holds_besides_entities.rs`): on Legacy 88,267 of 88,267 grass lists of 19,392 map files read, holding 38,427,099 instances, and on Enhanced 88,331 of 88,331 of 19,956 map files, holding 38,467,941; on both a list holds 1,023 instances at the most, states a distance from 30 to 100 m, and its scale range lies within 0.2 to 1.65. No light of an archetype is stated either: the index keeps no extension of an archetype, and the lights a drawable carries have no place in the core's model. An interior's body states nothing beside its entities. - **Models.** A model is asked for by the name of its archetype, and `BOX`, a name above every archetype's, is the cube an instance stands as where nothing says what draws it; such an instance is laid with the sphere about that cube as its entity places it, since its node has no archetype to state a radius. The link lists every file that holds models by how it holds them (`Holding`: a drawable of its own file, an entry of a drawable dictionary, the drawable of a fragment) and the hash of its stem, the last copy in the mount's order. An archetype's model is looked for in the drawable dictionary it states where the mount holds that file, then in a fragment of the asset's name, then in a drawable (`held_at`), and its file is read by the layout its own RSC7 version names, through `or-io`'s owned values of either target, each file once a batch. A mesh is a geometry: the game's vertex bytes as the file has them where it interleaves them, with an element for each channel the core has a format for, and gathered a vertex at a time where an Enhanced file keeps a channel in a run of its own. Its `Surface` is the fallback's: the colour is the texture the shader's colour parameter binds, else the first it binds; the normal is the texture its bump parameter binds; the alpha is by the shader's draw bucket. ⚠ A texture bound by name is asked for in the model's own dictionary where that dictionary holds one of the name, and in the archetype's otherwise: the files of the Enhanced installs bind by name what they carry. ⚠ An Enhanced file hashes a parameter under the spelling the shader's program has for it and a Legacy file under the sampler's, so the two targets ask by different names. The model's `title` is `Materials`: each shader's name, preset, draw bucket and every texture it binds, and which shader draws each mesh. `Gta5World::read_models` answers each ask with an `Outcome`: how the file holds it, its target, and the model or a `NoModel` that names why not. ⚠ The contract's `ModelReader` hands back models alone, so through it a model that does not read is logged and dropped. -- **Textures.** `crates/domain/or-world-gta5/src/textures.rs`. An ask's scope is the name of a texture dictionary, or, with the bit `EMBEDDED`, the archetype whose model carries the texture in a dictionary of its own. A named dictionary that lacks the texture falls through to its parent and on, as the install's relationship files state: an archive's section of the kept file holds those files as bytes, and the link reads them, in XML or binary, into `Linked::texture_parent`, so a second start opens none. A dictionary is read once a batch, by its own version's layout, whatever the asks that reach it. A texture's levels are the file's bytes, undecoded, from the first level no larger than the pixels asked. `Gta5World::read_textures` answers each ask with the texture or a `NoTexture`: a format the core's texture has no word for, a cube or a volume, a tiled Enhanced texture, a chain that holds none, or a scope that names no dictionary. -- **A node's name.** `crates/domain/or-world-gta5/src/named.rs`. An entity of a map is named by the logical path of its map file, its place among the file's entities and its guid, as ` entity guid `: the words `openrage-cli world find` prints a placement by, and what `maps edit-game` takes as `--map` and `--entity`. An entity of an interior is named by its instance's address, then `interior entity` and its place among the interior's own, which no verb takes yet. Its archetype's name is the stem of its model's file where that file is the archetype's own and is called by it; an entry of a drawable dictionary has a hash alone (`a_node_is_named_by_the_path_of_its_map_file_its_place_and_its_guid_there`). `world_forest::read::Placed` carries the entity's guid for it. ⚠ An address is read back by its path and its places alone: no map file is opened to hold the guid against. A node of a map of a project's own (`Body::own`) is named `project entity guid `, the source being its path in the project's maps content; `entity_of_address` reads it back with `Addressed::project` set, `node_at` refuses it, having no row to give, and `WorldInstall::node_in` finds its node in a body it is handed. `model_search` is the names a search of the models reads from a linked index, and `find::models_typed` the models a text typed so far lists, each with its name. +- **Textures.** `crates/domain/or-world-gta5/src/archetypes/textures.rs`. An ask's scope is the name of a texture dictionary, or, with the bit `EMBEDDED`, the archetype whose model carries the texture in a dictionary of its own. A named dictionary that lacks the texture falls through to its parent and on, as the install's relationship files state: an archive's section of the kept file holds those files as bytes, and the link reads them, in XML or binary, into `Linked::texture_parent`, so a second start opens none. A dictionary is read once a batch, by its own version's layout, whatever the asks that reach it. A texture's levels are the file's bytes, undecoded, from the first level no larger than the pixels asked. `Gta5World::read_textures` answers each ask with the texture or a `NoTexture`: a format the core's texture has no word for, a cube or a volume, a tiled Enhanced texture, a chain that holds none, or a scope that names no dictionary. +- **A node's name.** `crates/domain/or-world-gta5/src/map/named.rs`. An entity of a map is named by the logical path of its map file, its place among the file's entities and its guid, as ` entity guid `: the words `openrage-cli world find` prints a placement by, and what `maps edit-game` takes as `--map` and `--entity`. An entity of an interior is named by its instance's address, then `interior entity` and its place among the interior's own, which no verb takes yet. Its archetype's name is the stem of its model's file where that file is the archetype's own and is called by it; an entry of a drawable dictionary has a hash alone (`a_node_is_named_by_the_path_of_its_map_file_its_place_and_its_guid_there`). `world_forest::read::Placed` carries the entity's guid for it. ⚠ An address is read back by its path and its places alone: no map file is opened to hold the guid against. A node of a map of a project's own (`Body::own`) is named `project entity guid `, the source being its path in the project's maps content; `entity_of_address` reads it back with `Addressed::project` set, `node_at` refuses it, having no row to give, and `WorldInstall::node_in` finds its node in a body it is handed. `model_search` is the names a search of the models reads from a linked index, and `find::models_typed` the models a text typed so far lists, each with its name. - **The look, the ground and the collision.** One switch for each map only a request lets in, all labelled alike, since a switch has no name of its own. Its day is its programs', so `WorldLook::frame` hands nothing by name. Its weathers are the names a group may state (`WEATHER_NAMES`), the clear day first, which is the one a session opens under, then any weather a gate of the index names that none of those names hashes to, listed by its number so that the map it gates can be seen (`a_weather_a_group_names_that_no_name_is_known_for_is_listed_by_its_number`). Its water is the level's water file through `or_io`'s `CWaterData`, each quad the game draws as a `WaterQuad`, the hidden and the left-out ones dropped and a cut one as the half that keeps its corner, which is where the file's own `covers` says it lies for every type (`a_cut_quad_of_any_type_is_water_where_the_file_says_it_covers_and_nowhere_else`); an install with no such file has no water, and a file that is no water file is refused (`the_water_file_of_an_install_reaches_the_world_as_sheets_at_their_heights`). ⚠ A pack's own water file is not read. Each ask about the ground, a ray or a box makes a `WorldCollision` and reads the bounds of its column afresh. -It is held by the kit over an install built by hand (`crates/domain/or-worlds/tests/gta5_passes_the_kit.rs`, in the registry's crate, which alone names the title and its edit store; the install in `crates/domain/or-world-gta5/src/test_fixtures/hand_built/mod.rs` over the fixtures of the world index's own suites), where the rule of a list holds nothing of it; by the comparison of `crates/domain/or-world-gta5/tests/compare/mod.rs`, which asks the core's driver over the adapter and `WorldForest` about one view, each from nothing, and names the first difference in the maps wanted, the interiors, each instance's archetype, level, fade, place and box, and the models waited for (`the_scene_of_the_kit_is_selected_as_the_forest_selects_it`, `boxes_orphans_an_interiors_own_ladder_and_a_lost_parent_are_selected_as_the_forest_selects_them`); and by the kept file's tests above. Each part of the adapter was broken once to see its check fail. What neither asks is held in `crates/domain/or-world-gta5/tests/what_no_rule_of_the_kit_asks_of_gta5.rs`, each test seen failing with its part broken: a group's weathers as the gate of its map (`a_map_its_group_gates_by_the_weather_comes_in_under_the_weathers_the_group_names`), a drawable's levels, distances, elements, vertex bytes and triangles (`a_drawable_of_its_own_file_reads_as_the_levels_the_vertices_and_the_triangles_it_states`), the box and what gives no model, the last copy of a drawable, a box overlap by the bound's name and a ray's reach, a placement row's archetype and place, the link of an interior's entity under its instance or its own parent (`an_entity_of_an_interior_stands_under_the_instance_or_under_its_own_parent_there`), an instance's sphere, the capabilities, a map that names itself, a pack the title update patches (`a_pack_the_title_update_patches_links_from_its_sections_as_or_depends_indexes_it`), the sun's side and the keys of an opening; what an option and a layer make of the mount is held beside `mount_of` in `crates/domain/or-world-gta5/src/title.rs`. Over the installs, in the slow tier (`crates/domain/or-world-gta5/tests/gta5_over_a_real_install.rs`, 2026-11-27, Legacy then Enhanced, with the keys of each executable): the rows joined from the kept sections are byte for byte the index `or-depends` builds, of 11076 and 11052 maps; at eight fixed cameras, each at noon and at midnight, with every model ready and with one in three loading, the driver over the adapter and `WorldForest` want the same maps for the same reason, bring in the same interiors and select the same instances, 16 of 16 views on each install, from 2661 to 8284 instances a view (`the_adapter_selects_as_the_forest_does_at_fixed_cameras_of_a_real_install`); a world at the pack in the middle of the DLC list keeps a file of its own and holds 10032 and 9996 maps, and a second start of either world reads no archive (`a_level_of_a_real_install_keeps_an_index_of_its_own_and_a_second_start_reads_no_archive`); and 12 of the kit's rules hold over a scene read off the index, the world opened with the keys of the executable (`the_rules_of_the_kit_that_take_no_built_scene_hold_over_a_real_install`, 2026-11-28): the policy, the frame, the slots, what streams, what draws, the columns, a child's parent, a held map, a map by the clock, and three more below. ⚠ The rule of the capabilities is no longer one of them: since GTA V states an edit store it wants that store beside the world, which this crate cannot name, so that suite asks the world itself for the ground, the highest of a fixed camera's column as `or-depends` finds it over a mount of its own, for a ray down to it, and for the placement rows, counted against the map as its reader reads it (passed on Legacy on 2026-11-28 after that change, not seen failing since it, and not run on Enhanced). The three more: the kept index, built afresh in a folder of its own; an interior, at a fixed camera whose selection holds instances inside one, counted as `WorldForest` selects them; and the lights and occluders, counted against the maps in the forest as `or_world_gta5::MapData` reads them, 80791 far lights and 1374 occluders at the first camera on Legacy and 79527 and 1374 on Enhanced. ⚠ The rule of the models is asked there and its answer printed, and it holds on neither install: it wants every texture of every model, and some do not read, as below. The others are not asked there: a parent that draws alone until its children load states a scene no real map is arranged as, a list has nothing laid out, and the capabilities and the four rules of an edit store want the store, which the registry's crate names. +It is held by the kit over an install built by hand (`crates/domain/or-worlds/tests/gta5_passes_the_kit.rs`, in the registry's crate, which alone names the title and its edit store; the install in `crates/domain/or-world-gta5/src/test_fixtures/hand_built/mod.rs` over the fixtures of the world index's own suites), where the rule of a list holds nothing of it; by the comparison of `crates/domain/or-world-gta5/tests/compare/mod.rs`, which asks the core's driver over the adapter and `WorldForest` about one view, each from nothing, and names the first difference in the maps wanted, the interiors, each instance's archetype, level, fade, place and box, and the models waited for (`the_scene_of_the_kit_is_selected_as_the_forest_selects_it`, `boxes_orphans_an_interiors_own_ladder_and_a_lost_parent_are_selected_as_the_forest_selects_them`); and by the kept file's tests above. Each part of the adapter was broken once to see its check fail. What neither asks is held in `crates/domain/or-world-gta5/tests/what_no_rule_of_the_kit_asks_of_gta5.rs`, each test seen failing with its part broken: a group's weathers as the gate of its map (`a_map_its_group_gates_by_the_weather_comes_in_under_the_weathers_the_group_names`), a drawable's levels, distances, elements, vertex bytes and triangles (`a_drawable_of_its_own_file_reads_as_the_levels_the_vertices_and_the_triangles_it_states`), the box and what gives no model, the last copy of a drawable, a box overlap by the bound's name and a ray's reach, a placement row's archetype and place, the link of an interior's entity under its instance or its own parent (`an_entity_of_an_interior_stands_under_the_instance_or_under_its_own_parent_there`), an instance's sphere, the capabilities, a map that names itself, a pack the title update patches (`a_pack_the_title_update_patches_links_from_its_sections_as_or_depends_indexes_it`), the sun's side and the keys of an opening; what an option and a layer make of the mount is held beside `mount_of` in `crates/domain/or-world-gta5/src/streaming/title.rs`. Over the installs, in the slow tier (`crates/domain/or-world-gta5/tests/gta5_over_a_real_install.rs`, 2026-11-27, Legacy then Enhanced, with the keys of each executable): the rows joined from the kept sections are byte for byte the index `or-depends` builds, of 11076 and 11052 maps; at eight fixed cameras, each at noon and at midnight, with every model ready and with one in three loading, the driver over the adapter and `WorldForest` want the same maps for the same reason, bring in the same interiors and select the same instances, 16 of 16 views on each install, from 2661 to 8284 instances a view (`the_adapter_selects_as_the_forest_does_at_fixed_cameras_of_a_real_install`); a world at the pack in the middle of the DLC list keeps a file of its own and holds 10032 and 9996 maps, and a second start of either world reads no archive (`a_level_of_a_real_install_keeps_an_index_of_its_own_and_a_second_start_reads_no_archive`); and 12 of the kit's rules hold over a scene read off the index, the world opened with the keys of the executable (`the_rules_of_the_kit_that_take_no_built_scene_hold_over_a_real_install`, 2026-11-28): the policy, the frame, the slots, what streams, what draws, the columns, a child's parent, a held map, a map by the clock, and three more below. ⚠ The rule of the capabilities is no longer one of them: since GTA V states an edit store it wants that store beside the world, which this crate cannot name, so that suite asks the world itself for the ground, the highest of a fixed camera's column as `or-depends` finds it over a mount of its own, for a ray down to it, and for the placement rows, counted against the map as its reader reads it (passed on Legacy on 2026-11-28 after that change, not seen failing since it, and not run on Enhanced). The three more: the kept index, built afresh in a folder of its own; an interior, at a fixed camera whose selection holds instances inside one, counted as `WorldForest` selects them; and the lights and occluders, counted against the maps in the forest as `or_world_gta5::MapData` reads them, 80791 far lights and 1374 occluders at the first camera on Legacy and 79527 and 1374 on Enhanced. ⚠ The rule of the models is asked there and its answer printed, and it holds on neither install: it wants every texture of every model, and some do not read, as below. The others are not asked there: a parent that draws alone until its children load states a scene no real map is arranged as, a list has nothing laid out, and the capabilities and the four rules of an edit store want the store, which the registry's crate names. -What a selection draws with is measured by `the_models_and_textures_a_selection_draws_with_read_at_fixed_cameras` of the same suite (2026-11-28), over the selections of the eight cameras at noon, each camera's asks read as one batch and summed, so a model two cameras see is counted twice. Every model reads: 11558 of 11558 on Legacy, all by the Legacy layout, 2799 from a drawable of its own file, 8191 from a drawable dictionary and 568 from a fragment; 11559 of 11559 on Enhanced, all by the Enhanced layout, 2799, 8192 and 568. Their surfaces ask for 18590 textures on Legacy, of which 18247 are answered, and 18592 on Enhanced, of which 18249 are. The 343 not answered are the same on both: 220 in a format the core's texture has no word for, DXT3, and 15 in another, A8; 22 bound by name on an archetype that states no texture dictionary; 56 that no dictionary of their chain holds; and 30 whose archetype names a dictionary the mount holds no file of. ⚠ Before a texture bound by name was looked for in the model's own dictionary, Enhanced answered 11499 of 17711: an Enhanced file binds by name what a Legacy file binds by its place in the dictionary the model carries (`a_texture_bound_by_name_that_the_models_own_dictionary_holds_is_asked_for_there`). The first camera's read, on one thread with the files in the system's cache: on Legacy 1880 models from 747 files of 122 MB in 2.4 s and 2938 textures from 478 files of 252 MB in 4.2 s, 431 MB held as vertex, index and level bytes; on Enhanced the same asks but one from 747 files of 108 MB in 3.5 s and 478 of 206 MB in 5.6 s, 450 MB held. The bodies of those selections state 277641 far lights on Legacy and 276874 on Enhanced with none left unread, 2668 box occluders and 645 occlude models on each with none unread, and 7560 and 7562 instance lists that are counted and not laid out. The hand-built checks are in `crates/domain/or-world-gta5/tests/gta5_reads_what_a_frame_draws_with.rs`: a drawable of each holding and each target, written by `or-io`'s own writers and its retargeting, reads to the vertex bytes, the layout, the levels and the surface built; a model that cannot be read states its reason and the contract's reader hands back the rest; a texture is found through its chain with each dictionary opened once, and one whose chain lacks a file or holds one that does not read says which; and a body states the far lights and occluders of a hand-built map. Sixteen breaks of the adapter, one at a time, each turned one of them or the kit's rule of the lights red. A second pass of 23 breaks (2026-11-28) left eleven green, and the same file now holds what they guard: a channel an Enhanced file keeps in a run of its own (`a_channel_an_enhanced_file_keeps_in_a_run_of_its_own_is_gathered_a_vertex_at_a_time`); the dictionary before the fragment before the loose drawable, and the blend by draw bucket; a model with no level, no drawable or no triangle list; each format the core's texture has a word for, with DXT3, a cube, a volume, a tiled texture, a store that holds no whole level and a chain that comes round on itself (`a_texture_reads_in_the_format_its_file_states_and_one_that_cannot_says_why`); an occlude model whose triangle names a point it lacks; and the count of a map's lists. A geometry `or-io`'s writer refuses, with an index past its vertices or part of a vertex, is built in memory beside `mesh_of` in `crates/domain/or-world-gta5/src/models.rs`. ⚠ The install measure asserted only that something read. It now fails below 99 in 100 models or 19 in 20 textures, on a far light or an occlude model left unread, and on a mesh one of whose positions is no number within 10 km of its model's origin; it was seen failing on Enhanced with a texture bound by name never the model's own, and on Legacy with an element's offset one byte off. ⚠ No file states its colours as sRGB, 0 of the 18247 textures answered on Legacy and 0 of the 18249 on Enhanced (the same test, 2026-11-28), so a frame takes a colour texture's space from what its surface asks it as and never from the texture's own flag. ⚠ At these cameras no Enhanced file keeps a channel in a run of its own: with the gathering made to write wrong bytes the measure there does not change, so the file built by hand is all that holds it. +What a selection draws with is measured by `the_models_and_textures_a_selection_draws_with_read_at_fixed_cameras` of the same suite (2026-11-28), over the selections of the eight cameras at noon, each camera's asks read as one batch and summed, so a model two cameras see is counted twice. Every model reads: 11558 of 11558 on Legacy, all by the Legacy layout, 2799 from a drawable of its own file, 8191 from a drawable dictionary and 568 from a fragment; 11559 of 11559 on Enhanced, all by the Enhanced layout, 2799, 8192 and 568. Their surfaces ask for 18590 textures on Legacy, of which 18247 are answered, and 18592 on Enhanced, of which 18249 are. The 343 not answered are the same on both: 220 in a format the core's texture has no word for, DXT3, and 15 in another, A8; 22 bound by name on an archetype that states no texture dictionary; 56 that no dictionary of their chain holds; and 30 whose archetype names a dictionary the mount holds no file of. ⚠ Before a texture bound by name was looked for in the model's own dictionary, Enhanced answered 11499 of 17711: an Enhanced file binds by name what a Legacy file binds by its place in the dictionary the model carries (`a_texture_bound_by_name_that_the_models_own_dictionary_holds_is_asked_for_there`). The first camera's read, on one thread with the files in the system's cache: on Legacy 1880 models from 747 files of 122 MB in 2.4 s and 2938 textures from 478 files of 252 MB in 4.2 s, 431 MB held as vertex, index and level bytes; on Enhanced the same asks but one from 747 files of 108 MB in 3.5 s and 478 of 206 MB in 5.6 s, 450 MB held. The bodies of those selections state 277641 far lights on Legacy and 276874 on Enhanced with none left unread, 2668 box occluders and 645 occlude models on each with none unread, and 7560 and 7562 instance lists that are counted and not laid out. The hand-built checks are in `crates/domain/or-world-gta5/tests/gta5_reads_what_a_frame_draws_with.rs`: a drawable of each holding and each target, written by `or-io`'s own writers and its retargeting, reads to the vertex bytes, the layout, the levels and the surface built; a model that cannot be read states its reason and the contract's reader hands back the rest; a texture is found through its chain with each dictionary opened once, and one whose chain lacks a file or holds one that does not read says which; and a body states the far lights and occluders of a hand-built map. Sixteen breaks of the adapter, one at a time, each turned one of them or the kit's rule of the lights red. A second pass of 23 breaks (2026-11-28) left eleven green, and the same file now holds what they guard: a channel an Enhanced file keeps in a run of its own (`a_channel_an_enhanced_file_keeps_in_a_run_of_its_own_is_gathered_a_vertex_at_a_time`); the dictionary before the fragment before the loose drawable, and the blend by draw bucket; a model with no level, no drawable or no triangle list; each format the core's texture has a word for, with DXT3, a cube, a volume, a tiled texture, a store that holds no whole level and a chain that comes round on itself (`a_texture_reads_in_the_format_its_file_states_and_one_that_cannot_says_why`); an occlude model whose triangle names a point it lacks; and the count of a map's lists. A geometry `or-io`'s writer refuses, with an index past its vertices or part of a vertex, is built in memory beside `mesh_of` in `crates/domain/or-world-gta5/src/archetypes/models.rs`. ⚠ The install measure asserted only that something read. It now fails below 99 in 100 models or 19 in 20 textures, on a far light or an occlude model left unread, and on a mesh one of whose positions is no number within 10 km of its model's origin; it was seen failing on Enhanced with a texture bound by name never the model's own, and on Legacy with an element's offset one byte off. ⚠ No file states its colours as sRGB, 0 of the 18247 textures answered on Legacy and 0 of the 18249 on Enhanced (the same test, 2026-11-28), so a frame takes a colour texture's space from what its surface asks it as and never from the texture's own flag. ⚠ At these cameras no Enhanced file keeps a channel in a run of its own: with the gathering made to write wrong bytes the measure there does not change, so the file built by hand is all that holds it. ⚠ The first run of the comparison differed at 6 of the 16 views of each install, and the difference was the driver's: a parent map that three wanted maps name was wanted as the parent of the last of them in the index's order, where the forest says the first. `Driver` now follows the parents of one wanted map before the next map's, which the core holds over rows of its own (`a_parent_several_wanted_maps_name_is_wanted_as_the_parent_of_the_first_in_the_indexs_order`) and an install built by hand with three maps under one parent holds over the adapter. @@ -2068,7 +2068,7 @@ manifests' groups say nothing of it: neither copy is held back. among the mount's diagnostics and the pack's own groups stand (`the_groups_of_a_pack_are_those_of_the_title_updates_copy_of_its_setup_and_a_copy_that_does_not_parse_is_named`). - *A change set that invalidates an archive invalidates every copy of it that is on.* - `world_index::Switching` (`crates/domain/or-world-gta5/src/world_index/switching.rs`) runs + `world_index::Switching` (`crates/domain/or-world-gta5/src/streaming/world_index/switching.rs`) runs the change sets that run when a pack starts, pack after pack, then those of the map groups. A copy is an archive at the same path after its device and the platform folder. The pack that then enables its own copy is the one that is on, so the last pack to take a part over @@ -2094,7 +2094,7 @@ unless it hands the question on. Every row an archive holds is still read and ke file serves every mode and the link applies the rule. **The mode.** A world that states no mode is mounted as the story (`mount_of` in -`crates/domain/or-world-gta5/src/title.rs`), where it had every change set of every pack: with +`crates/domain/or-world-gta5/src/streaming/title.rs`), where it had every change set of every pack: with every one, the map is multiplayer's, which no game starts on. `openrage-cli`'s world verbs keep no mode as every change set, and say under `--mode` what the mode leaves out. @@ -2174,7 +2174,7 @@ What [R71d](../direction/Roadmap.md#r71d-the-gta-v-world-behind-the-contract-and with no donor and no snapshot, over the typed roots: the file is a PSO, RBM is refused for the signature word no tool derives, and a guid, the content flags and the extents are derived as they are for a file that arrived - (`crates/domain/or-world-gta5/src/create.rs`). A free guid is one more than the largest an + (`crates/domain/or-world-gta5/src/authoring/create.rs`). A free guid is one more than the largest an entity of the map states (`free_guid`), so the guid of a deleted last entity is handed out again, which the comparison of a map with its base reads as that entity kept ([R70y](../direction/Roadmap.md#r70y-what-a-project-changed-and-putting-it-back)); @@ -2200,9 +2200,9 @@ What [R71d](../direction/Roadmap.md#r71d-the-gta-v-world-behind-the-contract-and (`an_xml_that_adds_the_first_entity_compiles_over_a_pso_base_and_never_over_an_rbm_one`). - `parentIndex` does not index its own map when bit 3 of `CEntityDef::flags` is set, and `write::refuse_if_broken` honours the bit. A map name names a set of - files, which `MapGroup` merges (`crates/domain/or-world-gta5/src/group.rs`). + files, which `MapGroup` merges (`crates/domain/or-world-gta5/src/map/group.rs`). - `manifest_build` writes a `_manifest.ymf` for the maps a pack ships - (`crates/domain/or-world-gta5/src/manifest_build.rs`). It makes none from + (`crates/domain/or-world-gta5/src/authoring/manifest_build.rs`). It makes none from nothing: the document is typed by the type tables of manifests the game ships, and each entry is a copy of the one they state for a map of that name. A map taken from the game keeps its entry whole. The flags of an @@ -2265,7 +2265,7 @@ What [R71d](../direction/Roadmap.md#r71d-the-gta-v-world-behind-the-contract-and (`a_prefab_round_trips_every_map`). - A door is read from its archetype's box and never from the game's door tuning, so a hinge, a motion and an arc are proposals - (`crates/domain/or-world-gta5/src/doors/leaf.rs` states the rule). What the closed + (`crates/domain/or-world-gta5/src/map/doors/leaf.rs` states the rule). What the closed leaf already touches never blocks it, because a leaf stands in a frame, on a floor and inside the box of its building (`what_the_closed_leaf_stands_in_does_not_block_it`), and the box that is swept @@ -2391,9 +2391,9 @@ came in: - **[R70](../direction/Roadmap.md#r70-the-gta-v-world-editor).** A screen part and an open part of [R69](../direction/Roadmap.md#r69-one-window-of-tabs-and-a-rail) that edit the same shell file never run together. - **[R70b](../direction/Roadmap.md#r70b-the-gta-v-world-index).** An interior's bound states its box about the interior, so the index answers one at no position (`an_interiors_bound_whose_box_is_about_the_interior_is_answered_at_no_position_and_named_by_its_map`, measured by `what_the_files_of_a_real_install_state_where_the_index_takes_one_reading`). -- **[R70c](../direction/Roadmap.md#r70c-the-gta-v-world-streamed-and-drawn).** `crates/domain/or-world-gta5/src/world_forest.rs` streams an install's maps and selects their entities by the shared rules, behind `openrage-cli world select`. +- **[R70c](../direction/Roadmap.md#r70c-the-gta-v-world-streamed-and-drawn).** `crates/domain/or-world-gta5/src/streaming/world_forest/mod.rs` streams an install's maps and selects their entities by the shared rules, behind `openrage-cli world select`. - **[R70d](../direction/Roadmap.md#r70d-the-day-sky-water-and-shadows-of-the-world).** `openrage-cli convert` and the formats census take the file by its name. -- **[R70e](../direction/Roadmap.md#r70e-find-anything-and-go-there).** `crates/domain/or-world/src/place.rs` reads what is pasted, `crates/domain/or-world-gta5/src/script_text.rs` writes a position for a script, and `crates/domain/or-world-gta5/src/find.rs` answers what a person typed from an install's indexes, which `openrage-cli world find` prints. +- **[R70e](../direction/Roadmap.md#r70e-find-anything-and-go-there).** `crates/domain/or-world/src/place.rs` reads what is pasted, `crates/domain/or-world-gta5/src/authoring/script_text.rs` writes a position for a script, and `crates/domain/or-world-gta5/src/streaming/find/mod.rs` answers what a person typed from an install's indexes, which `openrage-cli world find` prints. - **[R70g](../direction/Roadmap.md#r70g-collision-as-a-query).** The ground asked at a height the query itself answered, with no rise, is the same ground (`the_ground_asked_at_the_height_it_answered_with_no_rise_is_the_same_ground`). - **[R70h](../direction/Roadmap.md#r70h-one-vocabulary-of-world-edits).** A place given with the game's path is a place in the game's file, carried to the source the project holds of it, and a copy of a map a later archive replaces is refused with the copy the install loads ([or-maps](#domain-crates)). - **[R70k](../direction/Roadmap.md#r70k-removing-what-the-game-placed).** A map that is not among the sources keeps its links, and the rules `parent-link-broken` and `lod-children-uncounted` name what a removal alone leaves. @@ -2491,9 +2491,9 @@ kind and lists Vulkan's first. | Module | What it holds | |---|---| -| `crates/domain/or-world-gta5/src/profile.rs` | What GTA V's frame states of a draw, as data with no device: `PER_DRAW`, the variables the game sets for a draw, each marked where it is a product with the view; `technique`, the technique a material of a draw bucket takes in the G-buffer, in a cascade, as a decal over the G-buffer and over the lit frame, with `camera_step`, the step of the camera's view a bucket is drawn in, and `forward_techniques`, the ones tried for what blends; and `GBUFFER_STATES`, `CASCADE_STATES`, `DECAL_STATES` and `FORWARD_STATES`, the render states of each step where a pass states none of a block. ⚠ Neither table of states is read from the game: the depth and the face are what the frame of one drawable sets by hand, and the stencil is every surface writing its material | -| `crates/runtime/or-renderer/src/game_shaders/fed.rs` | `class_of` classes a constant buffer; `build` builds a pass for meshes of one file layout, with each buffer written for a draw bound at an offset a draw sets; `Feed` holds the three arenas, makes a material's groups for a pass once (`bind`) and writes what a draw of an entity reads in a view (`offsets`): a copy of the matrices' buffer an entity a view, and of every other one an entity | -| `crates/runtime/or-renderer/src/game_shaders/fed/arena.rs` | One device buffer of runs at the device's offset alignment, written on the CPU and sent in one write; it is made again, larger, when a frame or a material outgrows it, and counts that up | +| `crates/domain/or-world-gta5/src/map/profile.rs` | What GTA V's frame states of a draw, as data with no device: `PER_DRAW`, the variables the game sets for a draw, each marked where it is a product with the view; `technique`, the technique a material of a draw bucket takes in the G-buffer, in a cascade, as a decal over the G-buffer and over the lit frame, with `camera_step`, the step of the camera's view a bucket is drawn in, and `forward_techniques`, the ones tried for what blends; and `GBUFFER_STATES`, `CASCADE_STATES`, `DECAL_STATES` and `FORWARD_STATES`, the render states of each step where a pass states none of a block. ⚠ Neither table of states is read from the game: the depth and the face are what the frame of one drawable sets by hand, and the stencil is every surface writing its material | +| `crates/runtime/or-renderer/src/game_shaders/geometry/fed.rs` | `class_of` classes a constant buffer; `build` builds a pass for meshes of one file layout, with each buffer written for a draw bound at an offset a draw sets; `Feed` holds the three arenas, makes a material's groups for a pass once (`bind`) and writes what a draw of an entity reads in a view (`offsets`): a copy of the matrices' buffer an entity a view, and of every other one an entity | +| `crates/runtime/or-renderer/src/game_shaders/geometry/fed/arena.rs` | One device buffer of runs at the device's offset alignment, written on the CPU and sent in one write; it is made again, larger, when a frame or a material outgrows it, and counts that up | | `crates/runtime/or-renderer/src/world/fed.rs` | `FedMaterial`, a mesh's shader as its file states it with each map on the device read as the file stores it; the world's draws of a frame, entity by entity, in rows: the surfaces of the G-buffer and each cascade's casters sorted by pipeline, material and page, then the decals, then what blends, the farthest first; the pipelines, built by workers; `FORWARD_NOT_FED`, the variables a forward program reads that a frame gives no value; and `FedReport`, what a frame drew by its own effect, by the default effect, not at all and not yet | | `crates/runtime/or-renderer/src/world/shadow.rs` | The fit of four cascades about what the camera sees by the game's split, with what the cycle gives them (`CycleShadow`); `spanning`, which has their one depth reach what the frame draws; and `CasterTiles`, by which a host keeps what casts into a tile from out of the camera's sight | | `crates/io/or-io/src/gta5/data/weather.rs` | `weather.xml` read typed under the engine's names: the weather types with their sun, cloud, wind, rain, snow and fog, and the order they follow in; `wetness_at_rest` is how wet a world held under one comes to be | @@ -2548,18 +2548,18 @@ In that run of 2026-12-01 at `10f5e2d76`, of the 16,286 meshes of the six stops, | Module | What it holds | |---|---| | `crates/io/or-io/src/gta5/data/watertune.rs` | `watertune.xml` read typed under the engine's names: the sea's colour and the opacity of a quad that states none, the scale of the ripples and of the foam, the glint's tightness, how far the sun pierces the water's fog, and the rectangle of the level the fog map lies over. | -| `crates/domain/or-world-gta5/src/sea.rs` | What the game's water programs are given, as data with no device: `sea_of`, the sheets of a water file with the opacity of their corners and a count of the quads that are none; `mesh_of` and `vertex_layout`, the sheets as the vertex program reads them; the pass a flat sheet is drawn by and its stencil; and each register as the tuning, a weather's ripples, the cycle and the clock give it. | +| `crates/domain/or-world-gta5/src/map/sea.rs` | What the game's water programs are given, as data with no device: `sea_of`, the sheets of a water file with the opacity of their corners and a count of the quads that are none; `mesh_of` and `vertex_layout`, the sheets as the vertex program reads them; the pass a flat sheet is drawn by and its stencil; and each register as the tuning, a weather's ripples, the cycle and the clock give it. | | `crates/runtime/or-renderer/src/world/water_fed.rs` | `FedSea`: the mesh in a store of its own, the pass built on a worker, the install's maps bound by their sampler's name with what the frame lends (the copy of the lit frame, the half depth, the map of the sky, the map of the sun's shadow), the sheets culled to the view and the reach, and `SeaReport`, what a frame drew and set. | | `crates/runtime/or-renderer/src/viewport/world_water.rs` | The two steps in the frame: the sea over a copy of the lit frame, writing its depth and its mark in the stencil, and the fog over depth; and the registers the water programs of a frame share. | -| `crates/domain/or-world-gta5/src/profile.rs`, `crates/runtime/or-renderer/src/world/fed.rs` | A river, a pool and a fountain: `Step::Water`, the step of the camera's view a material of the water bucket is drawn in, with the two techniques tried and the states of the step; and the row of the frame's draws for it, issued in the pass of the sea after its sheets, with what the sea lends a map's water bound by each sampler's name (`lent_to_a_map`). A far tree card that states no alpha to cut under is left out there by the profile's `left_out`. | -| `crates/runtime/or-renderer/src/game_shaders/depth_fog.rs` | `DepthFogPass`: the pass of the post effect that lays the fog over depth, with the states the game draws it by. | +| `crates/domain/or-world-gta5/src/map/profile.rs`, `crates/runtime/or-renderer/src/world/fed.rs` | A river, a pool and a fountain: `Step::Water`, the step of the camera's view a material of the water bucket is drawn in, with the two techniques tried and the states of the step; and the row of the frame's draws for it, issued in the pass of the sea after its sheets, with what the sea lends a map's water bound by each sampler's name (`lent_to_a_map`). A far tree card that states no alpha to cut under is left out there by the profile's `left_out`. | +| `crates/runtime/or-renderer/src/game_shaders/post/depth_fog.rs` | `DepthFogPass`: the pass of the post effect that lays the fog over depth, with the states the game draws it by. | | `crates/io/or-io/src/gta5/data/branch_bend.rs` | The settings file of the trees' wind read typed under the engine's names: the wind speeds a leaf moves low and high at, how far and how much slower the three winds beside the main one are turned, the clamp of a bend and how stiff a tree whose cards alone move is. | -| `crates/domain/or-world-gta5/src/wind.rs` | What the game sets for a draw of a tree, as data with no device: `WorldWind`, the wind of a world held under a weather; `tree_wind`, the four winds, the clamp, the shift of phase and the height over the water of one tree; `Random`, the game's generator that turns a tree's three winds; and `grass_bending`, how far the wind leans the grass. | -| `crates/domain/or-world-gta5/src/grass.rs` | A grass list as the game's grass program reads it: `Packed::raw`, the 16 bytes of an instance; `shared_rows`, the eight turns and sizes every list shares; `GrassList::draw_parameters`, what the game sets for a draw of a list. | +| `crates/domain/or-world-gta5/src/map/wind.rs` | What the game sets for a draw of a tree, as data with no device: `WorldWind`, the wind of a world held under a weather; `tree_wind`, the four winds, the clamp, the shift of phase and the height over the water of one tree; `Random`, the game's generator that turns a tree's three winds; and `grass_bending`, how far the wind leans the grass. | +| `crates/domain/or-world-gta5/src/map/grass.rs` | A grass list as the game's grass program reads it: `Packed::raw`, the 16 bytes of an instance; `shared_rows`, the eight turns and sizes every list shares; `GrassList::draw_parameters`, what the game sets for a draw of a list. | | `crates/runtime/or-renderer/src/world/fed.rs` | `WorldBatch`: a list on the device, drawn by one draw of every instance of each of its meshes, in the G-buffer and in each cascade, with groups of its own that bind the list's buffer of instances. | | `crates/io/or-io/src/gta5/data/clouds.rs` | The level's cloud hats and its kinds of cloud cover read typed: `CloudHatManager` and `CloudSettingsMap`, with `PtxKeyframe::at`, a curve through the day mixed between its rows. Read with the day and drawn by nothing yet. | -| `crates/runtime/or-renderer/src/game_shaders/meter.rs` | `Meter`: a world's exposure measured by the post effect's own passes, in the chain of targets the game holds for the frame's height (`chain`, `between`), with `Metering`, the registers the exposure pass reads. | -| `crates/runtime/or-renderer/src/game_shaders/resolve.rs` | `ResolvePass`: the simple pass that maps a frame to the screen, and for a world's frame the game's composite pass, handed the blurred light of the bloom, the vignette and the gamma (`Tone::composite_values`). | +| `crates/runtime/or-renderer/src/game_shaders/post/meter.rs` | `Meter`: a world's exposure measured by the post effect's own passes, in the chain of targets the game holds for the frame's height (`chain`, `between`), with `Metering`, the registers the exposure pass reads. | +| `crates/runtime/or-renderer/src/game_shaders/post/resolve.rs` | `ResolvePass`: the simple pass that maps a frame to the screen, and for a world's frame the game's composite pass, handed the blurred light of the bloom, the vignette and the gamma (`Tone::composite_values`). | **What the passes read.** The water effect's technique has 20 passes, and a flat sheet's one-pass form is the seventh; the post effect's technique has 129, of which four read the fog's registers, the first being the one run (`the_pass_the_sea_is_drawn_by_reads_the_map_of_the_sky_and_no_picture_drawn_for_its_reflection`, with `OPENRAGE_GAME_PACK` naming the Legacy pack of version 5, 2026-12-01). @@ -2582,8 +2582,8 @@ A sheet is counted drawn where the camera's frustum holds the sphere about it, s | Module | What it holds | |---|---| -| `crates/domain/or-world-gta5/src/lights.rs` | The rules, as data with no device: `model_lights`, the light attributes of a drawable or a fragment in the model's own space; `lit_at`, `cutoff_fade`, `reach` and `corona`, when a light is on, how it is cut off, how far it reaches and what glow it has; what a byte of a far light counts in, the ranges by category and the hours the far lights are held; `light_id`, the number a far light is matched by; and `entity_lights` and `far_lights`, the lights of a frame as an eye sees them at a moment of the day. | -| `crates/domain/or-world-gta5/src/models.rs`, `crates/domain/or-world-gta5/src/beside.rs` | A model's record carries its lights and the box they are matched by; a far light is unpacked by the rules above, with the category of its map. | +| `crates/domain/or-world-gta5/src/map/lights.rs` | The rules, as data with no device: `model_lights`, the light attributes of a drawable or a fragment in the model's own space; `lit_at`, `cutoff_fade`, `reach` and `corona`, when a light is on, how it is cut off, how far it reaches and what glow it has; what a byte of a far light counts in, the ranges by category and the hours the far lights are held; `light_id`, the number a far light is matched by; and `entity_lights` and `far_lights`, the lights of a frame as an eye sees them at a moment of the day. | +| `crates/domain/or-world-gta5/src/archetypes/models.rs`, `crates/domain/or-world-gta5/src/map/beside.rs` | A model's record carries its lights and the box they are matched by; a far light is unpacked by the rules above, with the category of its map. | | `crates/runtime/or-renderer/src/world.rs` | `WorldLights`: the lights of a world a frame draws beside the particles', each kind for the game's own pass of that kind, and the glows. | | `src/render/viewport/world_lights.rs` | The bridge: the lights of the models on the device and of the maps a selection stands on, culled to what the view can show, held to `MOST_LIGHTS`, and counted (`LightsDrawn`). | @@ -2606,10 +2606,10 @@ No stop reaches the cap of 1,024. ⚠ The times are of a loaded machine and say | Module | What it holds | |---|---| -| `crates/runtime/or-renderer/src/game_shaders/store.rs` | `Store`: a mesh's vertex bytes as its file has them and its indices, in pages of their own for each vertex layout; `put` takes a core `Mesh`, `Stored` says where it lies, and an element in an encoding the device has no vertex format for is rewritten in its own bytes as it is uploaded and counted by the encoding the file states (`rewritten`). No vertex is expanded to floats and no index to a vertex | -| `crates/runtime/or-renderer/src/game_shaders/store/pages.rs` | the allocator of a layout's pages, which the app's bridge held before: first fit of the fullest page, a page let go with its last mesh, a mesh moved out of the emptiest by a copy on the device. A caller's budget reaches it as numbers (`Sizes`), and a layout's first page is a whole one halved eight times, each after it twice the one before | -| `crates/runtime/or-renderer/src/game_shaders/store/matched.rs` | `matched`: for a file layout and the inputs of a vertex program, the vertex buffers of a pipeline. Each input reads the file's element of its meaning at the file's offset, in the device's format for what the file holds as the kind the program declares; a program that declares another width is given the element as it is, and the device fills the rest. An input the file has no element for, or one the device reads nowhere, is fed its meaning's default from a buffer of one vertex whose stride is nought, and is listed (`Lacking`, with why: `Lack`). `inputs_of` reads a program's inputs from its module and `signature_inputs` from the signature the pack's manifest holds; `build_pass_pipeline` in `crates/runtime/or-renderer/src/game_shaders/pipeline.rs` builds a pass that reads a mesh so | -| `crates/runtime/or-renderer/src/game_shaders/gta5.rs` | what the renderer reads of the record a GTA V model carries (`Materials` of `or_world_gta5`): the maps a mesh's shader binds, the effect of a pack a shader names, and `streams`, what the vertex programs of that effect's G-buffer and cascade techniques read that a mesh's bytes do not feed | +| `crates/runtime/or-renderer/src/game_shaders/geometry/store.rs` | `Store`: a mesh's vertex bytes as its file has them and its indices, in pages of their own for each vertex layout; `put` takes a core `Mesh`, `Stored` says where it lies, and an element in an encoding the device has no vertex format for is rewritten in its own bytes as it is uploaded and counted by the encoding the file states (`rewritten`). No vertex is expanded to floats and no index to a vertex | +| `crates/runtime/or-renderer/src/game_shaders/geometry/store/pages.rs` | the allocator of a layout's pages, which the app's bridge held before: first fit of the fullest page, a page let go with its last mesh, a mesh moved out of the emptiest by a copy on the device. A caller's budget reaches it as numbers (`Sizes`), and a layout's first page is a whole one halved eight times, each after it twice the one before | +| `crates/runtime/or-renderer/src/game_shaders/geometry/store/matched.rs` | `matched`: for a file layout and the inputs of a vertex program, the vertex buffers of a pipeline. Each input reads the file's element of its meaning at the file's offset, in the device's format for what the file holds as the kind the program declares; a program that declares another width is given the element as it is, and the device fills the rest. An input the file has no element for, or one the device reads nowhere, is fed its meaning's default from a buffer of one vertex whose stride is nought, and is listed (`Lacking`, with why: `Lack`). `inputs_of` reads a program's inputs from its module and `signature_inputs` from the signature the pack's manifest holds; `build_pass_pipeline` in `crates/runtime/or-renderer/src/game_shaders/core/pipeline.rs` builds a pass that reads a mesh so | +| `crates/runtime/or-renderer/src/game_shaders/geometry/gta5.rs` | what the renderer reads of the record a GTA V model carries (`Materials` of `or_world_gta5`): the maps a mesh's shader binds, the effect of a pack a shader names, and `streams`, what the vertex programs of that effect's G-buffer and cascade techniques read that a mesh's bytes do not feed | | `crates/runtime/or-renderer/src/plain.rs` | `PLAIN_SHADER`, the one program of the plain modes: a drawable's meshes and a world's instances are lit by its one `shade`, and `crates/runtime/or-renderer/tests/shader_ledger.rs` holds the ledger to one such module (`the_plain_modes_are_one_program`) | | `src/render/viewport/world_host.rs` | what both of the app's bridges of a world call: the budgets of a device, a mesh of the store as the renderer draws it, a material made again when its map changes, and a frame's draws sorted and handed to the renderer with the marks of what is picked | @@ -2660,9 +2660,9 @@ What [R71m](../direction/Roadmap.md#r71m-the-measures-that-decide-the-design) me `the_frame_is_listed_in_the_passes_the_source_labels_and_the_kinds_it_needs_are_counted` holds the list to the source, every step to a program of the game's or to none, and the four steps a world's entities are drawn in, the G-buffer's surfaces, its decals, the cast and what blends over the lit frame, to the game's programs. A row of a list must also state what the reading found in every kind: a condition on the frame's values (the occlusion's strength, whether the sun shines, whether a camera stands in a fog volume), one of several passes of a technique picked by them (the sky's variants, the directional light's), a stencil reference, a blend constant, and whether the pass keeps or clears what its target held. -Between passes the CPU picks the sky's variant and writes its constants, builds the map of the sky when the day changes, writes each list of lights as records, and writes every constant, a game program's by the name its reflection gives it (`EngineConstants::values`, `lighting_values` and each pass's own). The bloom is already a list of steps as data (`plan` in `crates/runtime/or-renderer/src/game_shaders/bloom.rs`). +Between passes the CPU picks the sky's variant and writes its constants, builds the map of the sky when the day changes, writes each list of lights as records, and writes every constant, a game program's by the name its reflection gives it (`EngineConstants::values`, `lighting_values` and each pass's own). The bloom is already a list of steps as data (`plan` in `crates/runtime/or-renderer/src/game_shaders/post/bloom.rs`). -**A world's entities enter that frame's G-buffer and its shadow map, and no other target.** In the plain modes a world is drawn by the host's own program, in the viewport's forward passes ([the world session](#the-world-session)). GTA VI's own frame is another matter: its pixel programs write their own targets over a float depth with no stencil (`TARGETS` in `crates/runtime/or-renderer/src/game_shaders/meshlets.rs`), and a surface its programs do not draw is drawn after the frame is lit, as Material over the same depth, never into those targets. +**A world's entities enter that frame's G-buffer and its shadow map, and no other target.** In the plain modes a world is drawn by the host's own program, in the viewport's forward passes ([the world session](#the-world-session)). GTA VI's own frame is another matter: its pixel programs write their own targets over a float depth with no stencil (`TARGETS` in `crates/runtime/or-renderer/src/game_shaders/geometry/meshlets.rs`), and a surface its programs do not draw is drawn after the frame is lit, as Material over the same depth, never into those targets. **RDR2's maps and types are GTA V's, in paged metadata under another head.** `crates/io/or-io-verify/tests/rdr2_world_census.rs` mounts an install with the keys its executable unlocks, counts every file by extension, puts a sample of each world extension to every reader that could take it, and looks in the bodies for what a world asks (`OPENRAGE_GAME_ROOT`, then `cargo nextest run --profile all -p or-io-verify --test rdr2_world_census --no-capture`). On the owner's install: @@ -2732,7 +2732,7 @@ constant buffer's class and the bytes a draw writes, and with a pack what cannot with a pack into a PNG, taking the scene from `or-cli`'s `export_scene` and the textures from the `.ytd` beside it, and `render-census` counts how much of an install's drawables a pack draws (`render_drawable`). `pack_protocol` is what `bake-pack --progress` -says on stdout, one JSON event a line, that the app's `src/state/game_pack.rs` reads. +says on stdout, one JSON event a line, that the app's `src/state/game_pack/mod.rs` reads. **or-shader-front** turns a DXBC container into a SPIR-V module with the vendored dxbc-spirv translator (`crates/tools/or-shader-front/vendor/dxbc-spirv`, MIT), @@ -2784,14 +2784,14 @@ values and the canonical writer. `src/main.rs` runs `app::run()`, or the headless self-check with `--self-check`; `src/app/` drives the editor and the settings window over one -`SharedGpu`, `src/render/` bridges the scene to `or-renderer` (and `src/render/game_scene.rs` makes the open drawable the surfaces Shaded mode draws, and `src/render/dressed.rs` holds what the Wardrobe hands the viewport to draw for a ped that is no document), +`SharedGpu`, `src/render/` bridges the scene to `or-renderer` (and `src/render/game_scene/mod.rs` makes the open drawable the surfaces Shaded mode draws, and `src/render/dressed.rs` holds what the Wardrobe hands the viewport to draw for a ped that is no document), `src/platform/` holds file dialogs, drag and drop, file associations, the Recycle Bin, the clipboard's file list and the probe for the libraries the app loads on Linux, `src/video/mod.rs` previews a `.bik` and plays its sound, Bink 1 and Bink 2 alike, through `or-media`'s own decoders, `src/video/bink.rs` reads a movie's header and holds the install's DLL that the Windows test comparing the Bink 2 decoder to it loads, and -`src/audio.rs` plays, through `rodio` on every platform, exports and replaces an +`src/audio/mod.rs` plays, through `rodio` on every platform, exports and replaces an `.awc`'s streams, decoding them through `or-media` and re-encoding a WAV into each stream's own codec, PCM16, ADPCM or MP3, through `AwcFile::with_stream_replaced`, which also rebuilds a multi-channel stream's @@ -2850,7 +2850,7 @@ harder in an immediate-mode UI (`the_shell_is_flat_rather_than_deep`). ### The layers of a GTA V world -`crates/domain/or-world-gta5/src/layers.rs` answers `WorldInstall::layers` for a GTA V install +`crates/domain/or-world-gta5/src/streaming/layers/mod.rs` answers `WorldInstall::layers` for a GTA V install ([R70f](../direction/Roadmap.md#r70f-layers-of-what-the-game-hides); what a person sees is in [GTA_V_World_Viewer.md](../features/GTA_V_World_Viewer.md#layers)). Its `kinds` are the ten layers and `presets` the three sets. @@ -2905,7 +2905,7 @@ and `presets` the three sets. ### The world session -The World screen reads one world through a seam of the app's own, `src/state/world_session.rs` +The World screen reads one world through a seam of the app's own, `src/state/world_session/mod.rs` ([R71c](../direction/Roadmap.md#r71c-one-world-session-one-frame-host-and-panels-by-capability), [R71e](../direction/Roadmap.md#r71e-the-gta-v-world-drawn-in-the-fallback-pass)). `AppState` holds it as `world`, and `world_session::wanted` says whose world that is: the active game's where @@ -2915,7 +2915,7 @@ and opens the next. | Module | What it holds | |---|---| -| `src/state/world_session.rs` | `WorldSession`, what the screen and the panel ask (where it stands, its capabilities, its title's options, its camera and hour, what is waited for, what could not be read with its reason), and `WorldFeed`, what the bridge takes and tells back: the last selection, models and textures as plain data, the look's frame values, where a model stands on the device | +| `src/state/world_session/mod.rs` | `WorldSession`, what the screen and the panel ask (where it stands, its capabilities, its title's options, its camera and hour, what is waited for, what could not be read with its reason), and `WorldFeed`, what the bridge takes and tells back: the last selection, models and textures as plain data, the look's frame values, where a model stands on the device | | `src/state/world_session/driven.rs` | `DrivenSession`: a title of `or_worlds` opens the install, the core's `Driver` streams and selects on the session's thread, and maps, models and textures are read in three of the core's `Pool`s; an interior is read on that thread. Nothing is read on the thread that draws | | `src/state/world_session/mesh.rs` | a core `Model`, the game's vertex bytes with their layout, handed on as they are with the maps each mesh's shader binds (`arrived`), its positions alone decoded on a reader to the `Shape` a pick tests | | `src/state/world_session/gta6.rs` | `Gta6Session`, a shell over GTA VI's viewer that hands the bridge no feed, answers a click on a thread of its own, draws a map as its document's tree places it (`lay_document`) and states `Capability::Pick` and `Capability::Edits` | @@ -3278,7 +3278,7 @@ the format-agnostic timeline both previews use. what it runs. A row also says where its keys are read (`Place`: the key dispatcher, or the panel that reads them itself under the pointer or with focus) and whether they name where a key sits and not the character typed - (`by_position`). `src/ui/shortcuts.rs` holds a press against the bindings: a + (`by_position`). `src/ui/shortcuts/mod.rs` holds a press against the bindings: a key the person chose first, then the chosen preset's (`src/ui/shortcuts/presets.rs`), then the table's; two commands share a key only when both are read by panels, in two places (`taken_by`), and diff --git a/plugins/README.md b/plugins/README.md index 1745dc95f..199727dd5 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -10,7 +10,7 @@ Nothing is loaded from here at run time: the app loads installed plugins from the `plugins` folder of the configuration directory ([Installing a plugin](#installing-a-plugin)). The in-app plugin host is `crates/domain/or-plugin`, whose contract is [Plugin_ABI.md](../docs/reference/Plugin_ABI.md); the app embeds it in -`src/state/plugins.rs`, and what a plugin adds to the editor beyond running on +`src/state/plugins/mod.rs`, and what a plugin adds to the editor beyond running on the open document (panels, commands, settings and viewport overlays, [R45](../docs/direction/Roadmap.md#r45-the-plugin-sdk-and-registration-surface)) is in `src/state/plugins/surface.rs`, described in diff --git a/src/README.md b/src/README.md index 82b6f44fc..998e67899 100644 --- a/src/README.md +++ b/src/README.md @@ -12,7 +12,7 @@ The `openrage` package: the desktop editor, and the entry point of the `openrage | `src/render/` | the bridge from a document to what `or-renderer` draws | | `src/i18n/` | the interface languages, as `.po` catalogs | | `src/platform/` | what differs per operating system, such as file associations | -| `src/self_check.rs` | every panel drawn through real frames with no window | +| `src/self_check/mod.rs` | every panel drawn through real frames with no window | The files under `src/repo_tests/` (`doc_*.rs`, `src/repo_tests/shell_budget.rs`, `src/repo_tests/suppressions.rs`, and the string checks) are tests that read the documents and the shape of this folder. diff --git a/src/audio.rs b/src/audio/mod.rs similarity index 100% rename from src/audio.rs rename to src/audio/mod.rs diff --git a/src/render/game_scene.rs b/src/render/game_scene/mod.rs similarity index 100% rename from src/render/game_scene.rs rename to src/render/game_scene/mod.rs diff --git a/src/render/gta6_drawable.rs b/src/render/gta6_drawable/mod.rs similarity index 100% rename from src/render/gta6_drawable.rs rename to src/render/gta6_drawable/mod.rs diff --git a/src/repo_tests/doc_counts.rs b/src/repo_tests/doc_counts.rs index 244561b35..b61e10f6c 100644 --- a/src/repo_tests/doc_counts.rs +++ b/src/repo_tests/doc_counts.rs @@ -693,7 +693,17 @@ fn owned_roots_or_io_declares() -> BTreeMap { }; let stem = path .file_stem() - .map(|s| s.to_string_lossy().to_string()) + .and_then(|s| s.to_str()) + .map(|s| { + if s == "mod" { + path.parent() + .and_then(|p| p.file_name()) + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default() + } else { + s.to_string() + } + }) .unwrap_or_default(); for line in text.lines().map(str::trim) { for trait_for in ["File for ", "Resource for "] { diff --git a/src/self_check.rs b/src/self_check/mod.rs similarity index 100% rename from src/self_check.rs rename to src/self_check/mod.rs diff --git a/src/state/every_viewer_path_takes_both_targets.rs b/src/state/every_viewer_path_takes_both_targets.rs index 4b879f61b..b78b9dde6 100644 --- a/src/state/every_viewer_path_takes_both_targets.rs +++ b/src/state/every_viewer_path_takes_both_targets.rs @@ -369,7 +369,7 @@ const NOT_THE_VIEWERS: &[(&str, &str, &str)] = &[ "the particle simulation's, which builds from a Legacy list only", ), ( - "src/render/game_scene.rs", + "src/render/game_scene/mod.rs", "surfaces_shown", "the ground under the particle simulation's effect, which builds from a Legacy list only", ), diff --git a/src/state/file_index.rs b/src/state/file_index/mod.rs similarity index 100% rename from src/state/file_index.rs rename to src/state/file_index/mod.rs diff --git a/src/state/game_pack.rs b/src/state/game_pack/mod.rs similarity index 100% rename from src/state/game_pack.rs rename to src/state/game_pack/mod.rs diff --git a/src/state/gta6_modding.rs b/src/state/gta6_modding/mod.rs similarity index 100% rename from src/state/gta6_modding.rs rename to src/state/gta6_modding/mod.rs diff --git a/src/state/gta6_worldview/sky.rs b/src/state/gta6_worldview/sky.rs index 5827d2d6f..0333b54e9 100644 --- a/src/state/gta6_worldview/sky.rs +++ b/src/state/gta6_worldview/sky.rs @@ -4,7 +4,7 @@ use std::path::{Path, PathBuf}; use std::sync::{Arc, Mutex, OnceLock}; -use or_title::gta6_day::{read_day, DayTables}; +use or_world_gta6::day::{read_day, DayTables}; /// The archive of an install the tables of the day are in. const ARCHIVE: &str = "common.rpf"; diff --git a/src/state/plugins.rs b/src/state/plugins/mod.rs similarity index 100% rename from src/state/plugins.rs rename to src/state/plugins/mod.rs diff --git a/src/state/project.rs b/src/state/project/mod.rs similarity index 100% rename from src/state/project.rs rename to src/state/project/mod.rs diff --git a/src/state/world_session.rs b/src/state/world_session/mod.rs similarity index 100% rename from src/state/world_session.rs rename to src/state/world_session/mod.rs diff --git a/src/ui/shortcuts.rs b/src/ui/shortcuts/mod.rs similarity index 100% rename from src/ui/shortcuts.rs rename to src/ui/shortcuts/mod.rs