Browse Source

Fixed issue with guides in zoomed mode

main
neauoire 4 years ago
parent
commit
39fcc095a0
  1. 49
      src/main.tal

49
src/main.tal

@ -914,20 +914,6 @@ RTN
RTN
@draw-nametable ( -- )
#00
&loop
DUP TOS
DUP2 10MOD2 8** .nametable/x LDZ2 ++ .Screen/x DEO2
DUP2 10// 8** .nametable/y LDZ2 ++ .Screen/y DEO2
DUP2 BANK-NAMETABLE ++ LDA TOS 10** BANK-SPRITESHEET ++ .Screen/addr DEO2
BANK-COLOR ++ LDA .Screen/sprite DEO
INC DUP ,&loop JCN
POP
RTN
@draw-tileview-zoom ( -- )
( find focus ) GET-POSITION STH2 STH2
@ -948,27 +934,22 @@ RTN
POP2r POP2r
( guides )
VER 8/ #01 - #00
&guides-hor
STHk
.tileview/x1 LDZ2
.tileview/x2 LDZ2
.tileview/y1 LDZ2 STHr INC 40* #01 - TOS ++
#02
;line-hor JSR2
INC GTHk ,&guides-hor JCN
POP2
.tileview/x1 LDZ2 .tileview/x2 LDZ2 .tileview/y1 LDZ2 #003f ++ #02 ;line-hor JSR2
.tileview/x1 LDZ2 #003f ++ .tileview/y1 LDZ2 .tileview/y2 LDZ2 #02 ;line-ver JSR2
HOR 8/ #01 - #00
&guides-ver
STHk
.tileview/x1 LDZ2 STHr INC 40* #01 - TOS ++
.tileview/y1 LDZ2
.tileview/y2 LDZ2
#02
;line-ver JSR2
INC GTHk ,&guides-ver JCN
POP2
RTN
@draw-nametable ( -- )
#00
&loop
DUP TOS
DUP2 10MOD2 8** .nametable/x LDZ2 ++ .Screen/x DEO2
DUP2 10// 8** .nametable/y LDZ2 ++ .Screen/y DEO2
DUP2 BANK-NAMETABLE ++ LDA TOS 10** BANK-SPRITESHEET ++ .Screen/addr DEO2
BANK-COLOR ++ LDA .Screen/sprite DEO
INC DUP ,&loop JCN
POP
RTN

Loading…
Cancel
Save