controlsxml

package
v0.0.0-...-2ea3e0e Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2016 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(fileName string, callback EntryRead) error

Load process all control elements

Types

type ControlsConstant

type ControlsConstant struct {
	Name string `xml:"name,attr"`
}

ControlsConstant holds ControlsName

type ControlsControl

type ControlsControl struct {
	Name     string           `xml:"name,attr"`
	Constant ControlsConstant `xml:"constant"`
}

ControlsControl Why is this structured this way?

type ControlsGame

type ControlsGame struct {
	RomName        string           `xml:"romname,attr"`
	GameName       string           `xml:"gamename,attr"`
	Players        int              `xml:"numPlayers,attr"`
	Alternating    bool             `xml:"alternating,attr"`
	Mirrored       bool             `xml:"mirrored,attr"`
	UsesService    bool             `xml:"usesService,attr"`
	Tilt           bool             `xml:"tilt,attr"`
	Cocktail       bool             `xml:"cocktail,attr"`
	PlayerControls []ControlsPlayer `xml:"player"`
}

ControlsGame all control related to a game element

type ControlsName

type ControlsName struct {
	Name        string
	Description string
}

ControlsName Human description of control

func GetControlsNames

func GetControlsNames(controlGame ControlsGame) []ControlsName

GetControlsNames find all names for a certain constant

type ControlsPlayer

type ControlsPlayer struct {
	Controls []ControlsControl `xml:"controls>control"`
}

ControlsPlayer I give up

type EntryRead

type EntryRead func(controls *ControlsGame) error

EntryRead callback signature

Jump to

Keyboard shortcuts

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