From eacc8e27ccbd109beeada7359033818fc9275d50 Mon Sep 17 00:00:00 2001 From: remi-k Date: Tue, 26 Jan 2010 18:09:03 +0000 Subject: [PATCH] Updated python trunk to SFML 1.6 git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1373 4e206d99-4929-0410-ac5d-dfc041789085 --- python/setup.py | 20 ++++++++++---------- python/src/Joy.cpp | 9 +++++++++ python/src/Mouse.cpp | 3 +++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/python/setup.py b/python/setup.py index 9eed271e..589cff29 100644 --- a/python/setup.py +++ b/python/setup.py @@ -10,16 +10,16 @@ setup(name='PySFML', author_email='remi.k2620@gmail.com', url='http://www.sfml-dev.org/', license='zlib/png', - ext_modules=[ Extension('PySFML.sf', \ - ['src/Clock.cpp', 'src/Color.cpp', 'src/Drawable.cpp', \ - 'src/Event.cpp', 'src/Image.cpp', 'src/Input.cpp', 'src/Key.cpp', 'src/main.cpp', 'src/Music.cpp', \ - 'src/PostFX.cpp', 'src/Rect.cpp', 'src/RenderWindow.cpp', 'src/Sleep.cpp', \ - 'src/Sprite.cpp', 'src/String.cpp', 'src/VideoMode.cpp', 'src/View.cpp', 'src/Window.cpp', \ - 'src/Joy.cpp', 'src/Mouse.cpp', 'src/WindowStyle.cpp', 'src/Blend.cpp', 'src/Sound.cpp', \ - 'src/SoundBuffer.cpp', 'src/Listener.cpp', 'src/SoundRecorder.cpp', 'src/SoundBufferRecorder.cpp', \ - 'src/SoundStream.cpp', 'src/Font.cpp', 'src/Glyph.cpp', 'src/Shape.cpp', 'src/WindowSettings.cpp' ], \ - libraries=['sfml-graphics', 'sfml-window', 'sfml-audio', 'sfml-system'], \ - library_dirs=['../lib/mingw'], \ + ext_modules=[ Extension('PySFML.sf', + ['src/Clock.cpp', 'src/Color.cpp', 'src/Drawable.cpp', + 'src/Event.cpp', 'src/Image.cpp', 'src/Input.cpp', 'src/Key.cpp', 'src/main.cpp', 'src/Music.cpp', + 'src/PostFX.cpp', 'src/Rect.cpp', 'src/RenderWindow.cpp', 'src/Sleep.cpp', + 'src/Sprite.cpp', 'src/String.cpp', 'src/VideoMode.cpp', 'src/View.cpp', 'src/Window.cpp', + 'src/Joy.cpp', 'src/Mouse.cpp', 'src/WindowStyle.cpp', 'src/Blend.cpp', 'src/Sound.cpp', + 'src/SoundBuffer.cpp', 'src/Listener.cpp', 'src/SoundRecorder.cpp', 'src/SoundBufferRecorder.cpp', + 'src/SoundStream.cpp', 'src/Font.cpp', 'src/Glyph.cpp', 'src/Shape.cpp', 'src/WindowSettings.cpp'], + libraries=['sfml-graphics', 'sfml-window', 'sfml-audio', 'sfml-system'], + library_dirs=['../lib/mingw'], include_dirs=['../include'] )], package_dir = {'PySFML':'PySFML'}, diff --git a/python/src/Joy.cpp b/python/src/Joy.cpp index 7f20f68f..fdce88c6 100644 --- a/python/src/Joy.cpp +++ b/python/src/Joy.cpp @@ -101,5 +101,14 @@ void PySfJoy_InitConst() obj = PyLong_FromLong(sf::Joy::AxisPOV); PyDict_SetItemString(PySfJoyType.tp_dict, "AxisPOV", obj); Py_DECREF(obj); + obj = PyLong_FromLong(sf::Joy::Count); + PyDict_SetItemString(PySfJoyType.tp_dict, "Count", obj); + Py_DECREF(obj); + obj = PyLong_FromLong(sf::Joy::AxisCount); + PyDict_SetItemString(PySfJoyType.tp_dict, "AxisCount", obj); + Py_DECREF(obj); + obj = PyLong_FromLong(sf::Joy::ButtonCount); + PyDict_SetItemString(PySfJoyType.tp_dict, "ButtonCount", obj); + Py_DECREF(obj); } diff --git a/python/src/Mouse.cpp b/python/src/Mouse.cpp index d0165efc..f2fe2097 100644 --- a/python/src/Mouse.cpp +++ b/python/src/Mouse.cpp @@ -95,5 +95,8 @@ void PySfMouse_InitConst() obj = PyLong_FromLong(sf::Mouse::XButton2); PyDict_SetItemString(PySfMouseType.tp_dict, "XButton2", obj); Py_DECREF(obj); + obj = PyLong_FromLong(sf::Mouse::ButtonCount); + PyDict_SetItemString(PySfMouseType.tp_dict, "ButtonCount", obj); + Py_DECREF(obj); }