pr2_level_import

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

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

Go to latest
Published: Nov 16, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MODE_DRAW = "draw"
View Source
const MODE_ERASE = "erase"

Variables

This section is empty.

Functions

func SetupPR2LevelImportRoutes

func SetupPR2LevelImportRoutes(router *gin.Engine, db *gorm.DB)

func SetupPR2LevelListRoutes

func SetupPR2LevelListRoutes(router *gin.Engine)

Types

type Chunk

type Chunk struct {
	Data   []int `json:"data"`
	Width  int   `json:"width"`
	Height int   `json:"height"`
	X      int   `json:"x"`
	Y      int   `json:"y"`
}

type Layer

type Layer struct {
	Opacity   int     `json:"opacity"`
	Type      string  `json:"type"`
	Name      string  `json:"name"`
	Visible   bool    `json:"visible"`
	OffsetX   int     `json:"offsetx"`
	OffsetY   int     `json:"offsety"`
	Width     int     `json:"width"`
	Height    int     `json:"height"`
	X         int     `json:"x"`
	Y         int     `json:"y"`
	Chunks    []Chunk `json:"chunks"`
	Depth     int     `json:"depth"`
	DrawOrder string  `json:"draworder"`
	Lines     []Line  `json:"lines"`
	Scale     float64 `json:"scale"`
}

type Line

type Line struct {
	X         float64 `json:"x"`
	Y         float64 `json:"y"`
	Points    []Point `json:"points"`
	Color     string  `json:"color"`
	Thickness int     `json:"thickness"`
	Mode      string  `json:"mode"`
}

type PR2Level

type PR2Level struct {
	Items       string     `json:"items"`
	Blocks      []string   `json:"blocks"`
	ArtLayers   [][]string `json:"artlayers"`
	Note        string     `json:"note"`
	Gravity     string     `json:"gravity"`
	Song        string     `json:"song"`
	LevelId     string     `json:"levelid"`
	Data        string     `json:"data"`
	FileVersion string     `json:"fileversion"`
	FadeColor   string     `json:"fadecolor"`
	BG          string     `json:"bg"`
	Title       string     `json:"title"`
	Hash        string     `json:"hash"`
}

type PR2LevelSections

type PR2LevelSections struct {
	FileVersion string     `json:"fileversion"`
	FadeColor   string     `json:"fadecolor"`
	Blocks      []string   `json:"blocks"`
	ArtLayers   [][]string `json:"artlayers"`
	BG          string     `json:"bg"`
}

type PR4Level

type PR4Level struct {
	BackgroundColor string                 `json:"backgroundcolor"`
	Width           int                    `json:"width"`
	Height          int                    `json:"height"`
	Infinite        bool                   `json:"infinite"`
	Layers          []Layer                `json:"layers"`
	Orientation     string                 `json:"orientation"`
	TileHeight      int                    `json:"tileheight"`
	TileWidth       int                    `json:"tilewidth"`
	TiledVersion    string                 `json:"tiledversion"`
	Properties      map[string]interface{} `json:"properties"`
	Tilesets        []Tileset              `json:"tilesets"`
}

type Point

type Point struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

type StampData

type StampData struct {
	ImageHeight float64 `json:"imageheight"`
	ImageWidth  float64 `json:"imagewidth"`
}

type Tileset

type Tileset struct {
	FirstGid int                  `json:"firstgid"`
	Name     string               `json:"name"`
	Tiles    map[string]StampData `json:"tiles"`
}

Jump to

Keyboard shortcuts

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