update template to use SFML-2.0-rc
This commit is contained in:
parent
31d9ab8f10
commit
eae0dc9e34
@ -9,16 +9,15 @@ server_name = client_name + '-server'
|
||||
platform = 'windows' if os.path.exists('/bin/cygwin1.dll') else 'unix'
|
||||
|
||||
# common environment settings
|
||||
#SFML_VERSION = '2.0-rc'
|
||||
SFML_VERSION = '1.6'
|
||||
SFML_VERSION = '2.0-rc'
|
||||
BIN_DIR = 'bin'
|
||||
CXX = 'g++'
|
||||
CPPFLAGS = []
|
||||
CPPFLAGS = ['-DSFML_STATIC']
|
||||
CXXFLAGS = ['-Wall', '-O2']
|
||||
LINKFLAGS = []
|
||||
LIBPATH = []
|
||||
LIBS_client = ['sfml-network', 'sfml-system', 'sfml-window']
|
||||
LIBS_server = ['sfml-network']
|
||||
LIBS_client = ['sfml-network-s', 'sfml-window-s', 'sfml-system-s']
|
||||
LIBS_server = ['sfml-network-s']
|
||||
libs_to_copy = []
|
||||
|
||||
if platform == 'windows':
|
||||
|
@ -18,27 +18,27 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
sf::VideoMode mode = fullscreen
|
||||
? sf::VideoMode::GetDesktopMode()
|
||||
? sf::VideoMode::getDesktopMode()
|
||||
: sf::VideoMode(800, 600, 32);
|
||||
long style = fullscreen
|
||||
? sf::Style::Fullscreen
|
||||
: sf::Style::Resize | sf::Style::Close;
|
||||
sf::Window window(mode, "Treacherous Terrain", style);
|
||||
|
||||
while (window.IsOpened())
|
||||
while (window.isOpen())
|
||||
{
|
||||
sf::Event event;
|
||||
while (window.GetEvent(event))
|
||||
while (window.pollEvent(event))
|
||||
{
|
||||
if (event.Type == sf::Event::Closed)
|
||||
window.Close();
|
||||
if (event.type == sf::Event::Closed)
|
||||
window.close();
|
||||
|
||||
if ( (event.Type == sf::Event::KeyPressed)
|
||||
&& (event.Key.Code == sf::Key::Escape) )
|
||||
window.Close();
|
||||
if ( (event.type == sf::Event::KeyPressed)
|
||||
&& (event.key.code == sf::Keyboard::Escape) )
|
||||
window.close();
|
||||
}
|
||||
|
||||
window.Display();
|
||||
window.display();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user