1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-19 13:45:23 +00:00
OpenDiablo2/d2common/d2fileformats/d2dt1/block.go

31 lines
538 B
Go
Raw Normal View History

package d2dt1
2020-06-29 02:32:34 +00:00
// Block represents a DT1 block
type Block struct {
X int16
Y int16
GridX byte
GridY byte
2021-02-02 18:25:27 +00:00
format int16
EncodedData []byte
Length int32
FileOffset int32
}
2021-02-02 18:25:27 +00:00
// Format returns block format
func (b *Block) Format() BlockDataFormat {
if b.format == 1 {
return BlockFormatIsometric
}
return BlockFormatRLE
}
func (b *Block) unknown1() []byte {
return make([]byte, numUnknownBlockBytes)
}
func (b *Block) unknown2() []byte {
return make([]byte, numUnknownBlockBytes)
}