So, I have set up my images to display using:
Sprite::Sprite(SDL_Renderer* passed_renderer, string FilePath, int x, int y, int w, int h, CCollisionRect passed_collisionRect)
{
CollisionRect = passed_collisionRect;
renderer = passed_renderer;
image = NULL;
image = IMG_LoadTexture(renderer, FilePath.c_str());
if (image == NULL){
cout << "Couldn't load background" << FilePath.c_str();
}
rect.x = x;
rect.y = y;
rect.w = w;
rect.h = h;
}
and then I draw them using:
player = new Sprite(setup->GetRenderer(), "images/player.png", 0, 500, 100, 100, CCollisionRect(0, 0, 100, 100));
and
player->Draw();
Now, my question is, how would I get this and allow the player to jump?