![]() |
Routines |
| Prev: D1E2 | Up: Map | Next: D219 |
|
Used by the routine at RunGame.
Builds the objects of the room that the player is in, and sets the game up to start again in it.
|
||||
|
Build the room, place the player, and reset the room flags.
|
||||
| BuildRoomObjects | D1E6 | LD A,($5BB2) | Fetch the flag that says it is not the first room of the game from NotFirstRoomFlag. | |
| D1E9 | AND A | |||
| D1EA | JR Z,BuildRoomObjects_Clear | Jump to BuildRoomObjects_Clear if it is the first room. | ||
| D1EC | CALL UpdateSpecialObjects | Store the special objects of the room that the player has left. | ||
| BuildRoomObjects_Clear | D1EF | CALL ClearScreenBuffer | Clear the objects of the room, apart from the player. | |
| D1F2 | CALL RetrieveRoom | Make the objects of the room from the room data. | ||
| D1F5 | CALL PlaceSpecialObjectsInRoom | Find the special objects that are in the room. | ||
| D1F8 | CALL PlacePlayerAtDoor | Move the player to the right place for the way it came in. | ||
| D1FB | XOR A | Get a zero to clear the flags with. | ||
| D1FC | LD ($5BAF),A | Clear the flag that says a portcullis is moving at PortcullisMovingFlag. | ||
| D1FF | LD ($5BB0),A | Clear the number of times a portcullis has come down at PortcullisLowerCount. | ||
| D202 | LD ($5BBD),A | Clear the height of the bounce of a ball at BallBounceHeight. | ||
| D205 | LD ($5BBF),A | Clear the flag that says a spiked ball is dropping at SpikedBallDroppingFlag. | ||
| D208 | LD A,$01 | Get the value that sets a flag. | ||
| D20A | LD ($5BB7),A | Flag the panel to be drawn again at RedrawPanelFlag. | ||
| D20D | LD A,($5C10) | Fetch the room number. | ||
| D210 | AND %00000001 | Keep bit 0. | ||
| D212 | LD ($5BC0),A | Set the flag that stops the spiked balls from dropping at SpikedBallHoldFlag. | ||
| D215 | CALL VisitRoom | Flag the room as visited. | ||
| D218 | RET | Return. | ||
| Prev: D1E2 | Up: Map | Next: D219 |