1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
GameObject texturetest;
GameObject sword;
texturetest.init(true, false,sr,true, "Untitled.png");
sword.init(true, false, sr, false, "mythicalsword.png");
while (gameisrunning)
{
SDL_RenderClear(sr); /// render
texturetest.render(sr, 45,12, 256, 256);
sword.render(sr, 12, -45, 256, 256);
SDL_RenderPresent(sr); /// render ends
// create game object code here
handleevent();
}
|