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

Pages: [1]
1
Thank you for the first answer.To get to your other statements:
I only could use an older version of my code (since i dont have my main pc next to me right now).So i forgot to fix that +1.But honestly dont be so condenscending because i made one simple mistake.

2
To switch between a splash,a title and a menu screen i wanted to use switch with an integer.If the space key would have been pressed,the int value would be increased:

int Screen;
while (window.isOpen())
   {
      Event event;
      while (window.pollEvent(event))
      {
         if (event.type == Event::Closed){ window.close(); }
      }
                if(Keyboard::isKeyPressed(Keyboard::Space)){Screen+1;}
      window.clear();
      switch (Screen)
      {
      case 0:
         window.draw(Sp_Splash);
         break;
      case 1:
         window.draw(Sp_Title);
         break;
      default:
         break;
      }
      window.display();
   }

But when i press space nothing happens(the Screen does not change).
Does anyone know why?

3
Graphics / Re: Images not loading in Visual Studio debug mode
« on: December 27, 2013, 01:37:49 pm »
First of all:Thank you for giving me the answer.
I used the forum search button but couldn't find anything related.
If this question was already asked im deeply sorry for this  :(

4
Graphics / Re: Sfml 2.0 Flipping a sprite
« on: December 26, 2013, 09:38:56 pm »
What do you mean once?
// flip X
sprite.setTextureRect(sf::IntRect(width, 0, -width, height));

// unflip X
sprite.setTextureRect(sf::IntRect(0, 0, width, height));

I did not find the correct values for unflipping it.So thank you for helping me  :)

5
Graphics / Re: Sfml 2.0 Flipping a sprite
« on: December 26, 2013, 09:21:26 pm »
Nop. Note that there's a better solution: using a textureRect with negative width/height (this solution maps exactly to what the Flip functions did).

// flip X
sprite.setTextureRect(sf::IntRect(width, 0, -width, height));

If you really miss the Flip functions, you can write yours as free functions, using the implementation above.

When I use this I can only flip it once?

6
Graphics / Images not loading in Visual Studio debug mode
« on: December 26, 2013, 08:04:34 pm »
Info:
Visual Studio 2013
Win 7
SFML 2.1

Whenever I start a (self made sfml) programm through windows visual studio
(after completing it ) ,the images won't load.
However,if I start the .exe myself, everything works flawlessly.
Is there anything I can change in the project or debugger settings ?

7
General / Re: Visual Studio 13: error for main() and winmain()
« on: December 14, 2013, 04:55:23 pm »
I think my mistake was to not include some dependencies  :o
I recompiled it and now it works
(seems like all of my forum posts so far were senseless :( )

Thank you for the fast reply.

8
General / Re: Visual Studio 13: error for main() and winmain()
« on: December 13, 2013, 07:59:51 pm »
Visual Studio 13 doesn't exist. It's either VS 12 or VS 2013 (yeah I know it's confusing - thank Microsoft). ;)

For VS 2013 there aren't any precompiled libraries, thus have you built SFML on your own?

Yes I have built it on my own

9
General / Visual Studio 13: error for main() and winmain()
« on: December 13, 2013, 04:19:32 pm »
And when i use WinMain() i get this error:

error LNK1561:Entry point must be defined

10
General / Visual Studio 13: error for main() and winmain()
« on: December 13, 2013, 04:18:16 pm »
When i try to use the main() function i get that error:

error LNK 2019

5 times the problem is a "reference to a not solved extern symbol  "
with following code following:

1.__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z)" in Funktion "_main".

3.__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ)" in Funktion "_main"

4.__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z)" in Funktion "_main"

2.error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ)" in Funktion "_main"

5."__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ)" in Funktion "_main".   C:\U



Pages: [1]
anything