Completed dvd example

This commit is contained in:
Devine Lu Linvega 2024-05-08 19:49:47 -07:00
parent d10dec803e
commit 92cbd8d31b
2 changed files with 21 additions and 21 deletions

View File

@ -1,31 +1,31 @@
<> (clean (?x ?y)) (?((?: ?0 ?1 ?2 ?3 ?4) ?:) fill-rect ?x ?y #20 #10 #4444dd)
<> (redraw (?a ?b) (?x ?y)) (?((?: ?0 ?1 ?2 ?3 ?4 ?5) ?:) icns ?x ?y 4 2 0 #aaaaff (?a ?b) (?x ?y))
<> (clean (?x ?y)) (?((?: ?0 ?1 ?2 ?3 ?4) ?:) rect ?x ?y 10 10 #000000)
<> ((?a ?b) (?x ?y) redraw) (?((?: ?0 ?1 ?2 ?3 ?4) ?:) rect ?x ?y 10 10 #ff0000 (?a ?b) (?x ?y))
?(?-) (T) <> ((?a -1) (?x 0) update) (clean (?x 0) redraw (?a 1) (?x 0))
?(?-) (B) <> ((?a 1) (?x 224) update) (clean (?x 224) redraw (?a -1) (?x 224))
?(?-) (L) <> ((-1 ?b) (0 ?y) update) (clean (0 ?y) redraw (1 ?b) (0 ?y))
?(?-) (R) <> ((1 ?b) (288 ?y) update) (clean (288 ?y) redraw (-1 ?b) (288 ?y))
?(?-) (Bounce top)
<> ((?a -1) (?x 0) update) (clean (?x 0) (?a 1) (?x 0) redraw)
?(?-) (Bounce bottom)
<> ((?a 1) (?x 118) update) (clean (?x 118) (?a -1) (?x 118) redraw)
?(?-) (Bounce left)
<> ((-1 ?b) (0 ?y) update) (clean (0 ?y) (1 ?b) (0 ?y) redraw)
?(?-) (Bounce right)
<> ((1 ?b) (246 ?y) update) (clean (246 ?y) (-1 ?b) (246 ?y) redraw)
<> ((?a ?b) (?x ?y) update) (clean (?x ?y) (?a ?b) (?((?: ?0 ?1) ?:) + ?x ?a ?((?: ?0 ?1) ?:) + ?y ?b) redraw)
<> ((?a ?b) (?x ?y) update) (
clean (?x ?y)
redraw (?a ?b) (?((?: ?0 ?1) ?:) + ?x ?a ?((?: ?0 ?1) ?:) + ?y ?b))
?(?-) (Handle events)
<> (handle-event (Tic ?x)) (update)
<> (handle-event (Key (?x q))) (?(?: ?:) quit)
<> (handle-event ?x) ()
<> (on-event ?~) (handle-event ?~ on-event Any)
?((?0 ?1 ?:) ?:) 256 128 size
?(?-) (Load assets)
?((?: ?0 ?1) ?:) save 0 (
001f 3f38 3838 787f 00fe fe7e 7777 e3c3
000f 1f3b 7b77 e7c7 00fc fe8f 8707 0efc
7f00 000f ff7f 0700 0301 00ff f0f8 ff00
8700 00ff 7f7f ff00 f000 00e0 fcfc 8000)
?((?0 ?1 ?:) ?:) 320 240 size
?((?: ?0 ?1 ?2 ?3 ?4) ?:) fill-rect 0 0 320 240 #4444dd
(1 1) (0 0) on-event Any

View File

@ -11,9 +11,9 @@ all: dest
dest:
@ mkdir -p bin
run: all bin/thuesday
@ bin/thuesday examples/draw.modal
@ bin/thuesday examples/dvd.modal
debug: all bin/thuesday-debug
@ bin/thuesday-debug examples/draw.modal
@ bin/thuesday-debug examples/dvd.modal
install: all
@ cp bin/thuesday ~/bin/
uninstall: