Using new font engine HTAB code now.

This commit is contained in:
Martin Haye 2015-07-11 08:58:00 -07:00
parent 5c95954cee
commit fef4595e9a

View File

@ -567,6 +567,36 @@ asm displayStr
jmp DisplayStr jmp DisplayStr
end end
///////////////////////////////////////////////////////////////////////////////////////////////////
// Display a string using the font engine.
// Params: pStr
asm rawDisplayStr
+asmPlasm 1
bit setLcRW+lcBank2
bit setLcRW+lcBank2
sta pTmp
sty pTmp+1
ldy #0
lda (pTmp),y
sta tmp
- cpy tmp
bcc +
rts
+ iny
lda (pTmp),y
ora #$80
cmp #"^"
bne +
iny
lda (pTmp),y
and #$1F
ora #$80
+ sty tmp+1
jsr DisplayChar
ldy tmp+1
bne -
end
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Convert a PLASMA string (starts with length, lo-bit ascii) to an assembly string // Convert a PLASMA string (starts with length, lo-bit ascii) to an assembly string
// (zero-terminated, hi-bit ascii). // (zero-terminated, hi-bit ascii).
@ -794,16 +824,10 @@ end
// Show some faked-up data for player characters // Show some faked-up data for player characters
def fakeChars() def fakeChars()
setWindow3() setWindow3()
displayChar('L'-$40) rawDisplayStr("^LName^T065Life^T090Gun^L\n")
displayStr("Name Life Gun\n") rawDisplayStr("Black Bart^T06512^T0904\n")
displayChar('L'-$40) rawDisplayStr("Wyld Bill^T0658^T0902\n")
displayStr("Black Bart ") rawDisplayStr("Lucy Lawls^T0659^T0906")
displayChar('U'-$40) // right 1 pix
displayStr("12 4\n")
displayStr("Wyld Bill 8 2\n")
displayStr("Lucy Lawless ")
displayChar('U'-$40) // right 1 pix
displayStr("9 6")
if mapIs3D; copyWindow(); fin if mapIs3D; copyWindow(); fin
setWindow2() setWindow2()
end end