1
Window / g++ Build problem
« on: June 16, 2010, 04:49:05 pm »
Just so you know, all other modules (sfml-graphics, sfml-audio, etc.) all depend on sfml-system, so you should always link to it when using SFML.
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.
Player(Image& i);
void assign(Image& i);
// File Test.h
#ifndef TEST_H
#define TEST_H
class Test
{
public:
Test( );
void Function( );
};
#endif
// File Test.cpp
#include <iostream>
#include <SFML/System.hpp>
#include "Test.h"
Test::Test( )
{
std::cout << "Test::Test( ) " << sf::Randomizer::Random( 0, 10 ) << std::endl;
}
void Test::Function( )
{
std::cout << "Test::Function( ) " << sf::Randomizer::Random( 50, 100 ) << std::endl;
}
ar x libsfml-system-s.a
ar rs libStaticSFMLTest.a *.o
C:\Documents and Settings\Eternal Warrior\My Documents\CodeBlocksProjects\StaticSFMLTest\libStaticSFMLTest.a(Test.o):Test.cpp:(.text+0x2f)||undefined reference to `sf::Randomizer::Random(int, int)'|
player.Input( window.GetInput( ) );
deltaTime = window.GetFrameTime( ) * 60.0f; // Synchronize to 60 FPS
player.Update( deltaTime );
void Player::Input( const sf::Input& input )
{
if( input.IsKeyDown( sf::Key::W ) )
{
if( y >= 448.0f )
{
verticalSpeed = -6.0f;
}
}
}
void Player::Update( float deltaTime )
{
y += verticalSpeed * deltaTime;
if( y >= 448.0f )
{
verticalSpeed = 0.0f;
y = 448.0f;
}
if( y < 448.0f ) verticalSpeed += 0.1f;
sprite.SetPosition( x, y );
}
class Piece;
<?php
$server = $_GET[ "server" ];
$ip = $_GET[ "ip" ];
$port = $_GET[ "port" ];
add_server( $server, $ip, $port );
?>