input

package
v0.0.0-...-dc33bde Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Right byte = iota
	Left
	Up
	Down
	A
	B
	Select
	Start
)
View Source
const P1 uint16 = 0xff00

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event int
const (
	None Event = iota
	Quit
)

type Joypad

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

func NewJoypad

func NewJoypad(ic *interrupt.IC) *Joypad

func (*Joypad) ReadByte

func (j *Joypad) ReadByte(address uint16) byte

func (*Joypad) ResetKey

func (j *Joypad) ResetKey(mask byte)

func (*Joypad) SetKey

func (j *Joypad) SetKey(mask byte)

func (*Joypad) WriteByte

func (j *Joypad) WriteByte(address uint16, value byte)

type Keys

type Keys interface {
	Read() Event
}

func NewSDLKeys

func NewSDLKeys(joypad *Joypad) Keys

type SDLKeys

type SDLKeys struct {
	// contains filtered or unexported fields
}

func (*SDLKeys) Read

func (s *SDLKeys) Read() Event

Jump to

Keyboard shortcuts

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