If you have any questions I can try and answer them, but as I said it's been a while since I wrote this code. Quote: Original post by AaronA By alpha channel, I assume you mean display them with transparency? I've been searching for a solution on google to no avail and i've been stuck on it for a few days now. I already did several tests to know what was containing TilesetFile and the path is correct, it's the one that I give in the file. When I discover a solution to this problem, I'll post it here. So I took a second to think about that and as TilesetFile path was relative to my. Right click on the project and select Properties. Well, I don't know which tutorials you're talking about.
Create a new surface that is 32 bpp. When I run the game from outside Visual C++, a window opens and the game crashes. I didn't know what that was all about since I'm new to this so i tried running the. I recently followed the same , extending its functionality to allow unpacking of resource files into the original file formats. But as you can see, it's pretty straightforward. But it fails and I don't know why. Hi everyone, this is my first time being here so i hope i can become a helpful part in this community soon enough.
I think I'm having a problem which relates to yours, and may provide more insight into the issue. When you were talking about Windows Explorer not showing the file extension. Maybe this is true on Windows too. It was still not working because there were some spaces in the path so fscanf returned me only the first part of the line. So be sure to include those with your project.
This side tutorial is rather simple, short, and sweet. Before you ask, my x. . If you're going to run from Visual Studio, make sure the image is in the same folder as your main. However, I have a text file in my game, and that file loads. Realizing something has to be wrong if the debugger doesn't work it made no sense i started looking into it, but not to bore you with more things i'm just gonna get right into it. Well, that's a big clue for those smarter than me.
I tried to load the image directly by giving the relative and absolute path of the image and it works fine. You'll need to initialise and cleanup the library although it seems to work even without this and remember to link the library and include the appropriate header file. Error loading image Couldn't open x. That's all I can help with, I'm out of ideas from here. Help would be really appreciated. With that done, let's set up a new project using Visual Studio 2010. It only fails when I get the file path with the GetOpenFileName function.
Also check the name your passing to make sure that it is truly the same name as you png file. These are the steps looped : 1. However, such functionality is provided by an extension library called. I ask for your help, if someone want, i can upload entire source code, or at least a simplified version with the resource file. I used breakpoints and the logger to pinpoint the error.
I told you it would be short. Let's concentrate on those development libraries for the moment. Up until this point whenever i debugged my project it would just flash and exit with code 1. The game builds with no errors. Create an Empty Project from the Visual C++ category. It's not just this lesson btw, none of my lessons can debug because of this problem. I have no idea why this is the case and if anyone can help me configure my Visual c++ to point to my Debug folder where the.
I mean you could just make something quick in paint like a white background and a few dots and save it not neccesarily as a png as test. Either way, does the same error occur with other image files? If you have not read my tutorial, I encourage you to do so now. I compiled a release version of my game using Visual C++ 2008 Express on a 32-bit Vista virtual machine. That's not what I'm looking for though, I probably didnt explain it right, by alpha channel I mean displaying a sprite in a texture with something like colorkeying but not colorkeying, transparent pixels. Don't worry, I appreciate all the help I can get! First of all, thanks to everyone who's reading my post and wants to help. Thanks for the help Spirrwell.
I could use fgets but I wanted to try to give the relative path of the TilesetFile but, this time, relative to the location of the file that I open to get the path. I really don't know what else to try. By alpha channel, I assume you mean display them with transparency? Once you extract the contents of the zip file, you'll be able to find an include folder and a lib folder among other stuff. Eh, maybe i didnt make myself clear enough. This tutorial inspired by Blommis. Then go to Input also under Linker and replace the Additional Dependencies with the following: Now let's try some code.
So this is from the 4th tutorial: Event driven programming. Try compiling, and trying out different file formats. Regarding the file names, I did notice that if I have a file named Tiles. But I thought putting them in the same location as the application was enough to get the image files to load. If you still have the full file name, then someone smarter than me will have to help you. That's about all I can think of for now, perhaps someone else has a better idea. Add a file called main.