... | ... |
@@ -2,11 +2,6 @@ |
2 | 2 |
|
3 | 3 |
%MOD { DUP2 DIV MUL SUB } |
4 | 4 |
|
5 |
-%%^! { .% DEI } %%~! { .% DEO } |
|
6 |
-%%*! { .% DEI2 } %%=! { .% DEO2 } |
|
7 |
-%%^ { .% PEK } %%~ { .% POK } |
|
8 |
-%%* { .% PEK2 } %%= { .% POK2 } |
|
9 |
- |
|
10 | 5 |
@timer $1 |
11 | 6 |
@progress $1 |
12 | 7 |
|
... | ... |
@@ -19,41 +14,41 @@ |
19 | 14 |
|0100 ( -> ) |
20 | 15 |
|
21 | 16 |
( set color pallete ) |
22 |
- #00ff System/r=! |
|
23 |
- #0f0f System/g=! |
|
24 |
- #0ff0 System/b=! |
|
17 |
+ #00ff .System/r DEO2 |
|
18 |
+ #0f0f .System/g DEO2 |
|
19 |
+ #0ff0 .System/b DEO2 |
|
25 | 20 |
|
26 |
- ;on-frame Screen/vector=! ( run on-frame every 1/60th of a second ) |
|
27 |
- #ff Audio/vol~! ( set volume to max ) |
|
28 |
- ;saw Audio/wave=! ( set waveform to saw for audio engine ) |
|
29 |
- ;env Audio/env=! ( set envelope for audio engine ) |
|
21 |
+ ;on-frame .Screen/vector DEO2 ( run on-frame every 1/60th of a second ) |
|
22 |
+ #ff .Audio/vol DEO ( set volume to max ) |
|
23 |
+ ;saw .Audio/wave DEO2 ( set waveform to saw for audio engine ) |
|
24 |
+ ;env .Audio/env DEO2 ( set envelope for audio engine ) |
|
30 | 25 |
|
31 | 26 |
BRK |
32 | 27 |
|
33 | 28 |
@on-frame ( -> ) |
34 | 29 |
|
35 |
- ( incr ) timer^ #01 ADD timer~ |
|
36 |
- ( skip ) timer^ #10 EQU ,&play-note JNZ BRK &play-note |
|
30 |
+ ( incr ) .timer PEK #01 ADD .timer POK |
|
31 |
+ ( skip ) .timer PEK #10 EQU ,&play-note JNZ BRK &play-note |
|
37 | 32 |
|
38 | 33 |
( get note ) |
39 |
- ;melody #00 progress^ ADD2 GET |
|
34 |
+ ;melody #00 .progress PEK ADD2 GET |
|
40 | 35 |
|
41 | 36 |
( play note ) |
42 |
- DUP #80 ORA Audio/pitch~! |
|
43 |
- #01 Audio/play~! |
|
37 |
+ DUP #80 ORA .Audio/pitch DEO |
|
38 |
+ #01 .Audio/play DEO |
|
44 | 39 |
|
45 | 40 |
( erase last note ) |
46 |
- #20 Screen/color~! |
|
41 |
+ #20 .Screen/color DEO |
|
47 | 42 |
|
48 | 43 |
( draw note ) |
49 |
- #00 SWP #0004 MUL2 #0100 SUB2 Screen/y=! |
|
50 |
- #00 progress^ #0008 MUL2 Screen/x=! |
|
51 |
- ;dot Screen/addr=! |
|
52 |
- #21 Screen/color~! |
|
44 |
+ #00 SWP #0004 MUL2 #0100 SUB2 .Screen/y DEO2 |
|
45 |
+ #00 .progress PEK #0008 MUL2 .Screen/x DEO2 |
|
46 |
+ ;dot .Screen/addr DEO2 |
|
47 |
+ #21 .Screen/color DEO |
|
53 | 48 |
|
54 |
- ( incr ) progress^ #01 ADD #20 MOD progress~ |
|
49 |
+ ( incr ) .progress PEK #01 ADD #20 MOD .progress POK |
|
55 | 50 |
|
56 |
- #00 timer~ |
|
51 |
+ #00 .timer POK |
|
57 | 52 |
|
58 | 53 |
BRK |
59 | 54 |
|
... | ... |
@@ -65,10 +60,10 @@ BRK |
65 | 60 |
|
66 | 61 |
@saw ( -> ) |
67 | 62 |
|
68 |
- #6000 Audio/value=! |
|
69 |
- #0000 Audio/delay=! ( move to volume #600 after 0 delay ) |
|
70 |
- #0000 Audio/value=! |
|
71 |
- #ffff Audio/delay=! ( reach volume 0 after the whole note. Interpolated linearly ) |
|
63 |
+ #6000 .Audio/value DEO2 |
|
64 |
+ #0000 .Audio/delay DEO2 ( move to volume #600 after 0 delay ) |
|
65 |
+ #0000 .Audio/value DEO2 |
|
66 |
+ #ffff .Audio/delay DEO2 ( reach volume 0 after the whole note. Interpolated linearly ) |
|
72 | 67 |
|
73 | 68 |
BRK |
74 | 69 |
|
... | ... |
@@ -76,11 +71,11 @@ BRK |
76 | 71 |
|
77 | 72 |
@env ( -> ) |
78 | 73 |
|
79 |
- #ffff Audio/value=! |
|
80 |
- #1000 Audio/delay=! ( move pretty quickly to volume #ffff (maximum) ) |
|
81 |
- #0000 Audio/value=! |
|
82 |
- #4000 Audio/delay=! ( interpolating linearly, move to #0000 after a delay of #4000 where #8000 is half a second ) |
|
83 |
- #00 Audio/finish~! ( end the envelope ) |
|
74 |
+ #ffff .Audio/value DEO2 |
|
75 |
+ #1000 .Audio/delay DEO2 ( move pretty quickly to volume #ffff (maximum) ) |
|
76 |
+ #0000 .Audio/value DEO2 |
|
77 |
+ #4000 .Audio/delay DEO2 ( interpolating linearly, move to #0000 after a delay of #4000 where #8000 is half a second ) |
|
78 |
+ #00 .Audio/finish DEO ( end the envelope ) |
|
84 | 79 |
|
85 | 80 |
BRK |
86 | 81 |
|
... | ... |
@@ -4,11 +4,6 @@ |
4 | 4 |
%-- { #0001 SUB2 } |
5 | 5 |
%2/ { #0002 DIV2 } |
6 | 6 |
|
7 |
-%%^! { .% DEI } %%~! { .% DEO } |
|
8 |
-%%*! { .% DEI2 } %%=! { .% DEO2 } |
|
9 |
-%%^ { .% PEK } %%~ { .% POK } |
|
10 |
-%%* { .% PEK2 } %%= { .% POK2 } |
|
11 |
- |
|
12 | 7 |
( devices ) |
13 | 8 |
|
14 | 9 |
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
... | ... |
@@ -26,62 +21,62 @@ |
26 | 21 |
|0100 ( -> ) |
27 | 22 |
|
28 | 23 |
( theme ) |
29 |
- #0daf System/r=! |
|
30 |
- #02ff System/g=! |
|
31 |
- #035f System/b=! |
|
24 |
+ #0daf .System/r DEO2 |
|
25 |
+ #02ff .System/g DEO2 |
|
26 |
+ #035f .System/b DEO2 |
|
32 | 27 |
|
33 | 28 |
( vectors ) |
34 |
- ;on-frame Screen/vector=! |
|
29 |
+ ;on-frame .Screen/vector DEO2 |
|
35 | 30 |
|
36 | 31 |
( set origin ) |
37 |
- Screen/width*! 2/ Screen/x=! |
|
38 |
- Screen/height*! 2/ Screen/y=! |
|
32 |
+ .Screen/width DEI2 2/ .Screen/x DEO2 |
|
33 |
+ .Screen/height DEI2 2/ .Screen/y DEO2 |
|
39 | 34 |
|
40 |
- ;default_icn Screen/addr=! |
|
41 |
- #31 Screen/color~! |
|
42 |
- #2a slime~ |
|
35 |
+ ;default_icn .Screen/addr DEO2 |
|
36 |
+ #31 .Screen/color DEO |
|
37 |
+ #2a .slime POK |
|
43 | 38 |
|
44 | 39 |
BRK |
45 | 40 |
|
46 | 41 |
@on-frame ( -> ) |
47 | 42 |
|
48 |
- #2a slime~ |
|
49 |
- ;default_icn Screen/addr=! |
|
43 |
+ #2a .slime POK |
|
44 |
+ ;default_icn .Screen/addr DEO2 |
|
50 | 45 |
|
51 | 46 |
( hold ctrl key to change slime color ) |
52 |
- Controller/button^! #0f AND |
|
53 |
- DUP #01 NEQ ,&no-ctrl JNZ #25 slime~ &no-ctrl |
|
54 |
- DUP #02 NEQ ,&no-alt JNZ #2f slime~ &no-alt |
|
47 |
+ .Controller/button DEI #0f AND |
|
48 |
+ DUP #01 NEQ ,&no-ctrl JNZ #25 .slime POK &no-ctrl |
|
49 |
+ DUP #02 NEQ ,&no-alt JNZ #2f .slime POK &no-alt |
|
55 | 50 |
POP |
56 | 51 |
|
57 |
- ( clear ) #30 Screen/color~! |
|
52 |
+ ( clear ) #30 .Screen/color DEO |
|
58 | 53 |
|
59 | 54 |
( detect movement ) |
60 |
- Controller/button^! #f0 AND |
|
55 |
+ .Controller/button DEI #f0 AND |
|
61 | 56 |
DUP #04 SFT #01 AND #01 NEQ ,&no-up JNZ |
62 | 57 |
( move ) |
63 |
- Screen/y*! -- Screen/y=! |
|
64 |
- ;up_icn Screen/addr=! &no-up |
|
58 |
+ .Screen/y DEI2 -- .Screen/y DEO2 |
|
59 |
+ ;up_icn .Screen/addr DEO2 &no-up |
|
65 | 60 |
DUP #05 SFT #01 AND #01 NEQ ,&no-down JNZ |
66 | 61 |
( move ) |
67 |
- Screen/y*! ++ Screen/y=! |
|
68 |
- ;down_icn Screen/addr=! &no-down |
|
62 |
+ .Screen/y DEI2 ++ .Screen/y DEO2 |
|
63 |
+ ;down_icn .Screen/addr DEO2 &no-down |
|
69 | 64 |
DUP #06 SFT #01 AND #01 NEQ ,&no-left JNZ |
70 | 65 |
( move ) |
71 |
- Screen/x*! -- Screen/x=! |
|
72 |
- ;left_icn Screen/addr=! &no-left |
|
66 |
+ .Screen/x DEI2 -- .Screen/x DEO2 |
|
67 |
+ ;left_icn .Screen/addr DEO2 &no-left |
|
73 | 68 |
DUP #07 SFT #01 AND #01 NEQ ,&no-right JNZ |
74 | 69 |
( move ) |
75 |
- Screen/x*! ++ Screen/x=! |
|
76 |
- ;right_icn Screen/addr=! &no-right |
|
70 |
+ .Screen/x DEI2 ++ .Screen/x DEO2 |
|
71 |
+ ;right_icn .Screen/addr DEO2 &no-right |
|
77 | 72 |
POP |
78 | 73 |
|
79 | 74 |
( draw face ) |
80 |
- #31 Screen/color~! |
|
75 |
+ #31 .Screen/color DEO |
|
81 | 76 |
|
82 | 77 |
( draw slime ) |
83 |
- ;slime_icn Screen/addr=! |
|
84 |
- slime^ Screen/color~! |
|
78 |
+ ;slime_icn .Screen/addr DEO2 |
|
79 |
+ .slime PEK .Screen/color DEO |
|
85 | 80 |
|
86 | 81 |
BRK |
87 | 82 |
|
... | ... |
@@ -4,11 +4,6 @@ |
4 | 4 |
%8+ { #0008 ADD2 } |
5 | 5 |
%8* { #0030 SFT2 } |
6 | 6 |
|
7 |
-%%^! { .% DEI } %%~! { .% DEO } |
|
8 |
-%%*! { .% DEI2 } %%=! { .% DEO2 } |
|
9 |
-%%^ { .% PEK } %%~ { .% POK } |
|
10 |
-%%* { .% PEK2 } %%= { .% POK2 } |
|
11 |
- |
|
12 | 7 |
( devices ) |
13 | 8 |
|
14 | 9 |
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
... | ... |
@@ -20,36 +15,36 @@ |
20 | 15 |
|0100 ( -> ) |
21 | 16 |
|
22 | 17 |
( theme ) |
23 |
- #0f73 System/r=! |
|
24 |
- #0fe3 System/g=! |
|
25 |
- #0fc3 System/b=! |
|
18 |
+ #0f73 .System/r DEO2 |
|
19 |
+ #0fe3 .System/g DEO2 |
|
20 |
+ #0fc3 .System/b DEO2 |
|
26 | 21 |
( vectors ) |
27 |
- ;on-button Controller/vector=! |
|
22 |
+ ;on-button .Controller/vector DEO2 |
|
28 | 23 |
;draw-cursor JSR2 |
29 | 24 |
|
30 | 25 |
BRK |
31 | 26 |
|
32 | 27 |
@on-button ( -> ) |
33 | 28 |
|
34 |
- Controller/key^! #00 NEQ ,&skip JNZ BRK &skip |
|
35 |
- Controller/key^! #0d NEQ ,&no-return JNZ |
|
36 |
- ( draw ) #20 Screen/color~! |
|
37 |
- ( reset ) #0000 Screen/x=! |
|
38 |
- ( incr ) Screen/y*! 8+ Screen/y=! |
|
29 |
+ .Controller/key DEI #00 NEQ ,&skip JNZ BRK &skip |
|
30 |
+ .Controller/key DEI #0d NEQ ,&no-return JNZ |
|
31 |
+ ( draw ) #20 .Screen/color DEO |
|
32 |
+ ( reset ) #0000 .Screen/x DEO2 |
|
33 |
+ ( incr ) .Screen/y DEI2 8+ .Screen/y DEO2 |
|
39 | 34 |
;draw-cursor JSR2 |
40 | 35 |
BRK |
41 | 36 |
&no-return |
42 |
- ;font #00 Controller/key^! 8* ADD2 Screen/addr=! |
|
43 |
- ( draw ) #21 Screen/color~! |
|
44 |
- ( incr ) Screen/x*! 8+ Screen/x=! |
|
37 |
+ ;font #00 .Controller/key DEI 8* ADD2 .Screen/addr DEO2 |
|
38 |
+ ( draw ) #21 .Screen/color DEO |
|
39 |
+ ( incr ) .Screen/x DEI2 8+ .Screen/x DEO2 |
|
45 | 40 |
;draw-cursor JSR2 |
46 | 41 |
|
47 | 42 |
BRK |
48 | 43 |
|
49 | 44 |
@draw-cursor ( -- ) |
50 | 45 |
|
51 |
- ;cursor Screen/addr=! |
|
52 |
- #22 Screen/color~! |
|
46 |
+ ;cursor .Screen/addr DEO2 |
|
47 |
+ #22 .Screen/color DEO |
|
53 | 48 |
|
54 | 49 |
RTN |
55 | 50 |
|
... | ... |
@@ -3,11 +3,6 @@ |
3 | 3 |
%8+ { #0008 ADD2 } |
4 | 4 |
%MEMORY { #1000 } |
5 | 5 |
|
6 |
-%%^! { .% DEI } %%~! { .% DEO } |
|
7 |
-%%*! { .% DEI2 } %%=! { .% DEO2 } |
|
8 |
-%%^ { .% PEK } %%~ { .% POK } |
|
9 |
-%%* { .% PEK2 } %%= { .% POK2 } |
|
10 |
- |
|
11 | 6 |
( devices ) |
12 | 7 |
|
13 | 8 |
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
... | ... |
@@ -24,46 +19,46 @@ |
24 | 19 |
|0100 ( -> ) |
25 | 20 |
|
26 | 21 |
( theme ) |
27 |
- #0efc System/r=! |
|
28 |
- #03cc System/g=! |
|
29 |
- #03ac System/b=! |
|
22 |
+ #0efc .System/r DEO2 |
|
23 |
+ #03cc .System/g DEO2 |
|
24 |
+ #03ac .System/b DEO2 |
|
30 | 25 |
|
31 | 26 |
( load file ) |
32 |
- #1000 File/length=! |
|
33 |
- ;srcpath File/name=! |
|
34 |
- MEMORY File/load=! |
|
27 |
+ #1000 .File/length DEO2 |
|
28 |
+ ;srcpath .File/name DEO2 |
|
29 |
+ MEMORY .File/load DEO2 |
|
35 | 30 |
|
36 |
- File/success*! #0000 NEQ2 ;on-success JNZ2 |
|
31 |
+ .File/success DEI2 #0000 NEQ2 ;on-success JNZ2 |
|
37 | 32 |
|
38 |
- ;failedtxt Console/string=! |
|
33 |
+ ;failedtxt .Console/string DEO2 |
|
39 | 34 |
|
40 | 35 |
BRK |
41 | 36 |
|
42 | 37 |
@on-success ( -> ) |
43 | 38 |
|
44 |
- ;successtxt Console/string=! |
|
39 |
+ ;successtxt .Console/string DEO2 |
|
45 | 40 |
|
46 | 41 |
( draw image ) |
47 |
- MEMORY Screen/addr=! |
|
42 |
+ MEMORY .Screen/addr DEO2 |
|
48 | 43 |
#0000 #0080 |
49 | 44 |
&ver |
50 |
- ( save ) OVR2 Screen/y=! |
|
45 |
+ ( save ) OVR2 .Screen/y DEO2 |
|
51 | 46 |
#0000 #0080 |
52 | 47 |
&hor |
53 |
- ( save ) OVR2 Screen/x=! |
|
54 |
- ( draw ) #41 Screen/color~! |
|
55 |
- ( incr ) Screen/addr*! #0010 ADD2 Screen/addr=! |
|
48 |
+ ( save ) OVR2 .Screen/x DEO2 |
|
49 |
+ ( draw ) #41 .Screen/color DEO |
|
50 |
+ ( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2 |
|
56 | 51 |
( incr ) SWP2 8+ SWP2 |
57 | 52 |
OVR2 OVR2 LTH2 ,&hor JNZ |
58 | 53 |
POP2 POP2 |
59 | 54 |
( incr ) SWP2 8+ SWP2 |
60 | 55 |
OVR2 OVR2 LTH2 ,&ver JNZ |
61 | 56 |
POP2 POP2 |
62 |
- |
|
57 |
+ |
|
63 | 58 |
( save file ) |
64 |
- #1000 File/length=! |
|
65 |
- ;dstpath File/name=! |
|
66 |
- MEMORY File/save=! |
|
59 |
+ #1000 .File/length DEO2 |
|
60 |
+ ;dstpath .File/name DEO2 |
|
61 |
+ MEMORY .File/save DEO2 |
|
67 | 62 |
|
68 | 63 |
BRK |
69 | 64 |
|
... | ... |
@@ -1,12 +1,7 @@ |
1 | 1 |
( dev/mouse ) |
2 | 2 |
|
3 | 3 |
%RTN { JMP2r } |
4 |
-%ABS2 { DUP2 #000f SFT2 EQU #04 JNZ #ffff MUL2 } |
|
5 |
- |
|
6 |
-%%^! { .% DEI } %%~! { .% DEO } |
|
7 |
-%%*! { .% DEI2 } %%=! { .% DEO2 } |
|
8 |
-%%^ { .% PEK } %%~ { .% POK } |
|
9 |
-%%* { .% PEK2 } %%= { .% POK2 } |
|
4 |
+%ABS2 { DUP2 #000f SFT2 EQU #04 JNZ #ffff MUL2 }. |
|
10 | 5 |
|
11 | 6 |
( devices ) |
12 | 7 |
|
... | ... |
@@ -25,11 +20,11 @@ |
25 | 20 |
|0100 ( -> ) |
26 | 21 |
|
27 | 22 |
( theme ) |
28 |
- #f0f0 System/r=! |
|
29 |
- #f00f System/g=! |
|
30 |
- #f000 System/b=! |
|
23 |
+ #f0f0 .System/r DEO2 |
|
24 |
+ #f00f .System/g DEO2 |
|
25 |
+ #f000 .System/b DEO2 |
|
31 | 26 |
( vectors ) |
32 |
- ;on-mouse Mouse/vector=! |
|
27 |
+ ;on-mouse .Mouse/vector DEO2 |
|
33 | 28 |
|
34 | 29 |
BRK |
35 | 30 |
|
... | ... |
@@ -37,79 +32,79 @@ BRK |
37 | 32 |
|
38 | 33 |
;draw-cursor JSR2 |
39 | 34 |
( on down ) |
40 |
- Mouse/state^! #00 NEQ pointer/state^ #00 EQU #0101 EQU2 ,on-mouse-down JNZ |
|
35 |
+ .Mouse/state DEI #00 NEQ .pointer/state PEK #00 EQU #0101 EQU2 ,on-mouse-down JNZ |
|
41 | 36 |
( on drag ) |
42 |
- Mouse/state^! #00 NEQ ,on-mouse-drag JNZ |
|
43 |
- Mouse/state^! pointer/state~ |
|
37 |
+ .Mouse/state DEI #00 NEQ ,on-mouse-drag JNZ |
|
38 |
+ .Mouse/state DEI .pointer/state POK |
|
44 | 39 |
|
45 | 40 |
BRK |
46 | 41 |
|
47 | 42 |
@on-mouse-down ( -> ) |
48 | 43 |
|
49 | 44 |
( record start position ) |
50 |
- Mouse/x*! DUP2 pointer/x= pointer/lastx= |
|
51 |
- Mouse/y*! DUP2 pointer/y= pointer/lasty= |
|
52 |
- Mouse/state^! pointer/state~ |
|
45 |
+ .Mouse/x DEI2 DUP2 .pointer/x POK2 .pointer/lastx POK2 |
|
46 |
+ .Mouse/y DEI2 DUP2 .pointer/y POK2 .pointer/lasty POK2 |
|
47 |
+ .Mouse/state DEI .pointer/state POK |
|
53 | 48 |
|
54 | 49 |
BRK |
55 | 50 |
|
56 | 51 |
@on-mouse-drag ( -> ) |
57 | 52 |
|
58 | 53 |
( draw line ) |
59 |
- pointer/lastx* |
|
60 |
- pointer/lasty* |
|
61 |
- pointer/x* |
|
62 |
- pointer/y* |
|
63 |
- #01 [ Mouse/state^! #10 EQU #02 MUL ADD ] |
|
54 |
+ .pointer/lastx PEK2 |
|
55 |
+ .pointer/lasty PEK2 |
|
56 |
+ .pointer/x PEK2 |
|
57 |
+ .pointer/y PEK2 |
|
58 |
+ #01 [ .Mouse/state DEI #10 EQU #02 MUL ADD ] |
|
64 | 59 |
;draw-line JSR2 |
65 | 60 |
( record last position ) |
66 |
- Mouse/x*! pointer/lastx= |
|
67 |
- Mouse/y*! pointer/lasty= |
|
68 |
- Mouse/state^! pointer/state~ |
|
61 |
+ .Mouse/x DEI2 .pointer/lastx POK2 |
|
62 |
+ .Mouse/y DEI2 .pointer/lasty POK2 |
|
63 |
+ .Mouse/state DEI .pointer/state POK |
|
69 | 64 |
|
70 | 65 |
BRK |
71 | 66 |
|
72 | 67 |
@draw-cursor ( -- ) |
73 | 68 |
|
74 | 69 |
( clear last cursor ) |
75 |
- ;clear Screen/addr=! |
|
76 |
- pointer/x* Screen/x=! |
|
77 |
- pointer/y* Screen/y=! |
|
78 |
- #30 Screen/color~! |
|
70 |
+ ;clear .Screen/addr DEO2 |
|
71 |
+ .pointer/x PEK2 .Screen/x DEO2 |
|
72 |
+ .pointer/y PEK2 .Screen/y DEO2 |
|
73 |
+ #30 .Screen/color DEO |
|
79 | 74 |
( record pointer positions ) |
80 |
- Mouse/x*! pointer/x= |
|
81 |
- Mouse/y*! pointer/y= |
|
75 |
+ .Mouse/x DEI2 .pointer/x POK2 |
|
76 |
+ .Mouse/y DEI2 .pointer/y POK2 |
|
82 | 77 |
( draw new cursor ) |
83 |
- ;cursor Screen/addr=! |
|
84 |
- pointer/x* Screen/x=! |
|
85 |
- pointer/y* Screen/y=! |
|
78 |
+ ;cursor .Screen/addr DEO2 |
|
79 |
+ .pointer/x PEK2 .Screen/x DEO2 |
|
80 |
+ .pointer/y PEK2 .Screen/y DEO2 |
|
86 | 81 |
( colorize on state ) |
87 |
- #31 [ Mouse/state^! #00 NEQ ] ADD Screen/color~! |
|
82 |
+ #31 [ .Mouse/state DEI #00 NEQ ] ADD .Screen/color DEO |
|
88 | 83 |
|
89 | 84 |
RTN |
90 | 85 |
|
91 | 86 |
@draw-line ( x1 y1 x2 y2 color -- ) |
92 | 87 |
|
93 |
- ( load ) color~ line/y0= line/x0= line/y= line/x= |
|
94 |
- line/x0* line/x* SUB2 ABS2 line/dx= |
|
95 |
- line/y0* line/y* SUB2 ABS2 #0000 SWP2 SUB2 line/dy= |
|
96 |
- #ffff #00 line/x* line/x0* LTS2 #0002 MUL2 ADD2 line/sx= |
|
97 |
- #ffff #00 line/y* line/y0* LTS2 #0002 MUL2 ADD2 line/sy= |
|
98 |
- line/dx* line/dy* ADD2 line/e1= |
|
88 |
+ ( load ) .color POK .line/y0 POK2 .line/x0 POK2 .line/y POK2 .line/x POK2 |
|
89 |
+ .line/x0 PEK2 .line/x PEK2 SUB2 ABS2 .line/dx POK2 |
|
90 |
+ .line/y0 PEK2 .line/y PEK2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy POK2 |
|
91 |
+ #ffff #00 .line/x PEK2 .line/x0 PEK2 LTS2 #0002 MUL2 ADD2 .line/sx POK2 |
|
92 |
+ #ffff #00 .line/y PEK2 .line/y0 PEK2 LTS2 #0002 MUL2 ADD2 .line/sy POK2 |
|
93 |
+ .line/dx PEK2 .line/dy PEK2 ADD2 .line/e1 POK2 |
|
99 | 94 |
&loop |
100 | 95 |
( draw ) |
101 |
- line/x* Screen/x=! |
|
102 |
- line/y* Screen/y=! |
|
103 |
- color^ Screen/color~! |
|
104 |
- line/x* line/x0* EQU2 line/y* line/y0* EQU2 #0101 EQU2 ,&end JNZ |
|
105 |
- line/e1* #0002 MUL2 line/e2= |
|
106 |
- line/e2* line/dy* LTS2 ,&skipy JNZ |
|
107 |
- line/e1* line/dy* ADD2 line/e1= |
|
108 |
- line/x* line/sx* ADD2 line/x= |
|
96 |
+ .line/x PEK2 .Screen/x DEO2 |
|
97 |
+ .line/y PEK2 .Screen/y DEO2 |
|
98 |
+ .color PEK .Screen/color DEO |
|
99 |
+ .line/x PEK2 .line/x0 PEK2 EQU2 .line/y PEK2 .line/y0 PEK2 EQU2 #0101 EQU2 ,&end JNZ |
|
100 |
+ .line/e1 PEK2 #0002 MUL2 .line/e2 POK2 |
|
101 |
+ .line/e2 PEK2 .line/dy PEK2 LTS2 ,&skipy JNZ |
|
102 |
+ .line/e1 PEK2 .line/dy PEK2 ADD2 .line/e1 POK2 |
|
103 |
+ .line/x PEK2 .line/sx PEK2 ADD2 .line/x POK2 |
|
109 | 104 |
&skipy |
110 |
- line/e2* line/dx* GTS2 ,&skipx JNZ |
|
111 |
- line/e1* line/dx* ADD2 line/e1= |
|
112 |
- line/y* line/sy* ADD2 line/y= |
|
105 |
+ .line/e2 PEK2 .line/dx PEK2 GTS2 ,&skipx JNZ |
|
106 |
+ .line/e1 PEK2 .line/dx PEK2 ADD2 .line/e1 POK2 |
|
107 |
+ .line/y PEK2 .line/sy PEK2 ADD2 .line/y POK2 |
|
113 | 108 |
&skipx |
114 | 109 |
,&loop JMP |
115 | 110 |
&end |
... | ... |
@@ -1,10 +1,5 @@ |
1 | 1 |
( GUI Animation ) |
2 | 2 |
|
3 |
-%%^! { .% DEI } %%~! { .% DEO } |
|
4 |
-%%*! { .% DEI2 } %%=! { .% DEO2 } |
|
5 |
-%%^ { .% PEK } %%~ { .% POK } |
|
6 |
-%%* { .% PEK2 } %%= { .% POK2 } |
|
7 |
- |
|
8 | 3 |
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
9 | 4 |
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |
10 | 5 |
|
... | ... |
@@ -17,14 +12,14 @@ |
17 | 12 |
|0100 ( -> ) |
18 | 13 |
|
19 | 14 |
( theme ) |
20 |
- #4cfd System/r=! |
|
21 |
- #4cf3 System/g=! |
|
22 |
- #dcf2 System/b=! |
|
15 |
+ #4cfd .System/r DEO2 |
|
16 |
+ #4cf3 .System/g DEO2 |
|
17 |
+ #dcf2 .System/b DEO2 |
|
23 | 18 |
( vectors ) |
24 |
- ;on-frame Screen/vector=! |
|
19 |
+ ;on-frame .Screen/vector DEO2 |
|
25 | 20 |
( starting position ) |
26 |
- Screen/width*! #0002 DIV2 dvd/x= |
|
27 |
- Screen/height*! #0002 DIV2 dvd/y= |
|
21 |
+ .Screen/width DEI2 #0002 DIV2 .dvd/x POK2 |
|
22 |
+ .Screen/height DEI2 #0002 DIV2 .dvd/y POK2 |
|
28 | 23 |
#21 ;draw-dvd JSR2 |
29 | 24 |
|
30 | 25 |
BRK |
... | ... |
@@ -32,16 +27,16 @@ BRK |
32 | 27 |
@on-frame ( -> ) |
33 | 28 |
|
34 | 29 |
( clear ) #20 ;draw-dvd JSR2 |
35 |
- ( case: hit-right ) dvd/x* Screen/width*! #0020 SUB2 EQU2 |
|
36 |
- ( case: hit-left ) dvd/x* #0000 EQU2 |
|
30 |
+ ( case: hit-right ) .dvd/x PEK2 .Screen/width DEI2 #0020 SUB2 EQU2 |
|
31 |
+ ( case: hit-left ) .dvd/x PEK2 #0000 EQU2 |
|
37 | 32 |
#0000 EQU2 ,&no-flipx JNZ |
38 |
- dvd/dx^ #00 EQU dvd/dx~ &no-flipx |
|
39 |
- ( case: hit-bottom ) dvd/y* Screen/height*! #0010 SUB2 EQU2 |
|
40 |
- ( case: hit-top ) dvd/y* #0000 EQU2 |
|
33 |
+ .dvd/dx PEK #00 EQU .dvd/dx POK &no-flipx |
|
34 |
+ ( case: hit-bottom ) .dvd/y PEK2 .Screen/height DEI2 #0010 SUB2 EQU2 |
|
35 |
+ ( case: hit-top ) .dvd/y PEK2 #0000 EQU2 |
|
41 | 36 |
#0000 EQU2 ,&no-flipy JNZ |
42 |
- dvd/dy^ #00 EQU dvd/dy~ &no-flipy |
|
43 |
- ( incr ) dvd/x* #0001 #00 dvd/dx^ #00 EQU #fffe MUL2 ADD2 ADD2 dvd/x= |
|
44 |
- ( incr ) dvd/y* #0001 #00 dvd/dy^ #00 EQU #fffe MUL2 ADD2 ADD2 dvd/y= |
|
37 |
+ .dvd/dy PEK #00 EQU .dvd/dy POK &no-flipy |
|
38 |
+ ( incr ) .dvd/x PEK2 #0001 #00 .dvd/dx PEK #00 EQU #fffe MUL2 ADD2 ADD2 .dvd/x POK2 |
|
39 |
+ ( incr ) .dvd/y PEK2 #0001 #00 .dvd/dy PEK #00 EQU #fffe MUL2 ADD2 ADD2 .dvd/y POK2 |
|
45 | 40 |
( draw ) #21 ;draw-dvd JSR2 |
46 | 41 |
|
47 | 42 |
BRK |
... | ... |
@@ -49,15 +44,15 @@ BRK |
49 | 44 |
@draw-dvd ( color -- ) |
50 | 45 |
|
51 | 46 |
( stash ) STH |
52 |
- ;dvd_icn Screen/addr=! |
|
53 |
- dvd/y* [ dvd/y* #0010 ADD2 ] |
|
47 |
+ ;dvd_icn .Screen/addr DEO2 |
|
48 |
+ .dvd/y PEK2 [ .dvd/y PEK2 #0010 ADD2 ] |
|
54 | 49 |
&ver |
55 |
- OVR2 Screen/y=! |
|
56 |
- dvd/x* [ dvd/x* #0020 ADD2 ] |
|
50 |
+ OVR2 .Screen/y DEO2 |
|
51 |
+ .dvd/x PEK2 [ .dvd/x PEK2 #0020 ADD2 ] |
|
57 | 52 |
&hor |
58 |
- OVR2 Screen/x=! |
|
59 |
- ( draw ) DUPr STHr Screen/color~! |
|
60 |
- ( next ) Screen/addr*! #0008 ADD2 Screen/addr=! |
|
53 |
+ OVR2 .Screen/x DEO2 |
|
54 |
+ ( draw ) DUPr STHr .Screen/color DEO |
|
55 |
+ ( next ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2 |
|
61 | 56 |
( incr ) SWP2 #0008 ADD2 SWP2 |
62 | 57 |
OVR2 OVR2 LTH2 ,&hor JNZ |
63 | 58 |
POP2 POP2 |