refactor(runtime): own world reveal generation
This commit is contained in:
parent
4ab98b080e
commit
a6860d5563
26 changed files with 1294 additions and 502 deletions
|
|
@ -26,6 +26,7 @@ using AcDream.Core.Selection;
|
|||
using AcDream.Core.Vfx;
|
||||
using AcDream.Core.World;
|
||||
using AcDream.Runtime.Entities;
|
||||
using AcDream.Runtime.World;
|
||||
using DatReaderWriter;
|
||||
using DatReaderWriter.DBObjs;
|
||||
using Silk.NET.OpenGL;
|
||||
|
|
@ -71,6 +72,7 @@ internal sealed record LivePresentationDependencies(
|
|||
DeferredCanonicalWorldEntityCountSource? DevWorldEntities,
|
||||
DeferredRenderFrameDiagnosticsSource? DevFrameDiagnostics,
|
||||
DeferredRenderFrameDiagnosticsSource UiFrameDiagnostics,
|
||||
Action<string> Log,
|
||||
Action<string>? Toast);
|
||||
|
||||
internal sealed record LivePresentationResult(
|
||||
|
|
@ -80,6 +82,7 @@ internal sealed record LivePresentationResult(
|
|||
EntitySpawnAdapter EntitySpawnAdapter,
|
||||
EntityScriptActivator EntityScriptActivator,
|
||||
RetailStaticAnimatingObjectScheduler StaticAnimationScheduler,
|
||||
RuntimeWorldTransitState WorldTransit,
|
||||
WorldGenerationAvailabilityState WorldAvailability,
|
||||
GpuWorldState WorldState,
|
||||
RenderSceneShadowRuntime? RenderSceneShadow,
|
||||
|
|
@ -333,7 +336,9 @@ internal sealed class LivePresentationCompositionPhase
|
|||
staticAnimationScheduler.Unregister,
|
||||
(entity, info) => staticAnimationScheduler.Rebind(entity, info));
|
||||
|
||||
var worldAvailability = new WorldGenerationAvailabilityState();
|
||||
var worldTransit = new RuntimeWorldTransitState(d.Log);
|
||||
var worldAvailability =
|
||||
new WorldGenerationAvailabilityState(worldTransit);
|
||||
var worldState = new GpuWorldState(
|
||||
wbSpawnAdapter,
|
||||
d.ClassificationCache.InvalidateLandblock,
|
||||
|
|
@ -583,6 +588,7 @@ internal sealed class LivePresentationCompositionPhase
|
|||
entitySpawnAdapter,
|
||||
entityScriptActivator,
|
||||
staticAnimationScheduler,
|
||||
worldTransit,
|
||||
worldAvailability,
|
||||
worldState,
|
||||
renderSceneShadow,
|
||||
|
|
@ -630,6 +636,7 @@ internal sealed class LivePresentationCompositionPhase
|
|||
EntitySpawnAdapter entitySpawnAdapter,
|
||||
EntityScriptActivator entityScriptActivator,
|
||||
RetailStaticAnimatingObjectScheduler staticAnimationScheduler,
|
||||
RuntimeWorldTransitState worldTransit,
|
||||
WorldGenerationAvailabilityState worldAvailability,
|
||||
GpuWorldState worldState,
|
||||
RenderSceneShadowRuntime? renderSceneShadow,
|
||||
|
|
@ -1026,6 +1033,7 @@ internal sealed class LivePresentationCompositionPhase
|
|||
entitySpawnAdapter,
|
||||
entityScriptActivator,
|
||||
staticAnimationScheduler,
|
||||
worldTransit,
|
||||
worldAvailability,
|
||||
worldState,
|
||||
renderSceneShadow,
|
||||
|
|
|
|||
|
|
@ -325,7 +325,6 @@ internal sealed class SessionPlayerCompositionPhase
|
|||
content.Dats,
|
||||
d.DatLock);
|
||||
var worldQuiescence = new WorldGenerationQuiescence(
|
||||
live.WorldAvailability,
|
||||
d.Actions.Selection,
|
||||
live.WorldState,
|
||||
guid => live.LiveEntities.TryGetProjectionKey(
|
||||
|
|
@ -340,6 +339,7 @@ internal sealed class SessionPlayerCompositionPhase
|
|||
foundation.MeshAdapter.SetDestinationRevealUploadPriority,
|
||||
foundation.TextureCache.SetDestinationRevealUploadPriority);
|
||||
var worldReveal = new WorldRevealCoordinator(
|
||||
live.WorldTransit,
|
||||
streaming.IsRenderNeighborhoodResident,
|
||||
d.PhysicsEngine.IsSpawnCellReady,
|
||||
d.PhysicsEngine.IsNeighborhoodTerrainResident,
|
||||
|
|
@ -359,7 +359,6 @@ internal sealed class SessionPlayerCompositionPhase
|
|||
live.DrawDispatcher.InvalidateCompositeWarmupReadiness();
|
||||
},
|
||||
spawnClaimClassifier.IsUnhydratable,
|
||||
d.Log,
|
||||
worldQuiescence,
|
||||
streaming,
|
||||
revealRenderResources);
|
||||
|
|
@ -880,7 +879,7 @@ internal sealed class SessionPlayerCompositionPhase
|
|||
d.Actions,
|
||||
d.PlayerController,
|
||||
d.WorldEnvironment.Runtime,
|
||||
worldReveal,
|
||||
live.WorldTransit,
|
||||
d.UpdateClock,
|
||||
live.SelectionInteractions);
|
||||
bindings.Adopt("current game runtime adapter", gameRuntime);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue