Prev: FAFE Up: Map Next: FB90
FB2F: Draw Actor
Used by the routine at JumpTable_DrawActor.
Draws the actor pointed to by IX.
Input
IX Actor data
Draw_Actor FB2F LD A,$FF Write FF to the mask at FBC5.
FB31 LD ($FBC5),A
FB34 LD C,(IX+$00) Fetch the column, row and width; height 01.
FB37 LD B,(IX+$01)
FB3A LD E,(IX+$04)
FB3D LD D,$01
FB3F LD A,(IX+$02) Increase the width when the fine-X is not 07.
FB42 CP $07
FB44 JR Z,Draw_Actor_Skip
FB46 INC E
Draw_Actor_Skip FB47 LD A,(IX+$03) Increase the height when the fine-Y is below 03.
FB4A CP $03
FB4C JR NC,Draw_Actor_Branch
FB4E INC D
Draw_Actor_Branch FB4F CALL Next_PrintCell Call Next_PrintCell.
FB52 XOR A Jump to Draw_Actor_Skip2 if the clipped size is zero.
FB53 CP E
FB54 JR Z,Draw_Actor_Skip2
FB56 CP D
FB57 JR Z,Draw_Actor_Skip2
FB59 PUSH DE Call Fill_Attributes with the actor colour at that attribute cell.
FB5A CALL Convert_Coordinate
FB5D LD DE,$5800
FB60 ADD HL,DE
FB61 LD A,(IX+$07)
FB64 POP BC
FB65 CALL Fill_Attributes
Draw_Actor_Skip2 FB68 LD HL,$6440 Fill Actor_MaskBuffer with FF for the actor width.
FB6B LD DE,$6441
FB6E LD (HL),$FF
FB70 LD C,(IX+$04)
FB73 LD B,$00
FB75 LDIR
FB77 XOR A Write 00 after the mask and load the fine-X.
FB78 LD (HL),A
FB79 LD B,(IX+$02)
FB7C INC B
Draw_Actor_Target FB7D SCF Build a left-hand mask of (fine-X+01) bits.
FB7E RLA
FB7F DJNZ Draw_Actor_Target
Write the mask to both ends of Actor_MaskBuffer.
FB81 LD DE,$6440 Write the mask to *Actor_MaskBuffer.
FB84 LD (DE),A
FB85 LD L,(IX+$04) Point HL at the other end of Actor_MaskBuffer.
FB88 LD H,$00
FB8A ADD HL,DE
FB8B XOR %11111111 Invert the mask.
FB8D LD (HL),A Write it.
FB8E JR Update_Actor_Target Jump to Update_Actor_Target.
Prev: FAFE Up: Map Next: FB90