mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-02 09:17:19 -04:00
55 lines
984 B
Go
55 lines
984 B
Go
package d2dt1
|
|
|
|
type SubTileFlags struct {
|
|
BlockWalk bool
|
|
BlockLOS bool
|
|
BlockJump bool
|
|
BlockPlayerWalk bool
|
|
Unknown1 bool
|
|
BlockLight bool
|
|
Unknown2 bool
|
|
Unknown3 bool
|
|
}
|
|
|
|
func (s* SubTileFlags) DebugString() string {
|
|
result := ""
|
|
if s.BlockWalk {
|
|
result += "BlockWalk "
|
|
}
|
|
if s.BlockLOS {
|
|
result += "BlockLOS "
|
|
}
|
|
if s.BlockJump {
|
|
result += "BlockJump "
|
|
}
|
|
if s.BlockPlayerWalk {
|
|
result += "BlockPlayerWalk "
|
|
}
|
|
if s.Unknown1 {
|
|
result += "Unknown1 "
|
|
}
|
|
if s.BlockLight {
|
|
result += "BlockLight "
|
|
}
|
|
if s.Unknown2 {
|
|
result += "Unknown2 "
|
|
}
|
|
if s.Unknown3 {
|
|
result += "Unknown3 "
|
|
}
|
|
return result
|
|
}
|
|
|
|
func NewSubTileFlags(data byte) SubTileFlags {
|
|
return SubTileFlags{
|
|
BlockWalk: data & 1 == 1,
|
|
BlockLOS: data & 2 == 2,
|
|
BlockJump: data & 4 == 4,
|
|
BlockPlayerWalk: data & 8 == 8,
|
|
Unknown1: data & 16 == 16,
|
|
BlockLight: data & 32 == 32,
|
|
Unknown2: data & 64 == 64,
|
|
Unknown3: data & 128 == 128,
|
|
}
|
|
}
|