• Advertisement

Bartek Sowka

Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Bartek Sowka

  • Rank
    Newbie
  1. Ok so I made the image bigger and it worked... The Image I had before was 32x32, when I stretched it to 128x128 it worked! How can I display 32x32 bmps then?
  2. Ok so my code is: [CODE] #include "SDL/SDL.h" #include <iostream> using namespace std; int main( int argc, char* args[] ) { SDL_Surface* hello = NULL; SDL_Surface* screen = NULL; //Start SDL SDL_Init( SDL_INIT_EVERYTHING ); screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE ); hello = SDL_LoadBMP("block.bmp"); SDL_BlitSurface(hello,NULL,screen,NULL); SDL_Flip(screen); SDL_Delay(2000); SDL_FreeSurface( hello ); //Quit SDL SDL_Quit(); return 0; } [/CODE] I have the block.bmp in the same directory as my exe (Debug) Oh and I'm using Code::Blocks. Can anyone help me?
  • Advertisement