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