1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-12 10:40:42 +00:00
OpenDiablo2/d2common/d2fileformats/d2dt1/block.go
2021-02-02 19:25:27 +01:00

25 lines
414 B
Go

package d2dt1
// Block represents a DT1 block
type Block struct {
unknown1 []byte
unknown2 []byte
X int16
Y int16
GridX byte
GridY byte
format int16
EncodedData []byte
Length int32
FileOffset int32
}
// Format returns block format
func (b *Block) Format() BlockDataFormat {
if b.format == 1 {
return BlockFormatIsometric
}
return BlockFormatRLE
}