Prev: 63696 Up: Map Next: 63801
63714: Build Shifted Shape A
Used by the routine at BuildShapeTables.
Merges a description of a shape into the buffers, once for each of the three shifts, using the first of the two formats. The description starts with the number of rows and the number of bytes in a row; the rows follow. Each row is merged into the buffer, with the byte that is left over at the end of the row from the shifted bytes, and the buffer moves on 48 bytes after each shift.
Input
HL Address of the description
HL' Address of the buffer for the shifted shape
BuildShiftedShapeA 63714 CALL ReadShapeHeader_Rows Call ReadShapeHeader_Rows.
BuildShiftedShapeA_Shift 63717 PUSH HL Stash HL on the stack.
BuildShiftedShapeA_Row 63718 LD B,C B=C.
63719 INC B Advance B.
BuildShiftedShapeA_Merge 63720 CALL MergeShiftedByte Call MergeShiftedByte.
63723 INC HL Advance HL.
63724 DJNZ BuildShiftedShapeA_Merge Decrease B and jump to BuildShiftedShapeA_Merge until none remain.
63726 EXX Switch to the alternate registers.
63727 LD (HL),0 Store 0 at the address in HL.
63729 DEC HL Step HL back.
63730 DEC HL Step HL back.
63731 DEC HL Step HL back.
63732 OR (HL) Set the bits of A that are set in the byte at HL.
63733 LD (HL),A Write A where HL points.
63734 INC HL Advance HL.
63735 INC HL Advance HL.
63736 INC HL Advance HL.
63737 EXX Switch to the alternate registers.
63738 CALL FetchShiftedByte_Count Call FetchShiftedByte_Count.
63741 LD (23584),A Update the segments still to draw.
BuildShiftedShapeA_Next 63744 INC B Advance B.
BuildShiftedShapeA_Loop 63745 CALL MergeNextShiftedByte Call MergeNextShiftedByte.
63748 CALL FetchShiftedByte_Byte Call FetchShiftedByte_Byte.
63751 CALL MergeBackgroundByte_Merge Call MergeBackgroundByte_Merge.
63754 DJNZ BuildShiftedShapeA_Loop Decrease B and jump to BuildShiftedShapeA_Loop until none remain.
63756 INC D Advance D.
63757 LD A,(DE) Read DE.
63758 DEC D Step D back.
63759 EXX Switch to the alternate registers.
63760 DEC HL Step HL back.
63761 XOR (HL) Flip the bits of A that are set in the byte at HL.
63762 LD (HL),A Write A where HL points.
63763 LD A,(23584) The segments still to draw.
63766 CALL MergeBackgroundByte_Store Call MergeBackgroundByte_Store.
63769 LD A,(23580) The number of rows.
63772 DEC A Step A back.
63773 LD (23580),A One fewer row of the shifted shape.
63776 JR NZ,BuildShiftedShapeA_Row Jump to BuildShiftedShapeA_Row if the zero flag is clear.
63778 CALL NextShift_Rows Call NextShift_Rows.
63781 EXX Switch to the alternate registers.
63782 LD DE,48 DE=48.
63785 ADD HL,DE HL gains DE.
63786 EXX Switch to the alternate registers.
63787 POP HL Bring HL back off the stack.
63788 JR NZ,BuildShiftedShapeA_Shift Jump to BuildShiftedShapeA_Shift if the zero flag is clear.
63790 LD A,92 A=92.
63792 LD (60212),A Purpose not yet known.
63795 LD A,64 A=64.
63797 LD (60464),A Purpose not yet known.
63800 RET Return.
Prev: 63696 Up: Map Next: 63801