1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
if (checkEnemyCollision(otherRect[0], enemiesRect)) {
gameOver(&otherRect[0], &lives, &play);
if(play == false) quit = true;
}
if (checkAllyCollision(&otherRect[0], alliesRect)) {
gameOver(&otherRect[0], &lives, &play);
if (play == false) quit = true;
}
if (play)
{
SDL_SetRenderDrawColor(gRenderer, 2, 100, 64, 1);
SDL_RenderClear(gRenderer);
SDL_RenderCopy(gRenderer, plansza, NULL, &otherRect[2]);
renderMovingObjects(enemiesRect, alliesRect);
SDL_RenderCopy(gRenderer, frog, NULL, &otherRect[0]);
//renderWonPosition(50, 74); //this called like that works perfectly
checkIfWon(&otherRect[0], &lives, &play); //inside this function is again renderWonPosition()
SDL_RenderPresent(gRenderer);
}
|