Prev: 48489 Up: Map Next: 48578
48510: Calculate Object Pointer Offset
Used by the routines at RecordResultCharacterScript and ReadActionFlags.
Points HL at byte 24 of the record, or at the object display link when bit 7 is set.
CalculateObjectPointerOffset 48510 PUSH IY Point HL at byte 24 of the record (IY+24).
48512 POP HL
48513 LD DE,24
48516 ADD HL,DE
48517 BIT 7,(IY+25) Jump to CalculateObjectPointerOffset_Next if a marker on the schedule entry is clear.
48521 JR Z,CalculateObjectPointerOffset_Next
48523 LD HL,40950 Take the object display link.
CalculateObjectPointerOffset_Next 48526 BIT 6,(IY+25) Jump to CalculateObjectPointerOffset_DisplayDataPointer if a marker on the schedule entry is clear.
48530 JR Z,CalculateObjectPointerOffset_DisplayDataPointer
48532 LD HL,40956 Take the alternate display link.
CalculateObjectPointerOffset_DisplayDataPointer 48535 LD DE,45426 Copy 6 bytes from the display data at DisplayDataPointer.
48538 LD BC,6
48541 LDIR
48543 PUSH IY Point HL at byte 8 of the record (IY+8).
48545 POP HL
48546 LD DE,8
48549 ADD HL,DE
48550 LD DE,45432 Take the display mode flag.
48553 LD BC,6 Copy 6 bytes and read IY+0 into L.
48556 LDIR
48558 LD L,(IY+0)
48561 LD A,(IY+1) Keep the low nibble of IY+1 in H.
48564 AND 15
48566 LD H,A
48567 LD (47639),HL Record the display pointer.
48570 PUSH IY Call PointObjectListRoom to store the character record.
48572 CALL PointObjectListRoom
48575 POP IY
48577 RET Return.
Prev: 48489 Up: Map Next: 48578