iso

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoordsToTile

func CoordsToTile(x, y int) (int16, int16)

Given logical x and y, returns the tile (col, row).

func TileCoords

func TileCoords(col, row int16) (int, int)

Given a tile column and row, returns the top left tile coordinates.

func TileIndexToKey

func TileIndexToKey(col, row int16) int32

func YCoord

func YCoord(col, row int16) int

Types

type Map

type Map[T any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[T any]() Map[T]

func (*Map[T]) Delete

func (self *Map[T]) Delete(x, y int16)

func (*Map[T]) DeleteArea

func (self *Map[T]) DeleteArea(x, y int16, w, h int)

func (*Map[T]) Each

func (self *Map[T]) Each(fn func(x, y int16, value T))

func (*Map[T]) Get

func (self *Map[T]) Get(x, y int16) (T, bool)

func (*Map[T]) Set

func (self *Map[T]) Set(x, y int16, value T)

func (*Map[T]) SetArea

func (self *Map[T]) SetArea(x, y int16, w, h int, value T)

func (*Map[T]) Size

func (self *Map[T]) Size() int

Jump to

Keyboard shortcuts

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