Skip to content

Commit

Permalink
Centered some text
Browse files Browse the repository at this point in the history
  • Loading branch information
kliao2016 committed Nov 13, 2017
1 parent b00a8b3 commit caf746c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
Binary file modified BrickBreaker.elf
Binary file not shown.
Binary file modified BrickBreaker.gba
Binary file not shown.
6 changes: 4 additions & 2 deletions game.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,17 @@ void handleBrickCollisions(Brick *brptr, Ball *ballptr, int *numBricks, int bric
*(numBricks) -= 1;
cur->isHit = 1;
ballptr->xDir *= -1;
ballptr->col = ballptr->col + (ballptr->xDir * 3);
//ballptr->xDir = ballptr->xDir * ((*(numBricks) % 2) + 1);
ballptr->col = ballptr->col + (ballptr->xDir * 2);
} else if ((((ballptr->row + BALLSIZE) == brptr->row)
|| (ballptr->row == (cur->row + BRICKHEIGHT)))
&& ((ballptr->col >= (cur->col - BALLSIZE))
&& (ballptr->col <= (cur->col + BRICKWIDTH)))) {
*(numBricks) -= 1;
cur->isHit = 1;
ballptr->yDir *= -1;
ballptr->row = ballptr->row + (ballptr->yDir * 3);
//ballptr->yDir = ballptr->yDir * ((*(numBricks) % 2) + 1);
ballptr->row = ballptr->row + (ballptr->yDir * 2);
}
drawRect(cur->row, cur->col, BRICKHEIGHT, BRICKWIDTH, cur->color);
}
Expand Down
Binary file modified game.o
Binary file not shown.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void tryAgain() {
*/
void gameWon() {
fillScreen(BGCOLOR);
drawString3(70, 56, "CONGRATULATIONS, YOU WON!", GREEN);
drawString3(70, 50, "CONGRATULATIONS, YOU WON!", GREEN);
drawString3(79, 53, "PRESS ENTER TO PLAY AGAIN", GREEN);
}

Expand Down

0 comments on commit caf746c

Please sign in to comment.