Skip to content

Commit

Permalink
Add and document new strmacro SSTNPL module.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasTheSpaceFox committed Apr 1, 2021
1 parent d446819 commit fb8b379
Show file tree
Hide file tree
Showing 9 changed files with 2,493 additions and 0 deletions.
3 changes: 3 additions & 0 deletions demos/directory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ shelldemo:
shelldemo_macros:
similar to `shelldemo` above, only using comprompt's provided macros
for command parsing loops.

string_macros:
shows off SSTNPL's named string macro module strmacro [nocurses]


----'demoscene-style demos'----
Expand Down
71 changes: 71 additions & 0 deletions demos/string_macros/auto_strmacro_test.stnp
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
!stm.def(sam, THIS IS SAM. )
!stm.def(bob, HI IM BOB. )




!stm.strp(sam)
!stm.strp(bob)
!stm.strpn(sam)
!stm.strpn(sam)
!stm.strpn(bob)

prline Press a key to enter segment-specific macro test.

keyprompt

gamode @30

drawfill *---------
val *+++++++++
set seg.color_on

val @-119
set seg.posx
set seg.posy
val @2
set seg.height
set seg.width
val @6
set seg.vert_space
set seg.hori_space


gsub seg.init_pos

!stm.strp_seg(sam)
!stm.strp_seg(bob)
!stm.strpn_seg(sam)
!stm.strpn_seg(sam)
!stm.strpn_seg(bob)

bprinttail1 --PRESS A KEY TO ENTER SBTVDI TEST--

gsub seg.output


keyprompt

gamode @0

!stm.def(help_test, help)

vdimode @1

var out=:n
!stm.strpn_vdi(help_test)

until out,@0
asm ioread1;>vdi.cli.out
asm iowrite1;>io.ttywr
set1 out
end

prline press a key to exit
keyprompt
stop



include strmacro as stm
include segment as seg
Loading

0 comments on commit fb8b379

Please sign in to comment.