mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-01-12 12:30:07 +00:00
Fixed fake character text; added support for control codes in packer.
This commit is contained in:
parent
7cf8cbeb0e
commit
cf55e06347
@ -1401,10 +1401,27 @@ class PackPartitions
|
||||
def vec_moveBackward = 0x31E
|
||||
def vec_getCharacter = 0x321
|
||||
|
||||
def emitAuxString(str)
|
||||
def emitAuxString(inStr)
|
||||
{
|
||||
emitCodeByte(0x54) // CALL
|
||||
emitCodeWord(vec_pushAuxStr)
|
||||
def buf = new StringBuilder()
|
||||
def prev = ' '
|
||||
inStr.each { ch ->
|
||||
if (ch == '^') {
|
||||
if (prev == '^')
|
||||
buf.append(ch)
|
||||
}
|
||||
else if (prev == '^') {
|
||||
def cp = Character.codePointAt(ch.toUpperCase(), 0)
|
||||
if (cp > 64 && cp < 96)
|
||||
buf.appendCodePoint(cp - 64)
|
||||
}
|
||||
else
|
||||
buf.append(ch)
|
||||
prev = ch
|
||||
}
|
||||
def str = buf.toString()
|
||||
assert str.size() < 256 : "String too long, max is 255 characters: $str"
|
||||
emitCodeByte(str.size())
|
||||
str.each { ch -> emitCodeByte((byte)ch) }
|
||||
|
@ -779,7 +779,7 @@ init: !zone
|
||||
sta setAuxRd
|
||||
lda $2000
|
||||
sta clrAuxRd
|
||||
cmp #1
|
||||
cmp #2
|
||||
beq +
|
||||
ldx #<.auxMsg
|
||||
ldy #>.auxMsg
|
||||
|
@ -753,12 +753,14 @@ end
|
||||
def fakeChars()
|
||||
setWindow3()
|
||||
displayChar('L'-$40)
|
||||
displayStr("Name Life Gun\n")
|
||||
displayStr("Name Life Gun\n")
|
||||
displayChar('L'-$40)
|
||||
displayStr("Black Bart 12 4\n")
|
||||
displayStr("Wyld Bill 8 2\n")
|
||||
displayStr("Lucy Lawless ")
|
||||
displayChar('H'-$40) // back 1 pixel
|
||||
displayStr("Black Bart ")
|
||||
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
|
||||
setWindow2()
|
||||
|
Loading…
x
Reference in New Issue
Block a user