add c:get/ext to library/c-get-ext.retro

FossilOrigin-Name: 1a7439272710c32eca9ba6e0c80825451087160d722885ea229e8449f306ca8a
This commit is contained in:
crc 2024-05-23 16:36:43 +00:00
parent 5e7e174e0d
commit 81a70edd50
2 changed files with 12 additions and 0 deletions

View file

@ -31,6 +31,8 @@
- library
- added "tob", a text output buffer
- added "c:get/ext", for reading keys and returning unique
codes for arrows
- retro-compiler

10
library/c-get-ext.retro Normal file
View 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 ;
~~~