Prev: B519 Up: Map Next: B54C
B530: Computes offset into the room graphic data based on projectile y-delta
Used by the routines at B49C, B519 and C15B.
Input
A Projectile y-delta
B530 LD (IY+$05),A Set y-delta
B533 LD E,A Set offset into HL based on y-delta
B534 LD L,E
B535 RL E
B537 SBC A,A
B538 LD H,A
B539 ADD HL,HL
B53A ADD HL,HL
B53B ADD HL,HL
B53C ADD HL,HL
B53D ADD HL,HL
B53E LD E,(IY+$07) Set DE to the base offset $FFFF left $0001 right
B541 LD D,(IY+$08)
B544 ADD HL,DE Adds base offset to HL
B545 LD (IY+$07),L Set computed offset into enemy configuration
B548 LD (IY+$08),H
B54B RET
Prev: B519 Up: Map Next: B54C