diff --git a/bindings/ruby/sfml-graphics/extconf.rb b/bindings/ruby/sfml-graphics/extconf.rb index 2b5addbf..b93a5ce2 100644 --- a/bindings/ruby/sfml-graphics/extconf.rb +++ b/bindings/ruby/sfml-graphics/extconf.rb @@ -22,6 +22,6 @@ require 'mkmf' dir_config("graphics") -have_library("sfml-graphics") +have_library("sfml-graphics") find_header("main.hpp", "../sfml-system/system") create_makefile("sfml/graphics", "graphics") diff --git a/bindings/ruby/sfml-graphics/graphics/main.cpp b/bindings/ruby/sfml-graphics/graphics/main.cpp index 848ae5c2..10c84777 100644 --- a/bindings/ruby/sfml-graphics/graphics/main.cpp +++ b/bindings/ruby/sfml-graphics/graphics/main.cpp @@ -20,9 +20,10 @@ * source distribution. */ -#include "../../sfml-system/system/main.hpp" #include "main.hpp" #include "Color.hpp" +#include "Rect.hpp" +#include "Drawable.hpp" #include @@ -70,4 +71,6 @@ void Init_graphics( void ) rb_define_const(globalSFMLNamespace, "GraphicsLoaded", Qtrue); Init_Color(); + Init_Rect(); + Init_Drawable(); } diff --git a/bindings/ruby/sfml-graphics/graphics/main.hpp b/bindings/ruby/sfml-graphics/graphics/main.hpp index 7583a16a..0d644098 100644 --- a/bindings/ruby/sfml-graphics/graphics/main.hpp +++ b/bindings/ruby/sfml-graphics/graphics/main.hpp @@ -20,10 +20,11 @@ * source distribution. */ -#ifndef SFML_RUBYEXT_MAIN_HEADER_ -#define SFML_RUBYEXT_MAIN_HEADER_ +#ifndef SFML_RUBYEXT_GRAPHICS_MAIN_HEADER_ +#define SFML_RUBYEXT_GRAPHICS_MAIN_HEADER_ #include "ruby.h" +#include "../../sfml-system/system/main.hpp" // Ruby initiation function extern "C" void Init_graphics( void ); @@ -42,4 +43,4 @@ if( rb_obj_is_kind_of( variable, type ) != Qtrue ) \ #define rb_define_singleton_method( klass, name, func, argc, ... ) rb_define_singleton_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ ) #define rb_define_method( klass, name, func, argc, ... ) rb_define_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ ) -#endif // SFML_RUBYEXT_MAIN_HEADER_ +#endif // SFML_RUBYEXT_GRAPHICS_MAIN_HEADER_ diff --git a/bindings/ruby/sfml-system/system/main.hpp b/bindings/ruby/sfml-system/system/main.hpp index d37d97a6..e8786378 100644 --- a/bindings/ruby/sfml-system/system/main.hpp +++ b/bindings/ruby/sfml-system/system/main.hpp @@ -20,8 +20,8 @@ * source distribution. */ -#ifndef SFML_RUBYEXT_MAIN_HEADER_ -#define SFML_RUBYEXT_MAIN_HEADER_ +#ifndef SFML_RUBYEXT_SYSTEM_MAIN_HEADER_ +#define SFML_RUBYEXT_SYSTEM_MAIN_HEADER_ #include "ruby.h" @@ -35,4 +35,4 @@ typedef VALUE ( *RubyFunctionPtr )( ... ); #define rb_define_singleton_method( klass, name, func, argc, ... ) rb_define_singleton_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ ) #define rb_define_method( klass, name, func, argc, ... ) rb_define_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ ) -#endif // SFML_RUBYEXT_MAIN_HEADER_ +#endif // SFML_RUBYEXT_SYSTEM_MAIN_HEADER_ diff --git a/bindings/ruby/sfml-window/window/main.cpp b/bindings/ruby/sfml-window/window/main.cpp index 4621d98c..9ba82559 100644 --- a/bindings/ruby/sfml-window/window/main.cpp +++ b/bindings/ruby/sfml-window/window/main.cpp @@ -20,7 +20,6 @@ * source distribution. */ -#include "../../sfml-system/system/main.hpp" #include "main.hpp" #include "Context.hpp" #include "ContextSettings.hpp" diff --git a/bindings/ruby/sfml-window/window/main.hpp b/bindings/ruby/sfml-window/window/main.hpp index 8be00af7..647b1258 100644 --- a/bindings/ruby/sfml-window/window/main.hpp +++ b/bindings/ruby/sfml-window/window/main.hpp @@ -20,10 +20,11 @@ * source distribution. */ -#ifndef SFML_RUBYEXT_MAIN_HEADER_ -#define SFML_RUBYEXT_MAIN_HEADER_ +#ifndef SFML_RUBYEXT_WINDOW_MAIN_HEADER_ +#define SFML_RUBYEXT_WINDOW_MAIN_HEADER_ #include "ruby.h" +#include "../../sfml-system/system/main.hpp" // Ruby initiation function extern "C" void Init_window( void ); @@ -39,4 +40,4 @@ if( rb_obj_is_kind_of( variable, type ) != Qtrue ) \ #define rb_define_singleton_method( klass, name, func, argc, ... ) rb_define_singleton_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ ) #define rb_define_method( klass, name, func, argc, ... ) rb_define_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ ) -#endif // SFML_RUBYEXT_MAIN_HEADER_ +#endif // SFML_RUBYEXT_WINDOW_MAIN_HEADER_