common

package
v0.0.0-...-01a19e3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Button_name = map[int32]string{
	0:  "UP",
	1:  "RIGHT",
	2:  "LEFT",
	3:  "DOWN",
	4:  "A",
	5:  "B",
	6:  "X",
	7:  "Y",
	8:  "START",
	9:  "SELECT",
	10: "L",
	11: "R",
}
View Source
var Button_value = map[string]int32{
	"UP":     0,
	"RIGHT":  1,
	"LEFT":   2,
	"DOWN":   3,
	"A":      4,
	"B":      5,
	"X":      6,
	"Y":      7,
	"START":  8,
	"SELECT": 9,
	"L":      10,
	"R":      11,
}
View Source
var Command_name = map[int32]string{
	0:  "UP_UP",
	1:  "UP_DOWN",
	2:  "RIGHT_UP",
	3:  "RIGHT_DOWN",
	4:  "LEFT_UP",
	5:  "LEFT_DOWN",
	6:  "DOWN_UP",
	7:  "DOWN_DOWN",
	8:  "A_UP",
	9:  "A_DOWN",
	10: "B_UP",
	11: "B_DOWN",
	12: "X_UP",
	13: "X_DOWN",
	14: "Y_UP",
	15: "Y_DOWN",
	16: "START_UP",
	17: "START_DOWN",
	18: "SELECT_UP",
	19: "SELECT_DOWN",
	20: "L_UP",
	21: "L_DOWN",
	22: "R_UP",
	23: "R_DOWN",
}
View Source
var Command_value = map[string]int32{
	"UP_UP":       0,
	"UP_DOWN":     1,
	"RIGHT_UP":    2,
	"RIGHT_DOWN":  3,
	"LEFT_UP":     4,
	"LEFT_DOWN":   5,
	"DOWN_UP":     6,
	"DOWN_DOWN":   7,
	"A_UP":        8,
	"A_DOWN":      9,
	"B_UP":        10,
	"B_DOWN":      11,
	"X_UP":        12,
	"X_DOWN":      13,
	"Y_UP":        14,
	"Y_DOWN":      15,
	"START_UP":    16,
	"START_DOWN":  17,
	"SELECT_UP":   18,
	"SELECT_DOWN": 19,
	"L_UP":        20,
	"L_DOWN":      21,
	"R_UP":        22,
	"R_DOWN":      23,
}

Functions

This section is empty.

Types

type Button

type Button int32
const (
	Button_UP     Button = 0
	Button_RIGHT  Button = 1
	Button_LEFT   Button = 2
	Button_DOWN   Button = 3
	Button_A      Button = 4
	Button_B      Button = 5
	Button_X      Button = 6
	Button_Y      Button = 7
	Button_START  Button = 8
	Button_SELECT Button = 9
	Button_L      Button = 10
	Button_R      Button = 11
)

func CommandToButtonState

func CommandToButtonState(cmd Command) (button Button, pressed bool)

CommandToButtonState returns button from given command with press state.

func (Button) EnumDescriptor

func (Button) EnumDescriptor() ([]byte, []int)

func (Button) String

func (x Button) String() string

type Color

