mapdraw

package
v0.0.0-...-f7f36cf Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NeighborOffset              = [4][2]int{{0, 1}, {-1, 0}, {0, -1}, {1, 0}}
	NeighborOffsetWithDiagonals = [8][2]int{{0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}}
)

Functions

func DrawMap

func DrawMap(
	saveData *polytopiamapmodel.PolytopiaSaveOutput,
	highlightedTileX int,
	highlightedTileY int,
	graphicsOptions GraphicsOptions,
) image.Image

func GetPlayerColor

func GetPlayerColor(playerData polytopiamapmodel.PlayerData) color.RGBA

func GetTileCoordinates

func GetTileCoordinates(pixelX int, pixelY int, mapWidth int, mapHeight int) (int, int)

func SaveImage

func SaveImage(outputFilename string, im image.Image)

Types

type GraphicsOptions

type GraphicsOptions struct {
	ShowResourcesImprovements bool
	ShowRoads                 bool
	ShowUnits                 bool
}

Jump to

Keyboard shortcuts

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