summaryrefslogtreecommitdiff
path: root/web/web_prompt.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-04 11:08:23 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-04 11:08:23 -0700
commita28369258b89e013103edcca20355eb61fffdf69 (patch)
treee514c8804fcdb5f282a012d8e8931b057585aba0 /web/web_prompt.c
parent3492c24cc533e9088e8b12f929f5d922c8787cba (diff)
downloaddartboat-a28369258b89e013103edcca20355eb61fffdf69.tar.gz
dartboat-a28369258b89e013103edcca20355eb61fffdf69.tar.xz
formatting
Diffstat (limited to 'web/web_prompt.c')
-rw-r--r--web/web_prompt.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/web/web_prompt.c b/web/web_prompt.c
index 814b08e..22ec4c1 100644
--- a/web/web_prompt.c
+++ b/web/web_prompt.c
@@ -22,7 +22,8 @@ enum prompt_mode pm;
void oi()
{
EM_ASM({elemAddClass($0, $1)}, "#oi", "visible");
- oi_timeout = EM_ASM_INT({return scheduleCCall($0, $1)}, "clear_oi", 3000);
+ oi_timeout = EM_ASM_INT({return scheduleCCall($0, $1)},
+ "clear_oi", 3000);
}
EMSCRIPTEN_KEEPALIVE
@@ -102,8 +103,9 @@ void set_prompt_mode(enum prompt_mode mode)
EM_ASM({elemRemoveClass($0, $1)}, "#prompt", "active");
EM_ASM({elemSetUniqClass($0, $1, $2)},
- (pm == PM_DARTBOARD ? "#keypad-dartboard" :
- pm == PM_SELECT_MODE ? "#keypad-select_mode" : "#keypad-default"),
+ pm == PM_DARTBOARD ? "#keypad-dartboard" :
+ pm == PM_SELECT_MODE ? "#keypad-select_mode" :
+ "#keypad-default",
"visible", ".keypad");
}
@@ -137,8 +139,8 @@ void prompt_end_match()
scoreboard_set_player_active(-1); // sets all inactive
set_prompt_mode(PM_END_MATCH);
prompt_set_msgl(
- state->mode == M_PVC && state->legs[1]->rem <= 0 ? "Bot wins. :(" :
- "You win! :)");
+ state->mode == M_PVC && state->legs[1]->rem <= 0 ?
+ "Bot wins. :(" : "You win! :)");
prompt_set_msgr(NULL);
EM_ASM({elemSetContent($0, $1)}, "#key-submit", "END MATCH");
EM_ASM({elemSetContent($0, $1)}, "#key-rem", "REMATCH");
@@ -180,7 +182,8 @@ void deactivate_key(char *k)
char *prompt_get()
{
- return (char *)EM_ASM_INT({return elemGetContent($0)}, "#prompt-input");
+ return (char *)EM_ASM_INT({return elemGetContent($0)},
+ "#prompt-input");
}
void prompt_handle_pre(char *command)