type Color struct {
	R                    uint64   `protobuf:"varint,1,opt,name=r,proto3" json:"r,omitempty"`
	G                    uint64   `protobuf:"varint,2,opt,name=g,proto3" json:"g,omitempty"`
	B                    uint64   `protobuf:"varint,3,opt,name=b,proto3" json:"b,omitempty"`
	A                    uint64   `protobuf:"varint,4,opt,name=a,proto3" json:"a,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Color) Descriptor

func (*Color) Descriptor() ([]byte, []int)

func (*Color) GetA

func (m *Color) GetA() uint64

func (*Color) GetB

func (m *Color) GetB() uint64

func (*Color) GetG

func (m *Color) GetG() uint64

func (*Color) GetR

func (m *Color) GetR() uint64

func (*Color) ProtoMessage

func (*Color) ProtoMessage()

func (*Color) Reset

func (m *Color) Reset()

func (*Color) String

func (m *Color) String() string

func (*Color) XXX_DiscardUnknown

func (m *Color) XXX_DiscardUnknown()

func (*Color) XXX_Marshal

func (m *Color) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Color) XXX_Merge

func (m *Color) XXX_Merge(src proto.Message)

func (*Color) XXX_Size

func (m *Color) XXX_Size() int

func (*Color) XXX_Unmarshal

func (m *Color) XXX_Unmarshal(b []byte) error

type Command

type Command int32
const (
	Command_UP_UP       Command = 0
	Command_UP_DOWN     Command = 1
	Command_RIGHT_UP    Command = 2
	Command_RIGHT_DOWN  Command = 3
	Command_LEFT_UP     Command = 4
	Command_LEFT_DOWN   Command = 5
	Command_DOWN_UP     Command = 6
	Command_DOWN_DOWN   Command = 7
	Command_A_UP        Command = 8
	Command_A_DOWN      Command = 9
	Command_B_UP        Command = 10
	Command_B_DOWN      Command = 11
	Command_X_UP        Command = 12
	Command_X_DOWN      Command = 13
	Command_Y_UP        Command = 14
	Command_Y_DOWN      Command = 15
	Command_START_UP    Command = 16
	Command_START_DOWN  Command = 17
	Command_SELECT_UP   Command = 18
	Command_SELECT_DOWN Command = 19
	Command_L_UP        Command = 20
	Command_L_DOWN      Command = 21
	Command_R_UP        Command = 22
	Command_R_DOWN      Command = 23
)

func (Command) EnumDescriptor

func (Command) EnumDescriptor() ([]byte, []int)

func (Command) String

func (x Command) String() string

type Coord

type Coord struct {
	X                    int64    `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y                    int64    `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Coord) Descriptor

func (*Coord) Descriptor() ([]byte, []int)

func (*Coord) GetX

func (m *Coord) GetX() int64

func (*Coord) GetY

func (m *Coord) GetY() int64

func (*Coord) ProtoMessage

func (*Coord) ProtoMessage()

func (*Coord) Reset

func (m *Coord) Reset()

func (*Coord) String

func (m *Coord) String() string

func (*Coord) XXX_DiscardUnknown

func (m *Coord) XXX_DiscardUnknown()

func (*Coord) XXX_Marshal

func (m *Coord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Coord) XXX_Merge

func (m *Coord) XXX_Merge(src proto.Message)

func (*Coord) XXX_Size

func (m *Coord) XXX_Size() int

func (*Coord) XXX_Unmarshal

func (m *Coord) XXX_Unmarshal(b []byte) error

type Frame

type Frame struct {
	Pixels               []*Color `protobuf:"bytes,1,rep,name=pixels,proto3" json:"pixels,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Frame) Descriptor

func (*Frame) Descriptor() ([]byte, []int)

func (*Frame) GetPixels

func (m *Frame) GetPixels() []*Color

func (*Frame) ProtoMessage

func (*Frame) ProtoMessage()

func (*Frame) Reset

func (m *Frame) Reset()

func (*Frame) String

func (m *Frame) String() string

func (*Frame) XXX_DiscardUnknown

func (m *Frame) XXX_DiscardUnknown()

func (*Frame) XXX_Marshal

func (m *Frame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Frame) XXX_Merge

func (m *Frame) XXX_Merge(src proto.Message)

func (*Frame) XXX_Size

func (m *Frame) XXX_Size() int

func (*Frame) XXX_Unmarshal

func (m *Frame) XXX_Unmarshal(b []byte) error

type Layer

type Layer struct {
	Uuid                 string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Layer) Descriptor

func (*Layer) Descriptor() ([]byte, []int)

func (*Layer) GetUuid

func (m *Layer) GetUuid() string

func (*Layer) ProtoMessage

func (*Layer) ProtoMessage()

func (*Layer) Reset

func (m *Layer) Reset()

func (*Layer) String

func (m *Layer) String() string

func (*Layer) XXX_DiscardUnknown

func (m *Layer) XXX_DiscardUnknown()

func (*Layer) XXX_Marshal

func (m *Layer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Layer) XXX_Merge

func (m *Layer) XXX_Merge(src proto.Message)

func (*Layer) XXX_Size

func (m *Layer) XXX_Size() int

func (*Layer) XXX_Unmarshal

func (m *Layer) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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