Prev: 53730 Up: Map Next: 53785
53734: Build Room Objects
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 53734 LD A,(23474) Fetch the flag that says it is not the first room of the game from NotFirstRoomFlag.
53737 AND A
53738 JR Z,BuildRoomObjects_Clear Jump to BuildRoomObjects_Clear if it is the first room.
53740 CALL UpdateSpecialObjects Store the special objects of the room that the player has left.
BuildRoomObjects_Clear 53743 CALL ClearScreenBuffer Clear the objects of the room, apart from the player.
53746 CALL RetrieveRoom Make the objects of the room from the room data.
53749 CALL PlaceSpecialObjectsInRoom Find the special objects that are in the room.
53752 CALL PlacePlayerAtDoor Move the player to the right place for the way it came in.
53755 XOR A Get a zero to clear the flags with.
53756 LD (23471),A Clear the flag that says a portcullis is moving at PortcullisMovingFlag.
53759 LD (23472),A Clear the number of times a portcullis has come down at PortcullisLowerCount.
53762 LD (23485),A Clear the height of the bounce of a ball at BallBounceHeight.
53765 LD (23487),A Clear the flag that says a spiked ball is dropping at SpikedBallDroppingFlag.
53768 LD A,1 Get the value that sets a flag.
53770 LD (23479),A Flag the panel to be drawn again at RedrawPanelFlag.
53773 LD A,(23568) Fetch the room number.
53776 AND %00000001 Keep bit 0.
53778 LD (23488),A Set the flag that stops the spiked balls from dropping at SpikedBallHoldFlag.
53781 CALL VisitRoom Flag the room as visited.
53784 RET Return.
Prev: 53730 Up: Map Next: 53785