![]() |
Routines |
| Prev: D1A1 | Up: Map | Next: D1E2 |
|
Used by the routine at main.
Fills the saved records at plyr_spr_1_scratchpad and plyr_spr_2_scratchpad that lose_life starts each life from: the initial values from plyr_spr_init_data, knight legs and head as the types to become after materialising, and one of four starting rooms, chosen by the low two bits of the random seed at $5BA0.
|
||||
| init_start_location | D1B1 | LD HL,plyr_spr_init_data | ||
| D1B4 | LD DE,plyr_spr_1_scratchpad | |||
| D1B7 | LD BC,$0008 | |||
| D1BA | LDIR | |||
| D1BC | LD DE,plyr_spr_2_scratchpad | |||
| D1BF | LD BC,$0008 | |||
| D1C2 | LDIR | |||
| D1C4 | LD A,$12 | become knight legs (18) and knight head (34) | ||
| D1C6 | LD (plyr_spr_1_tail),A | |||
| D1C9 | LD A,$22 | |||
| D1CB | LD (plyr_spr_2_tail),A | |||
| D1CE | LD A,($5BA0) | one of four rooms | ||
| D1D1 | AND $03 | |||
| D1D3 | LD L,A | |||
| D1D4 | LD H,$00 | |||
| D1D6 | LD BC,start_locations | |||
| D1D9 | ADD HL,BC | |||
| D1DA | LD A,(HL) | into both records | ||
| D1DB | LD (start_loc_1),A | |||
| D1DE | LD (start_loc_2),A | |||
| D1E1 | RET | |||
| Prev: D1A1 | Up: Map | Next: D1E2 |