From 98052b04792129db97286fdd77ef3b0de8912286 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Mon, 11 May 2020 08:15:17 +0200 Subject: [PATCH] call remote procs from guile code --- irrlicht/base.scm | 4 +- irrlicht/device.scm | 14 ++- irrlicht/foreign.scm | 23 +++- irrlicht/gui.scm | 26 +++-- irrlicht/io.scm | 3 +- irrlicht/irr.scm | 6 +- irrlicht/scene.scm | 3 +- src/animated-mesh-scene-node.cpp | 18 +-- src/animated-mesh.cpp | 7 +- src/box3d.cpp | 19 ++-- src/cursor-control.cpp | 12 +- src/device.cpp | 19 ++-- src/file-system.cpp | 16 +-- src/gui-environment.cpp | 132 +++++++++++----------- src/gui-in-out-fader.cpp | 8 +- src/gui-listbox.cpp | 8 +- src/gui-scrollbar.cpp | 16 +-- src/gui-skin.cpp | 28 ++--- src/gui-toolbar.cpp | 18 +-- src/reference-counted.cpp | 3 +- src/scene-manager.cpp | 183 +++++++++++++++---------------- src/scene-node.cpp | 122 ++++++++++----------- src/video-driver.cpp | 56 +++++----- 23 files changed, 383 insertions(+), 361 deletions(-) diff --git a/irrlicht/base.scm b/irrlicht/base.scm index 4f08eef..4a5d9ae 100644 --- a/irrlicht/base.scm +++ b/irrlicht/base.scm @@ -22,7 +22,9 @@ #:use-module (oop goops) #:use-module (system foreign) #:export ( + irr-class irr-pointer)) (define-class () - (irr-pointer #:init-value %null-pointer #:accessor irr-pointer #:init-keyword #:irr-pointer)) + (irr-class #:init-value "" #:getter irr-class) + (irr-pointer #:init-value %null-pointer #:getter irr-pointer #:init-keyword #:irr-pointer)) diff --git a/irrlicht/device.scm b/irrlicht/device.scm index 6049016..b75d4d3 100644 --- a/irrlicht/device.scm +++ b/irrlicht/device.scm @@ -29,7 +29,8 @@ ;; IrrlichtDevice -(define-class ()) +(define-class () + (irr-class #:init-value "IrrlichtDevice" #:getter irr-class)) (define* (create-device #:key (device-type 'software) @@ -46,7 +47,7 @@ (make #:irr-pointer - (irr_createDevice + ((get-irrlicht-proc "createDevice") device-type window-size bits @@ -57,17 +58,18 @@ (define-method (get-gui-environment (device )) (make - #:irr-pointer (irr_IrrlichtDevice_getGUIEnvironment (irr-pointer device)))) + #:irr-pointer ((get-irrlicht-proc "getGUIEnvironment" device) (irr-pointer device)))) (define-method (get-scene-manager (device )) (make - #:irr-pointer (irr_IrrlichtDevice_getSceneManager (irr-pointer device)))) + #:irr-pointer ((get-irrlicht-proc "getSceneManager" device) (irr-pointer device)))) (define-method (get-video-driver (device )) (make - #:irr-pointer (irr_IrrlichtDevice_getVideoDriver (irr-pointer device)))) + #:irr-pointer ((get-irrlicht-proc "getVideoDriver" device) (irr-pointer device)))) (define-method (set-window-caption! (device ) text) - (irr_IrrlichtDevice_setWindowCaption (irr-pointer device) text)) + ((get-irrlicht-proc "setWindowCaption" device) + (irr-pointer device) text)) (export create-device get-gui-environment get-scene-manager get-video-driver set-window-caption!) diff --git a/irrlicht/foreign.scm b/irrlicht/foreign.scm index ff46223..f6e2036 100644 --- a/irrlicht/foreign.scm +++ b/irrlicht/foreign.scm @@ -18,6 +18,25 @@ ;;; . -(define-module (irrlicht foreign)) +(define-module (irrlicht foreign) + #:use-module (irrlicht base) + #:export (get-irrlicht-proc)) -(load-extension "libguile-irrlicht" "init_guile_irrlicht") +;; We use a hash table to store foreign irrlicht methods related with their +;; classes +;; This is needed because we need to "simulate" C++ inheritance +(define remote-proc-table (make-hash-table)) + +(define (get-irrlicht-proc proc-name . objects) + (let* ((name (if (null? objects) + proc-name + (let ((classes (map irr-class objects))) + (string-join (cons (car classes) (cons proc-name (cdr classes))) "_")))) + (proc (hash-ref remote-proc-table name))) + (cond ((not proc) + (load-extension "libguile-irrlicht" "init_guile_irrlicht") + (let ((new-proc (eval-string name))) + (hash-set! remote-proc-table name new-proc) + new-proc)) + (else + proc)))) diff --git a/irrlicht/gui.scm b/irrlicht/gui.scm index e6e4ab3..aa12d37 100644 --- a/irrlicht/gui.scm +++ b/irrlicht/gui.scm @@ -28,13 +28,15 @@ ;; IGUIElement -(define-class ( )) +(define-class ( ) + (irr-class #:init-value "IGUIElement" #:getter irr-class)) (export ) ;; IGUIEnvironment -(define-class ()) +(define-class () + (irr-class #:init-value "IGUIEnvironment" #:getter irr-class)) (define-method (add-static-text! (gui-environment ) text rectangle . rest) (let-keywords rest #f @@ -45,19 +47,21 @@ (fill-background #f)) (make #:irr-pointer - (irr_gui_IGUIEnvironment_addStaticText (irr-pointer gui-environment) - text - rectangle - border - word-wrap - (irr-pointer parent) - id - fill-background)))) + ((get-irrlicht-proc "addStaticText" gui-environment parent) + (irr-pointer gui-environment) + text + rectangle + border + word-wrap + (irr-pointer parent) + id + fill-background)))) (export add-static-text!) ;; IGUIStaticText -(define-class ()) +(define-class () + (irr-class #:init-value "IGUIStaticText" #:getter irr-class)) (export ) diff --git a/irrlicht/io.scm b/irrlicht/io.scm index 73961bb..0229ac3 100644 --- a/irrlicht/io.scm +++ b/irrlicht/io.scm @@ -25,6 +25,7 @@ ;; IAttributeExchangingObject -(define-class ()) +(define-class () + (irr-class #:init-value "IAttributeExchangingObject" #:getter irr-class)) (export ) diff --git a/irrlicht/irr.scm b/irrlicht/irr.scm index 07e506a..2706793 100644 --- a/irrlicht/irr.scm +++ b/irrlicht/irr.scm @@ -25,12 +25,14 @@ ;; IReferenceCounted -(define-class ()) +(define-class () + (irr-class #:init-value "IReferenceCounted" #:getter irr-class)) (export ) ;; IEventReceiver -(define-class ()) +(define-class () + (irr-class #:init-value "IEventReceiver" #:getter irr-class)) (export ) diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 27f8946..e5cd422 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -25,6 +25,7 @@ ;; ISceneManager -(define-class ()) +(define-class () + (irr-class #:init-value "ISceneManager" #:getter irr-class)) (export ) diff --git a/src/animated-mesh-scene-node.cpp b/src/animated-mesh-scene-node.cpp index 474ef8f..498a196 100644 --- a/src/animated-mesh-scene-node.cpp +++ b/src/animated-mesh-scene-node.cpp @@ -30,9 +30,9 @@ using namespace irr; SCM -scene_IAnimatedMeshSceneNode_setFrameLoop (SCM animated_mesh_scene_node, - SCM begin, - SCM end) +IAnimatedMeshSceneNode_setFrameLoop (SCM animated_mesh_scene_node, + SCM begin, + SCM end) { return scm_from_bool (((scene::IAnimatedMeshSceneNode*)scm_to_pointer (animated_mesh_scene_node))-> @@ -42,8 +42,8 @@ scene_IAnimatedMeshSceneNode_setFrameLoop (SCM animated_mesh_scene_node, SCM -scene_IAnimatedMeshSceneNode_setMD2Animation (SCM animated_mesh_scene_node, - SCM anim) +IAnimatedMeshSceneNode_setMD2Animation (SCM animated_mesh_scene_node, + SCM anim) { return scm_from_bool (((scene::IAnimatedMeshSceneNode*)scm_to_pointer (animated_mesh_scene_node))-> @@ -56,10 +56,10 @@ extern "C" { void init_animated_mesh_scene_node (void) { - DEFINE_GSUBR ("scene_IAnimatedMeshSceneNode_setFrameLoop", 3, 0, 0, - scene_IAnimatedMeshSceneNode_setFrameLoop); - DEFINE_GSUBR ("scene_IAnimatedMeshSceneNode_setMD2Animation", 2, 0, 0, - scene_IAnimatedMeshSceneNode_setMD2Animation); + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setFrameLoop", 3, 0, 0, + IAnimatedMeshSceneNode_setFrameLoop); + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setMD2Animation", 2, 0, 0, + IAnimatedMeshSceneNode_setMD2Animation); } } diff --git a/src/animated-mesh.cpp b/src/animated-mesh.cpp index c7013b2..80b6229 100644 --- a/src/animated-mesh.cpp +++ b/src/animated-mesh.cpp @@ -29,8 +29,8 @@ using namespace irr; SCM -scene_IAnimatedMesh_setAnimationSpeed (SCM animated_mesh, - SCM frames_per_second) +IAnimatedMesh_setAnimationSpeed (SCM animated_mesh, + SCM frames_per_second) { ((scene::IAnimatedMesh*)scm_to_pointer (animated_mesh))-> setAnimationSpeed (scm_to_double (frames_per_second)); @@ -43,8 +43,7 @@ extern "C" { void init_animated_mesh (void) { - DEFINE_GSUBR ("scene_IAnimatedMesh_setAnimationSpeed", 2, 0, 0, - scene_IAnimatedMesh_setAnimationSpeed); + DEFINE_GSUBR ("IAnimatedMesh_setAnimationSpeed", 2, 0, 0, IAnimatedMesh_setAnimationSpeed); } } diff --git a/src/box3d.cpp b/src/box3d.cpp index f9a688b..71571b1 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -30,8 +30,8 @@ using namespace irr; SCM -core_aabbox3d_addInternalPoint (SCM box3d, - SCM point) +aabbox3d_addInternalPoint (SCM box3d, + SCM point) { ((core::aabbox3df*)scm_to_pointer (box3d))->addInternalPoint (scm_to_vector3df (point)); return SCM_UNSPECIFIED; @@ -39,7 +39,7 @@ core_aabbox3d_addInternalPoint (SCM box3d, SCM -core_aabbox3d_make () +aabbox3d_make () { core::aabbox3df* aabbox = new core::aabbox3df (); return scm_from_pointer ((void*)aabbox, NULL); @@ -47,8 +47,8 @@ core_aabbox3d_make () SCM -core_aabbox3d_reset (SCM box3d, - SCM init_value) +aabbox3d_reset (SCM box3d, + SCM init_value) { ((core::aabbox3df*)scm_to_pointer (box3d))->reset (scm_to_vector3df (init_value)); return SCM_UNSPECIFIED; @@ -60,12 +60,9 @@ extern "C" { void init_box3d (void) { - DEFINE_GSUBR ("core_aabbox3d_addInternalPoint", 2, 0, 0, - core_aabbox3d_addInternalPoint); - DEFINE_GSUBR ("core_aabbox3d_make", 0, 0, 0, - core_aabbox3d_make); - DEFINE_GSUBR ("core_aabbox3d_reset", 2, 0, 0, - core_aabbox3d_reset); + DEFINE_GSUBR ("aabbox3d_addInternalPoint", 2, 0, 0, aabbox3d_addInternalPoint); + DEFINE_GSUBR ("aabbox3d_make", 0, 0, 0, aabbox3d_make); + DEFINE_GSUBR ("aabbox3d_reset", 2, 0, 0, aabbox3d_reset); } } diff --git a/src/cursor-control.cpp b/src/cursor-control.cpp index 4efe056..79e31d9 100644 --- a/src/cursor-control.cpp +++ b/src/cursor-control.cpp @@ -30,7 +30,7 @@ using namespace irr; SCM -gui_ICursorControl_getPosition (SCM cursor_control) +ICursorControl_getPosition (SCM cursor_control) { return scm_from_position2d_s32 (((gui::ICursorControl*)scm_to_pointer (cursor_control))->getPosition ()); @@ -38,8 +38,8 @@ gui_ICursorControl_getPosition (SCM cursor_control) SCM -gui_ICursorControl_setPosition (SCM cursor_control, - SCM position) +ICursorControl_setPosition (SCM cursor_control, + SCM position) { ((gui::ICursorControl*)scm_to_pointer (cursor_control))-> setPosition (scm_to_position2d_s32 (position)); @@ -52,10 +52,8 @@ extern "C" { void init_cursor_control (void) { - DEFINE_GSUBR ("gui_ICursorControl_getPosition", 1, 0, 0, - gui_ICursorControl_getPosition); - DEFINE_GSUBR ("gui_ICursorControl_setPosition", 2, 0, 0, - gui_ICursorControl_setPosition); + DEFINE_GSUBR ("ICursorControl_getPosition", 1, 0, 0, ICursorControl_getPosition); + DEFINE_GSUBR ("ICursorControl_setPosition", 2, 0, 0, ICursorControl_setPosition); } } diff --git a/src/device.cpp b/src/device.cpp index 63db119..ed55170 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -31,15 +31,14 @@ using namespace irr; -template SCM -createDevice (SCM device_type, - SCM window_size, - SCM bits, - SCM fullscreen, - SCM stencilbuffer, - SCM vsync, - SCM receiver) +irr_createDevice (SCM device_type, + SCM window_size, + SCM bits, + SCM fullscreen, + SCM stencilbuffer, + SCM vsync, + SCM receiver) { IrrlichtDevice* device = createDevice (scm_to_driver_type (device_type), @@ -48,7 +47,7 @@ createDevice (SCM device_type, scm_to_bool (fullscreen), scm_to_bool (stencilbuffer), scm_to_bool (vsync), - (TEventReceiver)scm_to_pointer (receiver)); + (IEventReceiver*)scm_to_pointer (receiver)); return scm_from_pointer ((void*)device, NULL); } @@ -167,7 +166,7 @@ extern "C" { void init_device (void) { - DEFINE_GSUBR ("createDevice_IEventReceiver", 7, 0, 0, createDevice); + DEFINE_GSUBR ("createDevice", 7, 0, 0, irr_createDevice); DEFINE_GSUBR ("IrrlichtDevice_getCursorControl", 1, 0, 0, IrrlichtDevice_getCursorControl); DEFINE_GSUBR ("IrrlichtDevice_getFileSystem", 1, 0, 0, IrrlichtDevice_getFileSystem); DEFINE_GSUBR ("IrrlichtDevice_getGUIEnvironment", 1, 0, 0, IrrlichtDevice_getGUIEnvironment); diff --git a/src/file-system.cpp b/src/file-system.cpp index 76892ef..5b872a5 100644 --- a/src/file-system.cpp +++ b/src/file-system.cpp @@ -30,13 +30,13 @@ using namespace irr; SCM -io_IFileSystem_addFileArchive (SCM file_system, - SCM filename, - SCM ignore_case, - SCM ignore_paths, - SCM archive_type, - SCM password, - SCM ret_archive) +IFileSystem_addFileArchive (SCM file_system, + SCM filename, + SCM ignore_case, + SCM ignore_paths, + SCM archive_type, + SCM password, + SCM ret_archive) { io::IFileArchive* retArchive = (io::IFileArchive*)scm_to_pointer (ret_archive); io::IFileArchive** retArchiveReference = 0; @@ -61,7 +61,7 @@ extern "C" { void init_file_system (void) { - DEFINE_GSUBR ("io_IFileSystem_addFileArchive", 7, 0, 0, io_IFileSystem_addFileArchive); + DEFINE_GSUBR ("IFileSystem_addFileArchive", 7, 0, 0, IFileSystem_addFileArchive); } } diff --git a/src/gui-environment.cpp b/src/gui-environment.cpp index 420b6a6..92e4a7b 100644 --- a/src/gui-environment.cpp +++ b/src/gui-environment.cpp @@ -33,12 +33,12 @@ using namespace irr; template SCM -gui_IGUIEnvironment_addButton (SCM gui_environment, - SCM rectangle, - SCM parent, - SCM id, - SCM text, - SCM tooltiptext) +IGUIEnvironment_addButton (SCM gui_environment, + SCM rectangle, + SCM parent, + SCM id, + SCM text, + SCM tooltiptext) { gui::IGUIButton* button = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> @@ -53,12 +53,12 @@ gui_IGUIEnvironment_addButton (SCM gui_environment, template SCM -gui_IGUIEnvironment_addEditBox (SCM gui_environment, - SCM text, - SCM rectangle, - SCM border, - SCM parent, - SCM id) +IGUIEnvironment_addEditBox (SCM gui_environment, + SCM text, + SCM rectangle, + SCM border, + SCM parent, + SCM id) { gui::IGUIEditBox* editbox = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> @@ -73,13 +73,13 @@ gui_IGUIEnvironment_addEditBox (SCM gui_environment, template SCM -gui_IGUIEnvironment_addImage (SCM gui_environment, - SCM image, - SCM position, - SCM use_alpha_channel, - SCM parent, - SCM id, - SCM text) +IGUIEnvironment_addImage (SCM gui_environment, + SCM image, + SCM position, + SCM use_alpha_channel, + SCM parent, + SCM id, + SCM text) { gui::IGUIEnvironment* guienv = (gui::IGUIEnvironment*)scm_to_pointer (gui_environment); gui::IGUIImage* new_image = @@ -95,11 +95,11 @@ gui_IGUIEnvironment_addImage (SCM gui_environment, template SCM -gui_IGUIEnvironment_addListBox (SCM gui_environment, - SCM rectangle, - SCM parent, - SCM id, - SCM draw_background) +IGUIEnvironment_addListBox (SCM gui_environment, + SCM rectangle, + SCM parent, + SCM id, + SCM draw_background) { gui::IGUIListBox* listbox = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> @@ -113,11 +113,11 @@ gui_IGUIEnvironment_addListBox (SCM gui_environment, template SCM -gui_IGUIEnvironment_addScrollBar (SCM gui_environment, - SCM horizontal, - SCM rectangle, - SCM parent, - SCM id) +IGUIEnvironment_addScrollBar (SCM gui_environment, + SCM horizontal, + SCM rectangle, + SCM parent, + SCM id) { gui::IGUIScrollBar* scrollbar = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> @@ -131,14 +131,14 @@ gui_IGUIEnvironment_addScrollBar (SCM gui_environment, template SCM -gui_IGUIEnvironment_addStaticText (SCM gui_environment, - SCM text, - SCM rectangle, - SCM border, - SCM word_wrap, - SCM parent, - SCM id, - SCM fill_background) +IGUIEnvironment_addStaticText (SCM gui_environment, + SCM text, + SCM rectangle, + SCM border, + SCM word_wrap, + SCM parent, + SCM id, + SCM fill_background) { gui::IGUIStaticText* static_text = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> @@ -155,12 +155,12 @@ gui_IGUIEnvironment_addStaticText (SCM gui_environment, template SCM -gui_IGUIEnvironment_addWindow (SCM gui_environment, - SCM rectangle, - SCM modal, - SCM text, - SCM parent, - SCM id) +IGUIEnvironment_addWindow (SCM gui_environment, + SCM rectangle, + SCM modal, + SCM text, + SCM parent, + SCM id) { gui::IGUIWindow* window = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> @@ -174,7 +174,7 @@ gui_IGUIEnvironment_addWindow (SCM gui_environment, SCM -gui_IGUIEnvironment_drawAll (SCM gui_environment) +IGUIEnvironment_drawAll (SCM gui_environment) { ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))->drawAll (); return SCM_UNSPECIFIED; @@ -182,7 +182,7 @@ gui_IGUIEnvironment_drawAll (SCM gui_environment) SCM -gui_IGUIEnvironment_getBuiltInFont (SCM gui_environment) +IGUIEnvironment_getBuiltInFont (SCM gui_environment) { gui::IGUIFont* font = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))->getBuiltInFont (); @@ -191,8 +191,8 @@ gui_IGUIEnvironment_getBuiltInFont (SCM gui_environment) SCM -gui_IGUIEnvironment_getFont (SCM gui_environment, - SCM filename) +IGUIEnvironment_getFont (SCM gui_environment, + SCM filename) { gui::IGUIFont* font = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> @@ -202,7 +202,7 @@ gui_IGUIEnvironment_getFont (SCM gui_environment, SCM -gui_IGUIEnvironment_getSkin (SCM gui_environment) +IGUIEnvironment_getSkin (SCM gui_environment) { gui::IGUISkin* skin = ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))->getSkin (); @@ -215,24 +215,24 @@ extern "C" { void init_gui_environment (void) { - DEFINE_GSUBR ("gui_IGUIEnvironment_addButton_IGUIElement", 6, 0, 0, - gui_IGUIEnvironment_addButton); - DEFINE_GSUBR ("gui_IGUIEnvironment_addEditBox_IGUIElement", 6, 0, 0, - gui_IGUIEnvironment_addEditBox); - DEFINE_GSUBR ("gui_IGUIEnvironment_addImage_IGUIElement", 7, 0, 0, - gui_IGUIEnvironment_addImage); - DEFINE_GSUBR ("gui_IGUIEnvironment_addListBox_IGUIElement", 5, 0, 0, - gui_IGUIEnvironment_addListBox); - DEFINE_GSUBR ("gui_IGUIEnvironment_addScrollBar_IGUIElement", 5, 0, 0, - gui_IGUIEnvironment_addScrollBar); - DEFINE_GSUBR ("gui_IGUIEnvironment_addStaticText_IGUIElement", 8, 0, 0, - gui_IGUIEnvironment_addStaticText); - DEFINE_GSUBR ("gui_IGUIEnvironment_addWindow_IGUIElement", 6, 0, 0, - gui_IGUIEnvironment_addWindow); - DEFINE_GSUBR ("gui_IGUIEnvironment_drawAll", 1, 0, 0, gui_IGUIEnvironment_drawAll); - DEFINE_GSUBR ("gui_IGUIEnvironment_getBuiltInFont", 1, 0, 0, gui_IGUIEnvironment_getBuiltInFont); - DEFINE_GSUBR ("gui_IGUIEnvironment_getFont", 2, 0, 0, gui_IGUIEnvironment_getFont); - DEFINE_GSUBR ("gui_IGUIEnvironment_getSkin", 1, 0, 0, gui_IGUIEnvironment_getSkin); + DEFINE_GSUBR ("IGUIEnvironment_addButton_IGUIElement", 6, 0, 0, + IGUIEnvironment_addButton); + DEFINE_GSUBR ("IGUIEnvironment_addEditBox_IGUIElement", 6, 0, 0, + IGUIEnvironment_addEditBox); + DEFINE_GSUBR ("IGUIEnvironment_addImage_IGUIElement", 7, 0, 0, + IGUIEnvironment_addImage); + DEFINE_GSUBR ("IGUIEnvironment_addListBox_IGUIElement", 5, 0, 0, + IGUIEnvironment_addListBox); + DEFINE_GSUBR ("IGUIEnvironment_addScrollBar_IGUIElement", 5, 0, 0, + IGUIEnvironment_addScrollBar); + DEFINE_GSUBR ("IGUIEnvironment_addStaticText_IGUIElement", 8, 0, 0, + IGUIEnvironment_addStaticText); + DEFINE_GSUBR ("IGUIEnvironment_addWindow_IGUIElement", 6, 0, 0, + IGUIEnvironment_addWindow); + DEFINE_GSUBR ("IGUIEnvironment_drawAll", 1, 0, 0, IGUIEnvironment_drawAll); + DEFINE_GSUBR ("IGUIEnvironment_getBuiltInFont", 1, 0, 0, IGUIEnvironment_getBuiltInFont); + DEFINE_GSUBR ("IGUIEnvironment_getFont", 2, 0, 0, IGUIEnvironment_getFont); + DEFINE_GSUBR ("IGUIEnvironment_getSkin", 1, 0, 0, IGUIEnvironment_getSkin); } } diff --git a/src/gui-in-out-fader.cpp b/src/gui-in-out-fader.cpp index e571b30..028c84d 100644 --- a/src/gui-in-out-fader.cpp +++ b/src/gui-in-out-fader.cpp @@ -30,9 +30,9 @@ using namespace irr; SCM -gui_IGUIInOutFader_setColor (SCM in_out_fader, - SCM color, - SCM dest_color) +IGUIInOutFader_setColor (SCM in_out_fader, + SCM color, + SCM dest_color) { gui::IGUIInOutFader* fader = (gui::IGUIInOutFader*)scm_to_pointer (in_out_fader); if (dest_color == SCM_UNDEFINED) @@ -53,7 +53,7 @@ extern "C" { void init_gui_in_out_fader (void) { - DEFINE_GSUBR ("gui_IGUIInOutFader_setColor", 2, 1, 0, gui_IGUIInOutFader_setColor); + DEFINE_GSUBR ("IGUIInOutFader_setColor", 2, 1, 0, IGUIInOutFader_setColor); } } diff --git a/src/gui-listbox.cpp b/src/gui-listbox.cpp index ee82eff..08b3b22 100644 --- a/src/gui-listbox.cpp +++ b/src/gui-listbox.cpp @@ -30,9 +30,9 @@ using namespace irr; SCM -gui_IGUIListBox_addItem (SCM gui_listbox, - SCM text, - SCM icon) +IGUIListBox_addItem (SCM gui_listbox, + SCM text, + SCM icon) { gui::IGUIListBox* listbox = (gui::IGUIListBox*)scm_to_pointer (gui_listbox); u32 item_id; @@ -54,7 +54,7 @@ extern "C" { void init_gui_listbox (void) { - DEFINE_GSUBR ("gui_IGUIListBox_addItem", 2, 1, 0, gui_IGUIListBox_addItem); + DEFINE_GSUBR ("IGUIListBox_addItem", 2, 1, 0, IGUIListBox_addItem); } } diff --git a/src/gui-scrollbar.cpp b/src/gui-scrollbar.cpp index b67413e..37f4f95 100644 --- a/src/gui-scrollbar.cpp +++ b/src/gui-scrollbar.cpp @@ -29,7 +29,7 @@ using namespace irr; SCM -gui_IGUIScrollBar_getPos (SCM gui_scrollbar) +IGUIScrollBar_getPos (SCM gui_scrollbar) { return scm_from_int32 (((gui::IGUIScrollBar*)scm_to_pointer (gui_scrollbar))->getPos ()); @@ -37,8 +37,8 @@ gui_IGUIScrollBar_getPos (SCM gui_scrollbar) SCM -gui_IGUIScrollBar_setMax (SCM gui_scrollbar, - SCM max) +IGUIScrollBar_setMax (SCM gui_scrollbar, + SCM max) { ((gui::IGUIScrollBar*) scm_to_pointer (gui_scrollbar))->setMax (scm_to_int32 (max)); return SCM_UNSPECIFIED; @@ -46,8 +46,8 @@ gui_IGUIScrollBar_setMax (SCM gui_scrollbar, SCM -gui_IGUIScrollBar_setPos (SCM gui_scrollbar, - SCM pos) +IGUIScrollBar_setPos (SCM gui_scrollbar, + SCM pos) { ((gui::IGUIScrollBar*) scm_to_pointer (gui_scrollbar))->setPos (scm_to_int32 (pos)); return SCM_UNSPECIFIED; @@ -59,9 +59,9 @@ extern "C" { void init_gui_scrollbar (void) { - DEFINE_GSUBR ("gui_IGUIScrollBar_getPos", 1, 0, 0, gui_IGUIScrollBar_getPos); - DEFINE_GSUBR ("gui_IGUIScrollBar_setMax", 2, 0, 0, gui_IGUIScrollBar_setMax); - DEFINE_GSUBR ("gui_IGUIScrollBar_setPos", 2, 0, 0, gui_IGUIScrollBar_setPos); + DEFINE_GSUBR ("IGUIScrollBar_getPos", 1, 0, 0, IGUIScrollBar_getPos); + DEFINE_GSUBR ("IGUIScrollBar_setMax", 2, 0, 0, IGUIScrollBar_setMax); + DEFINE_GSUBR ("IGUIScrollBar_setPos", 2, 0, 0, IGUIScrollBar_setPos); } } diff --git a/src/gui-skin.cpp b/src/gui-skin.cpp index b6e0ae1..abe13f5 100644 --- a/src/gui-skin.cpp +++ b/src/gui-skin.cpp @@ -30,8 +30,8 @@ using namespace irr; SCM -irr_gui_IGUISkin_getColor (SCM gui_skin, - SCM color) +IGUISkin_getColor (SCM gui_skin, + SCM color) { gui::IGUISkin* skin = (gui::IGUISkin*) scm_to_pointer (gui_skin); video::SColor scolor = skin->getColor (scm_to_default_color (color)); @@ -40,8 +40,8 @@ irr_gui_IGUISkin_getColor (SCM gui_skin, SCM -irr_gui_IGUISkin_getFont (SCM gui_skin, - SCM which) +IGUISkin_getFont (SCM gui_skin, + SCM which) { gui::IGUISkin* skin = (gui::IGUISkin*) scm_to_pointer (gui_skin); gui::IGUIFont* font = skin->getFont (scm_to_default_font (which)); @@ -50,9 +50,9 @@ irr_gui_IGUISkin_getFont (SCM gui_skin, SCM -irr_gui_IGUISkin_setColor (SCM gui_skin, - SCM which, - SCM new_color) +IGUISkin_setColor (SCM gui_skin, + SCM which, + SCM new_color) { gui::IGUISkin* skin = (gui::IGUISkin*) scm_to_pointer (gui_skin); skin->setColor (scm_to_default_color (which), @@ -62,9 +62,9 @@ irr_gui_IGUISkin_setColor (SCM gui_skin, SCM -irr_gui_IGUISkin_setFont (SCM gui_skin, - SCM font, - SCM which) +IGUISkin_setFont (SCM gui_skin, + SCM font, + SCM which) { gui::IGUISkin* skin = (gui::IGUISkin*) scm_to_pointer (gui_skin); skin->setFont ((gui::IGUIFont*) scm_to_pointer (font), @@ -78,10 +78,10 @@ extern "C" { void init_gui_skin (void) { - DEFINE_GSUBR ("irr_gui_IGUISkin_getColor", 2, 0, 0, irr_gui_IGUISkin_getColor); - DEFINE_GSUBR ("irr_gui_IGUISkin_getFont", 2, 0, 0, irr_gui_IGUISkin_getFont); - DEFINE_GSUBR ("irr_gui_IGUISkin_setColor", 3, 0, 0, irr_gui_IGUISkin_setColor); - DEFINE_GSUBR ("irr_gui_IGUISkin_setFont", 3, 0, 0, irr_gui_IGUISkin_setFont); + DEFINE_GSUBR ("IGUISkin_getColor", 2, 0, 0, IGUISkin_getColor); + DEFINE_GSUBR ("IGUISkin_getFont", 2, 0, 0, IGUISkin_getFont); + DEFINE_GSUBR ("IGUISkin_setColor", 3, 0, 0, IGUISkin_setColor); + DEFINE_GSUBR ("IGUISkin_setFont", 3, 0, 0, IGUISkin_setFont); } } diff --git a/src/gui-toolbar.cpp b/src/gui-toolbar.cpp index 1f38bdb..fb3ca10 100644 --- a/src/gui-toolbar.cpp +++ b/src/gui-toolbar.cpp @@ -30,14 +30,14 @@ using namespace irr; SCM -irr_gui_IGUIToolBar_addButton (SCM gui_toolbar, - SCM id, - SCM text, - SCM tooltiptext, - SCM img, - SCM pressedimg, - SCM is_push_button, - SCM use_alpha_channel) +IGUIToolBar_addButton (SCM gui_toolbar, + SCM id, + SCM text, + SCM tooltiptext, + SCM img, + SCM pressedimg, + SCM is_push_button, + SCM use_alpha_channel) { gui::IGUIToolBar* toolbar = (gui::IGUIToolBar*) scm_to_pointer (gui_toolbar); gui::IGUIButton* button = @@ -57,7 +57,7 @@ extern "C" { void init_gui_toolbar (void) { - DEFINE_GSUBR ("irr_gui_IGUIToolBar_addButton", 8, 0, 0, irr_gui_IGUIToolBar_addButton); + DEFINE_GSUBR ("IGUIToolBar_addButton", 8, 0, 0, IGUIToolBar_addButton); } } diff --git a/src/reference-counted.cpp b/src/reference-counted.cpp index 3e099d1..ea019b0 100644 --- a/src/reference-counted.cpp +++ b/src/reference-counted.cpp @@ -41,8 +41,7 @@ extern "C" { void init_reference_counted (void) { - DEFINE_GSUBR ("IReferenceCounted_drop_IrrlichtDevice", 1, 0, 0, - IReferenceCounted_drop); + DEFINE_GSUBR ("IrrlichtDevice_drop", 1, 0, 0, IReferenceCounted_drop); } } diff --git a/src/scene-manager.cpp b/src/scene-manager.cpp index 51e561a..f969383 100644 --- a/src/scene-manager.cpp +++ b/src/scene-manager.cpp @@ -31,14 +31,14 @@ using namespace irr; template SCM -scene_ISceneManager_addAnimatedMeshSceneNode (SCM scene_manager, - SCM mesh, - SCM parent, - SCM id, - SCM position, - SCM rotation, - SCM scale, - SCM also_add_if_mesh_pointer_zero) +ISceneManager_addAnimatedMeshSceneNode (SCM scene_manager, + SCM mesh, + SCM parent, + SCM id, + SCM position, + SCM rotation, + SCM scale, + SCM also_add_if_mesh_pointer_zero) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::IAnimatedMeshSceneNode* node = @@ -55,12 +55,12 @@ scene_ISceneManager_addAnimatedMeshSceneNode (SCM scene_manager, template SCM -scene_ISceneManager_addCameraSceneNode (SCM scene_manager, - SCM parent, - SCM position, - SCM lookat, - SCM id, - SCM make_active) +ISceneManager_addCameraSceneNode (SCM scene_manager, + SCM parent, + SCM position, + SCM lookat, + SCM id, + SCM make_active) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::ICameraSceneNode* camera = @@ -75,8 +75,8 @@ scene_ISceneManager_addCameraSceneNode (SCM scene_manager, template SCM -scene_ISceneManager_addCameraSceneNodeFPS (SCM scene_manager, - SCM rest) +ISceneManager_addCameraSceneNodeFPS (SCM scene_manager, + SCM rest) { SCM parent; SCM rotate_speed; @@ -121,13 +121,13 @@ scene_ISceneManager_addCameraSceneNodeFPS (SCM scene_manager, template SCM -scene_ISceneManager_addCubeSceneNode (SCM scene_manager, - SCM size, - SCM parent, - SCM id, - SCM position, - SCM rotation, - SCM scale) +ISceneManager_addCubeSceneNode (SCM scene_manager, + SCM size, + SCM parent, + SCM id, + SCM position, + SCM rotation, + SCM scale) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::IMeshSceneNode* node = @@ -143,16 +143,16 @@ scene_ISceneManager_addCubeSceneNode (SCM scene_manager, template SCM -scene_ISceneManager_addCustomSceneNode (SCM scene_manager, - SCM proc_render, - SCM proc_get_bounding_box, - SCM proc_get_material_count, - SCM proc_get_material, - SCM parent, - SCM id, - SCM position, - SCM rotation, - SCM scale) +ISceneManager_addCustomSceneNode (SCM scene_manager, + SCM proc_render, + SCM proc_get_bounding_box, + SCM proc_get_material_count, + SCM proc_get_material, + SCM parent, + SCM id, + SCM position, + SCM rotation, + SCM scale) { class CustomSceneNode : public scene::ISceneNode { @@ -229,12 +229,12 @@ scene_ISceneManager_addCustomSceneNode (SCM scene_manager, template SCM -scene_ISceneManager_addOctreeSceneNode (SCM scene_manager, - SCM mesh, - SCM parent, - SCM id, - SCM minimal_polys_per_node, - SCM also_add_if_mesh_pointer_zero) +ISceneManager_addOctreeSceneNode (SCM scene_manager, + SCM mesh, + SCM parent, + SCM id, + SCM minimal_polys_per_node, + SCM also_add_if_mesh_pointer_zero) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::IMeshSceneNode* node = @@ -249,14 +249,14 @@ scene_ISceneManager_addOctreeSceneNode (SCM scene_manager, template SCM -scene_ISceneManager_addSphereSceneNode (SCM scene_manager, - SCM radius, - SCM poly_count, - SCM parent, - SCM id, - SCM position, - SCM rotation, - SCM scale) +ISceneManager_addSphereSceneNode (SCM scene_manager, + SCM radius, + SCM poly_count, + SCM parent, + SCM id, + SCM position, + SCM rotation, + SCM scale) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::IMeshSceneNode* node = @@ -272,13 +272,13 @@ scene_ISceneManager_addSphereSceneNode (SCM scene_manager, SCM -scene_ISceneManager_createFlyCircleAnimator (SCM scene_manager, - SCM center, - SCM radius, - SCM speed, - SCM direction, - SCM start_position, - SCM radius_ellipsoid) +ISceneManager_createFlyCircleAnimator (SCM scene_manager, + SCM center, + SCM radius, + SCM speed, + SCM direction, + SCM start_position, + SCM radius_ellipsoid) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::ISceneNodeAnimator* anim = @@ -293,12 +293,12 @@ scene_ISceneManager_createFlyCircleAnimator (SCM scene_manager, SCM -scene_ISceneManager_createFlyStraightAnimator (SCM scene_manager, - SCM start_point, - SCM end_point, - SCM time_for_way, - SCM loop, - SCM pingpong) +ISceneManager_createFlyStraightAnimator (SCM scene_manager, + SCM start_point, + SCM end_point, + SCM time_for_way, + SCM loop, + SCM pingpong) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::ISceneNodeAnimator* anim = @@ -312,8 +312,8 @@ scene_ISceneManager_createFlyStraightAnimator (SCM scene_manager, SCM -scene_ISceneManager_createRotationAnimator (SCM scene_manager, - SCM rotation_speed) +ISceneManager_createRotationAnimator (SCM scene_manager, + SCM rotation_speed) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::ISceneNodeAnimator* anim = @@ -323,7 +323,7 @@ scene_ISceneManager_createRotationAnimator (SCM scene_manager, SCM -scene_ISceneManager_drawAll (SCM scene_manager) +ISceneManager_drawAll (SCM scene_manager) { ((scene::ISceneManager*) scm_to_pointer (scene_manager))->drawAll (); return SCM_UNSPECIFIED; @@ -331,8 +331,8 @@ scene_ISceneManager_drawAll (SCM scene_manager) SCM -scene_ISceneManager_getMesh (SCM scene_manager, - SCM filename) +ISceneManager_getMesh (SCM scene_manager, + SCM filename) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); scene::IAnimatedMesh* mesh = smgr->getMesh(scm_to_utf8_stringn (filename, NULL)); @@ -341,7 +341,7 @@ scene_ISceneManager_getMesh (SCM scene_manager, SCM -scene_ISceneManager_getRootSceneNode (SCM scene_manager) +ISceneManager_getRootSceneNode (SCM scene_manager) { scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager); return scm_from_pointer ((void*) smgr->getRootSceneNode (), NULL); @@ -353,32 +353,31 @@ extern "C" { void init_scene_manager (void) { - DEFINE_GSUBR ("scene_ISceneManager_addAnimatedMeshSceneNode_ISceneNode", 8, 0, 0, - scene_ISceneManager_addAnimatedMeshSceneNode); - DEFINE_GSUBR ("scene_ISceneManager_addCameraSceneNode_ISceneNode", 6, 0, 0, - scene_ISceneManager_addCameraSceneNode); - DEFINE_GSUBR ("scene_ISceneManager_addCameraSceneNodeFPS_ISceneNode", 1, 0, 1, - scene_ISceneManager_addCameraSceneNodeFPS); - DEFINE_GSUBR ("scene_ISceneManager_addCubeSceneNode_ISceneNode", 7, 0, 0, - scene_ISceneManager_addCubeSceneNode); - DEFINE_GSUBR ("scene_ISceneManager_addCustomSceneNode_ISceneNode", 10, 0, 0, - scene_ISceneManager_addCustomSceneNode); - DEFINE_GSUBR ("scene_ISceneManager_addOctreeSceneNode_ISceneNode_IAnimatedMesh", 6, 0, 0, - (scene_ISceneManager_addOctreeSceneNode)); - DEFINE_GSUBR ("scene_ISceneManager_addOctreeSceneNode_ISceneNode_IMesh", 6, 0, 0, - (scene_ISceneManager_addOctreeSceneNode)); - DEFINE_GSUBR ("scene_ISceneManager_addSphereSceneNode_ISceneNode", 8, 0, 0, - scene_ISceneManager_addSphereSceneNode); - DEFINE_GSUBR ("scene_ISceneManager_createFlyCircleAnimator", 7, 0, 0, - scene_ISceneManager_createFlyCircleAnimator); - DEFINE_GSUBR ("scene_ISceneManager_createFlyStraightAnimator", 6, 0, 0, - scene_ISceneManager_createFlyStraightAnimator); - DEFINE_GSUBR ("scene_ISceneManager_createRotationAnimator", 2, 0, 0, - scene_ISceneManager_createRotationAnimator); - DEFINE_GSUBR ("scene_ISceneManager_drawAll", 1, 0, 0, scene_ISceneManager_drawAll); - DEFINE_GSUBR ("scene_ISceneManager_getMesh", 2, 0, 0, scene_ISceneManager_getMesh); - DEFINE_GSUBR ("scene_ISceneManager_getRootSceneNode", 1, 0, 0, - scene_ISceneManager_getRootSceneNode); + DEFINE_GSUBR ("ISceneManager_addAnimatedMeshSceneNode_ISceneNode", 8, 0, 0, + ISceneManager_addAnimatedMeshSceneNode); + DEFINE_GSUBR ("ISceneManager_addCameraSceneNode_ISceneNode", 6, 0, 0, + ISceneManager_addCameraSceneNode); + DEFINE_GSUBR ("ISceneManager_addCameraSceneNodeFPS_ISceneNode", 1, 0, 1, + ISceneManager_addCameraSceneNodeFPS); + DEFINE_GSUBR ("ISceneManager_addCubeSceneNode_ISceneNode", 7, 0, 0, + ISceneManager_addCubeSceneNode); + DEFINE_GSUBR ("ISceneManager_addCustomSceneNode_ISceneNode", 10, 0, 0, + ISceneManager_addCustomSceneNode); + DEFINE_GSUBR ("ISceneManager_addOctreeSceneNode_ISceneNode_IAnimatedMesh", 6, 0, 0, + (ISceneManager_addOctreeSceneNode)); + DEFINE_GSUBR ("ISceneManager_addOctreeSceneNode_ISceneNode_IMesh", 6, 0, 0, + (ISceneManager_addOctreeSceneNode)); + DEFINE_GSUBR ("ISceneManager_addSphereSceneNode_ISceneNode", 8, 0, 0, + ISceneManager_addSphereSceneNode); + DEFINE_GSUBR ("ISceneManager_createFlyCircleAnimator", 7, 0, 0, + ISceneManager_createFlyCircleAnimator); + DEFINE_GSUBR ("ISceneManager_createFlyStraightAnimator", 6, 0, 0, + ISceneManager_createFlyStraightAnimator); + DEFINE_GSUBR ("ISceneManager_createRotationAnimator", 2, 0, 0, + ISceneManager_createRotationAnimator); + DEFINE_GSUBR ("ISceneManager_drawAll", 1, 0, 0, ISceneManager_drawAll); + DEFINE_GSUBR ("ISceneManager_getMesh", 2, 0, 0, ISceneManager_getMesh); + DEFINE_GSUBR ("ISceneManager_getRootSceneNode", 1, 0, 0, ISceneManager_getRootSceneNode); } } diff --git a/src/scene-node.cpp b/src/scene-node.cpp index 08a1336..0caea37 100644 --- a/src/scene-node.cpp +++ b/src/scene-node.cpp @@ -33,8 +33,8 @@ using namespace irr; template SCM -scene_ISceneNode_addAnimator (SCM scene_node, - SCM animator) +ISceneNode_addAnimator (SCM scene_node, + SCM animator) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); node->addAnimator ((scene::ISceneNodeAnimator*) scm_to_pointer (animator)); @@ -44,7 +44,7 @@ scene_ISceneNode_addAnimator (SCM scene_node, template SCM -scene_ISceneNode_getAbsoluteTransformation (SCM scene_node) +ISceneNode_getAbsoluteTransformation (SCM scene_node) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); return scm_from_matrix4 (node->getAbsoluteTransformation ()); @@ -53,7 +53,7 @@ scene_ISceneNode_getAbsoluteTransformation (SCM scene_node) template SCM -scene_ISceneNode_getPosition (SCM scene_node) +ISceneNode_getPosition (SCM scene_node) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); return scm_from_vector3df (node->getPosition ()); @@ -62,9 +62,9 @@ scene_ISceneNode_getPosition (SCM scene_node) template SCM -scene_ISceneNode_setMaterialFlag (SCM scene_node, - SCM flag, - SCM newvalue) +ISceneNode_setMaterialFlag (SCM scene_node, + SCM flag, + SCM newvalue) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); node->setMaterialFlag (scm_to_material_flag (flag), scm_to_bool (newvalue)); @@ -74,9 +74,9 @@ scene_ISceneNode_setMaterialFlag (SCM scene_node, template SCM -scene_ISceneNode_setMaterialTexture (SCM scene_node, - SCM texture_layer, - SCM texture) +ISceneNode_setMaterialTexture (SCM scene_node, + SCM texture_layer, + SCM texture) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); node->setMaterialTexture (scm_to_uint32 (texture_layer), @@ -87,8 +87,8 @@ scene_ISceneNode_setMaterialTexture (SCM scene_node, template SCM -scene_ISceneNode_setPosition (SCM scene_node, - SCM position) +ISceneNode_setPosition (SCM scene_node, + SCM position) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); node->setPosition (scm_to_vector3df (position)); @@ -98,8 +98,8 @@ scene_ISceneNode_setPosition (SCM scene_node, template SCM -scene_ISceneNode_setRotation (SCM scene_node, - SCM rotation) +ISceneNode_setRotation (SCM scene_node, + SCM rotation) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); node->setRotation (scm_to_vector3df (rotation)); @@ -109,8 +109,8 @@ scene_ISceneNode_setRotation (SCM scene_node, template SCM -scene_ISceneNode_setScale (SCM scene_node, - SCM scale) +ISceneNode_setScale (SCM scene_node, + SCM scale) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); node->setScale (scm_to_vector3df (scale)); @@ -123,51 +123,51 @@ extern "C" { void init_scene_node (void) { - DEFINE_GSUBR ("scene_IAnimatedMeshSceneNode_addAnimator", 2, 0, 0, - scene_ISceneNode_addAnimator); - DEFINE_GSUBR ("scene_IMeshSceneNode_addAnimator", 2, 0, 0, - scene_ISceneNode_addAnimator); - DEFINE_GSUBR ("scene_ISceneNode_addAnimator", 2, 0, 0, - scene_ISceneNode_addAnimator); - - DEFINE_GSUBR ("scene_ISceneNode_getAbsoluteTransformation", 1, 0, 0, - scene_ISceneNode_getAbsoluteTransformation); - - DEFINE_GSUBR ("scene_IMeshSceneNode_getPosition", 1, 0, 0, - scene_ISceneNode_getPosition); - DEFINE_GSUBR ("scene_ISceneNode_getPosition", 1, 0, 0, - scene_ISceneNode_getPosition); - - DEFINE_GSUBR ("scene_IAnimatedMeshSceneNode_setMaterialFlag", 3, 0, 0, - scene_ISceneNode_setMaterialFlag); - DEFINE_GSUBR ("scene_IMeshSceneNode_setMaterialFlag", 3, 0, 0, - scene_ISceneNode_setMaterialFlag); - DEFINE_GSUBR ("scene_ISceneNode_setMaterialFlag", 3, 0, 0, - scene_ISceneNode_setMaterialFlag); - - DEFINE_GSUBR ("scene_IAnimatedMeshSceneNode_setMaterialTexture", 3, 0, 0, - scene_ISceneNode_setMaterialTexture); - DEFINE_GSUBR ("scene_IMeshSceneNode_setMaterialTexture", 3, 0, 0, - scene_ISceneNode_setMaterialTexture); - DEFINE_GSUBR ("scene_ISceneNode_setMaterialTexture", 3, 0, 0, - scene_ISceneNode_setMaterialTexture); - - DEFINE_GSUBR ("scene_IMeshSceneNode_setPosition", 2, 0, 0, - scene_ISceneNode_setPosition); - DEFINE_GSUBR ("scene_ISceneNode_setPosition", 2, 0, 0, - scene_ISceneNode_setPosition); - - DEFINE_GSUBR ("scene_IAnimatedMeshSceneNode_setRotation", 2, 0, 0, - scene_ISceneNode_setRotation); - DEFINE_GSUBR ("scene_ICameraSceneNode_setRotation", 2, 0, 0, - scene_ISceneNode_setRotation); - DEFINE_GSUBR ("scene_ISceneNode_setRotation", 2, 0, 0, - scene_ISceneNode_setRotation); - - DEFINE_GSUBR ("scene_IAnimatedMeshSceneNode_setScale", 2, 0, 0, - scene_ISceneNode_setScale); - DEFINE_GSUBR ("scene_ISceneNode_setScale", 2, 0, 0, - scene_ISceneNode_setScale); + DEFINE_GSUBR ("IAnimatedMeshSceneNode_addAnimator", 2, 0, 0, + ISceneNode_addAnimator); + DEFINE_GSUBR ("IMeshSceneNode_addAnimator", 2, 0, 0, + ISceneNode_addAnimator); + DEFINE_GSUBR ("ISceneNode_addAnimator", 2, 0, 0, + ISceneNode_addAnimator); + + DEFINE_GSUBR ("ISceneNode_getAbsoluteTransformation", 1, 0, 0, + ISceneNode_getAbsoluteTransformation); + + DEFINE_GSUBR ("IMeshSceneNode_getPosition", 1, 0, 0, + ISceneNode_getPosition); + DEFINE_GSUBR ("ISceneNode_getPosition", 1, 0, 0, + ISceneNode_getPosition); + + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setMaterialFlag", 3, 0, 0, + ISceneNode_setMaterialFlag); + DEFINE_GSUBR ("IMeshSceneNode_setMaterialFlag", 3, 0, 0, + ISceneNode_setMaterialFlag); + DEFINE_GSUBR ("ISceneNode_setMaterialFlag", 3, 0, 0, + ISceneNode_setMaterialFlag); + + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setMaterialTexture", 3, 0, 0, + ISceneNode_setMaterialTexture); + DEFINE_GSUBR ("IMeshSceneNode_setMaterialTexture", 3, 0, 0, + ISceneNode_setMaterialTexture); + DEFINE_GSUBR ("ISceneNode_setMaterialTexture", 3, 0, 0, + ISceneNode_setMaterialTexture); + + DEFINE_GSUBR ("IMeshSceneNode_setPosition", 2, 0, 0, + ISceneNode_setPosition); + DEFINE_GSUBR ("ISceneNode_setPosition", 2, 0, 0, + ISceneNode_setPosition); + + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setRotation", 2, 0, 0, + ISceneNode_setRotation); + DEFINE_GSUBR ("ICameraSceneNode_setRotation", 2, 0, 0, + ISceneNode_setRotation); + DEFINE_GSUBR ("ISceneNode_setRotation", 2, 0, 0, + ISceneNode_setRotation); + + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setScale", 2, 0, 0, + ISceneNode_setScale); + DEFINE_GSUBR ("ISceneNode_setScale", 2, 0, 0, + ISceneNode_setScale); } } diff --git a/src/video-driver.cpp b/src/video-driver.cpp index 643ad89..e2cb9cf 100644 --- a/src/video-driver.cpp +++ b/src/video-driver.cpp @@ -34,12 +34,12 @@ using namespace irr; SCM -video_IVideoDriver_beginScene (SCM video_driver, - SCM back_buffer, - SCM z_buffer, - SCM color, - SCM video_data, - SCM source_rect) +IVideoDriver_beginScene (SCM video_driver, + SCM back_buffer, + SCM z_buffer, + SCM color, + SCM video_data, + SCM source_rect) { video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_pointer (video_driver); @@ -60,11 +60,11 @@ video_IVideoDriver_beginScene (SCM video_driver, SCM -video_IVideoDriver_drawVertexPrimitiveList (SCM video_driver, - SCM vertices, - SCM indices, - SCM v_type, - SCM p_type) +IVideoDriver_drawVertexPrimitiveList (SCM video_driver, + SCM vertices, + SCM indices, + SCM v_type, + SCM p_type) { // Build vertex array u32 vertex_count = scm_to_uint32 (scm_length (vertices)); @@ -104,7 +104,7 @@ video_IVideoDriver_drawVertexPrimitiveList (SCM video_driver, SCM -video_IVideoDriver_endScene (SCM video_driver) +IVideoDriver_endScene (SCM video_driver) { video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_pointer (video_driver); return scm_from_bool (driver->endScene ()); @@ -112,7 +112,7 @@ video_IVideoDriver_endScene (SCM video_driver) SCM -video_IVideoDriver_getFPS (SCM video_driver) +IVideoDriver_getFPS (SCM video_driver) { video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_pointer (video_driver); return scm_from_int32 (driver->getFPS ()); @@ -120,8 +120,8 @@ video_IVideoDriver_getFPS (SCM video_driver) SCM -video_IVideoDriver_getTexture (SCM video_driver, - SCM filename) +IVideoDriver_getTexture (SCM video_driver, + SCM filename) { video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_pointer (video_driver); video::ITexture* texture = driver->getTexture (scm_to_utf8_stringn (filename, NULL)); @@ -130,8 +130,8 @@ video_IVideoDriver_getTexture (SCM video_driver, SCM -video_IVideoDriver_setMaterial (SCM video_driver, - SCM material) +IVideoDriver_setMaterial (SCM video_driver, + SCM material) { video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_pointer (video_driver); driver->setMaterial (*((video::SMaterial*) scm_to_pointer (material))); @@ -140,9 +140,9 @@ video_IVideoDriver_setMaterial (SCM video_driver, SCM -video_IVideoDriver_setTransform (SCM video_driver, - SCM state, - SCM mat) +IVideoDriver_setTransform (SCM video_driver, + SCM state, + SCM mat) { video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_pointer (video_driver); driver->setTransform (scm_to_transformation_state (state), @@ -156,14 +156,14 @@ extern "C" { void init_video_driver (void) { - DEFINE_GSUBR ("video_IVideoDriver_beginScene", 6, 0, 0, video_IVideoDriver_beginScene); - DEFINE_GSUBR ("video_IVideoDriver_drawVertexPrimitiveList", 5, 0, 1, - video_IVideoDriver_drawVertexPrimitiveList); - DEFINE_GSUBR ("video_IVideoDriver_endScene", 1, 0, 0, video_IVideoDriver_endScene); - DEFINE_GSUBR ("video_IVideoDriver_getFPS", 1, 0, 0, video_IVideoDriver_getFPS); - DEFINE_GSUBR ("video_IVideoDriver_getTexture", 2, 0, 0, video_IVideoDriver_getTexture); - DEFINE_GSUBR ("video_IVideoDriver_setMaterial", 2, 0, 0, video_IVideoDriver_setMaterial); - DEFINE_GSUBR ("video_IVideoDriver_setTransform", 3, 0, 0, video_IVideoDriver_setTransform); + DEFINE_GSUBR ("IVideoDriver_beginScene", 6, 0, 0, IVideoDriver_beginScene); + DEFINE_GSUBR ("IVideoDriver_drawVertexPrimitiveList", 5, 0, 1, + IVideoDriver_drawVertexPrimitiveList); + DEFINE_GSUBR ("IVideoDriver_endScene", 1, 0, 0, IVideoDriver_endScene); + DEFINE_GSUBR ("IVideoDriver_getFPS", 1, 0, 0, IVideoDriver_getFPS); + DEFINE_GSUBR ("IVideoDriver_getTexture", 2, 0, 0, IVideoDriver_getTexture); + DEFINE_GSUBR ("IVideoDriver_setMaterial", 2, 0, 0, IVideoDriver_setMaterial); + DEFINE_GSUBR ("IVideoDriver_setTransform", 3, 0, 0, IVideoDriver_setTransform); } } -- 2.39.2