#ifndef SDL_INCLUDES #include #endif #ifndef STD_INCLUDES #include #include #endif SDL_Surface* f_load_bmp(const char* p_filename) { SDL_Surface *v_image; printf("Attemping to load bitmap %s\n",p_filename); v_image = SDL_LoadBMP(p_filename); if (v_image == NULL) { printf("Unable to load bitmap %s : %s\n",p_filename, SDL_GetError()); return NULL; } printf("Image Loaded Succesfully : %s\n",p_filename); return v_image; } SDL_Surface* f_init_screen() { SDL_Surface *v_screen; printf("Attemping to initialize SDL Video\n"); if (SDL_Init(SDL_INIT_VIDEO) != 0) { printf("Unable to initialize SDL: %s\n", SDL_GetError()); return NULL; } printf("Attemping to set the video mode\n"); v_screen = SDL_SetVideoMode(1024, 768, 32, SDL_FULLSCREEN); if (v_screen == NULL) { printf("Unable to set video mode: %s\n", SDL_GetError()); return NULL; } printf("Video Mode set correctly at %dx%d\n",v_screen->w,v_screen->h); return v_screen; }