Minor refactor of mainmem.gfx.s

This commit is contained in:
Bobbi Webber-Manners 2021-10-10 14:43:57 -04:00
parent 281360de93
commit c0d00c27e5
2 changed files with 20 additions and 19 deletions

Binary file not shown.

View File

@ -19,9 +19,8 @@ SETLINE >>> ENTMAIN
JSR FDRAWADDR+43 ; FDRAW: SetLineMode
>>> XF2AUX,VDU18RET1
* Call FDraw DrawLine routine
DRAWLINE >>> ENTMAIN
LDA PLOTMODE
* Helper function to set up colors
SETCOLOR LDA PLOTMODE
AND #$03
CMP #$01 ; Draw in foreground colour
BNE :S1
@ -35,30 +34,32 @@ DRAWLINE >>> ENTMAIN
BRA :SETCOLOR
:S2 LDA BGCOLOR ; Draw in background colour
:SETCOLOR STA FDRAWADDR+5
JSR FDRAWADDR+16 ; FDRAW: SetColor
JMP FDRAWADDR+16 ; FDRAW: SetColor
* Call FDraw DrawLine routine
DRAWLINE >>> ENTMAIN
JSR SETCOLOR
JSR FDRAWADDR+28 ; FDRAW: DrawLine
>>> XF2AUX,VDU25RET
* Call FDraw DrawPoint routine
DRAWPNT >>> ENTMAIN
LDA PLOTMODE
AND #$03
CMP #$01 ; Draw in foreground colour
BNE :S1
LDA FGCOLOR
BRA :SETCOLOR
:S1 CMP #$02 ; Draw in inverse colour
BNE :S2
SEC
LDA #$07
SBC FGCOLOR
BRA :SETCOLOR
:S2 LDA BGCOLOR ; Draw in background colour
:SETCOLOR STA FDRAWADDR+5
JSR FDRAWADDR+16 ; FDRAW: SetColor
JSR SETCOLOR
JSR FDRAWADDR+25 ; FDRAW: DrawPoint
>>> XF2AUX,VDU25RET
* Call FDraw DrawCircle routine
DRAWCIRC >>> ENTMAIN
JSR SETCOLOR
JSR FDRAWADDR+37 ; FDRAW: DrawCircle
>>> XF2AUX,VDU25RET
* Call FDraw FillCircle routine
FILLCIRC >>> ENTMAIN
JSR SETCOLOR
JSR FDRAWADDR+40 ; FDRAW: FillCircle
>>> XF2AUX,VDU25RET
* Reset colours and linetype
GFXINIT JSR FDRAWADDR+0 ; Initialize FDRAW library
LDA #$20