groovymister

package
v0.0.0-...-41c7586 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LaunchGroovyCore

func LaunchGroovyCore(path string) error

Types

type GroovyInput

type GroovyInput struct {
	PrevJoy1   GroovyJoy
	Joy1       GroovyJoy
	PrevJoy2   GroovyJoy
	Joy2       GroovyJoy
	IsDisabled bool
}

func (*GroovyInput) AddInputPacket

func (input *GroovyInput) AddInputPacket(packet GroovyInputPacket)

func (*GroovyInput) IsJustPressed

func (input *GroovyInput) IsJustPressed(joyNum uint8, key InputKey) bool

func (*GroovyInput) IsJustReleased

func (input *GroovyInput) IsJustReleased(joyNum uint8, key InputKey) bool

func (*GroovyInput) IsPressed

func (input *GroovyInput) IsPressed(joyNum uint8, key InputKey) bool

type GroovyInputPacket

type GroovyInputPacket struct {
	JoyFrame uint32
	JoyOrder uint8
	Joy1Mask uint16 // bitmask
	Joy2Mask uint16 // bitmask

}

func InputPacketFromBuffer

func InputPacketFromBuffer(buf []uint8) GroovyInputPacket

type GroovyJoy

type GroovyJoy struct {
	Right bool
	Left  bool
	Down  bool
	Up    bool
	B1    bool
	B2    bool
	B3    bool
	B4    bool
	B5    bool
	B6    bool
	B7    bool
	B8    bool
	B9    bool
}

func GroovyJoyFromMask

func GroovyJoyFromMask(m uint16) GroovyJoy

type InputKey

type InputKey uint8
const (
	InputRight InputKey = iota
	InputLeft
	InputDown
	InputUp
	InputB1
	InputB2
	InputB3
	InputB4
	InputB5
	InputB6
	InputB7
	InputB8
	InputB9
)

type Modeline

type Modeline struct {
	PixelClock float64
	HActive    uint16
	HBegin     uint16
	HEnd       uint16
	HTotal     uint16
	VActive    uint16
	VBegin     uint16
	VEnd       uint16
	VTotal     uint16
	FrameRate  float64
	Interlace  bool
}

func ModelineFromSettings

func ModelineFromSettings(modeline string, frameRate float64, interlace bool) *Modeline

type UdpClient

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

func NewUdpClient

func NewUdpClient(host string, mtuBlockSize int32) UdpClient

func (*UdpClient) Close

func (client *UdpClient) Close()

func (*UdpClient) CmdBlit

func (client *UdpClient) CmdBlit(frameBuffer []byte)

func (*UdpClient) CmdClose

func (client *UdpClient) CmdClose()

func (*UdpClient) CmdInit

func (client *UdpClient) CmdInit()

func (*UdpClient) CmdSwitchres

func (client *UdpClient) CmdSwitchres(modeline *Modeline)

func (*UdpClient) PollInput

func (client *UdpClient) PollInput() (chan GroovyInputPacket, chan bool)

func (*UdpClient) SendMTU

func (client *UdpClient) SendMTU(buffer []byte)

func (*UdpClient) SendPacket

func (client *UdpClient) SendPacket(buffer []byte)

Jump to

Keyboard shortcuts

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