mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-04-03 18:32:25 +00:00
Fix drawing with relative coords (ticket #116)
This commit is contained in:
parent
ec264aa4b0
commit
1aeacf29b6
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
33
auxmem.gfx.s
33
auxmem.gfx.s
@ -149,10 +149,6 @@ HGRPLOTTER2 LDA VDUQ+5,X
|
||||
*
|
||||
HGRPLOT JSR CVTCOORD ; Convert coordinate system
|
||||
HGRPLOT2 LDA VDUQ+4
|
||||
AND #$04 ; Bit 2 set -> absolute
|
||||
BNE HGRPLOTABS
|
||||
JSR RELCOORD ; Add coords to XPIXEL/YPIXEL
|
||||
HGRPLOTABS LDA VDUQ+4
|
||||
AND #$03
|
||||
CMP #$0 ; Bits 0,1 clear -> just move
|
||||
BNE HGRPLOTACT
|
||||
@ -325,33 +321,4 @@ CVTCOORD
|
||||
STA VDUQ+6
|
||||
BRA :YCOORD
|
||||
|
||||
* Add coordinates to XPIXEL, YPIXEL
|
||||
RELCOORD CLC
|
||||
LDA XPIXEL+0
|
||||
ADC VDUQ+5
|
||||
STA VDUQ+5
|
||||
LDA XPIXEL+1
|
||||
ADC VDUQ+6
|
||||
STA VDUQ+6
|
||||
CLC
|
||||
LDA YPIXEL
|
||||
ADC VDUQ+7
|
||||
STA VDUQ+7
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
33
auxmem.vdu.s
33
auxmem.vdu.s
@ -1063,16 +1063,17 @@ VDUCOPYEXIT RTS
|
||||
* x is in VDUQ+5,VDUQ+6
|
||||
* y is in VDUQ+7,VDUQ+8
|
||||
*
|
||||
VDU25 LDA VDUPIXELS
|
||||
BEQ VDU25NULL
|
||||
|
||||
* TO DO:
|
||||
* coord=coord+origin
|
||||
* scale coord
|
||||
* clip to viewport
|
||||
|
||||
JSR HGRPLOTTER
|
||||
|
||||
VDU25NULL LDX #7
|
||||
VDU25 LDA VDUQ+4
|
||||
AND #$04 ; Bit 2 set -> absolute
|
||||
BNE :S0
|
||||
JSR RELCOORD
|
||||
:S0 LDX #7
|
||||
VDU25BACKUP1 LDA PIXELPLOTX+0,X ; Copy pixel coords
|
||||
STA PIXELPLOTX+4,X ; POSN becomes LAST
|
||||
DEX ; and PLOT becomes POSN
|
||||
@ -1084,13 +1085,33 @@ VDU25BACKUP2 LDA GFXPOSNX,X ; POSN becomes LAST
|
||||
STA GFXPOSNX,X
|
||||
DEX
|
||||
BPL VDU25BACKUP2
|
||||
LDA $C000 ; This and PRCHRC need to be
|
||||
LDA VDUPIXELS
|
||||
BEQ :S1
|
||||
JSR HGRPLOTTER
|
||||
:S1 LDA $C000 ; This and PRCHRC need to be
|
||||
EOR #$80 ; made more generalised
|
||||
BMI VDU25EXIT ; No key pressed
|
||||
JSR KBDCHKESC ; Ask KBD to test if Escape
|
||||
VDU25EXIT RTS
|
||||
|
||||
|
||||
* Add coordinates to GFXPOSNX, GFXPOSNY
|
||||
RELCOORD CLC
|
||||
LDA GFXPOSNX+0
|
||||
ADC VDUQ+5
|
||||
STA VDUQ+5
|
||||
LDA GFXPOSNX+1
|
||||
ADC VDUQ+6
|
||||
STA VDUQ+6
|
||||
CLC
|
||||
LDA GFXPOSNY+0
|
||||
ADC VDUQ+7
|
||||
STA VDUQ+7
|
||||
LDA GFXPOSNY+1
|
||||
ADC VDUQ+8
|
||||
STA VDUQ+8
|
||||
RTS
|
||||
|
||||
* Program video system and define characters
|
||||
********************************************
|
||||
VDU23 RTS
|
||||
|
Loading…
x
Reference in New Issue
Block a user