mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-01-14 13:26:49 -05:00
hotfix: rename hidden -> HiddenBytes in wall_record.go and floor_shadow_record.go
This commit is contained in:
parent
0428aa274a
commit
bbeb4b48e2
@ -37,7 +37,7 @@ type FloorShadowRecord struct {
|
||||
Unknown1 byte
|
||||
Style byte
|
||||
Unknown2 byte
|
||||
hidden byte
|
||||
HiddenBytes byte
|
||||
RandomIndex byte
|
||||
Animated bool
|
||||
YAdjust int
|
||||
@ -45,7 +45,7 @@ type FloorShadowRecord struct {
|
||||
|
||||
// Hidden returns if floor/shadow is hidden
|
||||
func (f *FloorShadowRecord) Hidden() bool {
|
||||
return f.hidden > 0
|
||||
return f.HiddenBytes > 0
|
||||
}
|
||||
|
||||
// Decode decodes floor-shadow record
|
||||
@ -55,7 +55,7 @@ func (f *FloorShadowRecord) Decode(dw uint32) {
|
||||
f.Unknown1 = byte((dw & unknown1Bitmask) >> unknown1Offset)
|
||||
f.Style = byte((dw & styleBitmask) >> styleOffset)
|
||||
f.Unknown2 = byte((dw & unknown2Bitmask) >> unknown2Offset)
|
||||
f.hidden = byte((dw & hiddenBitmask) >> hiddenOffset)
|
||||
f.HiddenBytes = byte((dw & hiddenBitmask) >> hiddenOffset)
|
||||
}
|
||||
|
||||
// Encode adds Floor's bits to stream writter given
|
||||
@ -65,5 +65,5 @@ func (f *FloorShadowRecord) Encode(sw *d2datautils.StreamWriter) {
|
||||
sw.PushBits32(uint32(f.Unknown1), unknown1Length)
|
||||
sw.PushBits32(uint32(f.Style), styleLength)
|
||||
sw.PushBits32(uint32(f.Unknown2), unknown2Length)
|
||||
sw.PushBits32(uint32(f.hidden), hiddenLength)
|
||||
sw.PushBits32(uint32(f.HiddenBytes), hiddenLength)
|
||||
}
|
||||
|
@ -14,14 +14,14 @@ type WallRecord struct {
|
||||
Unknown1 byte
|
||||
Style byte
|
||||
Unknown2 byte
|
||||
hidden byte
|
||||
HiddenBytes byte
|
||||
RandomIndex byte
|
||||
YAdjust int
|
||||
}
|
||||
|
||||
// Hidden returns if wall is hidden
|
||||
func (w *WallRecord) Hidden() bool {
|
||||
return w.hidden > 0
|
||||
return w.HiddenBytes > 0
|
||||
}
|
||||
|
||||
// Decode decodes wall record
|
||||
@ -31,7 +31,7 @@ func (w *WallRecord) Decode(dw uint32) {
|
||||
w.Unknown1 = byte((dw & unknown1Bitmask) >> unknown1Offset)
|
||||
w.Style = byte((dw & styleBitmask) >> styleOffset)
|
||||
w.Unknown2 = byte((dw & unknown2Bitmask) >> unknown2Offset)
|
||||
w.hidden = byte((dw & hiddenBitmask) >> hiddenOffset)
|
||||
w.HiddenBytes = byte((dw & hiddenBitmask) >> hiddenOffset)
|
||||
}
|
||||
|
||||
// Encode adds wall's record's bytes into stream writer given
|
||||
@ -41,5 +41,5 @@ func (w *WallRecord) Encode(sw *d2datautils.StreamWriter) {
|
||||
sw.PushBits32(uint32(w.Unknown1), unknown1Length)
|
||||
sw.PushBits32(uint32(w.Style), styleLength)
|
||||
sw.PushBits32(uint32(w.Unknown2), unknown2Length)
|
||||
sw.PushBits32(uint32(w.hidden), hiddenLength)
|
||||
sw.PushBits32(uint32(w.HiddenBytes), hiddenLength)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user