Merge commit 'd0153' into cc-merge

This commit is contained in:
C. Guy Yarvin 2016-11-13 18:51:57 -08:00
commit 8a6b77149c
2 changed files with 37 additions and 0 deletions

View File

@ -432,6 +432,10 @@
?. se-ably (se-talk [%leaf txt]~)
(se-blit %out (tuba txt))
::
++ se-klr :: return styled text
|= a/stub
^+(+> (se-blit %klr a))
::
++ se-poke :: send a poke
|= {gyl/gill:^gall par/pear}
(se-emit [ost.hid %poke (drum-path gyl) gyl par])
@ -583,6 +587,37 @@
|= pos/@ud
(ta-erl (~(transpose sole say.inp) pos))
::
++ ta-klr :: render styled text
|= a/styx
=< =. +>+>.$ (se-klr (flatten a))
+>.$
|%
++ flatten
|= a/styx
=| b/styd
%+ reel
|- ^- stub
%- zing
%+ turn a
|= a/_?>(?=(^ a) i.a)
?@ a
[b (tuba (trip a))]~
%= ^$
a q.a
b :+ ?~ p.p.a p.b
?~(u.p.p.a ~ (~(put in p.b) u.p.p.a))
?~(p.q.p.a p.q.b u.p.q.p.a)
?~(q.q.p.a q.q.b u.q.q.p.a)
==
::
|= {a/(pair styd (list @c)) b/stub}
?~ b
[a]~
?. =(p.a p.i.b)
[a b]
[[p.a (weld q.a q.i.b)] t.b]
--
::
++ ta-fec :: apply effect
|= fec/sole-effect
^+ +>
@ -592,6 +627,7 @@
{$clr *} +>(..ta (se-blit fec))
{$det *} (ta-got +.fec)
{$err *} (ta-err p.fec)
{$klr *} (ta-klr p.fec)
{$mor *} |- ^+ +>.^$
?~ p.fec +>.^$
$(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))

View File

@ -28,6 +28,7 @@
{$clr $~} :: clear screen
{$det sole-change} :: edit command
{$err p/@ud} :: error point
{$klr p/styx} :: styled text line
{$mor p/(list sole-effect)} :: multiple effects
{$nex $~} :: save clear command
{$pro sole-prompt} :: set prompt