Prev: 51870 Up: Map Next: 51922
51874: 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.
Save the room that was left, unless this is the first.
BuildRoomObjects 51874 LD A,(23314) Fetch RoomFlags.
51877 AND A Jump to BuildRoomObjects_Clear if it is zero.
51878 JR Z,BuildRoomObjects_Clear
51880 CALL UpdateSpecialObjects Call UpdateSpecialObjects.
Build the new room.
BuildRoomObjects_Clear 51883 CALL RetrieveRoom Call RetrieveRoom.
51886 CALL ClearScreenBuffer Call ClearScreenBuffer.
51889 CALL PlaceSpecialObjectsInRoom Call PlaceSpecialObjectsInRoom.
51892 CALL PlacePlayerAtDoor Call PlacePlayerAtDoor.
51895 XOR A Write 0 to EggTopFlag, RemoteControlCommand and LandMineFlag.
51896 LD (23354),A
51899 LD (23362),A
51902 LD (23363),A
51905 LD A,(23440) Fetch 23440.
51908 CPL Invert A.
51909 AND %00000001 Keep only bit 0.
51911 LD (23355),A Set EggTopDisabledFlag.
51914 LD A,1 Write 1 to RedrawPanelFlag.
51916 LD (23319),A
51919 JP VisitRoom Jump to VisitRoom.
Prev: 51870 Up: Map Next: 51922