/* Include libraries */ #include /* Include header files */ #include "mansdl.hh" bool mansdl::init(void) { if(SDL_Init(SDL_INIT_EVERYTHING) < 0) return false; if((window = SDL_CreateWindow("MandelbrotSDL", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOW_WIDTH, WINDOW_HEIGHT, 0)) == NULL) return false; if((renderer = SDL_CreateRenderer(window, -1, 0)) == NULL) return false; SDL_SetRenderDrawColor(renderer, 255, 255, 255, SDL_ALPHA_OPAQUE); SDL_RenderClear(renderer); SDL_RenderPresent(renderer); return true; /* Initialized successfully */ }