![]() |
Routines |
Prev: 34073 | Up: Map | Next: 34254 |
Used by the routine at Select1Or2PlayerGame.
|
||||
Prints "Name....( )".
|
||||
PlayerNameInput | 34120 | LD HL,35816 | HL=Messaging_Name. | |
34123 | LD DE,20616 | DE=20616 (screen buffer location). | ||
34126 | CALL Print_String | Call Print_String. | ||
Prints the name of the current player.
|
||||
34129 | LD HL,(61426) | HL=*Pointer_ActivePlayer. | ||
34132 | LD DE,20625 | DE=20625 (screen buffer location). | ||
34135 | CALL Print_String | Call Print_String. | ||
Draw an underline to show the "cursor".
|
||||
34138 | LD HL,20657 | HL=20657 (screen buffer location). | ||
34141 | LD (HL),255 | Write 255 to *HL. | ||
34143 | PUSH HL | Stash the cursor position on the stack. | ||
34144 | LD HL,(61426) | Stash *Pointer_ActivePlayer on the stack. | ||
34147 | PUSH HL | |||
34148 | CALL PauseCheck | Call PauseCheck. | ||
PlayerNameInput_Fire | 34151 | LD B,10 | B=10. | |
PlayerNameInput_Loop | 34153 | CALL 32853 | Call 32853. | |
34156 | CALL Handler_Controls | Call Handler_Controls. | ||
34159 | LD A,E | Jump to PlayerNameInput_Up if E is equal to 24. | ||
34160 | CP 24 | |||
34162 | JR Z,PlayerNameInput_Up | |||
34164 | CP 8 | Jump to PlayerNameInput_Down if E is equal to 8. | ||
34166 | JR Z,PlayerNameInput_Down | |||
34168 | CP 32 | Jump to PlayerNameInput_Fire if E is not equal to 32. | ||
34170 | JR NZ,PlayerNameInput_Fire | |||
34172 | POP HL | Restore HL and DE from the stack. | ||
34173 | POP DE | |||
34174 | LD A,0 | Write 0 to *DE. | ||
34176 | LD (DE),A | |||
34177 | BIT 7,(HL) | Return if bit 7 of *HL is set. | ||
34179 | RET NZ | |||
34180 | INC DE | Increment DE by one. | ||
34181 | CPL | Invert the bits in A. | ||
34182 | LD (DE),A | Write A to *DE. | ||
34183 | PUSH DE | Stash DE on the stack. | ||
34184 | INC HL | Increment HL by one. | ||
34185 | PUSH HL | Stash HL on the stack. | ||
34186 | LD HL,(61426) | HL=*Pointer_ActivePlayer. | ||
34189 | LD DE,20625 | DE=20625 (screen buffer location). | ||
34192 | CALL Print_String | Call Print_String. | ||
34195 | LD B,20 | B=20. | ||
34197 | JR PlayerNameInput_Loop | Jump to PlayerNameInput_Loop. | ||
PlayerNameInput_Up | 34199 | POP HL | Restore HL from the stack. | |
34200 | LD A,(HL) | A=*HL. | ||
34201 | AND %01111111 | Keep only bits 0-6. | ||
34203 | CP 32 | Compare A with 32. | ||
34205 | LD C,65 | C=65. | ||
34207 | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
34209 | CP 90 | Compare A with 90. | ||
34211 | LD C,32 | C=32. | ||
34213 | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
34215 | INC A | Increment A by one. | ||
34216 | LD C,A | C=A. | ||
34217 | JR PlayerNameInput_0 | Jump to PlayerNameInput_0. | ||
PlayerNameInput_Down | 34219 | POP HL | Restore HL from the stack. | |
34220 | LD A,(HL) | A=*HL. | ||
34221 | AND %01111111 | Keep only bits 0-6. | ||
34223 | CP 65 | Compare A with 65. | ||
34225 | LD C,32 | C=32. | ||
34227 | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
34229 | CP 32 | Compare A with 32. | ||
34231 | LD C,90 | C=90. | ||
34233 | JR Z,PlayerNameInput_0 | Jump to PlayerNameInput_0 if A is zero. | ||
34235 | DEC A | Decrease A by one. | ||
34236 | LD C,A | C=A. | ||
PlayerNameInput_0 | 34237 | LD A,128 | A=128. | |
34239 | AND (HL) | Merge the bits from *HL. | ||
34240 | OR C | Set the bits from C. | ||
34241 | LD (HL),A | Write A to *HL. | ||
34242 | PUSH HL | Stash HL on the stack. | ||
34243 | LD HL,(61426) | HL=*Pointer_ActivePlayer. | ||
34246 | LD DE,20625 | DE=20625 (screen buffer location). | ||
34249 | CALL Print_String | Call Print_String. | ||
34252 | JR PlayerNameInput_Fire | Jump to PlayerNameInput_Fire. |
Prev: 34073 | Up: Map | Next: 34254 |