Prev: F86B Up: Map Next: F8AA
F895: Read Shape Header
Used by the routine at BuildShiftedShapeB.
Reads the header of a description of a shape and sets up the counters that the routines at BuildShiftedShapeA and BuildShiftedShapeB use. The first byte is the number of strips, which is stored in ScratchPair and 5C1F. The second byte is the number of rows, which is stored in ScratchValue and TileNumber. The third byte is the number of bytes in a row. The entry point at ReadShapeHeader_Rows skips the first byte.
Input
HL Address of the description
Output
HL Address of the first byte after the header
C Number of bytes in a row
D FA, the page of the table of bytes shifted by two pixels
ReadShapeHeader F895 LD A,(HL) Read HL.
F896 LD ($5C1E),A The number of strips.
F899 LD ($5C1F),A The number of strips.
F89C INC HL Advance HL.
This entry point is used by the routine at BuildShiftedShapeA.
ReadShapeHeader_Rows F89D LD A,(HL) Read HL.
F89E LD ($5C1C),A The number of rows.
F8A1 LD ($5C1D),A The number of rows.
F8A4 INC HL Advance HL.
F8A5 LD D,$FA D=FA.
F8A7 LD C,(HL) Read HL into C.
F8A8 INC HL Advance HL.
F8A9 RET Return.
Prev: F86B Up: Map Next: F8AA