Skip to content

check_hit_brick.asm

Erik Lothe edited this page Jul 5, 2014 · 1 revision

Tree: root /src/loop/check_hit_brick.asm

This file contains the CheckHitBrick subroutine which determines if the ball is currently hitting a brick, including bouncing the ball, killing the brick, and switching to the next level.

CheckHitBrick

  • For all bricks, check if brick is being hit.
  • If a brick was hit, call the KillBrick sub routine.
  • For the brick being hit, calculate bounce direction and then bounce.

KillBrick

  • Set brick presence to false and queue it for drawing.
  • If no more present bricks left, load next level.
  • Else, increase kill count and dispense a token according to token frequency.
Clone this wiki locally