Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - shaidyn

Pages: [1]
1
Hi again, folks!

I'm coming back to this because I've encountered a related issue, and didn't want to clog the boards with a new thread.

I was able to get a release build using static linking, by adding all of the additional libraries. But I'm running into an issue when I try to create a debug build. Specifically:

Unhandled exception at 0x77E122D2 (ntdll.dll) in Point_and_Click.exe: 0xC0000005: Access violation writing location 0x00000004.

I did some searching on google, and it's mentioned that I may be mixing release and debug libraries. My additional dependencies look like this:

sfml-graphics-s-d.lib
sfml-audio-s-d.lib
sfml-network-s-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
winmm.lib
ws2_32.lib
sndfile.lib
openal32.lib
opengl32.lib
gdi32.lib
glew.lib
freetype.lib
jpeg.lib

I tried changing the latter ones to include a -d, but I then got this error:

cannot open file 'winmm-d.lib', so I suspect that's not the case.

I'm fairly certain it's an issue with my debug vs release configuration, because the code itself compiles and runs happily in release mode.

2
Thank you for the reply, zsbzsb.

Google had lead me to http://www.sfml-dev.org/tutorials/2.0/start-vc.php. I didn't think that the difference between 2.2 and 2.0 would be so much as to push the tutorial out of date, and that was my bad assumption.

Thanks for the help.

3
Now, before you direct me to the tutorials or google, I've gone through those carefully. There's obviously something simple I'm missing, and I'm hoping you can point it out. :)

I have a small SFML project that was working previously, and is no longer. Here are the details:

The solution file is located at: G:\Entertainment\Programming_Projects\Point_and_Click.

There is a folder in this directory that holds the SFML files called "SFML-2.2".

The "Active config" for the solution is "Release|Win32".

In the Properties, I have the C++ > General > Additional Include Directories set to:

G:\Entertainment\Programming_Projects\Point_and_Click\SFML-2.2\include

C++ > Code Generation > Runetime Library is /MD

C++ > Preprocessor > Preprocessor Definitions includes SFML_STATIC at the top.

Linker > General > Additional Library Directories is:

G:\Entertainment\Programming_Projects\Point_and_Click\SFML-2.2\lib

Linker > Input > Additional Dependencies (for Release) are:

sfml-graphics-s.lib
sfml-audio-s.lib
sfml-network-s.lib
sfml-window-s.lib
sfml-system-s.lib

If I go to the location I've indicated (G:\Entertainment\Programming_Projects\Point_and_Click\SFML-2.2\lib), all of the applicable .lib files are there.

When I attempt to compile the solution in Visual Studio 2013, I get around 90 errors that say roughly the same thing:

"error LNK2001: Unresolved external symbol".

I tried compiling without using the -s at the end of the .lib files, and only got one LNK2001 error. I'd greatly appreciate any and all help.

4
General / Re: Should Sprite Alpha affect collision detection?
« on: April 19, 2013, 06:11:47 pm »
I'm using Pixel perfect

5
General / Should Sprite Alpha affect collision detection?
« on: April 18, 2013, 08:09:42 pm »
Hi folks! I'm very new to SFML, and this is my first time posting. If I'm asking a stupid question in the wrong place, let me know and I'll do my best to fix it.

So, I've implemented the simple collision detection module (http://www.sfml-dev.org/wiki/en/sources/simple_collision_detection), and it works just fine. I have a number of sprites for walls, and a sprite for the player, and when the player walks into the wall he stops. No problems there.

I decided I wanted to make a transparent sprites with collision. These would represent traps on the floor that the player can't see. I used .SetColor to set the alpha for the sprite down to 0, making it transparent. But for some reason that I can't figure out, this removed all collision detection. In fact, any alpha value below  128 removes collision detection.

I can't for the life of me figure out why. The alpha doesn't make any changes to the 'math' behind the detection. It's purely visual. Is there something I'm missing?

The code I'm using to change alpha is:

wall_left->set_colour(255,255,255,128);

Which feeds into:

void VisibleGameObject::set_colour(float red, float blue, float green, float alpha)
{
   _sprite.SetColor(sf::Color(red, blue, green, alpha));
}

Nothing exciting, but I figure I should post it for completeness.

Pages: [1]