Prev: 47231 Up: Map Next: 47358
47336: Change a character's name (2)
Continues from 47208. Returns with the zero flag set if 'c' was pressed after entering the character's name.
Input
DE Address of the character's name message
HL 23611 (FLAGS)
47336 RES 5,(HL) Signal: no key pressed
47338 LD H,D Set HL to the message address for the character's name
47339 LD L,E
47340 CALL 47080 Collect a keypress
47343 JR Z,47352 Jump forward if ENTER was pressed
47345 CP 13 Have 13 characters been typed?
47347 JR NZ,47340 Jump back to collect another keypress if not
47349 DEC E Set the character name message address offset back to 12 to avoid overflow (any subsequent keypresses will be stored at that offset)
47350 JR 47340
47352 PUSH HL Save the message address
47353 CALL 46824 Print 'PRESS'C'TO CHANGE NAME' and wait for a keypress
47356 POP HL Restore the character name message address to HL
47357 RET
Prev: 47231 Up: Map Next: 47358