Browse code

(boot.rom) Selection with enter key

Devine Lu Linvega authored on 08/11/2021 19:02:29
Showing 1 changed files
... ...
@@ -33,7 +33,6 @@
33 33
 
34 34
 |0000
35 35
 
36
-@second $1
37 36
 @pointer
38 37
 	&x  $2 &y  $2
39 38
 @browser
... ...
@@ -80,9 +79,7 @@ BRK
80 79
 
81 80
 @on-frame ( -> )
82 81
 
83
-	BRK
84
-	.DateTime/second DEI .second LDZ ! BRK?
85
-	.DateTime/second DEI .second STZ ;draw-time JSR2
82
+	( unused )
86 83
 
87 84
 BRK
88 85
 
... ...
@@ -94,13 +91,9 @@ BRK
94 91
 	.pointer/y LDZ2 .Screen/y DEO2
95 92
 	#40 .Screen/sprite DEO
96 93
 
97
-	( record pointer positions )
98
-	.Mouse/x DEI2 .pointer/x STZ2 
99
-	.Mouse/y DEI2 .pointer/y STZ2
100
-
101 94
 	( draw new cursor )
102
-	.pointer/x LDZ2 .Screen/x DEO2
103
-	.pointer/y LDZ2 .Screen/y DEO2
95
+	.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
96
+	.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
104 97
 	#41 .Mouse/state DEI #01 = + .Screen/sprite DEO
105 98
 
106 99
 	( select choice )
... ...
@@ -119,14 +112,22 @@ BRK
119 112
 	.Controller/button DEI
120 113
 	DUP #10 ! ,&no-up JCN
121 114
 		#01 .browser/sel LDZ GTHk SWP? POP DEC ;select-file JSR2
115
+		POP BRK
122 116
 		&no-up
123 117
 	DUP #20 ! ,&no-down JCN
124 118
 		.browser/sel LDZ ;dir/lines LDA LTHk SWP? POP INC ;select-file JSR2
119
+		POP BRK
125 120
 		&no-down
126 121
 	DUP #01 ! ,&no-a JCN
127 122
 		.browser/sel LDZ ;run-file JSR2
123
+		POP BRK
128 124
 		&no-a
129 125
 	POP
126
+	.Controller/key DEI
127
+	DUP #0d ! ,&no-enter JCN
128
+		.browser/sel LDZ ;run-file JSR2
129
+		&no-enter
130
+	POP
130 131
 
131 132
 BRK
132 133