(calc.tal) Optimizations

This commit is contained in:
neauoire 2022-01-26 10:14:18 -08:00
parent 055fa9bcd0
commit 3f94152050
1 changed files with 58 additions and 58 deletions

View File

@ -165,6 +165,7 @@ BRK
OVR2 OVR2 .input-frame ;within-rect JSR2 ;click-input JCN2 OVR2 OVR2 .input-frame ;within-rect JSR2 ;click-input JCN2
OVR2 OVR2 .modpad-frame ;within-rect JSR2 ;click-modpad JCN2 OVR2 OVR2 .modpad-frame ;within-rect JSR2 ;click-modpad JCN2
OVR2 OVR2 .bitpad-frame ;within-rect JSR2 ;click-bitpad JCN2 OVR2 OVR2 .bitpad-frame ;within-rect JSR2 ;click-bitpad JCN2
;toggle-mode JSR2
POP2 POP2 POP2 POP2
&no-down &no-down
( up ) ( up )
@ -263,6 +264,7 @@ RTN
@toggle-mode ( -- ) @toggle-mode ( -- )
.input/mode LDZk #00 = SWP STZ .input/mode LDZk #00 = SWP STZ
#30 .Audio0/pitch DEO
;redraw JSR2 ;redraw JSR2
RTN RTN
@ -538,28 +540,24 @@ RTN
@draw-key ( x* y* glyph* state color -- ) @draw-key ( x* y* glyph* state color -- )
( auto x addr ) AUTO-XADDR STH2
( color ) ,&color STR AUTO-XADDR
( state ) ,&state STR SWP2 .Screen/y DEO2
( glyph ) ,&glyph STR2 SWP2 .Screen/x DEO2
( state ) ;button-icns [ #00 ,&state LDR 20** ++ ] .Screen/addr DEO2 ( bg )
( y ) .Screen/y DEO2 ;button-icns [ #00 OVRr STHr 20** ++ ] .Screen/addr DEO2
( x ) .Screen/x DEO2 STHkr .Screen/sprite DEOk DEO
( draw background ) .Screen/x DEI2k #0010 -- ROT DEO2
,&color LDR .Screen/sprite DEO .Screen/y DEI2k #0008 ++ ROT DEO2
,&color LDR .Screen/sprite DEO STHkr .Screen/sprite DEOk DEO
.Screen/x DEI2 #0010 -- .Screen/x DEO2 ( fg )
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/addr DEO2
,&color LDR .Screen/sprite DEOk DEO .Screen/x DEI2k #000c -- ROT DEO2
( glyph ) .Screen/y DEI2k #0005 -- ROT DEO2
,&glyph LDR2 .Screen/addr DEO2 STHr [ STHr #09 MUL + ] .Screen/sprite DEO
.Screen/x DEI2 #000c -- .Screen/x DEO2 AUTO-NONE
.Screen/y DEI2 #0005 -- .Screen/y DEO2
,&color LDR [ ,&state LDR #09 MUL + ] .Screen/sprite DEO
( auto none ) AUTO-NONE
RTN RTN
&color $1 &state $1 &glyph $2
@draw-key-thin ( x* y* glyph* state color -- ) @draw-key-thin ( x* y* glyph* state color -- )
@ -595,7 +593,7 @@ RTN
RTN RTN
&digit ( num -- ) &digit ( num -- )
,&addr JSR .Screen/addr DEO2 ,&addr JSR .Screen/addr DEO2
LIT &color $1 .Screen/sprite DEO [ LIT &color $1 ] .Screen/sprite DEO
RTN RTN
&decimal ( num* -- ) &decimal ( num* -- )
AUTO-X AUTO-X
@ -674,6 +672,8 @@ RTN
JMP2r JMP2r
( assets )
@keypad @keypad
&layout &layout
0708 090f 0405 060e 0102 030d 000a 0b0c 0708 090f 0405 060e 0102 030d 000a 0b0c