metadata

package
v2.13.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 1 Imported by: 6

Documentation

Overview

Package metadata provides metadata and utility functions, like translations from ingame coordinates to radar image pixels (see also /assets/maps directory).

Index

Constants

This section is empty.

Variables

View Source
var (
	MapDeAncient  = makeMap("de_ancient", -2953, 2164, 5)
	MapDeCache    = makeMap("de_cache", -2000, 3250, 5.5)
	MapDeCanals   = makeMap("de_canals", -2496, 1792, 4)
	MapDeCbble    = makeMap("de_cbble", -3840, 3072, 6)
	MapDeDust2    = makeMap("de_dust2", -2476, 3239, 4.4)
	MapDeInferno  = makeMap("de_inferno", -2087, 3870, 4.9)
	MapDeMirage   = makeMap("de_mirage", -3230, 1713, 5)
	MapDeNuke     = makeMap("de_nuke", -3453, 2887, 7)
	MapDeOverpass = makeMap("de_overpass", -4831, 1781, 5.2)
	MapDeTrain    = makeMap("de_train", -2477, 2392, 4.7)
	MapDeVertigo  = makeMap("de_vertigo", -3168, 1762, 4)
	MapCsAgency   = makeMap("cs_agency", -2947, 2492, 5)
	MapCsOffice   = makeMap("cs_office", -1838, 1858, 4.1)
)

Pre-defined map translations. see "steamapps/common/Counter-Strike Global Offensive/csgo/resource/overviews/*.txt"

View Source
var MapNameToMap = make(map[string]Map)

MapNameToMap translates a map name to a Map.

Functions

This section is empty.

Types

type Map

type Map struct {
	Name  string
	PZero r2.Point
	Scale float64
}

Map represents a CS:GO map. It contains information required to translate in-game world coordinates to coordinates relative to (0, 0) on the provided map-overviews (radar images).

func (Map) Translate

func (m Map) Translate(x, y float64) (float64, float64)

Translate translates in-game world-relative coordinates to (0, 0) relative coordinates.

func (Map) TranslateScale

func (m Map) TranslateScale(x, y float64) (float64, float64)

TranslateScale translates and scales in-game world-relative coordinates to (0, 0) relative coordinates. The outputs are pixel coordinates for the radar images found in the maps folder.

Jump to

Keyboard shortcuts

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