mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed some missing reference in sfml-graphics initiation function. The shared classes has to be global and reacquired in each library for it to work.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1798 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
e63a8fe442
commit
1fad97be6d
@ -70,15 +70,15 @@ static void CreateBlendEnum( void )
|
|||||||
void Init_graphics( void )
|
void Init_graphics( void )
|
||||||
{
|
{
|
||||||
/* SFML namespace which contains the classes of this module. */
|
/* SFML namespace which contains the classes of this module. */
|
||||||
/*globalSFMLNamespace = rb_define_module( "SFML" );*/
|
globalSFMLNamespace = rb_define_module( "SFML" );
|
||||||
if( CheckDependencies() == false )
|
if( CheckDependencies() == false )
|
||||||
{
|
{
|
||||||
rb_raise( rb_eRuntimeError, "This module depends on sfml-window" );
|
rb_raise( rb_eRuntimeError, "This module depends on sfml-window" );
|
||||||
}
|
}
|
||||||
/*globalVector2Class = RetrieveSFMLClass( "Vector2" );
|
globalVector2Class = RetrieveSFMLClass( "Vector2" );
|
||||||
globalVector3Class = RetrieveSFMLClass( "Vector3" );*/
|
globalVector3Class = RetrieveSFMLClass( "Vector3" );
|
||||||
globalWindowClass = RetrieveSFMLClass( "Window" );
|
globalWindowClass = RetrieveSFMLClass( "Window" );
|
||||||
/*globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" );*/
|
globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" );
|
||||||
rb_define_const(globalSFMLNamespace, "GraphicsLoaded", Qtrue);
|
rb_define_const(globalSFMLNamespace, "GraphicsLoaded", Qtrue);
|
||||||
|
|
||||||
CreateBlendEnum();
|
CreateBlendEnum();
|
||||||
|
@ -162,7 +162,6 @@ void Init_window( void )
|
|||||||
rb_raise( rb_eRuntimeError, "This module depends on sfml-system" );
|
rb_raise( rb_eRuntimeError, "This module depends on sfml-system" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
globalVector2Class = rb_define_class_under(globalSFMLNamespace, "Vector2", rb_cObject );
|
globalVector2Class = rb_define_class_under(globalSFMLNamespace, "Vector2", rb_cObject );
|
||||||
globalNonCopyableModule = rb_define_module_under(globalSFMLNamespace, "NonCopyable");
|
globalNonCopyableModule = rb_define_module_under(globalSFMLNamespace, "NonCopyable");
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
|
|
||||||
|
extern VALUE globalNonCopyableModule;
|
||||||
|
|
||||||
void Init_NonCopyable( void );
|
void Init_NonCopyable( void );
|
||||||
|
|
||||||
#endif // SFML_RUBYEXT_NON_COPYABLE_HEADER_
|
#endif // SFML_RUBYEXT_NON_COPYABLE_HEADER_
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
|
|
||||||
|
extern VALUE globalVector2Class;
|
||||||
|
|
||||||
VALUE Vector2_GetX( VALUE self );
|
VALUE Vector2_GetX( VALUE self );
|
||||||
VALUE Vector2_GetY( VALUE self );
|
VALUE Vector2_GetY( VALUE self );
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
|
|
||||||
|
extern VALUE globalVector3Class;
|
||||||
|
|
||||||
VALUE Vector3_GetX( VALUE self );
|
VALUE Vector3_GetX( VALUE self );
|
||||||
VALUE Vector3_GetY( VALUE self );
|
VALUE Vector3_GetY( VALUE self );
|
||||||
VALUE Vector3_GetZ( VALUE self );
|
VALUE Vector3_GetZ( VALUE self );
|
||||||
|
Loading…
Reference in New Issue
Block a user