This commit is contained in:
4am 2018-04-01 19:12:39 -04:00
parent 817e1d45b6
commit 6081601a68
3 changed files with 31 additions and 34 deletions

View File

@ -18,3 +18,9 @@ gKey = $3F01
gValLen = $3F80
gVal = $3F81
WGInit = $4000 ; WeeGUI file load address and initialization function
; zero page
PTR = $02
SRC = $04
DEST = $06
SAVE = $08

View File

@ -61,11 +61,6 @@
; ... filler bytes up to value max length (set at append() time)
!zone {
PTR = $02
SRC = $04
DEST = $06
SAVE = $08
;------------------------------------------------------------------------------
; okvs_init
;

View File

@ -214,20 +214,23 @@ PaintDescriptionView
ldx #WGSelectView
lda #ID_DESCRIPTION
jsr WeeGUI
+LDAY addrDescription
ldx #kDescriptionPaintWidth
jsr MultiPrint
lda .vtab+1
cmp #10
lda SAVE
cmp #10 ; minimum content height
bcs +
lda #10
+ ldx #WGSetContentHeight
+ ldx #WGSetContentHeight ; set content height so we stop scrolling on the last line of text
jmp WeeGUI
PaintInfoView
ldx #WGSelectView
lda #ID_INFO
jsr WeeGUI
+LDAY addrInfo
ldx #kInfoPaintWidth
jsr MultiPrint
@ -246,44 +249,37 @@ PaintInfoView
!word gVersionsStore
+ !word $FDFD ; SMC
; A/Y contains address
ldx #kInfoPaintWidth
jsr CreateNullTerminatedString
+LDADDR kNullTerminatedBuffer
bra MultiPrintWhereYouAre
ldx #kInfoPaintWidth ; where to put the null (rest is padded with spaces)
jsr CreateNullTerminatedString ; copies string to kNullTerminatedBuffer
+LDADDR kNullTerminatedBuffer ; now use that as the buffer to print the last line
!byte $2C
; execution falls through here
MultiPrint
stz .htab+1
stz .vtab+1
MultiPrintWhereYouAre
stz SAVE
stx .printLineLength+1
+STAY $00
+STAY SRC
.printLoop
lda ($00)
beq .printDone
stz PARAM0
lda SAVE
sta PARAM1
ldx #WGSetCursor
.htab lda #$FD ; SMC
sta PARAM0
.vtab lda #$FD ; SMC
sta PARAM1
jsr WeeGUI
+LDAY SRC
+STAY PARAM0
bit MAGICRTS ; set overflow bit to trigger raw printing (with mousetext)
ldx #WGPrint
lda $00
sta PARAM0
lda $01
sta PARAM1
bit MAGICRTS ; set overflow bit
jsr WeeGUI
lda $00
lda SRC
clc
.printLineLength
adc #$fd ; SMC
sta $00
adc #$FD ; SMC
sta SRC
bcc +
inc $01
+ inc .vtab+1
inc SRC+1
+ inc SAVE
lda (SRC)
bne .printLoop
.printDone
rts
kViewPrevious