Prev: B39C Up: Map Next: B405
B39D: Process Display Pointer
Used by the routine at InitialiseDisplayBuffer.
Stores the result in the display, then clears the mark on this character.
ProcessDisplayPointer B39D PUSH IY Read the word at IY+00-01 into HL, keeping IY.
B39F LD L,(IY+$00)
B3A2 LD H,(IY+$01)
B3A5 LD A,H Read the high byte of the pointer.
B3A6 AND $80 Keep bit 7.
B3A8 LD ($B39C),A Record the result in the display flag at B39C.
B3AB RES 7,H Clear the top bit of the pointer.
B3AD LD ($B186),HL Store the pointer at B185+01 and read the low byte at IY+02.
B3B0 LD L,(IY+$02)
B3B3 LD H,(IY+$03) Read the high byte at IY+03.
B3B6 LD ($B18C),HL Store that word at B18C and push the pointer at B188.
B3B9 LD HL,$B188
B3BC PUSH HL
B3BD LD B,$04 Take 04 bytes for ClearBuffer to clear.
B3BF CALL ClearBuffer Call ClearBuffer to clear buffer.
B3C2 POP HL
B3C3 LD B,$02 Take 02 bytes and call CopyCharacterDisplay to copy the character into the display.
B3C5 LD E,$04
B3C7 CALL CopyCharacterDisplay
B3CA LD E,$0E Take 0E and call CopyCharacterDisplay to copy the character into the display.
B3CC CALL CopyCharacterDisplay
B3CF LD E,$06 Take 06 and call CopyCharacterDisplay to copy the character into the display.
B3D1 CALL CopyCharacterDisplay
B3D4 LD E,$10 Take 10 and call CopyCharacterDisplay to copy the character into the display.
B3D6 CALL CopyCharacterDisplay
B3D9 XOR A Clear the byte at LocationMatchFlag and point HL at ObjectTablePointer+08.
B3DA LD ($A02E),A
B3DD LD HL,$B186
B3E0 LD DE,$0008 Take a length of 08 entries.
B3E3 LD IX,$8259 Use the object runtime table (8259).
ProcessDisplayPointer_Loop B3E7 PUSH IX Use the character record as the schedule entry.
B3E9 POP IY
B3EB CALL CompareLocationData Call CompareLocationData to compare location data.
B3EE JR Z,ProcessDisplayPointer_Next Go to ProcessDisplayPointer_Next if the room fields match.
B3F0 ADD IX,DE Step to the next display entry.
B3F2 LD A,(IX+$01) Go back to ProcessDisplayPointer_Loop if this object word is not zero.
B3F5 OR (IX+$00)
B3F8 JR NZ,ProcessDisplayPointer_Loop
B3FA POP IY Restore the saved schedule entry from the stack.
B3FC RET Return.
Restores the character, swaps the display pointers, and leaves a non-zero result.
ProcessDisplayPointer_Next B3FD POP IY Restore the saved schedule entry from the stack.
B3FF CALL SwapObjectDisplayPointers Call SwapObjectDisplayPointers.
B402 OR %00000001 Reset the zero flag.
B404 RET Return.
View the equivalent code in;
Prev: B39C Up: Map Next: B405