Prev: 27252 Up: Map Next: 28970
28903: Plot Target Slots
Used by the routine at Initialise_Next_Phase.
Moves and plots 64 slots at Target_Slots using *Model_Letter.
Set up the slot walk.
Plot_Target_Slots 28903 EXX Switch to the shadow registers.
28904 LD IX,56832 Point IX at Target_Slots.
28908 LD B,64 Set the slot counter to 64 in B'.
28910 LD DE,4 Set the slot stride to 4 in DE'.
Plot_Target_Slots_Loop 28913 EXX Switch back.
Update and plot one slot.
28914 LD A,(IX+1) Jump to Plot_Target_Slots_Advance if bit 0 of the Y coordinate is set.
28917 BIT 0,A
28919 JR NZ,Plot_Target_Slots_Advance
28921 ADD A,(IX+3) Add the Y step, and jump to Plot_Target_Slots_Inactive if it overflows.
28924 JP PE,Plot_Target_Slots_Inactive
28927 LD (IX+1),A Write the Y coordinate to the slot.
28930 SRA A Set H to the Y coordinate halved plus 64.
28932 ADD A,64
28934 LD H,A
28935 LD A,(IX+0) Add the X step, and jump to Plot_Target_Slots_Inactive if it overflows.
28938 ADD A,(IX+2)
28941 JP PE,Plot_Target_Slots_Inactive
28944 LD (IX+0),A Write the X coordinate to the slot.
28947 ADD A,128 Set L to the X coordinate plus 128.
28949 LD L,A
28950 LD A,(57847) Fetch *Model_Letter.
28953 CALL Plot_Pixel Call Plot_Pixel.
Advance to the next slot.
Plot_Target_Slots_Advance 28956 EXX Switch to the shadow registers.
28957 ADD IX,DE Advance IX by the slot stride.
28959 DJNZ Plot_Target_Slots_Loop Decrease the slot counter by one and loop back to Plot_Target_Slots_Loop until it is zero.
28961 EXX Switch back.
28962 RET Return.
Mark the slot inactive.
Plot_Target_Slots_Inactive 28963 LD A,1 Write 1 to the Y coordinate.
28965 LD (IX+1),A
28968 JR Plot_Target_Slots_Advance Jump to Plot_Target_Slots_Advance.
Prev: 27252 Up: Map Next: 28970