level

package
v0.7.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtraPrefab added in v0.7.18

type ExtraPrefab struct {
	UnkHash1 stingray.Hash
	Path     stingray.Hash
	stingray.Transform
	UnkFloats [3]float32
	UnkInt    uint32
}

type ExtraUnit added in v0.7.18

type ExtraUnit struct {
	UnkHash1 stingray.Hash
	Path     stingray.Hash
	UnkHash2 stingray.Hash

	stingray.Transform
	UnkFloats [3]float32
	UnkInt    uint32
	UnkInt2   uint32
	// contains filtered or unexported fields
}

type ExtraUnitsContainer added in v0.7.18

type ExtraUnitsContainer struct {
	UnkInt              uint32
	UnkInt2             uint32
	LevelName           stingray.Hash
	ExtraUnits          []ExtraUnit
	ExtraPrefabs        []ExtraPrefab
	UnkIntList          []uint32
	UnkFloatTwoIntsList []FloatTwoInts
	UnkIntsAndFloatList []IntsAndFloat
}

type FloatTwoInts added in v0.7.18

type FloatTwoInts struct {
	UnkFloat float32 `json:"unk_float"`
	UnkInt1  uint32  `json:"unk_int_1"`
	UnkInt2  uint32  `json:"unk_int_2"`
}

type HashIndexRange added in v0.7.18

type HashIndexRange struct {
	Hash  stingray.ThinHash
	Start uint32 // Inclusive
	End   uint32 // Exclusive
}

type IntsAndFloat added in v0.7.18

type IntsAndFloat struct {
	UnkInts  [14]uint32 `json:"unk_ints"`
	UnkFloat float32    `json:"unk_float"`
}

type Level

type Level struct {
	Name                   stingray.Hash
	Metadata               map[int][]MetadataEntry
	Prefabs                []Prefab
	MaterialOverrides      []MaterialSlotOverrides
	Units                  []Unit
	UnkTransformedItems    []UnknownTransformedItem
	UnkExtraUnitContainers []ExtraUnitsContainer
	UnitHashIndexRange     []HashIndexRange
	UnkHashIndexRange1     []HashIndexRange
	UnkHashIndexRange2     []HashIndexRange
	UnkHashIndexRange3     []HashIndexRange
	PrefabHashIndexRange   []HashIndexRange
	UnkHashIndexRange4     []HashIndexRange
	UnkHashIndexRange5     []HashIndexRange
}

func LoadLevel

func LoadLevel(r io.ReadSeeker) (*Level, error)

type LevelMetadataType

type LevelMetadataType uint32
const (
	LevelMetadata_NotSeen LevelMetadataType = iota
	LevelMetadata_uint32
	LevelMetadata_float32
	LevelMetadata_string
)

func (LevelMetadataType) MarshalText

func (p LevelMetadataType) MarshalText() ([]byte, error)

func (LevelMetadataType) String

func (i LevelMetadataType) String() string

type Material

type Material struct {
	Slot stingray.ThinHash
	Path stingray.Hash
}

type MaterialSlotOverrides

type MaterialSlotOverrides struct {
	Index     uint32 // Index into unit array?
	Materials []Material
}

type MetadataEntry

type MetadataEntry struct {
	VariableNames []stingray.ThinHash
	Type          LevelMetadataType
	ValueUint     uint32
	ValueFloat    float32
	ValueString   string
}

type Prefab

type Prefab struct {
	UnkHash00 stingray.Hash
	Path      stingray.Hash
	stingray.Transform
	UnkExtraRotation mgl32.Vec4
}

type Unit

type Unit struct {
	UnkHash00 stingray.Hash
	UnkHash01 stingray.Hash
	Path      stingray.Hash

	stingray.Transform
	UnkFloats [6]float32 // Maybe a bounding box?
	// contains filtered or unexported fields
}

func (*Unit) Unit

func (p *Unit) Unit() stingray.Hash

type UnknownTransformedItem added in v0.7.18

type UnknownTransformedItem struct {
	Hash stingray.Hash
	stingray.Transform
	UnkFloats [6]float32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL