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

Author Topic: Help, Printing an Array to Window is causing unusual Display  (Read 1333 times)

0 Members and 1 Guest are viewing this topic.

Dreken

  • Newbie
  • *
  • Posts: 9
    • View Profile
Help, Printing an Array to Window is causing unusual Display
« on: September 07, 2012, 09:14:34 pm »
I need help desperately, I am on Windows 7, using SFML 2.0-RC, and visual studio 2010.

Here is the snippet of code:

 

And here what is being outputted (attachment).


Why is there a space of nothing, and then suddenly the first row?

Why is the first row being printed after everything and the null pointer? Why is it starting at the index point "1" in the array instead of "0" like it should? (As in it starts at 1, gets to the null pointer, then goes back to 0.)

Thanks for your help.

« Last Edit: September 07, 2012, 09:52:44 pm by Dreken »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Help, Printing an Array to Window is causing unusual Display
« Reply #1 on: September 07, 2012, 09:29:41 pm »
You set the position of your sprites after drawing them.
Laurent Gomila - SFML developer

Dreken

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Help, Printing an Array to Window is causing unusual Display
« Reply #2 on: September 07, 2012, 09:35:12 pm »
Thanks! I've fixed it based on your reply. It works now. You're the best.


 

anything