Switch from encoding/binary to struc
It's not perfect, but struc can deserialize the whole thing into one struct while encoding/binary can't. It's nice to have that.
This commit is contained in:
@@ -139,16 +139,15 @@ func loadMapsFrom(mapsPath string) {
|
||||
}
|
||||
|
||||
log.Printf("Maps in %s:", mapsPath)
|
||||
for key, gameMap := range gameMaps {
|
||||
rect := gameMap.Rect()
|
||||
hdr := gameMap.Header
|
||||
for key, gm := range gameMaps {
|
||||
rect := gm.Rect()
|
||||
fmt.Printf(
|
||||
" * `%s`: IsCampaignMap=%v W=%v:%v L=%v:%v SetName=%s\n",
|
||||
key,
|
||||
hdr.IsCampaignMap,
|
||||
gm.IsCampaignMap,
|
||||
rect.Min.X, rect.Max.X,
|
||||
rect.Min.Y, rect.Max.Y,
|
||||
string(hdr.SetName[:]),
|
||||
string(gm.SetName),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user