game

package
v0.0.0-...-4ede3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: BSD-2-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 Game

type Game struct {
	GameMeta
	World
}

type GameMeta

type GameMeta struct {
	ID    string `json:"id"`
	World string `json:"world"`
	Vers  Vers   `json:"vers"`
}

func (*GameMeta) MarshalBinary

func (m *GameMeta) MarshalBinary() ([]byte, error)

func (*GameMeta) UnmarshalBinary

func (m *GameMeta) UnmarshalBinary(raw []byte) error

type Vers

type Vers struct {
	Major uint  `json:"major"`
	Minor uint  `json:"minor"`
	Mod   int64 `json:"mod"`
}

type World

type World struct {
	WorldMeta
	Pix pix.Sys
	Lvl lvl.Sys
	Obj obj.Sys
	Inv inv.Sys
	Dia dia.Sys
}

func (*World) Info

func (w *World) Info() WorldData

type WorldData

type WorldData struct {
	WorldMeta
	Pal  []*pix.Pal  `json:"pal"`
	Spot []*pix.Spot `json:"spot"`
	Img  []*pix.Img  `json:"img"`
	Clip []*pix.Clip `json:"clip"`
	Tset []*lvl.Tset `json:"tset"`
	Lvl  []*lvl.Lvl  `json:"lvl"`
	Info []*obj.Info `json:"info"`
	Obj  []*obj.Obj  `json:"obj"`
	Prod []*inv.Prod `json:"prod"`
	Inv  []*inv.Inv  `json:"inv"`
	Item []*inv.Item `json:"item"`
	Dia  []*dia.Dia  `json:"dia"`
}

type WorldMeta

type WorldMeta struct {
	Name string `json:"name"`
	Vers Vers   `json:"vers"`
}

func (*WorldMeta) MarshalBinary

func (m *WorldMeta) MarshalBinary() ([]byte, error)

func (*WorldMeta) UnmarshalBinary

func (m *WorldMeta) UnmarshalBinary(raw []byte) error

Directories

Path Synopsis
Packages bolt provides ways to store and query game data in the bbolt database.
Packages bolt provides ways to store and query game data in the bbolt database.
Package dia provides a dialog system.
Package dia provides a dialog system.
Package inv provides an item and inventory system.
Package inv provides an item and inventory system.
Package obj provides tools to work with game entities.
Package obj provides tools to work with game entities.
Package pix provides models and helpers to work with paletted pixel graphics.
Package pix provides models and helpers to work with paletted pixel graphics.

Jump to

Keyboard shortcuts

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