data

package
v0.0.0-...-0abf848 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveLevel

func SaveLevel(out io.Writer, level Level) error

Types

type Color

type Color struct {
	R byte
	G byte
	B byte
}

type Extrusion

type Extrusion struct {
	Top    float32 `json:"t"`
	Bottom float32 `json:"b"`

	OuterTexture int `json:"ot"`
	FaceTexture  int `json:"ft"`
	InnerTexture int `json:"it"`
}

type Level

type Level struct {
	Textures []string `json:"textures"`
	Walls    []Wall   `json:"walls"`
}

func LoadLevel

func LoadLevel(in io.Reader) (Level, error)

type Texture

type Texture struct {
	Width  int
	Height int
	Texels []byte
}

func LoadTexture

func LoadTexture(in io.Reader) (Texture, error)

type Wall

type Wall struct {
	LeftEdgeX  float32 `json:"lx"`
	LeftEdgeZ  float32 `json:"lz"`
	RightEdgeX float32 `json:"rx"`
	RightEdgeZ float32 `json:"rz"`

	Ceiling *Extrusion `json:"c,omitempty"`
	Floor   *Extrusion `json:"f,omitempty"`

	FrontWall int `json:"fw"`
	BackWall  int `json:"bw"`
}

Jump to

Keyboard shortcuts

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