Prev: B85C Up: Map Next: B876
B865: Ball bouncing on the spot (types 178 and 179)
The ball_ud blocks (ball_ud and its three shifted variants). The ball goes straight up and down: rising at two units a frame to a ceiling, then falling under gravity until it lands, which sends it up again with a thud. Bit 2 of +13 is set while it is rising. It flips between its two frames every frame and kills on contact.
The ceiling is shared. $5BBD is cleared on entering a room, and the first ball to run sets it to 32 above its own height; every ball in the room then turns at that same height.
upd_178_179 B865 CALL upd_12_to_15 pixel offsets
B868 LD A,($5BBD) ceiling already set
B86B AND A
B86C JR NZ,ud_ball_rise_or_fall
B86E LD A,(IX+$03) 32 above this ball
B871 ADD A,$20
B873 LD ($5BBD),A
Prev: B85C Up: Map Next: B876