text fixes

This commit is contained in:
4am 2018-02-08 16:28:49 -05:00
parent ea47d16d7f
commit c8086cff13
3 changed files with 16 additions and 31 deletions

Binary file not shown.

View File

@ -12,7 +12,6 @@
;
; Public constants
; - kNumberOfGames
; - kGameRootDirectory
; - GAMES
;
@ -191,27 +190,24 @@ LoadGameInfo
sta $03
parseloop
lda ($00)
; Replace all carriage returns with zeroes,
; because WeeGUI wants zero-terminated strings
; but I want to be able to edit files in a text editor.
cmp #$0D
bne +
cmp #$0D ; CR -> 0x00 (WeeGUI wants null-terminated strings)
bne .notCR
lda #$00
sta ($00)
lda #$FF
sta bFoundCR
bra .next
+ cmp #$5B ; '[' is section name start delimiter
.notCR
cmp #$5B ; '[' is section name start delimiter
beq .startsectionname
cmp #$5D ; ']' is section name end delimiter
beq .endsectionname
bit bInSectionName
bmi .parsesectionname
bvs .next
tax
beq .nohighbit
+ cmp #$5E ; '^' -> closed-apple mousetext
cmp #$5E ; '^' -> closed-apple mousetext
bne +
lda #$40
sta ($00)
@ -225,7 +221,6 @@ parseloop
ora #$80
sta ($00)
.nohighbit
bit bFoundCR
bpl .next
stz bFoundCR

View File

@ -102,13 +102,6 @@ PaintAllViews
jsr WeeGUI
jsr .paintTitleView
jsr .paintInfoView
ldx #WGSelectView
lda #ID_DESCRIPTION
jsr WeeGUI
ldx #WGPaintView
jsr WeeGUI
jmp .paintDescriptionView
;------------------------------------------------------------------------------
@ -147,10 +140,9 @@ RepaintSomeViews
ldx #WGSelectView
lda #ID_DESCRIPTION
jsr WeeGUI
;ldx #WGEraseViewContents
;jsr WeeGUI
lda addrDescription
ldy addrDescription+1
ldx #78
jsr .multiPrint
lda .vtab+1
cmp #10
@ -161,17 +153,16 @@ RepaintSomeViews
.paintInfoView
ldx #WGSelectView
lda #12
jsr WeeGUI
ldx #WGEraseViewContents
lda #ID_INFO
jsr WeeGUI
lda addrInfo
ldy addrInfo+1
; note: execution falls through here
ldx #21
.multiPrint
sta $00
sty $01
stx .printLineLength+1
stz .htab+1
stz .vtab+1
.printLoop
@ -190,15 +181,14 @@ RepaintSomeViews
sta PARAM1
bit MAGICRTS ; set overflow bit
jsr WeeGUI
bit #%00000000
- lda ($00)
bne +
bit MAGICRTS ; set overflow bit
+ inc $00
bne +
lda $00
clc
.printLineLength
adc #$fd ; set at runtime
sta $00
bcc +
inc $01
+ bvc -
inc .vtab+1
+ inc .vtab+1
bne .printLoop
.printDone
rts