| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,65 @@ |
| 1 |
+( screen blending modes ) |
|
| 2 |
+ |
|
| 3 |
+|00 @System &catch $2 &expansion $2 &pad $2 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 |
|
| 4 |
+|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |
|
| 5 |
+ |
|
| 6 |
+|0100 |
|
| 7 |
+ |
|
| 8 |
+@on-reset ( -> ) |
|
| 9 |
+ ( | theme ) |
|
| 10 |
+ #f07f .System/r DEO2 |
|
| 11 |
+ #f0d6 .System/g DEO2 |
|
| 12 |
+ #f0b2 .System/b DEO2 |
|
| 13 |
+ ( | size ) |
|
| 14 |
+ #0080 .Screen/width DEO2 |
|
| 15 |
+ #008c .Screen/height DEO2 |
|
| 16 |
+ ( | background ) |
|
| 17 |
+ #f2 .Screen/auto DEO |
|
| 18 |
+ ;check-icn .Screen/addr DEO2 |
|
| 19 |
+ #ee × #02 .Screen/sprite DEO |
|
| 20 |
+ INC DUP ?× |
|
| 21 |
+ POP |
|
| 22 |
+ ( | circles ) |
|
| 23 |
+ #1000 |
|
| 24 |
+ &l ( -- ) |
|
| 25 |
+ #00 OVR #03 AND #50 SFT2 #0008 ADD2 .Screen/x DEO2 |
|
| 26 |
+ #00 OVR #02 SFT #50 SFT2 #0008 ADD2 .Screen/y DEO2 |
|
| 27 |
+ DUP #80 ORA <draw-circle> |
|
| 28 |
+ INC GTHk ?&l |
|
| 29 |
+ POP2 BRK |
|
| 30 |
+ |
|
| 31 |
+@<draw-circle> ( color -- ) |
|
| 32 |
+ #01 .Screen/auto DEO |
|
| 33 |
+ ;circle-chr .Screen/addr DEO2 |
|
| 34 |
+ DUP .Screen/sprite DEO |
|
| 35 |
+ DUP #10 ORA .Screen/sprite DEO |
|
| 36 |
+ .Screen/x DEI2k #0010 SUB2 ROT DEO2 |
|
| 37 |
+ .Screen/y DEI2k #0008 ADD2 ROT DEO2 |
|
| 38 |
+ DUP #20 ORA .Screen/sprite DEO |
|
| 39 |
+ DUP #30 ORA .Screen/sprite DEO |
|
| 40 |
+ |
|
| 41 |
+@<draw-hex> ( color -- ) |
|
| 42 |
+ .Screen/x DEI2k #000c SUB2 ROT DEO2 |
|
| 43 |
+ .Screen/y DEI2k #000c ADD2 ROT DEO2 |
|
| 44 |
+ #00 SWP #30 SFT ;font-icn ADD2 .Screen/addr DEO2 |
|
| 45 |
+ #05 .Screen/sprite DEO |
|
| 46 |
+ JMP2r |
|
| 47 |
+ |
|
| 48 |
+@check-icn |
|
| 49 |
+ [ 0306 0c18 3060 c081 ] |
|
| 50 |
+ |
|
| 51 |
+@circle-chr |
|
| 52 |
+ [ |
|
| 53 |
+ 071f 3c70 60e3 c7c7 0000 030f 1f1f 3f3f ] |
|
| 54 |
+ |
|
| 55 |
+@font-icn ( 0-f ) |
|
| 56 |
+ [ |
|
| 57 |
+ 007c 8282 8282 827c 0030 1010 1010 1010 |
|
| 58 |
+ 007c 8202 7c80 80fe 007c 8202 1c02 827c |
|
| 59 |
+ 000c 1424 4484 fe04 00fe 8080 7c02 827c |
|
| 60 |
+ 007c 8280 fc82 827c 007c 8202 1e02 0202 |
|
| 61 |
+ 007c 8282 7c82 827c 007c 8282 7e02 827c |
|
| 62 |
+ 007c 8202 7e82 827e 00fc 8282 fc82 82fc |
|
| 63 |
+ 007c 8280 8080 827c 00fc 8282 8282 82fc |
|
| 64 |
+ 007c 8280 f080 827c 007c 8280 f080 8080 ] |
|
| 65 |
+ |