new directory structure for ruby binding should compile and link fine under windows

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1797 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
tricksterguy 2011-02-13 05:26:14 +00:00
parent 8675cb364c
commit e63a8fe442
17 changed files with 219 additions and 123 deletions

View file

@ -470,7 +470,7 @@ static VALUE Drawable_TransformToLocal( VALUE self, VALUE aPoint )
*/
static VALUE Drawable_TransformToGlobal( VALUE self, VALUE aPoint )
{
VALUE point = Vector2_ForceType( point );
VALUE point = Vector2_ForceType(point);
rbDrawable *object = NULL;
Data_Get_Struct( self, rbDrawable, object );
sf::Vector2f newPoint = object->TransformToGlobal( sf::Vector2f( NUM2DBL( Vector2_GetX( point ) ),

View file

@ -21,6 +21,9 @@
*/
#include "main.hpp"
#include "Vector2.hpp"
#include "Vector3.hpp"
#include "NonCopyable.hpp"
#include "Color.hpp"
#include "Rect.hpp"
#include "Drawable.hpp"
@ -39,14 +42,10 @@
#include <SFML/Graphics.hpp>
VALUE globalSFMLNamespace;
VALUE globalBlendNamespace;
/* External classes */
VALUE globalVector2Class;
VALUE globalVector3Class;
VALUE globalWindowClass;
VALUE globalNonCopyableModule;
static bool CheckDependencies( void )
{
@ -71,19 +70,19 @@ static void CreateBlendEnum( void )
void Init_graphics( void )
{
/* SFML namespace which contains the classes of this module. */
globalSFMLNamespace = rb_define_module( "SFML" );
/*globalSFMLNamespace = rb_define_module( "SFML" );*/
if( CheckDependencies() == false )
{
rb_raise( rb_eRuntimeError, "This module depends on sfml-window" );
}
globalVector2Class = RetrieveSFMLClass( "Vector2" );
globalVector3Class = RetrieveSFMLClass( "Vector3" );
/*globalVector2Class = RetrieveSFMLClass( "Vector2" );
globalVector3Class = RetrieveSFMLClass( "Vector3" );*/
globalWindowClass = RetrieveSFMLClass( "Window" );
globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" );
/*globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" );*/
rb_define_const(globalSFMLNamespace, "GraphicsLoaded", Qtrue);
CreateBlendEnum();
Init_Color();
Init_Rect();
Init_Drawable();

View file

@ -24,7 +24,7 @@
#define SFML_RUBYEXT_GRAPHICS_MAIN_HEADER_
#include "ruby.h"
#include "../../sfml-system/system/main.hpp"
#include "global.hpp"
// Ruby initiation function
extern "C" void Init_graphics( void );