diff --git a/Atari/textproc.asm b/Atari/textproc.asm index b36270d..ad33735 100644 --- a/Atari/textproc.asm +++ b/Atari/textproc.asm @@ -1252,35 +1252,33 @@ NotRobot mva #sfx_next_player sfx_effect - - ; check if all chars are empty (" ") - ldy #7 - lda #0 -@ ora NameAdr,y - and #$7F ; remove inverse (Cursor) - dey - bpl @- - tay - beq MakeDefaultName - ldy #0 + stx temp+1 ; remember start position in tanksnames + sty temp ; 0 if name is empty @ lda NameAdr,y and #$7f ; remove inverse (Cursor) sta tanksnames,x + ora temp + sta temp inx iny cpy #$08 bne @- + lda temp ; check if all chars are empty (" ") + beq MakeDefaultName rts MakeDefaultName -@ - lda tanksnamesDefault,x - sta tanksnames,x - inx - iny - cpy #$08 + ldx temp+1 + ldy #7 +@ lda tanksnamesDefault,y + sta tanksnames,x + inx + dey bne @- + ldy tanknr + lda digits+1,y + sta tanksnames,x rts .endp ;-------------------------------------------------- diff --git a/C64/textproc.asm b/C64/textproc.asm index 3c770bc..f67a032 100644 --- a/C64/textproc.asm +++ b/C64/textproc.asm @@ -169,35 +169,33 @@ NotRobot mva #sfx_next_player sfx_effect - - ; check if all chars are empty (" ") - ldy #7 - lda #0 -@ ora #0 ; NameAdr,y - and #$7F ; remove inverse (Cursor) - dey - bpl @- - tay - beq MakeDefaultName - ldy #0 -nextchar04 - lda #0 ; NameAdr,y - and #$7f ; remove inverse (Cursor) - sta tanksnames,x - inx - iny - cpy #$08 - bne nextchar04 + stx temp+1 ; remember start position in tanksnames + sty temp ; 0 if name is empty +@ + lda #0 ; NameAdr,y + and #$7f ; remove inverse (Cursor) + sta tanksnames,x + ora temp + sta temp + inx + iny + cpy #$08 + bne @- + lda temp ; check if all chars are empty (" ") + beq MakeDefaultName rts MakeDefaultName -nextchar05 - lda tanksnamesDefault,x + ldx temp+1 + ldy #7 +@ lda tanksnamesDefault,y sta tanksnames,x inx - iny - cpy #$08 - bne nextchar05 + dey + bne @- + ldy tanknr + lda digits+1,y + sta tanksnames,x rts .endp ;-------------------------------------------------- diff --git a/constants.asm b/constants.asm index cf10a5e..9dc16ae 100644 --- a/constants.asm +++ b/constants.asm @@ -225,12 +225,7 @@ SlideLeftTable SlideLeftTableLen = *-SlideLeftTable ;------------------------------------------------- TanksNamesDefault - dta d"1st.Tank" - dta d"2nd.Tank" - dta d"3rd.Tank" -.REPT MaxPlayers-3, #+4 - dta d":1th.Tank" -.ENDR + dta d"x.n knaT" ;------------------------------------------------- TankShapesTable .BYTE char_tank1 .BYTE char_tank2 diff --git a/scorch.bin b/scorch.bin index 25039d2..45c1e31 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 807192c..4e157f3 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/scorchC64.prg b/scorchC64.prg index 9c2bda6..84687d4 100644 Binary files a/scorchC64.prg and b/scorchC64.prg differ