Prev: 40782 Up: Map Next: 40808
40789: Play Slow Fall
Used by the routines at UpdatePickupEntity and UpdateGrowingBubbleEntity.
Plays a series of 18 clicks whose lengths slowly increase.
PlaySlowFall 40789 LD C,18 Set the number of clicks to 18.
40791 LD D,96 Set the base length to 96.
PlaySlowFall_Click 40793 LD A,C Fetch the number of clicks left.
40794 ADD A,A Double it.
40795 ADD A,D Add the base length.
40796 LD B,A Use it as the length of the click.
40797 CALL PlayClick Play a click.
40800 LD A,D Fetch the base length.
40801 ADD A,3 Add 3.
40803 LD D,A Store it.
40804 DEC C Decrease the number of clicks by one.
40805 JR NZ,PlaySlowFall_Click Jump back until they have all been played.
40807 RET Return.
Prev: 40782 Up: Map Next: 40808