Prev: 6A74 Up: Map Next: 712A
70E7: Plot Target Slots
Used by the routine at Initialise_Next_Phase.
Moves and plots 40 slots at Target_Slots using *Model_Letter.
Set up the slot walk.
Plot_Target_Slots 70E7 EXX Switch to the shadow registers.
70E8 LD IX,$DE00 Point IX at Target_Slots.
70EC LD B,$40 Set the slot counter to 40 in B'.
70EE LD DE,$0004 Set the slot stride to 04 in DE'.
Plot_Target_Slots_Loop 70F1 EXX Switch back.
Update and plot one slot.
70F2 LD A,(IX+$01) Jump to Plot_Target_Slots_Advance if bit 0 of the Y coordinate is set.
70F5 BIT 0,A
70F7 JR NZ,Plot_Target_Slots_Advance
70F9 ADD A,(IX+$03) Add the Y step, and jump to Plot_Target_Slots_Inactive if it overflows.
70FC JP PE,Plot_Target_Slots_Inactive
70FF LD (IX+$01),A Write the Y coordinate to the slot.
7102 SRA A Set H to the Y coordinate halved plus 40.
7104 ADD A,$40
7106 LD H,A
7107 LD A,(IX+$00) Add the X step, and jump to Plot_Target_Slots_Inactive if it overflows.
710A ADD A,(IX+$02)
710D JP PE,Plot_Target_Slots_Inactive
7110 LD (IX+$00),A Write the X coordinate to the slot.
7113 ADD A,$80 Set L to the X coordinate plus 80.
7115 LD L,A
7116 LD A,($E1F7) Fetch *Model_Letter.
7119 CALL Plot_Pixel Call Plot_Pixel.
Advance to the next slot.
Plot_Target_Slots_Advance 711C EXX Switch to the shadow registers.
711D ADD IX,DE Advance IX by the slot stride.
711F DJNZ Plot_Target_Slots_Loop Decrease the slot counter by one and loop back to Plot_Target_Slots_Loop until it is zero.
7121 EXX Switch back.
7122 RET Return.
Mark the slot inactive.
Plot_Target_Slots_Inactive 7123 LD A,$01 Write 01 to the Y coordinate.
7125 LD (IX+$01),A
7128 JR Plot_Target_Slots_Advance Jump to Plot_Target_Slots_Advance.
Prev: 6A74 Up: Map Next: 712A