![]() |
Routines |
Prev: 33913 | Up: Map | Next: 34005 |
Used by the routine at GameInitialise.
|
||||
Clears the 1UP/ 2UP game data for:
|
||||
Initialise_NewGame | 33949 | LD HL,35888 | Start at 1UP_Location (stored in HL), as the player name is retained (probably as it's a pain to enter!) | |
33952 | LD B,8 | Set a counter in B for 8 bytes (2 for location, 3 for score, 2 for cash balance and 1 for player state). | ||
Loop through the player variables and reset them all to 0, ready for the new game.
|
||||
Clear1UPStats_Loop | 33954 | LD (HL),0 | Write 0 to *HL. | |
33956 | INC HL | Increment HL by one. | ||
33957 | DJNZ Clear1UPStats_Loop | Decrease counter by one and loop back to Clear1UPStats_Loop until counter is zero. | ||
Set the initial location for when the game starts.
|
||||
33959 | LD DE,36482 | Write London_Location to *1UP_Location. | ||
33962 | LD (35888),DE | |||
Set the starting cash amount.
|
||||
33966 | LD HL,592 | Write 592 to *1UP_Cash. | ||
33969 | LD (35893),HL | |||
Copy all the same 1UP data to 2UP.
|
||||
33972 | LD HL,35888 | Copy 0008 bytes of data from 1UP_Location to 2UP_Location. | ||
33975 | LD DE,35904 | |||
33978 | LD BC,8 | |||
33981 | LDIR | |||
Set the active player to 1UP.
|
||||
33983 | LD HL,35880 | Write 1UP_Name to *Pointer_ActivePlayer. | ||
33986 | LD (61426),HL | |||
Set the 1UP default state (and also 2UP if this is a two player game).
|
||||
33989 | LD A,129 | Write 10000001 to *1UP_State. | ||
33991 | LD (35895),A | |||
33994 | LD HL,61435 | Return if this is not a two player game. | ||
33997 | BIT 5,(HL) | |||
33999 | RET Z | |||
34000 | INC A | Write 10000010 to *2UP_State. | ||
34001 | LD (35911),A | |||
34004 | RET | Return. |
Prev: 33913 | Up: Map | Next: 34005 |