joypad

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	A      = 0
	B      = 1
	Select = 2
	Start  = 3
	Right  = 4
	Left   = 5
	Up     = 6
	Down   = 7
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Joypad

type Joypad struct {
	P1 byte
	// contains filtered or unexported fields
}

Joypad state

func New

func New(h [8](func() bool)) *Joypad

func (*Joypad) Input

func (j *Joypad) Input() bool

Input joypad

func (*Joypad) Output

func (pad *Joypad) Output() byte

Output returns joypad state in bitfield format

Jump to

Keyboard shortcuts

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