Prev: 710E Up: Map Next: 7213
718B: Find Shape In Picture Font
Used by the routines at PlotShape and ScaleShape.
Looks the shape number up in the picture font that follows this routine and remembers its address.
FindShape 718B LD HL,$7188
718E CP (HL)
718F JR NZ,FindShape_0
7191 LD HL,($7189)
7194 LD B,$00
7196 LD C,A
7197 JR FindShape_3
FindShape_0 7199 LD HL,$C708
719C LD B,A
719D LD C,A
719E LD ($7188),A
71A1 OR A
71A2 JR Z,FindShape_3
FindShape_1 71A4 INC HL
71A5 LD A,(HL)
71A6 CP $FE
71A8 JR Z,FindShape_2
71AA JR FindShape_1
FindShape_2 71AC DJNZ FindShape_1
71AE INC HL
FindShape_3 71AF LD ($7189),HL
71B2 LD A,(HL)
71B3 PUSH AF
71B4 AND $F0
71B6 RRA
71B7 RRA
71B8 RRA
71B9 RRA
71BA INC A
71BB PUSH AF
71BC LD A,C
71BD CP $0D
71BF JR Z,FindShape_4
71C1 CP $22
71C3 JR Z,FindShape_4
71C5 CP $6F
71C7 JR Z,FindShape_4
71C9 CP $0F
71CB JR Z,FindShape_4
71CD CP $11
71CF JR Z,FindShape_4
71D1 CP $55
71D3 JR NZ,FindShape_5
FindShape_4 71D5 POP AF
71D6 ADD A,$10
71D8 PUSH AF
FindShape_5 71D9 POP AF
71DA LD ($5BC4),A
71DD LD ($5BC6),A
71E0 POP AF
71E1 AND $0F
71E3 INC A
71E4 LD ($5BC5),A
71E7 LD ($5BC7),A
71EA RET
This entry point is used by the routines at ReadShapeByte and PaintShape.
FindShape_6 71EB LD A,($5B9E)
71EE OR A
71EF JR Z,FindShape_7
71F1 DEC A
71F2 LD ($5B9E),A
71F5 LD HL,$5B9F
71F8 LD A,(HL)
71F9 RET
FindShape_7 71FA LD HL,($5BCC)
71FD LD A,(HL)
71FE RET
This entry point is used by the routines at SpecialShape and PaintShape.
FindShape_8 71FF INC HL
7200 LD C,(HL)
7201 LD B,$00
7203 LD DE,$5B9E
7206 INC HL
7207 LDIR
7209 LD ($5BCC),HL
720C LD HL,$5B9F
720F LD A,$FB
7211 LD (DE),A
7212 RET
Prev: 710E Up: Map Next: 7213