feat(physics #145): Slice 1 — Position/Frame types + LandDefs.GetBlockOffset (0x0043e630)
Introduces the two value types (Frame, Position) that represent retail's cell-relative position pair (acclient.h:30647/30658). Types are unused by consumers yet — zero behavior change. Also ports LandDefs::get_block_offset (pc:69189, @0x0043e630): world-meter offset between two named landblock ids, the ONLY cross-cell translation primitive in retail physics. Conformance tests: same-landblock→Zero, south-neighbour→(0,-192,0) (the exact #145 cascade cell), east-neighbour→(+192,0,0), diagonal→(+192,+192,0). 4/4 pass; full Core suite 1522 passed / 0 failed. DatFrame alias added to 4 files that had using DatReaderWriter.Types + using AcDream.Core.Physics in scope simultaneously. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ed32db70d7
commit
438bb681a5
8 changed files with 115 additions and 18 deletions
|
|
@ -7,6 +7,7 @@ using AcDream.Core.World;
|
|||
using DatReaderWriter.Types;
|
||||
using Xunit;
|
||||
using DatPhysicsScript = DatReaderWriter.DBObjs.PhysicsScript;
|
||||
using DatFrame = DatReaderWriter.Types.Frame;
|
||||
|
||||
namespace AcDream.Core.Tests.Rendering.Vfx;
|
||||
|
||||
|
|
@ -140,7 +141,7 @@ public sealed class EntityScriptActivatorTests
|
|||
var hookSink = new ParticleHookSink(system);
|
||||
|
||||
// Hook offset = (1, 0, 0) in entity-local frame.
|
||||
var hookOffset = new Frame
|
||||
var hookOffset = new DatFrame
|
||||
{
|
||||
Origin = new Vector3(1f, 0f, 0f),
|
||||
Orientation = Quaternion.Identity,
|
||||
|
|
@ -194,7 +195,7 @@ public sealed class EntityScriptActivatorTests
|
|||
var system = new ParticleSystem(registry);
|
||||
var hookSink = new ParticleHookSink(system);
|
||||
|
||||
var script = BuildScript((0.0, new CreateParticleHook { EmitterInfoId = 100u, Offset = new Frame() }));
|
||||
var script = BuildScript((0.0, new CreateParticleHook { EmitterInfoId = 100u, Offset = new DatFrame() }));
|
||||
var table = new Dictionary<uint, DatPhysicsScript> { [0xAAu] = script };
|
||||
var runner = new PhysicsScriptRunner(
|
||||
id => table.TryGetValue(id, out var s) ? s : null,
|
||||
|
|
@ -257,7 +258,7 @@ public sealed class EntityScriptActivatorTests
|
|||
var system = new ParticleSystem(registry);
|
||||
var hookSink = new ParticleHookSink(system);
|
||||
|
||||
var hookOffset = new Frame { Origin = new Vector3(1f, 0, 0), Orientation = Quaternion.Identity };
|
||||
var hookOffset = new DatFrame { Origin = new Vector3(1f, 0, 0), Orientation = Quaternion.Identity };
|
||||
var script = BuildScript(
|
||||
(0.0, new CreateParticleHook { EmitterInfoId = 100u, Offset = hookOffset, PartIndex = 1 }));
|
||||
var table = new Dictionary<uint, DatPhysicsScript> { [0xAAu] = script };
|
||||
|
|
@ -297,7 +298,7 @@ public sealed class EntityScriptActivatorTests
|
|||
var system = new ParticleSystem(registry);
|
||||
var hookSink = new ParticleHookSink(system);
|
||||
|
||||
var script = BuildScript((0.0, new CreateParticleHook { EmitterInfoId = 100u, Offset = new Frame() }));
|
||||
var script = BuildScript((0.0, new CreateParticleHook { EmitterInfoId = 100u, Offset = new DatFrame() }));
|
||||
var table = new Dictionary<uint, DatPhysicsScript> { [0xAAu] = script };
|
||||
var runner = new PhysicsScriptRunner(
|
||||
id => table.TryGetValue(id, out var s) ? s : null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue