rendered paste body#include<iostream>#include<SDL/SDL.h>class Sprite{ private: SDL_Surface *sprit; SDL_Rect alue; int pos_x, pos_y; public: Sprite(int,int); void Create(int,int,SDL_Surface*,Uint32);};Sprite::Sprite(int coord_x,int coord_y){ pos_x = coord_x; pos_y = coord_y;}void Sprite::Create(int width, int height,SDL_Surface* parent,Uint32 color){ alue.x = pos_x; alue.y = pos_y; sprit = SDL_CreateRGBSurface(SDL_SWSURFACE,width,height, 32, parent->format->Rmask, parent->format->Gmask, parent->format->Bmask, parent->format->Amask); SDL_FillRect(sprit,NULL,color); SDL_BlitSurface(sprit,NULL,parent,&alue);}int main(int *argc, char *argv[]){ Sprite pallo(10,10); SDL_Surface *naytto; naytto = SDL_SetVideoMode(800,600,32,SDL_HWSURFACE); pallo.Create(10,10,naytto,0xff0000); SDL_Flip(naytto); SDL_Delay(1000); SDL_Quit(); return 0;}