Window::Window( int w, int h, int buffer ) { // initialisation de la SDL init_sdl(); // création d'une nouvelle fenêtre creer_fenetre( w, h, buffer ); }
SDL_Surface* init_SDL(SDL_Surface* ecran, int taille_fenetre) { if(SDL_Init(SDL_INIT_VIDEO || SDL_INIT_AUDIO) == -1) { printf("Impossible d'initialiser la SDL: %s.\n", SDL_GetError()); SDL_Quit(); } TTF_Init(); ecran = creer_fenetre(taille_fenetre, taille_fenetre); return ecran; }