Prev: 55556 Up: Map Next: 55871
55734: Handler: Room Seven
Used by the routine at Dispatch_Handlers.
Two bats in room 7 stored at SpecialActor.
Handler_RoomSeven 55734 LD IX,25677 IX=SpecialActor.
55738 LD A,(25762) Return if *CurrentRoom is not 7.
55741 CP 7
55743 RET NZ Write 14 to *ClipWindow_MaximumRow.
55744 LD A,14
55746 LD (25626),A
55749 LD B,2 B=2.
Handler_RoomSeven_Loop 55751 PUSH BC Stash the bat count on the stack.
55752 LD A,(IX+0) Jump to Handler_RoomSeven_Move if this bat is already active.
55755 BIT 7,A
55757 JR Z,Handler_RoomSeven_Move
55759 CALL JumpTable_GetRandomNumber Jump to Handler_RoomSeven_Next if JumpTable_GetRandomNumber is 190 or higher.
55762 CP 190
55764 JR NC,Handler_RoomSeven_Next
55766 AND 15 Spawn the bat with sprite 231.
55768 ADD A,9
55770 LD C,A
55771 LD B,25
55773 LD DE,257
55776 LD L,70
55778 LD A,231
55780 CALL JumpTable_SpawnEntity
55783 LD (IX+9),250 Write 250 to the bat timer.
Handler_RoomSeven_Move 55787 LD A,(IX+1) Deactivate the bat if it has reached row 12.
55790 CP 12
55792 JR NZ,Handler_RoomSeven_Draw
55794 SET 7,(IX+0)
55798 JR Handler_RoomSeven_Next Jump to Handler_RoomSeven_Next.
Handler_RoomSeven_Draw 55800 CALL JumpTable_AdvanceEntity Call JumpTable_AdvanceEntity.
55803 CALL JumpTable_StorePosition Call JumpTable_StorePosition.
55806 CALL JumpTable_MoveEntity Call JumpTable_MoveEntity.
55809 CALL JumpTable_DrawEntity Call JumpTable_DrawEntity.
55812 CALL JumpTable_EraseEntity Call JumpTable_EraseEntity.
Handler_RoomSeven_Next 55815 POP BC Restore the bat count from the stack.
55816 LD DE,14 IX+=0014.
55819 ADD IX,DE
55821 DJNZ Handler_RoomSeven_Loop Decrease the bat count and loop back to Handler_RoomSeven_Loop.
55823 LD A,2 Write 2 to *ClipWindow_MaximumRow.
55825 LD (25626),A
55828 RET Return.
This entry point is used by the routines at Change_Room and Handler_InventoryItems.
Draw the collected-item icons along the top of the screen.
Print_CollectionBar 55829 LD HL,31856 Write Buffer_ActiveFont to *CHARS.
55832 LD (23606),HL
55835 LD BC,281 Call JumpTable_SetPrintPosition at column 1 row 25.
55838 CALL JumpTable_SetPrintPosition
55841 LD B,0 Write WHITE to *ATTR_T.
55843 LD A,7
55845 LD (23695),A
Print_CollectionBar_Loop 55848 LD A,(25761) Highlight the current icon in BLACK.
55851 CP B
55852 JR NZ,Print_CollectionBar_Glyph
55854 LD A,56
55856 LD (23695),A
Print_CollectionBar_Glyph 55859 LD A,228 Print glyph 228.
55861 CALL JumpTable_PrintCharacter
55864 INC B Jump to Print_CollectionBar_Loop until 16 icons are printed.
55865 LD A,B
55866 CP 16
55868 JR NZ,Print_CollectionBar_Loop Return.
55870 RET
Prev: 55556 Up: Map Next: 55871