summaryrefslogtreecommitdiff
path: root/web/dartboat_wasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/dartboat_wasm.c')
-rw-r--r--web/dartboat_wasm.c8
1 files changed, 4 insertions, 4 deletions
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);