commit c3def5d
zzo38
·
2026-03-03 01:50:25 +0000 UTC
parent 0d78c0d
Changes to prg/elemental.tal which make the compiled file shorter.
1 files changed,
+21,
-20
+21,
-20
1@@ -61,7 +61,7 @@
2 \\ Deal cards (now the stack has #03 on top)
3 LITr 01 [@
4 #04 STHrk .Height ADD STZ
5- STHrk #0a MUL deal1 deal1 deal1 deal1 POP
6+ STHrk #0a MUL deal2 deal2 POP
7 INCr DUPr LITr 03 EQUr ADDr DUPr LITr 0c EQUr ADDr
8 STHrk #0f NEQ ]?
9 \\ Ready
10@@ -85,7 +85,7 @@
11 \\ Contents of pile
12 #0029 DEO #702b DEO #802e DEO
13 LIT2 03 -Cursor/X LDZ LTH [?
14- LIT2 -Tableau -Cursor LDZ2 #20 SFT ADD STHk #0a MUL ADD
15+ LIT2 -Tableau -Cursor LDZ2 xym STHk #0a MUL ADD
16 LITr -Height ADDr LDZr STHk ADDr
17 [@
18 DUP STHrk EQU ?/x
19@@ -99,6 +99,8 @@
20 .Cursor cursorat ;Cards/cursor showoverlay
21 .Mark LDZ2k ORA [? BRK ]@ cursorat ;Cards/mark showoverlay BRK
22
23+@deal2
24+ [& ]@
25 @deal1
26 STH INC LDZk #80 ORA
27 STHrk .Tableau ADD STZ
28@@ -167,17 +169,17 @@
29 ;Mani LDZ EQU ?/sh
30 ;Cursor/Y LDZ LDZ
31 ][
32- DUP2 #20 SFT ADD .Height ADD LDZ #00
33+ DUP2 xym .Height ADD LDZ #00
34 ]@
35 EQU ?/sh .Mark STZ2
36- sound fd e0 00
37+ \\ sound fd e0 00
38 ][
39 EQU2k ?/un /nm
40 OVR #05 NEQ [?
41 \\ Check if card should be moved from outside into the tableau
42 LITr 00 STH STH
43 OVR STHr EQU ?/un
44- #20 SFT ADD
45+ xym
46 DUP ,/ah STR
47 .Height ADD LDZk
48 DUP #0a EQU ?/un
49@@ -191,9 +193,9 @@
50 OVR2 OVR #05 NEQ [?
51 \\ Check if card should be moved to spare side
52 LDZk ?/un
53- POP2 #20 SFT ADD STH !/s
54+ POP2 xym STH !/s
55 ]@
56- #20 SFT ADD
57+ xym
58 ( cx cy mx my cxy )
59 \\ Check for moving a pile to a adjacent empty cell
60 DUP .Height ADD LDZ [?
61@@ -204,7 +206,7 @@
62 DUP2k INC2k SUB2 EQU2k STH INC EQU2 STHk INCk EQU2k STH SWP EQU2 STH2r STHr ORA2 ORA
63 #00 EQU ?/un
64 \\ It is OK
65- #20 SFT ADD
66+ xym
67 DUP #0a MUL .Tableau ADD ;movepile/s STA
68 .Height ADD LITr -Height ADDr
69 LDZk STHr STZ #00 SWP STZ
70@@ -217,7 +219,7 @@
71 LITr 00 STH
72 \\ (Difference of X coordinates must be odd, and same with Y coordinates)
73 EOR2k AND #01 ANDk NEQ NIP ?/un
74- #20 SFT ADD
75+ xym
76 DUP topcard STHrk topcard ORA
77 SWP STH STH2rk
78 #030c AND2 ORA topcard STH2rk #0c03 AND2 ORA STHk topcard ORA ORA
79@@ -253,7 +255,7 @@
80 @movepile 01 000a 0000 00 &s 00 0000 00 &d 00
81
82 @topcard ( position -- card )
83- DUP #10 LTH [? POP #00 JMP2r ]@
84+ DUP #10 LTH [? INCk EQU JMP2r ]@
85 DUP .Height ADD LDZ DUP [? NIP JMP2r ]@
86 .Tableau-1 ADD SWP #0a MUL ADD LDZ JMP2r
87
88@@ -352,8 +354,7 @@
89 \-1...111.
90 \-1....111
91 \-1.....11;
92-@Wave 00 7f ff 80
93- $4
94+@Wave 00 7f ff @xym #20 SFT ADD JMP2r
95
96 \-11111111
97 \-1.......
98@@ -365,14 +366,14 @@
99 \-1.11....;
100
101 @Cards/cursor
102- \=32222223
103- \=23333332
104- \=23......
105- \=23......
106- \=23......
107- \=23......
108- \=23......
109- \=32......;
110+ \=2.......
111+ \=.3333332
112+ \=.3......
113+ \=.3......
114+ \=.3......
115+ \=.3......
116+ \=.3......
117+ \=.2......;
118
119 @Cards/back
120 \-11111111