Skip to content
Snippets Groups Projects
Commit 242365cb authored by antoinemeyer5's avatar antoinemeyer5
Browse files

idee: point de chute de la balle, raquette du joueur; tofix : collisions du joueur

parent 00b51cd2
No related branches found
No related tags found
No related merge requests found
travail_de_groupe/jeu_appren_par_renfo/Res/racket.png

17.4 KiB

......@@ -154,6 +154,8 @@ void manageMovement()
player.y += y_increment * MOVEMENT_SPEED;
}
}
printf("newpos_x:%f, newpos_y:%f - ", newpos_x, newpos_y);
printf("pX:%f, pY:%f\n", player.x, player.y);
}
void managePlayer()
......
......@@ -10,6 +10,7 @@ SDL_Rect destRect;
SDL_Rect rect;
SDL_Rect sky;
SDL_Rect ground;
SDL_Rect racket;
int showHub = 0;
......@@ -21,6 +22,7 @@ SDL_Texture *playerTexture;
SDL_Texture *ballTexture;
SDL_Texture *skyTexture;
SDL_Texture *groundTexture;
SDL_Texture *racketTexture;
int **rays;
int raysListLength = 0;
......@@ -908,6 +910,10 @@ void drawSkyAndGround()
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
}
void drawRacket(){
//todo
}
void drawMap2D(int map[][MAP_WIDTH])
{
int i, j;
......@@ -1034,10 +1040,12 @@ void drawGame()
drawVerticalWalls();
drawEnnemy();
drawHorizentalWalls();
//draw point de chute de la balle
drawBall();
drawVerticalNet();
}
drawMap2D(map);
drawRacket();
//affiche le hub
if(showHub){
drawHub();
......@@ -1059,6 +1067,7 @@ void mainLoop()
netEdgeRightTexture = loadTexture("Res/netRight.png");
skyTexture = loadTexture("Res/sky.png");
groundTexture = loadTexture("Res/ground.png");
racketTexture = loadTexture("Res/racket.png");
ray1 = malloc(sizeof(int) * 2);
ray2 = malloc(sizeof(int) * 2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment