From fa10ec56328db52080e15bdb3db3fb86a3a03a84 Mon Sep 17 00:00:00 2001 From: HimbeerserverDE Date: Thu, 8 Jun 2023 17:15:59 +0200 Subject: add DayOpacity to ToCltStarParams --- serialize.go | 92 +++++++++++++++++++++++++++++++++++++++--------------------- 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 { -- cgit v1.2.3