Offensive text fix and optimization

This commit is contained in:
Pecusx
2023-05-25 23:30:48 +02:00
parent 1389675fce
commit 2ee718ce63
5 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ L48 dta d"I SHALL OIL MY TURRET WITH YOUR BLOOD", d"."*
L49 dta d"DIE, TANK-SCUM", d"!"*
L50 dta d"I'M GONNA BREAK YOUR FACE", d"!"*
L51 dta d"MAMA SAID KNOCK YOU OUT", d"!"*
L52 dta d"I HOPE YOU ENJOY PAIN"
L52 dta d"I HOPE YOU ENJOY PAIN", d"!"*
L53 dta d"HOW'D YOU LIKE ONE ACROSS YOUR LIPS", d"?"* ;(sanford and son)
;--------------------------------
L54 dta d"PARTING IS SUCH SWEET SORROW... NOT", d"!"*
+5 -7
View File
@@ -1599,32 +1599,30 @@ NotHigher
; all text start from `talk` and end with an inverse.
; we go through the `talk`, count number of inverses.
; if equal to TextNumberOff, it is our text, printit
talk_address = temp2
inverse_counter = temp
tya
tax ; save Y
mwa #0 inverse_counter
tay ; ldy #0
mwa #(talk-1) talk_address
mwa #(talk-1) LineAddress4x4
@
inw talk_address
lda (talk_address),y
inw LineAddress4x4
lda (LineAddress4x4),y
spl:inc inverse_counter
lda TextNumberOff
beq zeroth_talk ; special treatment of talk #0
cmp inverse_counter
bne @-
inw talk_address ; we were pointing at the char with inverse, must go 1 further
inw LineAddress4x4 ; we were pointing at the char with inverse, must go 1 further
zeroth_talk
mwa talk_address LineAddress4x4
; now find length of the text
@
iny
lda (talk_address),y
lda (LineAddress4x4),y
bpl @-
iny
sty fx
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.