SHR: Extended range of y coordinate before clipping

This commit is contained in:
Bobbi Webber-Manners 2023-01-05 18:28:22 -05:00
parent abae32ada9
commit a4add222b9
2 changed files with 6 additions and 1 deletions

Binary file not shown.

View File

@ -232,6 +232,8 @@ SHRPLOT >>> ENTMAIN
PHA PHA
LDA A2L ; Preserve converted y LDA A2L ; Preserve converted y
PHA PHA
LDA A2H
PHA
LDA SHRVDUQ+4 ; k LDA SHRVDUQ+4 ; k
AND #$03 AND #$03
CMP #$00 ; Bits 0,1 clear -> just move CMP #$00 ; Bits 0,1 clear -> just move
@ -260,14 +262,16 @@ SHRPLOT >>> ENTMAIN
BRA :S2 BRA :S2
:S2 PLA ; Store prev pt in screen coords :S2 PLA ; Store prev pt in screen coords
STA SHRYPIXEL+1
PLA
STA SHRYPIXEL+0 STA SHRYPIXEL+0
STZ SHRYPIXEL+1
PLA PLA
STA SHRXPIXEL+1 STA SHRXPIXEL+1
PLA PLA
STA SHRXPIXEL+0 STA SHRXPIXEL+0
:DONE >>> XF2AUX,GFXPLOTRET :DONE >>> XF2AUX,GFXPLOTRET
:BAIL PLA :BAIL PLA
PLA
PLA PLA
PLA PLA
LDA SHRGFXFGMSK2 ; Restore original FG colour LDA SHRGFXFGMSK2 ; Restore original FG colour
@ -700,6 +704,7 @@ SHRCOORD PHP ; Disable interrupts
ASL ; ASL ;
AND #$FF00 ; Mask bits AND #$FF00 ; Mask bits
ADC #0 ; Add in carry (9th bit)
XBA ; Clever trick: fewer shifts XBA ; Clever trick: fewer shifts
STA A2L ; Into A2L/H STA A2L ; Into A2L/H