Changed Window so where ever it uses SFML::Vector2 to access it's elements I use the helper functions.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1674 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-19 08:33:30 +00:00
parent 8335502866
commit 4b8ae2b817

View File

@ -323,8 +323,8 @@ static VALUE Window_SetCursorPosition2( VALUE self, VALUE anArgument )
VALUE argument = Vector2_ForceType( anArgument );
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE argumentX = rb_funcall( argument, rb_intern( "x" ), 0 );
VALUE argumentY = rb_funcall( argument, rb_intern( "y" ), 0 );
VALUE argumentX = Vector2_GetX( argument );
VALUE argumentY = Vector2_GetY( argument );
object->SetCursorPosition( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
return Qnil;
}
@ -431,8 +431,8 @@ static VALUE Window_SetPosition2( VALUE self, VALUE anArgument )
VALUE argument = Vector2_ForceType( anArgument );
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE argumentX = rb_funcall( argument, rb_intern( "x" ), 0 );
VALUE argumentY = rb_funcall( argument, rb_intern( "y" ), 0 );
VALUE argumentX = Vector2_GetX( argument );
VALUE argumentY = Vector2_GetY( argument );
object->SetPosition( FIX2UINT( argumentX ), FIX2INT( argumentY ) );
return Qnil;
}
@ -460,8 +460,8 @@ static VALUE Window_SetSize2( VALUE self, VALUE anArgument )
VALUE argument = Vector2_ForceType( anArgument );
sf::Window *object = NULL;
Data_Get_Struct( self, sf::Window, object );
VALUE argumentX = rb_funcall( argument, rb_intern( "x" ), 0 );
VALUE argumentY = rb_funcall( argument, rb_intern( "y" ), 0 );
VALUE argumentX = Vector2_GetX( argument );
VALUE argumentY = Vector2_GetY( argument );
object->SetSize( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
return Qnil;
}