aboutsummaryrefslogtreecommitdiff
path: root/src/text/main.c
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-01-09 05:49:31 -0500
committerPaul Duncan <pabs@pablotron.org>2019-01-09 05:49:31 -0500
commitd010dba0efaba8f5be2191bd52c8a40705a9ec28 (patch)
tree3359a296e1786aaf827461a785fb1938138f9eb7 /src/text/main.c
parent1aa27ed5589c1b310037b0e6d09765888f2da29a (diff)
downloadsok-d010dba0efaba8f5be2191bd52c8a40705a9ec28.tar.bz2
sok-d010dba0efaba8f5be2191bd52c8a40705a9ec28.zip
add reset
Diffstat (limited to 'src/text/main.c')
-rw-r--r--src/text/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/text/main.c b/src/text/main.c
index db4a48c..7d6f144 100644
--- a/src/text/main.c
+++ b/src/text/main.c
@@ -82,6 +82,13 @@ int main(int argc, char *argv[]) {
}
break;
+ case ACTION_RESET:
+ // reset level
+ if (!sok_ctx_set_level(&ctx, level->data)) {
+ die("Couldn't load level %zu", level_num);
+ }
+
+ break;
case ACTION_WARP:
level_num = action.data;
level = levels_get_level(level_num);