Prev: 38903 Up: Map Next: 39000
38941: TrackerHolderRoom — sweep the rooms around one tracker holder
A = the front-hand marker (160+slot), HL -> the NearRoomList entry to fill: walk the holder's 5 adjacency slots (corridor map, or duct map when he is in the ducts) and write the holder's room ("all clear") — unless Jones, the alien, or any live actor is in an adjacent room, in which case the entry becomes 255 ("motion detected", via PickRoom_Reject).
Used by the routine at 38903.
38941 CP 255 marker 255 = the item does not exist
38943 RET Z
38944 PUSH HL save the NearRoomList entry ptr
38945 SUB 160 A = the holder's slot;
38947 ADD A,A HL -> his room byte (+1)
38948 ADD A,A
38949 ADD A,A
38950 LD E,A
38951 LD D,0
38953 LD HL,29567
38956 ADD HL,DE
38957 LD A,(HL) AdjTestRoom = the holder's room
38958 LD (38356),A
38961 LD BC,29171 BC = RoomAdjCorridors...
38964 BIT 6,A ...unless he is in the ducts:
38966 JR Z,38971
38968 CALL 45683 then RoomAdjDucts (DuctSearchInit)
38971 LD L,A HL = map + room*5:
38972 LD H,0 the room's 5 direction slots
38974 PUSH HL
38975 ADD HL,HL
38976 ADD HL,HL
38977 POP DE
38978 ADD HL,DE
38979 ADD HL,BC
38980 LD DE,8
38983 LD B,5 each direction slot:
38985 PUSH BC
38986 PUSH HL
38987 LD C,(HL) C = the adjacent room
38988 LD A,(38356) own room = no exit that way:
38991 CP C skip the slot
38992 JR Z,39023
38994 LD A,(33706) anything moving in there?
38997 JP 45705 Jones / the alien / live actors
Prev: 38903 Up: Map Next: 39000