![]() |
Routines |
| Prev: 53665 | Up: Map | Next: 53730 |
|
Used by the routine at InitialiseGame.
Sets up the copy of the player at the start of the game. The player appears in a room that is picked at random from four rooms.
|
||||
|
Copy the initial player and pick a start room.
|
||||
| InitialisePlayer | 53681 | LD HL,53665 | Point HL at the initial data of the player, InitialPlayerData. | |
| 53684 | LD DE,53601 | Point DE at PlayerCopy. | ||
| 53687 | LD BC,8 | Set the number of bytes to 8. | ||
| 53690 | LDIR | Copy the initial data of the legs. | ||
| 53692 | LD DE,53633 | Point DE at PlayerCopy_TopHalf. | ||
| 53695 | LD BC,8 | Set the number of bytes to 8. | ||
| 53698 | LDIR | Copy the initial data of the top half. | ||
| 53700 | LD A,18 | Fetch the graphic number of the legs of a human. | ||
| 53702 | LD (53617),A | Store it as the graphic that the legs have when the player appears. | ||
| 53705 | LD A,34 | Fetch the graphic number of the top half of a human. | ||
| 53707 | LD (53649),A | Store it as the graphic that the top half has when the player appears. | ||
| 53710 | LD A,(23456) | Fetch the first random seed from RandomSeed1. | ||
| 53713 | AND %00000011 | Keep two bits. | ||
| 53715 | LD L,A | Make it an offset. | ||
| 53716 | LD H,0 | |||
| 53718 | LD BC,53730 | Point BC at StartRooms. | ||
| 53721 | ADD HL,BC | Add the offset. | ||
| 53722 | LD A,(HL) | Fetch the start room. | ||
| 53723 | LD (53609),A | Set the room of the legs at PlayerCopy_LegsRoom. | ||
| 53726 | LD (53641),A | Set the room of the top half at PlayerCopy_TopHalfRoom. | ||
| 53729 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 53665 | Up: Map | Next: 53730 |