mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Added comments to the ruby wrapper functions. Hopefully they comply with rdoc and the ruby standard so I can generate a good documentation later.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1592 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
bd16e0fc40
commit
562547b0ee
@ -2,13 +2,23 @@
|
|||||||
#include "System.hpp"
|
#include "System.hpp"
|
||||||
#include <SFML/System/Clock.hpp>
|
#include <SFML/System/Clock.hpp>
|
||||||
|
|
||||||
|
/* Clock class */
|
||||||
VALUE globalClockClass;
|
VALUE globalClockClass;
|
||||||
|
|
||||||
|
/* Free a heap allocated object
|
||||||
|
* Not accessible trough ruby directly!
|
||||||
|
*/
|
||||||
static void Clock_Free( sf::Clock *anObject )
|
static void Clock_Free( sf::Clock *anObject )
|
||||||
{
|
{
|
||||||
delete anObject;
|
delete anObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* call-seq:
|
||||||
|
* clock.getElapsedTime() -> Float
|
||||||
|
*
|
||||||
|
* This function returns the time elapsed since the last call to Reset()
|
||||||
|
* (or the construction of the instance if Reset() has not been called) in seconds.
|
||||||
|
*/
|
||||||
static VALUE Clock_GetElapsedTime( VALUE self )
|
static VALUE Clock_GetElapsedTime( VALUE self )
|
||||||
{
|
{
|
||||||
sf::Clock *object = NULL;
|
sf::Clock *object = NULL;
|
||||||
@ -16,6 +26,11 @@ static VALUE Clock_GetElapsedTime( VALUE self )
|
|||||||
return rb_float_new( object->GetElapsedTime() );
|
return rb_float_new( object->GetElapsedTime() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* call-seq:
|
||||||
|
* clock.reset() -> nil
|
||||||
|
*
|
||||||
|
* This function puts the time counter back to zero.
|
||||||
|
*/
|
||||||
static VALUE Clock_Reset( VALUE self )
|
static VALUE Clock_Reset( VALUE self )
|
||||||
{
|
{
|
||||||
sf::Clock *object = NULL;
|
sf::Clock *object = NULL;
|
||||||
@ -24,6 +39,11 @@ static VALUE Clock_Reset( VALUE self )
|
|||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* call-seq:
|
||||||
|
* Clock.new() -> clock
|
||||||
|
*
|
||||||
|
* The clock starts automatically after being constructed.
|
||||||
|
*/
|
||||||
static VALUE Clock_New( VALUE aKlass )
|
static VALUE Clock_New( VALUE aKlass )
|
||||||
{
|
{
|
||||||
sf::Clock *object = new sf::Clock();
|
sf::Clock *object = new sf::Clock();
|
||||||
|
Loading…
Reference in New Issue
Block a user