#ifndef SDL_INCLUDES #include #endif #ifndef STD_INCLUDES #include #include #endif #include "video.h" int main() { // Variable Initialization SDL_Surface *screen; SDL_Surface *image; SDL_Rect src, dest; screen=f_init_screen(); if (screen=NULL) { return 1; } // We unload SDL in case of quitting atexit(SDL_Quit); image = f_load_bmp("test_image.bmp"); if (image == NULL) { return 1; } src.x = 0; src.y = 0; src.w = image->w; src.h = image->h; dest.x = 0; dest.y = 0; dest.w = image->w; dest.h = image->h; SDL_BlitSurface(image, &src, screen, &dest); /* Ask SDL to update the entire screen. */ SDL_UpdateRect(screen, 0, 0, 0, 0); /* Pause for a few seconds as the viewer gasps in awe. */ SDL_Delay(3000); /* Free the memory that was allocated to the bitmap. */ // SDL_FreeSurface(image); printf("Bye!\n"); return 0; }