Prev: 59099 Up: Map Next: 59195
59165: Process Graphic Layout Data For Entity
Used by the routine at PopulateDisplayBuffer_VisibleEntities.
Load the graphic layout address from the entity at IX, set drawing coordinates relative to the camera, then jump to Process_GraphicLayoutData.
Input
IX Address of entity state data
Process_GraphicLayoutData_Entity 59165 LD E,(IX+10) Fetch the current entity's graphic-layout address into DE.
59168 LD D,(IX+11)
59171 LD A,(IX+5) Load A with the current entity's y-coordinate.
59174 SUB 20 A-=20.
59176 LD L,A Copy A into L.
59177 LD A,(29435) Load A with the camera room-origin pointer (Pointer_CameraRoomOrigin).
59180 LD C,A Keep the camera origin X in C.
59181 LD A,(IX+7) Load A with the current entity's x-coordinate.
59184 SUB C Subtract C from A.
59185 LD C,A Keep the delta in C.
59186 LD H,C Copy C into H.
59187 LD (29431),HL Store HL in the stored drawing coordinates (StoredDrawingCoordinates).
59190 PUSH DE Copy DE into IX (using the stack).
59191 POP IX
59193 JR Process_GraphicLayoutData Jump to Process_GraphicLayoutData to process graphic layout data.
View the equivalent code in;
Prev: 59099 Up: Map Next: 59195