res

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AudioSampleRate = 44_100
View Source
const PieceCount = 12

PieceCount is the total number of pieces

View Source
const PieceTileSize = 128

PieceTileSize is the width/height of each tile in a piece

Variables

View Source
var UiImageRects = map[UiImageType]image.Rectangle{
	BackgroundButton: r(378, 44, 40, 20),
	BackgroundDialog: r(64, 0, 64, 64),
	BackgroundPanel:  r(0, 0, 64, 64),
	Forward:          r(278, 14, 50, 50),
	MusicOff:         r(178, 14, 50, 50),
	MusicOn:          r(328, 14, 50, 50),
	Pause:            r(228, 14, 50, 50),
	Return:           r(128, 14, 50, 50),
	Stripes:          r(378, 16, 28, 28),
}

UiImageRects are coordinates for ui.png from ui.atlas TODO: Auto parse from atlas file

Functions

func Adjective

func Adjective(index int) string

func Font

func Font(fontType FontType, fontSize float64) (font.Face, error)

func Image

func Image(name string) (*ebiten.Image, error)

func Music

func Music() (*vorbis.Stream, error)

func Noun

func Noun(index int) string

func RandomWord

func RandomWord(seed int64) string

Types

type FontType

type FontType uint8
const (
	FontRegular FontType = iota
	FontTitle   FontType = iota
	FontDebug   FontType = iota
)

type UiImageType

type UiImageType uint8
const (
	BackgroundButton UiImageType = iota
	BackgroundDialog UiImageType = iota
	BackgroundPanel  UiImageType = iota
	Forward          UiImageType = iota
	MusicOff         UiImageType = iota
	MusicOn          UiImageType = iota
	Pause            UiImageType = iota
	Return           UiImageType = iota
	Stripes          UiImageType = iota
)

Jump to

Keyboard shortcuts

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