summaryrefslogtreecommitdiff
path: root/classic
diff options
context:
space:
mode:
authorraven <citrons@mondecitronne.com>2026-03-22 15:22:22 -0500
committerraven <citrons@mondecitronne.com>2026-03-22 15:22:22 -0500
commitc8ccf29f3154299b7f692e75cfe835935e9b8362 (patch)
treecb9c8e16d70b9405c5bcb57b836f4de3deff354d /classic
parent4b3aca124e0aab537e94d4d1582a093fa5d24dcb (diff)
EnvMapAspect
Diffstat (limited to 'classic')
-rw-r--r--classic/ext_env_map_aspect.go50
1 files changed, 50 insertions, 0 deletions
diff --git a/classic/ext_env_map_aspect.go b/classic/ext_env_map_aspect.go
new file mode 100644
index 0000000..0c2f5e1
--- /dev/null
+++ b/classic/ext_env_map_aspect.go
@@ -0,0 +1,50 @@
+package classic
+
+import "bytes"
+
+type DoubleString [128]byte
+
+func PadDString(str string) DoubleString {
+ var pstr DoubleString
+ copy(pstr[:], []byte(str))
+ if len(str) < 64 {
+ copy(pstr[len(str):], bytes.Repeat([]byte(" "), 128 - len(str)))
+ }
+ return pstr
+}
+
+func UnpadDString(pstr DoubleString) string {
+ return string(bytes.TrimRight(pstr[:], " "))
+}
+
+func (s DoubleString) String() string {
+ return UnpadDString(s)
+}
+
+type SetMapEnvUrl struct {
+ TexturePackUrl DoubleString
+}
+func (p *SetMapEnvUrl) PacketId() byte {
+ return 0x28
+}
+
+const (
+ SideBlock = iota
+ HorizonBlock
+ EdgeHeight
+ CloudsHeight
+ ViewDistance
+ CloudsSpeed
+ WeatherSpeed
+ WeatherFad
+ ExpFog
+ SidesEdgeOffset
+)
+
+type SetMapEnvProperty struct {
+ PropertyType byte
+ PropertyVal int
+}
+func (p *SetMapEnvProperty) PacketId() byte {
+ return 0x29
+}