Prev: B3C8 Up: Map Next: B440
B3E4: Copy a moving object's frame to the screen buffer
Used by the routine at AF5D.
Input
IX The frame buffer
HL The address in the screen buffer to copy to
B Width in bytes (pixels / 8 )
C Height in bytes
B3E4 JR Z,$B3F4
B3E6 LD A,L
B3E7 SUB $20
B3E9 LD L,A
B3EA JR NC,$B3F0
B3EC LD A,H
B3ED XOR $08
B3EF LD H,A
B3F0 LD A,C
B3F1 ADD A,$10
B3F3 LD C,A
B3F4 BIT 7,D
B3F6 JR NZ,$B400
B3F8 LD A,L
B3F9 AND $1F
B3FB JR Z,$B3FF
B3FD DEC L
B3FE INC B
B3FF INC B
B400 LD A,B
B401 LD ($A455),A
B404 LD A,H
B405 ADD A,$C0
B407 LD H,A
B408 LD A,C
This entry point is used by the routine at AF5D.
B409 PUSH AF
B40A PUSH HL
B40B CALL $B803
B40E POP HL
B40F LD A,H
B410 RRCA
B411 RRCA
B412 RRCA
B413 AND $01
B415 ADD A,$58
B417 LD H,A
B418 POP AF
B419 RRCA
B41A RRCA
B41B RRCA
B41C AND $0F
B41E LD C,L
B41F EX AF,AF'
B420 LD L,C
B421 LD E,C
B422 LD A,H
B423 ADD A,$48
B425 LD D,A
B426 LD A,($A455)
B429 LD B,A
B42A LD A,(DE)
B42B LD (HL),A
B42C INC L
B42D INC E
B42E DJNZ $B42A
B430 LD A,C
B431 ADD A,$20
B433 LD C,A
B434 LD A,H
B435 ADC A,B
B436 XOR H
B437 AND $01
B439 XOR H
B43A LD H,A
B43B EX AF,AF'
B43C DEC A
B43D JR NZ,$B41F
B43F RET
Prev: B3C8 Up: Map Next: B440