diff --git a/Atari/textproc.asm b/Atari/textproc.asm index 282507b..782b917 100644 --- a/Atari/textproc.asm +++ b/Atari/textproc.asm @@ -2022,27 +2022,10 @@ AngleDisplay ;------------------------------------------------- .proc DisplayWeaponName ; nr of weapon in A, address to put in weaponPointer -@weapon_index = temp +@weapon_index = TextNumberOff sta @weapon_index ;get back number of the weapon - -@inverse_counter = temp+1 - - mwa #0 @inverse_counter - tay ; ldy #0 mwa #(NamesOfWeapons-1) LineAddress4x4 - -@ - inw LineAddress4x4 - lda (LineAddress4x4),y - spl:inc @inverse_counter - lda @weapon_index - beq zeroth_talk ; special treatment of talk #0 - cmp @inverse_counter - bne @- - - inw LineAddress4x4 ; we were pointing at the char with inverse, must go 1 further -zeroth_talk - + jsr _calc_inverse_display ; now copy text to screen dey ; ldy #-1 @ @@ -2058,6 +2041,27 @@ clearingOnly bne clearingonly rts .endp - - +;------------------------------------------------- +.proc _calc_inverse_display +; optymalization station. not a real function +; or is it? +@weapon_index = TextNumberOff +@inverse_counter = temp+1 + + mwa #0 @inverse_counter + tay ; ldy #0 +@ + inw LineAddress4x4 + lda (LineAddress4x4),y + spl:inc @inverse_counter + lda @weapon_index + beq zeroth_talk ; special treatment of talk #0 + cmp @inverse_counter + bne @- + + inw LineAddress4x4 ; we were pointing at the char with inverse, must go 1 further +zeroth_talk + rts +.endp + .endif \ No newline at end of file diff --git a/C64/textproc.asm b/C64/textproc.asm index 8998e1f..5e98710 100644 --- a/C64/textproc.asm +++ b/C64/textproc.asm @@ -340,6 +340,28 @@ DisplayAngle rts .endp ;------------------------------------------------- +.proc _calc_inverse_display +; optymalization station. not a real function +; or is it? +@weapon_index = TextNumberOff +@inverse_counter = temp+1 + + mwa #0 @inverse_counter + tay ; ldy #0 +@ + inw LineAddress4x4 + lda (LineAddress4x4),y + spl:inc @inverse_counter + lda @weapon_index + beq zeroth_talk ; special treatment of talk #0 + cmp @inverse_counter + bne @- + + inw LineAddress4x4 ; we were pointing at the char with inverse, must go 1 further +zeroth_talk + rts +.endp +;------------------------------------------------- .endif \ No newline at end of file diff --git a/grafproc.asm b/grafproc.asm index e8bbd64..cb6a0a3 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -1599,25 +1599,10 @@ 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 - inverse_counter = temp+1 - tya tax ; save Y - mwa #0 inverse_counter - tay ; ldy #0 mwa #(talk-1) LineAddress4x4 - -@ - inw LineAddress4x4 - lda (LineAddress4x4),y - spl:inc inverse_counter - lda TextNumberOff - beq zeroth_talk ; special treatment of talk #0 - cmp inverse_counter - bne @- - - inw LineAddress4x4 ; we were pointing at the char with inverse, must go 1 further -zeroth_talk + jsr _calc_inverse_display ; now find length of the text @ diff --git a/scorch.bin b/scorch.bin index e85bb6e..e9ee31b 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 5f4c059..cceff98 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/scorchC64.prg b/scorchC64.prg index a416e98..a991713 100644 Binary files a/scorchC64.prg and b/scorchC64.prg differ