Prev: C1AA Up: Map Next: C1CE
C1AC: Make an object of a dropped ship part
Used by the routine at carried_part.
Used by carried_part when the carried part is put down on the surface: initialises the object record at IX (free_object) and fills in its graphic number ($0C), its kind (+$13), $FF at +$0D, and its place in the world from four bytes at HL. Read only: none of it ran in the build's sessions.
Input
IX The object record
HL Four bytes: map column, map row, x and y in the cell
B The kind (9 or 10)
place_dropped_part C1AC CALL free_object Clear the record.
C1AF LD (IX+$00),$0C Graphic $0C, the kind, and $FF at +$0D.
C1B3 LD (IX+$13),B
C1B6 LD (IX+$0D),$FF
C1BA LD A,(HL) The map column to +1, the row to +4, x to +2, y to +5.
C1BB LD (IX+$01),A
C1BE INC HL
C1BF LD A,(HL)
C1C0 LD (IX+$04),A
C1C3 INC HL
C1C4 LD A,(HL)
C1C5 LD (IX+$02),A
C1C8 INC HL
C1C9 LD A,(HL)
C1CA LD (IX+$05),A
C1CD RET
Prev: C1AA Up: Map Next: C1CE