Documentation ¶
Overview ¶
Package w3m implements basic information extraction functions for w3m/w3x files.
Index ¶
- Variables
- type CustomTechAvailability
- type CustomUpgradeAvailability
- type Force
- type ForceFlags
- type Hash
- type Info
- type Map
- func (m *Map) Checksum(defaultFiles map[string]io.Reader) (*Hash, error)
- func (m *Map) Close() error
- func (m *Map) ExpandString(s string) (string, error)
- func (m *Map) Info() (*Info, error)
- func (m *Map) Minimap() (image.Image, error)
- func (m *Map) Preview() (image.Image, error)
- func (m *Map) Signed() bool
- func (m *Map) TriggerStrings() (map[int]string, error)
- type MapFlags
- type Player
- type PlayerFlags
- type PlayerType
- type Race
- type Size
- type Tileset
- type UpgradeAvailability
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBadFormat = errors.New("w3m: Invalid file format")
)
Errors
Functions ¶
This section is empty.
Types ¶
type CustomTechAvailability ¶
type CustomTechAvailability struct { PlayerSet protocol.BitSet32 TechID protocol.DWordString }
CustomTechAvailability in war3map.w3i file
type CustomUpgradeAvailability ¶
type CustomUpgradeAvailability struct { PlayerSet protocol.BitSet32 UpgradeID protocol.DWordString Level uint32 Availability UpgradeAvailability }
CustomUpgradeAvailability in war3map.w3i file
type Force ¶
type Force struct { Flags ForceFlags PlayerSet protocol.BitSet32 Name string }
Force structure in war3map.w3i file
type ForceFlags ¶
type ForceFlags uint32
ForceFlags enum
const ( ForceFlagAllied ForceFlags = 0x01 ForceFlagAlliedVictory ForceFlags = 0x02 )
Force Flags
func (ForceFlags) String ¶
func (f ForceFlags) String() string
type Info ¶
type Info struct { FileFormat uint32 SaveCount uint32 EditorVersion uint32 Name string Author string Description string SuggestedPlayers string CamBounds [8]float32 CamBoundsCompl [4]uint32 Width uint32 Height uint32 Flags MapFlags Tileset Tileset LsBackground uint32 LsPath string LsText string LsTitle string LsSubTitle string DataSet uint32 PsPath string PsText string PsTitle string PsSubTitle string Fog uint32 FogStart float32 FogEnd float32 FogDensity float32 FogColor uint32 WeatherID protocol.DWordString SoundEnv string LightEnv Tileset WaterColor uint32 Players []Player Forces []Force CustomUpgradeAvailabilities []CustomUpgradeAvailability CustomTechAvailabilities []CustomTechAvailability }
Info for Warcraft III maps as found in the war3map.w3i file
type Map ¶
Map refers to an w3m/w3x map (MPQ archive)
func (*Map) ExpandString ¶
ExpandString expands trigger strings in s and returns the expanded string
type MapFlags ¶
type MapFlags uint32
MapFlags enum
const ( MapFlagHideMinimap MapFlags = 0x0001 MapFlagModifyAllyPriorities MapFlags = 0x0002 MapFlagMelee MapFlags = 0x0004 MapFlagRevealTerrain MapFlags = 0x0010 MapFlagFixedPlayerSettings MapFlags = 0x0020 MapFlagCustomForces MapFlags = 0x0040 MapFlagCustomTechTree MapFlags = 0x0080 MapFlagCustomAbilities MapFlags = 0x0100 MapFlagCustomUpgrades MapFlags = 0x0200 MapFlagWaterWavesOnCliffShoes MapFlags = 0x0800 MapFlagWaterWavesOnSlopeShores MapFlags = 0x1000 )
Map Flags
type Player ¶
type Player struct { ID uint32 Type PlayerType Race Race Flags PlayerFlags Name string StartPosX float32 StartPosY float32 AllyPrioLow protocol.BitSet32 AllyPrioHigh protocol.BitSet32 }
Player structure in war3map.w3i file
type PlayerFlags ¶
type PlayerFlags uint32
PlayerFlags enum
const (
PlayerFlagFixedPos PlayerFlags = 0x01
)
Player Flags
func (PlayerFlags) String ¶
func (f PlayerFlags) String() string
type PlayerType ¶
type PlayerType uint32
PlayerType enum
const ( PlayerHuman PlayerType = iota + 1 PlayerComputer PlayerNeutral PlayerRescuable )
Player types
func (PlayerType) String ¶
func (p PlayerType) String() string
type Size ¶
type Size uint8
Size enum
type Tileset ¶
type Tileset byte
Tileset enum
const ( TileAshenvale Tileset = 'A' TileBarrens Tileset = 'B' TileFelwood Tileset = 'C' TileDungeon Tileset = 'D' TileLordaeronFall Tileset = 'F' TileUnderground Tileset = 'G' TileLordaeronSummer Tileset = 'L' TileNorthrend Tileset = 'N' TileVillageFall Tileset = 'Q' TileVillage Tileset = 'V' TileLordaeronWinter Tileset = 'W' TileDalaran Tileset = 'X' TileCityscape Tileset = 'Y' TileSunkenRuins Tileset = 'Z' TileIcecrown Tileset = 'I' TileDalaranRuins Tileset = 'J' TileOutland Tileset = 'O' TileBlackCitadel Tileset = 'K' )
Tileset
type UpgradeAvailability ¶
type UpgradeAvailability uint32
UpgradeAvailability enum
const ( UpgradeAvailable UpgradeResearched )
Upgrade availabilities
func (UpgradeAvailability) String ¶
func (u UpgradeAvailability) String() string
Click to show internal directories.
Click to hide internal directories.