diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-02 05:58:26 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-02 05:58:26 -0700 |
commit | 6a4dd8790c5c98466087a5374611f72131eff958 (patch) | |
tree | a40a8fe0ef8833e2c758d6b67fda640fa6d28b01 /web/web_main.c | |
parent | 446a32d0e301285e54fa1030fb2138b0169d3fae (diff) | |
download | dartboat-6a4dd8790c5c98466087a5374611f72131eff958.tar.gz dartboat-6a4dd8790c5c98466087a5374611f72131eff958.tar.xz |
web: generate all required files in new dir
Diffstat (limited to 'web/web_main.c')
-rw-r--r-- | web/web_main.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/web/web_main.c b/web/web_main.c new file mode 100644 index 0000000..42535aa --- /dev/null +++ b/web/web_main.c @@ -0,0 +1,31 @@ +#include "web_control.h" +#include "web_opts.h" +#include "web_prompt.h" +#include "web_svg.h" + +#include "comp.h" + +#include <stdlib.h> +#include <time.h> + +#include <emscripten/emscripten.h> + +EMSCRIPTEN_KEEPALIVE +void init() +{ + srand(time(NULL)); + init_board(); + svg_draw_board(); + + EM_ASM(readOpts()); + EM_ASM({updateDelay($0)}, delay_ms); + EM_ASM({updateStdev($0)}, horizontal_stdev); + + set_prompt_mode(PM_VISIT); + handle_next(); +} + +int main() +{ + EM_ASM(boatAfloat()); +} |