From d3eaceebe43cbb6b85125f73fbef3cf2241fe452 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Mon, 15 Apr 2024 20:19:25 +0100 Subject: add stroke drawop and refactor drawop ser/deser a bit --- client/main.ha | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/main.ha b/client/main.ha index 4c70892..9b8f92b 100644 --- a/client/main.ha +++ b/client/main.ha @@ -45,7 +45,7 @@ export fn main() void = { }; // connect to server - const conn = match(dial::dial("tcp","ubq323.website","41460")) { + const conn = match(dial::dial("tcp","localhost","41460")) { case let c: net::socket => yield c; case let err: net::error => fmt::fatal("couldn't connect to server:",net::strerror(err)); @@ -139,8 +139,7 @@ export fn main() void = { for (const packet => packet_reader::next(&packet_reader)!) { match (packet) { case let op: packet_reader::packet_drawop => - const opc = op as drawing::op_circle; - drawing::perform(pictures, opc); + drawing::perform(pictures, op); case let packet: packet_reader::packet_sendchunk => assert(packet.world_pos.0 % CHUNKSIZE == 0 && packet.world_pos.1 % CHUNKSIZE == 0, "bad chunk world pos"); -- cgit v1.2.3