Prev: B2D2 Up: Map Next: B3C8
B398: Draw a conveyor belt
Used by the routine at AF5D.
Input
IX Pointer to conveyor belt working buffer
DE Offset (from the start of the conveyor belt graphics) for the frame to draw
B398 LD HL,($A465)
B39B ADD HL,DE
B39C LD A,(IX+$00)
B39F INC IX
B3A1 AND A
B3A2 RET Z
B3A3 PUSH HL
B3A4 LD E,(IX+$01)
B3A7 LD C,$20
B3A9 EX AF,AF'
B3AA CALL $B3C8
B3AD INC E
B3AE ADD HL,BC
B3AF EX AF,AF'
B3B0 SUB $02
B3B2 JR Z,$B3BD
B3B4 EX AF,AF'
B3B5 CALL $B3C8
B3B8 INC E
B3B9 EX AF,AF'
B3BA DEC A
B3BB JR NZ,$B3B4
B3BD ADD HL,BC
B3BE CALL $B3C8
B3C1 LD C,$03
B3C3 ADD IX,BC
B3C5 POP HL
B3C6 JR $B39C
Prev: B2D2 Up: Map Next: B3C8