Documentation
¶
Index ¶
- Constants
- func ApplyCellUpdate(ctx client.Context, update network.MapCellUpdate) bool
- func AttackApproachCellFromTarget(ctx client.Context, sourceX, sourceY, targetX, targetY int, attackRange int) (int, int, bool)
- func AttackTargetWithinRange(playerX, playerY, targetX, targetY, attackRange int) bool
- func ClearWorldScene(screen *render.Frame, mapName string)
- func ClickedWalkTarget(ctx client.Context, projection scene.Projection, mouseX, mouseY int) (int, int, bool)
- func FindWalkPath(gat *res.GAT, fromX, fromY, toX, toY int) ([]worldstate.WalkStep, bool)
- func GNDShadowMapAlpha(gnd *res.GND, shadowX, shadowY int) uint8
- func GNDShadowMapPoint(x, y float64) (int, int)
- func HoveredWalkCell(ctx client.Context, projection scene.Projection, mouseX, mouseY int) (int, int, bool)
- func InfoNotifyMessage(result uint16) string
- func LoadGAT(manager *res.Manager, mapName string) (*res.GAT, string, error)
- func LoadGND(manager *res.Manager, mapName string) (*res.GND, string, error)
- func LoadRSMModel(manager *res.Manager, filename string) (*res.RSM, error)
- func LoadRSW(manager *res.Manager, mapName string) (*res.RSW, string, error)
- func MapEffectComponent(component effects.Component) effects.Component
- func ModelLoadTasks(ctx client.Context) []func()
- func NormalAttackApproachCellFromTarget(ctx client.Context, sourceX, sourceY, targetX, targetY int, attackRange int) (int, int, bool)
- func NormalAttackTargetWithinRange(playerX, playerY, targetX, targetY, attackRange int) bool
- func PathHeuristic(from, to PathPoint) int
- func PathStepCost(from, to PathPoint) int
- func RSMAnimationFrame(rsm *res.RSM, _ res.RSWModel, now time.Time) (int, bool)
- func RSMAnimationLength(rsm *res.RSM) int
- func RSMRenderRadius() float64
- func RangedAttackApproachCellFromTarget(ctx client.Context, sourceX, sourceY, targetX, targetY int, attackRange int) (int, int, bool)
- func RangedAttackApproachCellFromTargetMatching(ctx client.Context, sourceX, sourceY, targetX, targetY int, attackRange int, ...) (int, int, bool)
- func SoundLoadTasks(ctx client.Context) []func()
- func WalkPath(gat *res.GAT, fromX, fromY, toX, toY int) []worldstate.WalkStep
- func WalkTargetReachable(ctx client.Context, sourceX, sourceY, targetX, targetY int) bool
- func WorldGNDHeightAt(world *worldstate.World, x, y float64) (float64, bool)
- func WorldOpaqueTriangleDrawOptions(filter render.Filter, address render.Address) *render.DrawTrianglesOptions
- type Fade
- func (f *Fade) AdvancePrewarm(now time.Time, uploadsPending bool)
- func (f *Fade) Alpha(now time.Time) uint8
- func (f *Fade) Draw(screen *render.Frame, now time.Time)
- func (f *Fade) Elapsed(now time.Time) bool
- func (f *Fade) RecordCoveredFrame()
- func (f *Fade) StartCharacterSelectOut(now time.Time)
- func (f *Fade) StartIn(now time.Time)
- func (f *Fade) StartOut(change network.MapChange, now time.Time)
- func (f *Fade) StartPrewarm()
- type FadePhase
- type Lighting
- type Loading
- type ModelPlacement
- type PathPoint
- type System
- func (m *System) DrawAnimatedRSMPlacement(screen *render.Frame, manager *res.Manager, rsw *res.RSW, rsm *res.RSM, ...)
- func (m *System) DrawGNDMeshes(screen *render.Frame, manager *res.Manager, gnd *res.GND, rsw *res.RSW, ...)
- func (m *System) DrawGNDWater(screen *render.Frame, manager *res.Manager, gnd *res.GND, rsw *res.RSW, ...)
- func (m *System) DrawRSMModels(screen *render.Frame, manager *res.Manager, rsw *res.RSW, ...)
- func (m *System) DrawRSWEffects(screen *render.Frame, ctx client.Context, projection scene.Projection, ...)
- func (m *System) DrawTileCursor(screen *render.Frame, manager *res.Manager, gat *res.GAT, ...)
- func (m *System) InvalidateLighting()
- func (m *System) Lighting(rsw *res.RSW) Lighting
- func (m *System) ProcessMapSounds(ctx client.Context, now time.Time, ...)
- func (m *System) ResetGeometry()
- func (m *System) RuntimeRSMModel(manager *res.Manager, modelPath string) *res.RSM
- func (m *System) TextureLoadTasks(ctx client.Context) []func()
- type Textures
Constants ¶
const ( FadeOutDuration = 220 * time.Millisecond FadeInDuration = 340 * time.Millisecond // Present the transition cover before blocking on synchronous map loading. FadeHandoffFrames = 1 // Warm the base map, then allow a frame for the initial post-ack actors. FadePrewarmFrames = 2 )
const (
TextureUploadCount = 32
)
const TileCursorDepthBias = rsmModelDepthBias + rsmHorizontalDepthBiasLayers*rsmHorizontalDepthBiasStep
RSM walk surfaces can be coplanar with the GAT and use layered depth biases. Keep the cursor just above the largest RSM layer while remaining far below the old 0.001 bias that let it show through furniture.
Variables ¶
This section is empty.
Functions ¶
func ApplyCellUpdate ¶
func ApplyCellUpdate(ctx client.Context, update network.MapCellUpdate) bool
func AttackTargetWithinRange ¶
func ClearWorldScene ¶
func ClickedWalkTarget ¶
func FindWalkPath ¶
func GNDShadowMapPoint ¶
func HoveredWalkCell ¶
func InfoNotifyMessage ¶
func ModelLoadTasks ¶ added in v0.24.0
func PathHeuristic ¶
PathHeuristic is a lower bound for search limits and approach-cell scoring. The classic client's route priority deliberately uses Manhattan distance.
func PathStepCost ¶
func RSMAnimationFrame ¶
func RSMAnimationLength ¶
func RSMRenderRadius ¶
func RSMRenderRadius() float64
func SoundLoadTasks ¶ added in v0.24.0
func WalkTargetReachable ¶
func WorldGNDHeightAt ¶
func WorldGNDHeightAt(world *worldstate.World, x, y float64) (float64, bool)
Types ¶
type Fade ¶
type Fade struct {
Phase FadePhase
Started time.Time
CoveredFrames int
Change network.MapChange
HasChange bool
CharacterSelect bool
}
func (*Fade) RecordCoveredFrame ¶
func (f *Fade) RecordCoveredFrame()
func (*Fade) StartCharacterSelectOut ¶
func (*Fade) StartPrewarm ¶
func (f *Fade) StartPrewarm()
type Lighting ¶
type Loading ¶ added in v0.24.0
Loading prepares one map on the game thread, yielding between assets so the loading screen can redraw. GPU uploads and scene warmup follow preparation.
func NewLoading ¶ added in v0.24.0
func (*Loading) Advance ¶ added in v0.24.0
Advance reports completion once. Each batch waits for a submitted frame; skipped GPU frames cannot turn loading back into a blocking loop.
type ModelPlacement ¶
type System ¶
type System struct {
WhitePixel *render.Image
Textures map[string]*render.Image
Images Textures
UpscaleTextures bool // Captured when loading the map; cached meshes keep matching UVs.
TextureMiss map[string]struct{}
MapSoundNext map[int]time.Time
Night bool
// contains filtered or unexported fields
}
func (*System) DrawAnimatedRSMPlacement ¶
func (*System) DrawGNDMeshes ¶
func (*System) DrawGNDWater ¶
func (*System) DrawRSMModels ¶
func (*System) DrawRSWEffects ¶
func (*System) DrawTileCursor ¶
func (*System) InvalidateLighting ¶
func (m *System) InvalidateLighting()
func (*System) ProcessMapSounds ¶
func (*System) ResetGeometry ¶
func (m *System) ResetGeometry()
func (*System) RuntimeRSMModel ¶
func (*System) TextureLoadTasks ¶ added in v0.24.0
Use the draw-time loaders, preserving resource lookup and transparency rules. Only the current map retains these images; no cross-map texture cache grows.
type Textures ¶
type Textures struct {
Images *render.ImageGroup
Uploads []*render.Image
UploadBatch int
}
func (*Textures) FrameSubmitted ¶
FrameSubmitted reports whether this submission completed an upload batch.
func (*Textures) PrepareUploads ¶
Keep the map covered until all requested uploads have been submitted, then render the usual two warmup frames. A skipped GPU frame retries the same batch.