- Added desktop painting

- Fixed WGEraseView corrupting the X register
- WGPaintAll now renders contents cleanly
This commit is contained in:
Quinn Dunki 2014-09-07 16:25:26 -07:00
parent 4e1843706e
commit ae3f4f491e
4 changed files with 41 additions and 3 deletions

2
gui.s
View File

@ -24,7 +24,7 @@ main:
;jmp tortureTestPrint
;jmp tortureTestRects
jsr WGClearScreen
jsr WGDesktop
lda #<testView
sta PARAM0

Binary file not shown.

View File

@ -43,6 +43,43 @@ WGClearScreen_charLoop:
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGDesktop
; Paints the desktop pattern (assumes 80 cols)
; Side effects: Clobbers BASL,BASH
;
WGDesktop:
SAVE_AXY
SETSWITCH PAGE2OFF
ldx #23
WGDesktop_lineLoop:
lda TEXTLINES_L,x ; Compute video memory address of line
sta BASL
lda TEXTLINES_H,x
sta BASH
ldy #39
WGDesktop_charLoop:
lda #'W'
sta (BASL),y
SETSWITCH PAGE2ON
lda #'V'
sta (BASL),y
SETSWITCH PAGE2OFF
dey
bpl WGDesktop_charLoop
dex
bpl WGDesktop_lineLoop
RESTORE_AXY
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGPlot
; Plots a character at current cursor position (assumes 80 cols)

View File

@ -442,7 +442,7 @@ paintWindowTitle_done:
; Erases the current view (including decoration)
;
WGEraseView:
SAVE_AY
SAVE_AXY
SAVE_ZPP
LDY_ACTIVEVIEW
@ -470,7 +470,7 @@ WGEraseView:
WGEraseView_done:
RESTORE_ZPP
RESTORE_AY
RESTORE_AXY
rts
@ -859,6 +859,7 @@ WGViewPaintAll_loop:
lda WG_VIEWRECORDS+2,y ; Last view?
beq WGViewPaintAll_done
jsr WGEraseViewContents
jsr WGPaintView
inx
bra WGViewPaintAll_loop