initialize ball and bouncer

This commit is contained in:
Quinn
2024-06-10 14:40:53 +02:00
parent d4f51ee3d1
commit 73260f736e
4 changed files with 37 additions and 16 deletions

18
level.c
View File

@@ -1,9 +1,21 @@
#include <stdbool.h>
#include <SDL2/SDL.h>
#include "level.h"
#include <stdbool.h>
#include <SDL2/SDL.h>
#include "constants.h"
//prepares the level to be in a playable state
void level_init(Level* level) {}
void level_init(Level* level) {
// initialize ball
level->ball.pos.x = SCREEN_WIDTH / 2;
level->ball.pos.y = SCREEN_HEIGHT / 2;
level->ball.radius = 1;
// initialize bouncer
level->bouncer.pos.x = SCREEN_HEIGHT / 2;
level->bouncer.pos.y = 5;
level->bouncer.width = 20;
}
//updates the level
void level_update(Level* level, bool* keys) {}