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

Pages: 1 [2]
16
Graphics / Move by Keypressing
« on: May 10, 2008, 07:38:59 pm »
ok thanks, i've done this ;)

and i changed my code a little bit

Code: [Select]
Angle_Bogen = 0.0174532925 * (Angle + 90.0);

mfg Max

17
Graphics / Move by Keypressing
« on: May 10, 2008, 02:47:03 pm »
hm.. i think you're right! ;)
thanks, but I am happy about that, that the code works^^

18
Graphics / Move by Keypressing
« on: May 10, 2008, 02:34:57 pm »
hm...what do you meaning?
ähm.. it works now, i have tried a little bit to change the code,
my knight walks perfekt into his line of sight, forward and backward...
Code: [Select]
void Player::Input(RenderWindow *Game)
{
Angle_Bogen = 2 * 3.1415 / 360 * (Angle + 90);
if (Game->GetInput().IsKeyDown(Key::Left))
{
Angle += 5;
}
if (Game->GetInput().IsKeyDown(Key::Right))
{
Angle -= 5;
}
if (Angle > 0)
{
Angle += 360;
}
if (Angle > 360)
{
Angle -= 360;
}
if (Game->GetInput().IsKeyDown(Key::Up))
{
X = 5 * cos(Angle_Bogen);
Y = 5 * sin(Angle_Bogen);
PosX -= (int) X;
PosY += (int) Y;
}
if (Game->GetInput().IsKeyDown(Key::Down))
{
X = 5 * cos(Angle_Bogen);
Y = 5 * sin(Angle_Bogen);
PosX += (int) X;
PosY -= (int) Y;
}
}

19
Graphics / Move by Keypressing
« on: May 10, 2008, 02:19:48 pm »
yes, thanks, a buddy from me, have said the same, I have a big code for this, but it don't works, perhaps there is an failure, here is the code
Code: [Select]
void Player::Input(RenderWindow *Game)
{
Angle_Bogen = 2 * 3.1415 / 360 * Angle;
if (Game->GetInput().IsKeyDown(Key::Left))
{
Angle += 5;
}
if (Game->GetInput().IsKeyDown(Key::Right))
{
Angle -= 5;
}
if (Angle > 0)
{
Angle += 360;
}
if (Angle > 360)
{
Angle -= 360;
}
if (Game->GetInput().IsKeyDown(Key::Up))
{
if (Angle > 90 && Angle < 180)
{
X = 5 * cos(Angle_Bogen - 3.1415 / 2);
Y = 5 * sin(Angle_Bogen - 3.1415 / 2);
}
else if (Angle > 270)
{
X = 5 * cos(Angle_Bogen - 3.1415 / 2 * 3);
Y = 5 * sin(Angle_Bogen - 3.1415 / 2 * 3);
}
else if (Angle >= 180 && Angle <= 270)
{
X = 5 * cos(Angle_Bogen);
Y = 5 * sin(Angle_Bogen);
}
else
{
X = 5 * cos(Angle_Bogen - 3.1415);
Y = 5 * sin(Angle_Bogen - 3.1415);
}
PosX += (int) X;
PosY += (int) Y;
}
if (Game->GetInput().IsKeyDown(Key::Down))
{
if (Angle > 90 && Angle < 180)
{
X = 5 * cos(Angle_Bogen - 3.1415 / 2);
Y = 5 * sin(Angle_Bogen - 3.1415 / 2);
}
else if (Angle > 270)
{
X = 5 * cos(Angle_Bogen - 3.1415 / 2 * 3);
Y = 5 * sin(Angle_Bogen - 3.1415 / 2 * 3);
}
else if (Angle >= 180 && Angle <= 270)
{
X = 5 * cos(Angle_Bogen);
Y = 5 * sin(Angle_Bogen);
}
else
{
X = 5 * cos(Angle_Bogen - 3.1415);
Y = 5 * sin(Angle_Bogen - 3.1415);
}
PosX -= (int) X;
PosY -= (int) Y;
}
}


Mfg Max

20
Graphics / Move by Keypressing
« on: May 10, 2008, 02:01:54 pm »
Hello, I have the following problem
I have an green background, and a Texture from a knight,
the Texture can be rotatet by using the Arrow Keys right, and left,
I have one variable named Angle

Angle = 0;

Angle goes from 0-360, by using the arrow keys, the number of arrow is changing, so we can rotate the textur,

but now, i want to let the knight walk, key up should move the knight into his line of sight forward, and key down should move the knight backward.

I have tried anything, but nothing worked right...
Does anybody has an idea ?

sorry for my bad english, mfg max

21
General discussions / error LNK2001 ...
« on: May 04, 2008, 09:18:05 pm »
hm..? sry my english isn't very well.. I have the newest .lib's .dll's and .hpp's downloaded.. how can I rebuild this? sry I don't understand =/

EDIT: ähm.. ok, I've put the static libs from 2005 into the lib foulder from my vsc++2008EE .. it works T_T

why?? I'm happy about that, but why I must use the 2005 libraries in 2008 ??

mfg max

22
General discussions / error LNK2001 ...
« on: May 04, 2008, 01:22:21 pm »
hm.. thank you, I have done this,
but now, I have a new problem -.-
the linker-failures don't come again, but vsc++ told me, that the application can't be startet, because of a false Applicationconfiguration.. VSC++ says I should check the manifest for failures, how can I check the manifest?

I hate microsoft.. everytime I fix one failure, i get the next..

dos anybody know what to do? =(

mfg max

23
General discussions / error LNK2001 ...
« on: May 04, 2008, 10:55:24 am »
Hello, I use the Microsoft Visual Studio 2008 Express Edition Compiler and Windows XP SP2 32 bit,
I have downloaded the SFML-SDK and copied the .lib datas into the lib folder
and the .h datas into the include folder.
then, I have created a new Project (Win32 Application) in my compiler and have set the linker option "input", I included the lib "sfml-system.lib"
then i have tried the first code of this tutorial
Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime() < 5.f)
{
std::cout << Clock.GetElapsedTime() << std::endl;
sf::Sleep(0.5f);
}
return 0;
}


When I compile it, it works.
But when I will debugg it, I get 2 failures:

Fehler   1   error LNK2001: Nicht aufgelöstes externes Symbol "_WinMain@16".   MSVCRT.lib
Fehler   2   fatal error LNK1120: 1 nicht aufgelöste externe Verweise.   C:\Dokumente und Einstellungen\Arantir\Eigene Dateien\Projekte und Anderes\Programmieren\SFML\Release\SFML.exe

It seems like Linker-failures.. what should I do?

sorry for my bad english ^^
mfg max

Pages: 1 [2]