From: Javier Sancho Date: Sun, 9 May 2021 18:27:53 +0000 (+0200) Subject: Quit regular expressions X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=5473c4a53d06649a3041cee0ce329e9af0eaf14e;p=guile-irrlicht.git Quit regular expressions --- diff --git a/examples/01-hello-world.scm b/examples/01-hello-world.scm index 5269400..38f54a3 100644 --- a/examples/01-hello-world.scm +++ b/examples/01-hello-world.scm @@ -63,7 +63,7 @@ ;; draw everything (let ((back-buffer #t) (z-buffer #t) - (color (make #:args '(255 100 101 140)))) + (color (make #:args '(255 100 101 140)))) (while (run device) (begin-scene driver back-buffer z-buffer color) (draw-all scene-manager) diff --git a/irrlicht.i b/irrlicht.i index 8e90421..b20f39a 100644 --- a/irrlicht.i +++ b/irrlicht.i @@ -31,41 +31,41 @@ using namespace io; using namespace gui; %} -%typecheck(SWIG_TYPECHECK_POINTER) const IRR_CHAR_TYPE & +%typecheck (SWIG_TYPECHECK_POINTER) const IRR_CHAR_TYPE & { $1 = scm_is_string ($input); } -%typemap(in) const IRR_CHAR_TYPE & +%typemap (in) const IRR_CHAR_TYPE & { $1 = ($ltype) scm_to_utf8_string ($input); } -%typemap(freearg) const IRR_CHAR_TYPE & +%typemap (freearg) const IRR_CHAR_TYPE & { free ($1); } -%typecheck(SWIG_TYPECHECK_POINTER) const IRR_WCHAR_TYPE & +%typecheck (SWIG_TYPECHECK_POINTER) const IRR_WCHAR_TYPE & { $1 = scm_is_string ($input); } -%typemap(in) const IRR_WCHAR_TYPE & +%typemap (in) const IRR_WCHAR_TYPE & { $1 = ($ltype) scm_to_utf32_string ($input); } -%typemap(freearg) const IRR_WCHAR_TYPE & +%typemap (freearg) const IRR_WCHAR_TYPE & { free ($1); } -%typecheck(SWIG_TYPECHECK_POINTER) const IRR_IO_PATH & +%typecheck (SWIG_TYPECHECK_POINTER) const IRR_IO_PATH & { $1 = scm_is_string ($input); } -%typemap(in) const IRR_IO_PATH & +%typemap (in) const IRR_IO_PATH & { $1 = new $*1_ltype (scm_to_utf8_string ($input)); } -%typemap(freearg) const IRR_IO_PATH & +%typemap (freearg) const IRR_IO_PATH & { delete $1; } @@ -82,11 +82,17 @@ typedef double f64; #define _IRR_DEPRECATED_ -%rename(add) operator+; -%rename(substract) operator-; -%rename(product) operator*; -%rename(divide) operator/; -%rename(equal) operator==; +%rename (add) operator+; +%rename (substract) operator-; +%rename (product) operator*; +%rename (divide) operator/; +%rename (equal) operator==; +%rename (not_equal) operator!=; +%rename (less) operator<; +%rename (less_equal) operator<=; +%rename (greater) operator>; +%rename (greater_equal) operator>=; +%ignore operator=; %ignore operator+=; %ignore operator-=; %ignore operator*=; @@ -94,67 +100,78 @@ typedef double f64; %ignore operator!=; %include dimension2d.h -%template(dimension2df) irr::core::dimension2d; -%template(dimension2du) irr::core::dimension2d; -%template(dimension2di) irr::core::dimension2d; +%template (dimension2df) irr::core::dimension2d; +%template (dimension2du) irr::core::dimension2d; +%template (dimension2di) irr::core::dimension2d; %include rect.h -%template(rectf) irr::core::rect; -%template(recti) irr::core::rect; +%template (rectf) irr::core::rect; +%template (recti) irr::core::rect; %include vector3d.h -%template(vector3df) irr::core::vector3d; -%template(vector3di) irr::core::vector3d; +%template (vector3df) irr::core::vector3d; +%template (vector3di) irr::core::vector3d; -%rename("%(undercase)s", %$not %$isconstant, %$not %$isenumitem) ""; -%feature("constasvar"); +%rename ("%(undercase)s", %$not %$isconstant, %$not %$isenumitem) ""; +%feature ("constasvar"); %include EDriverTypes.h %include EMaterialFlags.h %include IrrCompileConfig.h -%rename("%(regex:/(.*)SColor(.*)/\\1s_color\\2/)s") ""; -%rename(get_color_alpha) irr::video::SColor::getAlpha; -%rename(get_color_red) irr::video::SColor::getRed; -%rename(get_color_green) irr::video::SColor::getGreen; -%rename(get_color_blue) irr::video::SColor::getBlue; -%rename(get_color_average) irr::video::SColor::getAverage; -%rename(get_colorf_alpha) irr::video::SColorf::getAlpha; -%rename(get_colorf_red) irr::video::SColorf::getRed; -%rename(get_colorf_green) irr::video::SColorf::getGreen; -%rename(get_colorf_blue) irr::video::SColorf::getBlue; -%rename(get_colorf_average) irr::video::SColorf::getAverage; +%rename (color) irr::video::SColor; +%rename (color) irr::video::SColor::SColor; +%rename (xcolor) irr::video::SColor::color; +%rename (get_color_alpha) irr::video::SColor::getAlpha; +%rename (get_color_red) irr::video::SColor::getRed; +%rename (get_color_green) irr::video::SColor::getGreen; +%rename (get_color_blue) irr::video::SColor::getBlue; +%rename (get_color_average) irr::video::SColor::getAverage; +%rename (get_colorf_alpha) irr::video::SColorf::getAlpha; +%rename (get_colorf_red) irr::video::SColorf::getRed; +%rename (get_colorf_green) irr::video::SColorf::getGreen; +%rename (get_colorf_blue) irr::video::SColorf::getBlue; +%rename (get_colorf_average) irr::video::SColorf::getAverage; %include SColor.h -%rename("%(regex:/(.*)IAnimatedMesh(.*)/\\1animated_mesh\\2/)s") ""; -%rename (set_md2_animation) setMD2Animation; +%include IReferenceCounted.h +%include IAttributeExchangingObject.h + +%include IMesh.h + +%rename (animated_mesh) irr::scene::IAnimatedMesh; %include IAnimatedMesh.h + %include IAnimatedMeshMD2.h %include SAnimatedMesh.h -%rename("%(regex:/(.*)ISceneNode(.*)/\\1scene_node\\2/)s") ""; +%rename (scene_node) irr::scene::ISceneNode; %include ISceneNode.h -%rename("%(regex:/(.*)IAnimatedMeshSceneNode(.*)/\\1animated_mesh_scene_node\\2/)s") ""; +%rename (animated_mesh_scene_node) irr::scene::IAnimatedMeshSceneNode; +%rename (set_md2_animation) irr::scene::IAnimatedMeshSceneNode::setMD2Animation; %include IAnimatedMeshSceneNode.h -%rename("%(regex:/(.*)IGUIStaticText(.*)/\\1gui_static_text\\2/)s") ""; +%include IEventReceiver.h +%include IGUIElement.h + +%rename (gui_static_text) irr::gui::IGUIStaticText; %include IGUIStaticText.h -%rename(get_gui_environment) getGUIEnvironment; -%rename("%(regex:/(.*)IGUIEnvironment(.*)/\\1gui_environment\\2/)s") ""; +%rename (get_gui_environment) getGUIEnvironment; +%rename (gui_environment) irr::gui::IGUIEnvironment; %include IGUIEnvironment.h -%rename("%(regex:/(.*)ISceneManager(.*)/\\1scene_manager\\2/)s") ""; +%rename (scene_manager) irr::scene::ISceneManager; %include ISceneManager.h %ignore irr::video::IVideoDriver::createImage; -%rename(apply_material) apply; -%rename("%(regex:/(.*)IVideoDriver(.*)/\\1video_driver\\2/)s") ""; +%rename (apply_material) apply; +%rename (video_driver) irr::video::IVideoDriver; %include IVideoDriver.h -%rename(yield_device) yield; -%rename(sleep_device) sleep; +%rename (yield_device) yield; +%rename (sleep_device) sleep; %include IrrlichtDevice.h %include irrlicht.h