tfv: battle actually uses entered name

This commit is contained in:
Vince Weaver 2021-02-07 15:13:07 -05:00
parent d6816b81ec
commit 4224a48d64
3 changed files with 33 additions and 2 deletions

View File

@ -40,6 +40,22 @@ do_battle:
jsr update_hero_mp
;======================
; copy in player name
ldx #0
load_name_loop:
lda HERO_NAME,X
bne load_name_zero
lda #' '
load_name_zero:
sta battle_name_string+2,X
inx
cpx #8
bne load_name_loop
really_done_load_name:
;=============
; start music
lda SOUND_STATUS

View File

@ -1007,7 +1007,7 @@ battle_enemy_attack_string:
; current hero name to print
battle_name_string:
.byte 14,21,"DEATER",0
.byte 14,21,"????????",0
; menu status strings

View File

@ -395,8 +395,23 @@ done_textentry:
done_enter_name:
; FIXME: if empty, set to default
; copy in default if empty
; FIXME: use heroine name if applicable
lda HERO_NAME
bne really_done_enter_name
ldx #0
copy_name_loop:
lda default_hero,X
sta HERO_NAME,X
beq really_done_enter_name
inx
cpx #8
bne copy_name_loop
really_done_enter_name:
rts