Prev: 9836 Up: Map Next: 989A
9878: Populate primary display buffer with graphic layout data for entity whose simple / complex state data is at address in IX
Used by the routine at PopulatePrimaryDisplay_LayoutData.
Input
IX Address of complex state data for an entity
9878 LD E,(IX+$02) Load DE with address of graphic layout data for entity.
987B LD D,(IX+$03)
987E LD A,($6DA2) Load A with TempStore_RoomDimension_YCoordinateTopEdge and add y-coordinate of graphic element to draw as offset, subtract 64 and load into L.
9881 ADD A,(IX+$04)
9884 SUB $64
9886 LD L,A
9887 LD A,($6DA0) Load A with TempStore_RoomDimension_XCoordinateLeftEdge and add x-coordinate of graphic element to draw as offset, subtract 64 and load into H.
988A ADD A,(IX+$05)
988D SUB $64
988F LD H,A
9890 LD ($6DCA),HL Store x- and y-coordinates at DrawingYCo-Ordinate/ DrawingXCo-Ordinate.
9893 PUSH DE Load IX with address of graphic layout data in simple/complex state data.
9894 POP IX
9896 LD B,$00 Reset do-not-recalculate-display-buffer-address flag, as address not yet calculated.
9898 JR $989E Jump to 989E (read / process data at address in IX).
Prev: 9836 Up: Map Next: 989A