summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-15 20:19:25 +0100
committerubq323 <ubq323@ubq323.website>2024-04-15 20:19:25 +0100
commitd3eaceebe43cbb6b85125f73fbef3cf2241fe452 (patch)
tree64902701cb24bf0715364e8fddd534de1bc97190 /client
parente19852c958838688481422ed3ddd953d2dcd4309 (diff)
add stroke drawop and refactor drawop ser/deser a bit
Diffstat (limited to 'client')
-rw-r--r--client/main.ha5
1 files changed, 2 insertions, 3 deletions
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");