on the SDL website you can only download SDL-devel-1.2.14-mingw32.tar.gz but on the tutorial it say to download SDL-devel-1.2.8-mingw32.tar.gz i don't know if there is much differences
Please help




Posted 18 January 2012 - 05:15 PM
Posted 19 January 2012 - 03:51 AM
Posted 19 January 2012 - 05:42 AM
#include "SDL/SDL.h" // include <span class="searchlite">SDL</span>
int main(int argc, char *argv[])
{
// the screen we will draw to.
<span class="searchlite">SDL</span>_Surface *screen;
// the surface to draw the bitmap on.
<span class="searchlite">SDL</span>_Surface *bmp;
// area to draw the bitmap to.
<span class="searchlite">SDL</span>_Rect targetarea;
// initialize <span class="searchlite">SDL</span>. // I use everything as it will load video as well.
<span class="searchlite">SDL</span>_Init(<span class="searchlite">SDL</span>_INIT_EVERYTHING);
/*
set up the screen pass in screen
width,height,bpp and set <span class="searchlite">SDL</span> to software
rendering
*/
screen = <span class="searchlite">SDL</span>_SetVideoMode(640,480,32, <span class="searchlite">SDL</span>_SWSURFACE);
// load a bitmap.
bmp = <span class="searchlite">SDL</span>_LoadBMP("test.bmp"); /
targetarea.x = 10; // target x
targetarea.y = 20; // target y
targetarea.w = bmp->w; // target width
targetarea.h = bmp->h; // target height
// Draw the bitmap to the target area
<span class="searchlite">SDL</span>_BlitSurface(bmp, NULL, screen, &targetarea);
// show the bitmap // double buffering
<span class="searchlite">SDL</span>_Flip(screen);
while(1);
}
Posted 19 January 2012 - 05:59 AM
#include "SDL/SDL.h" // include SDL
int main(int argc, char *argv[])
{
// the screen we will draw to.
SDL_Surface *screen;
// the surface to draw the bitmap on.
SDL_Surface *bmp;
// area to draw the bitmap to.
SDL_Rect targetarea;
// initialize SDL.
// I use everything as it will load video as well.
SDL_Init(SDL_INIT_EVERYTHING);
/*
set up the screen pass in screen
width,height,bpp and set SDL to software
rendering
*/
screen = SDL_SetVideoMode(640,480,32, SDL_SWSURFACE);
// load a bitmap.
bmp = SDL_LoadBMP("test.bmp"); /
targetarea.x = 10; // target x
targetarea.y = 20; // target y
targetarea.w = bmp->w; // target width
targetarea.h = bmp->h; // target height
// Draw the bitmap to the target area
SDL_BlitSurface(bmp, NULL, screen, &targetarea);
// show the bitmap // double buffering
SDL_Flip(screen);
while(1);
}
#include "SDL/SDL.h"
int main( int argc, char* args[] )
{
//Start SDL
SDL_Init( SDL_INIT_EVERYTHING );
//Quit SDL
SDL_Quit();
return 0;
}
Posted 19 January 2012 - 06:19 AM
Posted 19 January 2012 - 02:17 PM
Posted 19 January 2012 - 05:20 PM
Posted 19 January 2012 - 06:02 PM
Posted 19 January 2012 - 06:45 PM
Posted 19 January 2012 - 06:52 PM
Frankma5, on 19 January 2012 - 10:19 AM, said:
Posted 20 January 2012 - 02:27 AM
Posted 20 January 2012 - 04:19 AM
