Jump to content
  • 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: #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; } 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!