tonkkis
public cpp v1 · immutable#include<SDL/SDL.h>class Sprite{ private: int width; int height; int color; SDL_Surface *surf; SDL_Rect alue; public: void Create(void);};void Sprite::Create(void){ alue.h = height; alue.w = width; alue.x = 0; alue.y = 0; SDL_FillRect(surf,&alue,0xff0000);}int main(int *argc,char *argv[]){ SDL_Surface *screen; Sprite Ball; Ball.Create(); screen = SDL_SetVideoMode(800,600,32,SDL_HWSURFACE); SDL_Delay(1000); SDL_Quit(); return 0;}