Prev: 64254 Up: Map Next: 64400
64303: Draw Actor
Used by the routine at JumpTable_DrawActor.
Draws the actor pointed to by IX.
Input
IX Actor data
Draw_Actor 64303 LD A,255 Write 255 to the mask at 64453.
64305 LD (64453),A
64308 LD C,(IX+0) Fetch the column, row and width; height 1.
64311 LD B,(IX+1)
64314 LD E,(IX+4)
64317 LD D,1
64319 LD A,(IX+2) Increase the width when the fine-X is not 7.
64322 CP 7
64324 JR Z,Draw_Actor_Skip
64326 INC E
Draw_Actor_Skip 64327 LD A,(IX+3) Increase the height when the fine-Y is below 3.
64330 CP 3
64332 JR NC,Draw_Actor_Branch
64334 INC D
Draw_Actor_Branch 64335 CALL Next_PrintCell Call Next_PrintCell.
64338 XOR A Jump to Draw_Actor_Skip2 if the clipped size is zero.
64339 CP E
64340 JR Z,Draw_Actor_Skip2
64342 CP D
64343 JR Z,Draw_Actor_Skip2
64345 PUSH DE Call Fill_Attributes with the actor colour at that attribute cell.
64346 CALL Convert_Coordinate
64349 LD DE,22528
64352 ADD HL,DE
64353 LD A,(IX+7)
64356 POP BC
64357 CALL Fill_Attributes
Draw_Actor_Skip2 64360 LD HL,25664 Fill Actor_MaskBuffer with 255 for the actor width.
64363 LD DE,25665
64366 LD (HL),255
64368 LD C,(IX+4)
64371 LD B,0
64373 LDIR
64375 XOR A Write 0 after the mask and load the fine-X.
64376 LD (HL),A
64377 LD B,(IX+2)
64380 INC B
Draw_Actor_Target 64381 SCF Build a left-hand mask of (fine-X+1) bits.
64382 RLA
64383 DJNZ Draw_Actor_Target
Write the mask to both ends of Actor_MaskBuffer.
64385 LD DE,25664 Write the mask to *Actor_MaskBuffer.
64388 LD (DE),A
64389 LD L,(IX+4) Point HL at the other end of Actor_MaskBuffer.
64392 LD H,0
64394 ADD HL,DE
64395 XOR %11111111 Invert the mask.
64397 LD (HL),A Write it.
64398 JR Update_Actor_Target Jump to Update_Actor_Target.
Prev: 64254 Up: Map Next: 64400