diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-08 17:15:59 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-08 17:15:59 +0200 |
commit | fa10ec56328db52080e15bdb3db3fb86a3a03a84 (patch) | |
tree | 650cf76750a724df1f3067bae2f21938d8b20b8b | |
parent | e98dd24a04aae3c202db0d41b8bad01dc0d5e7cd (diff) |
add DayOpacity to ToCltStarParams
-rw-r--r-- | serialize.go | 92 | ||||
-rw-r--r-- | tocltcmds.go | 9 |
2 files changed, 65 insertions, 36 deletions
diff --git a/serialize.go b/serialize.go index 08ae94b..273558d 100644 --- a/serialize.go +++ b/serialize.go @@ -13437,10 +13437,11 @@ func (obj *ToCltMoonParams) deserialize(r io.Reader) { func (obj *ToCltStarParams) serialize(w io.Writer) { { x := (*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Visible if x { write8(w, 1) @@ -13450,40 +13451,54 @@ func (obj *ToCltStarParams) serialize(w io.Writer) { } { x := (*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Count write32(w, uint32(x)) } { x := (*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Color w.Write([]byte{x.A, x.R, x.G, x.B}) } { x := (*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Size write32(w, math.Float32bits(x)) } + { + x := (*(*(struct { + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 + }))(obj)).DayOpacity + write32(w, math.Float32bits(x)) + } } func (obj *ToCltStarParams) deserialize(r io.Reader) { { p := &(*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Visible switch n := read8(r); n { case 0: @@ -13496,31 +13511,44 @@ func (obj *ToCltStarParams) deserialize(r io.Reader) { } { p := &(*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Count *p = read32(r) } { p := &(*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Color *p = color.NRGBA{A: read8(r), R: read8(r), G: read8(r), B: read8(r)} } { p := &(*(*(struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 }))(obj)).Size *p = math.Float32frombits(read32(r)) } + { + p := &(*(*(struct { + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 + }))(obj)).DayOpacity + *p = math.Float32frombits(read32(r)) + } } func (obj *ToCltSRPBytesSaltB) serialize(w io.Writer) { diff --git a/tocltcmds.go b/tocltcmds.go index a6ba471..4a553a2 100644 --- a/tocltcmds.go +++ b/tocltcmds.go @@ -737,10 +737,11 @@ type ToCltMoonParams struct { // ToCltStarParams tells the client how to render the stars. type ToCltStarParams struct { - Visible bool - Count uint32 - Color color.NRGBA - Size float32 + Visible bool + Count uint32 + Color color.NRGBA + Size float32 + DayOpacity float32 } type ToCltSRPBytesSaltB struct { |