mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
add c:get/ext to library/c-get-ext.retro
FossilOrigin-Name: 1a7439272710c32eca9ba6e0c80825451087160d722885ea229e8449f306ca8a
This commit is contained in:
parent
5e7e174e0d
commit
81a70edd50
2 changed files with 12 additions and 0 deletions
|
@ -31,6 +31,8 @@
|
||||||
- library
|
- library
|
||||||
|
|
||||||
- added "tob", a text output buffer
|
- added "tob", a text output buffer
|
||||||
|
- added "c:get/ext", for reading keys and returning unique
|
||||||
|
codes for arrows
|
||||||
|
|
||||||
- retro-compiler
|
- retro-compiler
|
||||||
|
|
||||||
|
|
10
library/c-get-ext.retro
Normal file
10
library/c-get-ext.retro
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
~~~
|
||||||
|
:keys:UP #-300 ;
|
||||||
|
:keys:DOWN #-301 ;
|
||||||
|
:keys:RIGHT #-302 ;
|
||||||
|
:keys:LEFT #-303 ;
|
||||||
|
|
||||||
|
:c:get/ext (-c)
|
||||||
|
c:get dup #27 eq?
|
||||||
|
[ drop c:get drop c:get #235 + n:negate ] if ;
|
||||||
|
~~~
|
Loading…
Reference in a new issue