![]() |
Routines |
| Prev: 8519 | Up: Map | Next: 85CE |
|
Used by the routine at Select1Or2PlayerGame.
|
||||
|
Prints "Name....( )".
|
||||
| PlayerNameInput | 8548 | LD HL,$8BE8 | HL=Messaging_Name. | |
| 854B | LD DE,$5088 | DE=5088 (screen buffer location). | ||
| 854E | CALL Print_String | Call Print_String. | ||
|
Prints the name of the current player.
|
||||
| 8551 | LD HL,($EFF2) | HL=*Pointer_ActivePlayer. | ||
| 8554 | LD DE,$5091 | DE=5091 (screen buffer location). | ||
| 8557 | CALL Print_String | Call Print_String. | ||
|
Draw an underline to show the "cursor".
|
||||
| 855A | LD HL,$50B1 | HL=50B1 (screen buffer location). | ||
| 855D | LD (HL),$FF | Write FF to *HL. | ||
| 855F | PUSH HL | Stash the cursor position on the stack. | ||
| 8560 | LD HL,($EFF2) | Stash *Pointer_ActivePlayer on the stack. | ||
| 8563 | PUSH HL | |||
| 8564 | CALL PauseCheck | Call PauseCheck. | ||
| PlayerNameInput_Fire | 8567 | LD B,$0A | B=0A. | |
| PlayerNameInput_Loop | 8569 | CALL $8055 | Call 8055. | |
| 856C | CALL Handler_Controls | Call Handler_Controls. | ||
| 856F | LD A,E | Jump to PlayerNameInput_Up if E is equal to 18. | ||
| 8570 | CP $18 | |||
| 8572 | JR Z,PlayerNameInput_Up | |||
| 8574 | CP $08 | Jump to PlayerNameInput_Down if E is equal to 08. | ||
| 8576 | JR Z,PlayerNameInput_Down | |||
| 8578 | CP $20 | Jump to PlayerNameInput_Fire if E is not equal to 20. | ||
| 857A | JR NZ,PlayerNameInput_Fire | |||
| 857C | POP HL | Restore HL and DE from the stack. | ||
| 857D | POP DE | |||
| 857E | LD A,$00 | Write 00 to *DE. | ||
| 8580 | LD (DE),A | |||
| 8581 | BIT 7,(HL) | Return if bit 7 of *HL is set. | ||
| 8583 | RET NZ | |||
| 8584 | INC DE | Increment DE by one. | ||
| 8585 | CPL | Invert the bits in A. | ||
| 8586 | LD (DE),A | Write A to *DE. | ||
| 8587 | PUSH DE | Stash DE on the stack. | ||
| 8588 | INC HL | Increment HL by one. | ||
| 8589 | PUSH HL | Stash HL on the stack. | ||
| 858A | LD HL,($EFF2) | HL=*Pointer_ActivePlayer. | ||
| 858D | LD DE,$5091 | DE=5091 (screen buffer location). | ||
| 8590 | CALL Print_String | Call Print_String. | ||
| 8593 | LD B,$14 | B=14. | ||
| 8595 | JR PlayerNameInput_Loop | Jump to PlayerNameInput_Loop. | ||
| PlayerNameInput_Up | 8597 | POP HL | Restore HL from the stack. | |
| 8598 | LD A,(HL) | A=*HL. | ||
| 8599 | AND %01111111 | Keep only bits 0-6. | ||
| 859B | CP $20 | Compare A with 20. | ||
| 859D | LD C,$41 | C=41. | ||
| 859F | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
| 85A1 | CP $5A | Compare A with 5A. | ||
| 85A3 | LD C,$20 | C=20. | ||
| 85A5 | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
| 85A7 | INC A | Increment A by one. | ||
| 85A8 | LD C,A | C=A. | ||
| 85A9 | JR PlayerNameInput_0 | Jump to PlayerNameInput_0. | ||
| PlayerNameInput_Down | 85AB | POP HL | Restore HL from the stack. | |
| 85AC | LD A,(HL) | A=*HL. | ||
| 85AD | AND %01111111 | Keep only bits 0-6. | ||
| 85AF | CP $41 | Compare A with 41. | ||
| 85B1 | LD C,$20 | C=20. | ||
| 85B3 | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
| 85B5 | CP $20 | Compare A with 20. | ||
| 85B7 | LD C,$5A | C=5A. | ||
| 85B9 | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
| 85BB | DEC A | Decrease A by one. | ||
| 85BC | LD C,A | C=A. | ||
| PlayerNameInput_0 | 85BD | LD A,$80 | A=80. | |
| 85BF | AND (HL) | Merge the bits from *HL. | ||
| 85C0 | OR C | Set the bits from C. | ||
| 85C1 | LD (HL),A | Write A to *HL. | ||
| 85C2 | PUSH HL | Stash HL on the stack. | ||
| 85C3 | LD HL,($EFF2) | HL=*Pointer_ActivePlayer. | ||
| 85C6 | LD DE,$5091 | DE=5091 (screen buffer location). | ||
| 85C9 | CALL Print_String | Call Print_String. | ||
| 85CC | JR PlayerNameInput_Fire | Jump to PlayerNameInput_Fire. | ||
| Prev: 8519 | Up: Map | Next: 85CE |