From c5bad6bf85f0d60e420dc523b20e6f589d6b524b Mon Sep 17 00:00:00 2001 From: nihilazo Date: Thu, 18 Mar 2021 10:19:51 +0000 Subject: [PATCH] clarify quit message --- main.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.fs b/main.fs index 9f91ce4..826845f 100644 --- a/main.fs +++ b/main.fs @@ -5,11 +5,11 @@ : hide-cursor esc[ ." ?25l" ; : show-cursor esc[ ." ?25h" ; : clear-line esc[ ." K" ; -: move-right ( x -- ) esc[ 0 .R ." C" ; +: move-right ( x -- ) esc[ 0 .R ." C" ; \ 0 .R : print a number without trailing space \ some of these values (member cost, device count) have two cells. \ the first cell stores the value, the second cell stores if the value has changed. -\ this is useful as it means we only redraw the display if the relevant value has changed. +\ this is useful as it means we only redraw the display if a relevant value has changed. \ the word "changed" sets one of these values as being changed. : changed ( addr -- ) 1 cells + -1 swap ! ; \ the word "cleared" sets one of these values as having been used, clearing the change flag. @@ -31,7 +31,7 @@ create membercost 0 , 0 , variable membercount \ any-change? leaves a -1 on the stack if any value has changed, 0 otherwise -: any-change? ( -- flag ) membercost changed? devices changed? or ; +: any-change? ( -- flag ) membercost changed? devices changed? ; \ clear-all clears the change flag on all values. : clear-all membercost cleared devices cleared ; \ the word !0= tests if something is non-zero @@ -101,7 +101,7 @@ variable membercount membercost @ dup !0= if \ if membercost is non-zero (members have been unlocked) ." (h)ire a chat member [" . ." Devices] (you have " membercount @ . ." chat members helping you)" cr else drop then - 1 move-right ." (q)uit" ; + 1 move-right ." (q)uit (without saving)" ; \ draw-screen redraws the screen, but only if there's been a change. : draw-screen any-change? if draw-devices draw-actions clear-all then ;