From f9117e7c9b5b6602e4eb55ee48815882a7085782 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sun, 1 May 2022 09:43:27 -0700 Subject: make name consistent; minor file organisation --- web/dartboat_wasm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/dartboat_wasm.c') diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c index 21d13fd..b4d232a 100644 --- a/web/dartboat_wasm.c +++ b/web/dartboat_wasm.c @@ -1,3 +1,5 @@ +#include "svg.h" + #include "checkouts.h" #include "comp.h" @@ -157,7 +159,6 @@ EMSCRIPTEN_KEEPALIVE void update_user_rem_from_pts(int pts) update_player_rem(state->active_player, state->active_leg->rem - pts); } -void draw_point(double, double); EMSCRIPTEN_KEEPALIVE void draw_boat_throwing(int pts, char *str, double x, double y) { char pts_str[10]; @@ -167,7 +168,7 @@ EMSCRIPTEN_KEEPALIVE void draw_boat_throwing(int pts, char *str, double x, doubl state->legs[1]->visits[state->legs[1]->n_visits-2].rem : state->legs[1]->start; - draw_point(x, y); + svg_draw_point(x, y); update_player_rem(2, rem - pts); EM_ASM({setPromptInput($0)}, pts_str); EM_ASM({promptMsgR($0)}, str); @@ -461,12 +462,11 @@ EMSCRIPTEN_KEEPALIVE void set_stdev(float stdev) horizontal_stdev = vertical_stdev = stdev; } -void draw_board(); void init_boat() { srand(time(NULL)); init_board(); - draw_board(); + svg_draw_board(); EM_ASM(readOpts()); EM_ASM({updateDelay($0)}, delay_ms); -- cgit v1.2.3-70-g09d2