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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!