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 - jone

Pages: [1]
1
General discussions / Extremely important question for Friday
« on: February 03, 2012, 07:01:35 pm »
Very oddly shaped glasses of water? ;)

2
Feature requests / Link List for multi-frame (image) sprites
« on: February 03, 2012, 07:00:38 pm »
Assuming you're coding in C++: the STL has a lot of useful data structures. For example, std::list implements a doubly linked list: http://www.cplusplus.com/reference/stl/list/

You could easily use this to do what you're describing.

3
General discussions / Extremely important question for Friday
« on: February 03, 2012, 06:57:52 pm »
What are the symbols next to the user "level" meant to represent?  :lol:

4
Graphics / Tank doesn't Shoot Multiple Bullets
« on: February 03, 2012, 04:20:48 pm »
You're not showing us the right code. :) In fact, I'm not sure what code you're showing us as that seems to be a part of Microsoft Visual C++ library code, but you didn't tell us the file name. :)

How familiar are you with debugging? You might want to check out some tutorials on the subject. For this problem, check out the information on the call stack here: http://www.learncpp.com/cpp-tutorial/a5-debugging-your-program-watching-variables-and-the-call-stack/

The tutorial is using the VS2005 IDE, so it might differ slightly from what you'll see.

Using the call stack, figure out what line of your code is causing the debug assertion to fail, and see if you can't figure out what's wrong with your code.

5
General / 3 keys ok, but 4 halts the input. Why? (Solved)
« on: January 31, 2012, 01:22:03 pm »
Here's a nice explanation. You can even test your keyboard using the small app on top of the page. :)

http://www.microsoft.com/appliedsciences/antighostingexplained.mspx

6
Graphics / sf::Text problem (bug?)
« on: January 30, 2012, 12:28:23 pm »
Quote from: "Laurent"
It's not a wrong usage, just a bug that will be fixed quickly after SFML 2 is released ;)

All right, thanks for the help! :)

7
Graphics / sf::Text problem (bug?)
« on: January 30, 2012, 12:13:41 pm »
Quote from: "Laurent"
It's a known bug ;)


After doing some reading, I think I (vaguely) understand the issue. The issues described in these threads are about the same bug, right?

http://www.sfml-dev.org/forum/viewtopic.php?t=6047
http://www.sfml-dev.org/forum/viewtopic.php?t=6130

In other words, the issue is the lines:

Code: [Select]

sf::Text text;
text.SetFont(font);


As no font is specified in the constructor, the first line instanciates the default font. This is bad because of the destruction order "issues" caused by SFML's own globals.

If I understood correctly, changing the lines to

Code: [Select]

sf::Text text("Hello SFML", font, 50);


causes the constructor of the default sf::Font not to be called, so the default font is not instaciated, and the issue is avoided.

As a side note, it might be a good idea to change the usage example of sf::Text in the SFML2 documentation, as inserting it to your own code like above can cause the issue. I mean this bit: http://sfml-dev.org/documentation/2.0/classsf_1_1Text.php#details

8
Graphics / sf::Text problem (bug?)
« on: January 28, 2012, 10:15:01 pm »
Not sure if this helps, but here's the call stack. Looks like this is originating from the sf::Font's destructor?



I'm not familiar with the implementation of sf::Font so I can't be of much more help.

9
Graphics / sf::Text problem (bug?)
« on: January 28, 2012, 10:09:16 pm »
I can confirm the crash on SFML2 (from git on 22.1) and Windows 7.

However, VS 2008 shows me the next line as the offender:



IIRC, I've had a similar crash when the sf::Font in sf::Text was being destroyed before the text... or something similar. Can't exactly remember.

10
General / SFML 2 inside out - Performances & optimisations
« on: January 24, 2012, 07:48:55 am »
Quote from: "Laurent"
Code: [Select]
sf::Transform transform;
transform.Translate(x, y);
window.Draw(vertexArray, transform);


Ah, I see. Thank you!

11
General / SFML 2 inside out - Performances & optimisations
« on: January 23, 2012, 09:32:25 pm »
Quote from: "jone"
Quote from: "Laurent"

To move a single vertex array, use a sf::Transform with a translation inside.


I apologize for threadjacking, but how would I do this? Do I need to use sf::Transform::GetMatrix and use that on the vertex array, or is there a more direct way that I am missing? I'm using a version of SFML2 that I  grabbed from the git repo on 22.1.


Of course, I can also iterate through all the vertices in the vertex array and perform the transformation on them individually... :)

12
General / SFML 2 inside out - Performances & optimisations
« on: January 23, 2012, 06:53:47 pm »
Quote from: "Laurent"

To move a single vertex array, use a sf::Transform with a translation inside.


I apologize for threadjacking, but how would I do this? Do I need to use sf::Transform::GetMatrix and use that on the vertex array, or is there a more direct way that I am missing? I'm using a version of SFML2 that I  grabbed from the git repo on 22.1.

Pages: [1]
anything