SDL is the root of all annoyance, Oh and hey everyone
Hey everyone I know this may not be the best idea to incorporate a problem into my first post but as I've seen the admin responds a lot to these I thought it might be easier to solve it.
Before I get into my problem I'd like to talk a bit about myself. I have recently got into programming as a hobby and learnt C++. I am currently learning SDL to start on game programming. Now onto my problem :p
So I've been following a wonderful tutorial from Lazyfoo.net that teaches SDL. My problem is that I can not use images of a different type than .bmp. If I use .bmp the program loads fine but when I use a different extension for example .png, it does not work. What happens is that a blank window quickly pops up for less than a second and closes. I have rechecked that I had set everything up for SDL and SDL_Image. From .libs to the .dlls I've literally checked at least 15 times. Also on my compiler (Visiual C++ 2008 expres edition) it says there were no errors which puzzles me.
For the source code of the project you can download it here: lazyfoo.net/downloads/index.php?file=SDLTut_lesson06 (sorry for not having the full length but It won't let me post it)
I do wish to overcome this as wasting about half a day on something like this that does hold me back from continuing is rather annoying.
Any and all help is welcome :) Thanks for reading all that and I hope I will have a great time here as I overcome all my troubles through programming.
Re: SDL is the root of all annoyance, Oh and hey everyone
Sorry for a double post but it won't let me edit the first post. I have re-read the code clearly to actually grasp the problem and have found out that what really happens is that the .png/ .jpg or any extension other than .bmp does not load. Therefore it returned false and closed the program instantly. Pretty much with removing that if statement the image does not load which still puzzles me. I rechecked all the files once again and am currently thinking it might be the SDL_image. Any idea/suggestions are helpful :D
|All times are GMT +5.5. The time now is 19:37.|