From 41a6ad96e81a8d8153c54877c4c12f61100677a9 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Tue, 12 May 2020 09:21:41 +0200 Subject: [PATCH] clean code --- src/animated-mesh-md2.cpp | 2 - src/animated-mesh-scene-node.cpp | 22 ++----- src/animated-mesh-scene-node.h | 6 +- src/animated-mesh.cpp | 15 ++--- src/animated-mesh.h | 6 +- src/box3d.cpp | 21 ++---- src/box3d.h | 6 +- src/color.cpp | 3 - src/cursor-control.cpp | 18 ++--- src/cursor-control.h | 6 +- src/device.cpp | 53 +++++---------- src/device.h | 6 +- src/dimension2d.cpp | 2 - src/driver-types.cpp | 2 - src/event-receiver.cpp | 31 +++------ src/event-receiver.h | 6 +- src/file-archive.cpp | 2 - src/file-system.cpp | 15 ++--- src/file-system.h | 6 +- src/gui-environment.cpp | 59 ++++++----------- src/gui-environment.h | 6 +- src/gui-in-out-fader.cpp | 15 ++--- src/gui-in-out-fader.h | 6 +- src/gui-listbox.cpp | 15 ++--- src/gui-listbox.h | 6 +- src/gui-scrollbar.cpp | 21 ++---- src/gui-scrollbar.h | 6 +- src/gui-skin.cpp | 25 ++----- src/gui-skin.h | 6 +- src/gui-toolbar.cpp | 15 ++--- src/gui-toolbar.h | 6 +- src/gui.cpp | 46 ------------- src/gui.h | 30 --------- src/guile-irrlicht.cpp | 18 +++-- src/io.cpp | 33 ---------- src/io.h | 30 --------- src/keycodes.cpp | 2 - src/material-flags.cpp | 2 - src/material-types.cpp | 2 - src/material.cpp | 21 ++---- src/material.h | 6 +- src/matrix4.cpp | 3 - src/position2d.cpp | 2 - src/primitive-types.cpp | 2 - src/rect.cpp | 2 - src/reference-counted.cpp | 15 ++--- src/reference-counted.h | 6 +- src/scene-manager.cpp | 75 ++++++++------------- src/scene-manager.h | 6 +- src/scene-node.cpp | 110 ++++++++++++++----------------- src/scene-node.h | 6 +- src/timer.cpp | 15 ++--- src/timer.h | 6 +- src/vector2d.cpp | 2 - src/vector3d.cpp | 3 - src/vertex3d.cpp | 19 ++---- src/vertex3d.h | 6 +- src/video-driver.cpp | 34 ++++------ src/video-driver.h | 6 +- 59 files changed, 256 insertions(+), 666 deletions(-) delete mode 100644 src/gui.cpp delete mode 100644 src/gui.h delete mode 100644 src/io.cpp delete mode 100644 src/io.h diff --git a/src/animated-mesh-md2.cpp b/src/animated-mesh-md2.cpp index 3cd2d39..11e680f 100644 --- a/src/animated-mesh-md2.cpp +++ b/src/animated-mesh-md2.cpp @@ -23,10 +23,8 @@ #include #include "animated-mesh-md2.h" - using namespace irr; - scene::EMD2_ANIMATION_TYPE scm_to_md2_animation_type (SCM md2_animation_type) { diff --git a/src/animated-mesh-scene-node.cpp b/src/animated-mesh-scene-node.cpp index 498a196..3496b3a 100644 --- a/src/animated-mesh-scene-node.cpp +++ b/src/animated-mesh-scene-node.cpp @@ -25,10 +25,8 @@ #include "animated-mesh-scene-node.h" #include "gsubr.h" - using namespace irr; - SCM IAnimatedMeshSceneNode_setFrameLoop (SCM animated_mesh_scene_node, SCM begin, @@ -40,7 +38,6 @@ IAnimatedMeshSceneNode_setFrameLoop (SCM animated_mesh_scene_node, scm_to_int32 (end))); } - SCM IAnimatedMeshSceneNode_setMD2Animation (SCM animated_mesh_scene_node, SCM anim) @@ -50,16 +47,11 @@ IAnimatedMeshSceneNode_setMD2Animation (SCM animated_mesh_scene_node, setMD2Animation (scm_to_md2_animation_type (anim))); } - -extern "C" { - - void - init_animated_mesh_scene_node (void) - { - DEFINE_GSUBR ("IAnimatedMeshSceneNode_setFrameLoop", 3, 0, 0, - IAnimatedMeshSceneNode_setFrameLoop); - DEFINE_GSUBR ("IAnimatedMeshSceneNode_setMD2Animation", 2, 0, 0, - IAnimatedMeshSceneNode_setMD2Animation); - } - +void +init_animated_mesh_scene_node (void) +{ + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setFrameLoop", 3, 0, 0, + IAnimatedMeshSceneNode_setFrameLoop); + DEFINE_GSUBR ("IAnimatedMeshSceneNode_setMD2Animation", 2, 0, 0, + IAnimatedMeshSceneNode_setMD2Animation); } diff --git a/src/animated-mesh-scene-node.h b/src/animated-mesh-scene-node.h index ead8ba0..d586cce 100644 --- a/src/animated-mesh-scene-node.h +++ b/src/animated-mesh-scene-node.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ #define __GUILE_IRRLICHT_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ -extern "C" { - void - init_animated_mesh_scene_node (void); -} +void +init_animated_mesh_scene_node (void); #endif diff --git a/src/animated-mesh.cpp b/src/animated-mesh.cpp index 80b6229..cb88225 100644 --- a/src/animated-mesh.cpp +++ b/src/animated-mesh.cpp @@ -24,10 +24,8 @@ #include "animated-mesh.h" #include "gsubr.h" - using namespace irr; - SCM IAnimatedMesh_setAnimationSpeed (SCM animated_mesh, SCM frames_per_second) @@ -37,13 +35,8 @@ IAnimatedMesh_setAnimationSpeed (SCM animated_mesh, return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_animated_mesh (void) - { - DEFINE_GSUBR ("IAnimatedMesh_setAnimationSpeed", 2, 0, 0, IAnimatedMesh_setAnimationSpeed); - } - +void +init_animated_mesh (void) +{ + DEFINE_GSUBR ("IAnimatedMesh_setAnimationSpeed", 2, 0, 0, IAnimatedMesh_setAnimationSpeed); } diff --git a/src/animated-mesh.h b/src/animated-mesh.h index f44df1d..3a4966b 100644 --- a/src/animated-mesh.h +++ b/src/animated-mesh.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_ANIMATED_MESH_H_INCLUDED__ #define __GUILE_IRRLICHT_ANIMATED_MESH_H_INCLUDED__ -extern "C" { - void - init_animated_mesh (void); -} +void +init_animated_mesh (void); #endif diff --git a/src/box3d.cpp b/src/box3d.cpp index 71571b1..ed56fdc 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -25,10 +25,8 @@ #include "gsubr.h" #include "vector3d.h" - using namespace irr; - SCM aabbox3d_addInternalPoint (SCM box3d, SCM point) @@ -37,7 +35,6 @@ aabbox3d_addInternalPoint (SCM box3d, return SCM_UNSPECIFIED; } - SCM aabbox3d_make () { @@ -45,7 +42,6 @@ aabbox3d_make () return scm_from_pointer ((void*)aabbox, NULL); } - SCM aabbox3d_reset (SCM box3d, SCM init_value) @@ -54,15 +50,10 @@ aabbox3d_reset (SCM box3d, return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_box3d (void) - { - 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); - } - +void +init_box3d (void) +{ + 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/box3d.h b/src/box3d.h index ce91f67..cfcde7b 100644 --- a/src/box3d.h +++ b/src/box3d.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_AABBOX_3D_H_INCLUDED__ #define __GUILE_IRRLICHT_AABBOX_3D_H_INCLUDED__ -extern "C" { - void - init_box3d (void); -} +void +init_box3d (void); #endif diff --git a/src/color.cpp b/src/color.cpp index 6d836d3..9308abc 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -23,10 +23,8 @@ #include #include "color.h" - using namespace irr; - SCM scm_from_color (video::SColor color) { @@ -36,7 +34,6 @@ scm_from_color (video::SColor color) scm_from_uint32 (color.getBlue ())); } - video::SColor scm_to_color (SCM color) { diff --git a/src/cursor-control.cpp b/src/cursor-control.cpp index 79e31d9..55f6622 100644 --- a/src/cursor-control.cpp +++ b/src/cursor-control.cpp @@ -25,10 +25,8 @@ #include "gsubr.h" #include "position2d.h" - using namespace irr; - SCM ICursorControl_getPosition (SCM cursor_control) { @@ -36,7 +34,6 @@ ICursorControl_getPosition (SCM cursor_control) (((gui::ICursorControl*)scm_to_pointer (cursor_control))->getPosition ()); } - SCM ICursorControl_setPosition (SCM cursor_control, SCM position) @@ -46,14 +43,9 @@ ICursorControl_setPosition (SCM cursor_control, return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_cursor_control (void) - { - DEFINE_GSUBR ("ICursorControl_getPosition", 1, 0, 0, ICursorControl_getPosition); - DEFINE_GSUBR ("ICursorControl_setPosition", 2, 0, 0, ICursorControl_setPosition); - } - +void +init_cursor_control (void) +{ + DEFINE_GSUBR ("ICursorControl_getPosition", 1, 0, 0, ICursorControl_getPosition); + DEFINE_GSUBR ("ICursorControl_setPosition", 2, 0, 0, ICursorControl_setPosition); } diff --git a/src/cursor-control.h b/src/cursor-control.h index 73e3537..f01bd78 100644 --- a/src/cursor-control.h +++ b/src/cursor-control.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_CURSOR_CONTROL_H_INCLUDED__ #define __GUILE_IRRLICHT_CURSOR_CONTROL_H_INCLUDED__ -extern "C" { - void - init_cursor_control (void); -} +void +init_cursor_control (void); #endif diff --git a/src/device.cpp b/src/device.cpp index ed55170..55c752f 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -27,10 +27,8 @@ #include "gsubr.h" #include "wchar.h" - using namespace irr; - SCM irr_createDevice (SCM device_type, SCM window_size, @@ -51,7 +49,6 @@ irr_createDevice (SCM device_type, return scm_from_pointer ((void*)device, NULL); } - SCM IrrlichtDevice_getCursorControl (SCM device) { @@ -60,7 +57,6 @@ IrrlichtDevice_getCursorControl (SCM device) return scm_from_pointer ((void*)cursor_control, NULL); } - SCM IrrlichtDevice_getFileSystem (SCM device) { @@ -69,7 +65,6 @@ IrrlichtDevice_getFileSystem (SCM device) return scm_from_pointer ((void*)file_system, NULL); } - SCM IrrlichtDevice_getGUIEnvironment (SCM device) { @@ -78,7 +73,6 @@ IrrlichtDevice_getGUIEnvironment (SCM device) return scm_from_pointer ((void*)gui_env, NULL); } - SCM IrrlichtDevice_getSceneManager (SCM device) { @@ -87,7 +81,6 @@ IrrlichtDevice_getSceneManager (SCM device) return scm_from_pointer ((void*)manager, NULL); } - SCM IrrlichtDevice_getTimer (SCM device) { @@ -96,7 +89,6 @@ IrrlichtDevice_getTimer (SCM device) return scm_from_pointer ((void*)timer, NULL); } - SCM IrrlichtDevice_getVideoDriver (SCM device) { @@ -105,7 +97,6 @@ IrrlichtDevice_getVideoDriver (SCM device) return scm_from_pointer ((void*)driver, NULL); } - SCM IrrlichtDevice_isWindowActive (SCM device) { @@ -113,7 +104,6 @@ IrrlichtDevice_isWindowActive (SCM device) (((IrrlichtDevice*)scm_to_pointer (device))->isWindowActive ()); } - SCM IrrlichtDevice_run (SCM device) { @@ -121,7 +111,6 @@ IrrlichtDevice_run (SCM device) (((IrrlichtDevice*)scm_to_pointer (device))->run ()); } - template SCM IrrlichtDevice_setEventReceiver (SCM device, @@ -132,7 +121,6 @@ IrrlichtDevice_setEventReceiver (SCM device, return SCM_UNSPECIFIED; } - SCM IrrlichtDevice_setResizable (SCM device, SCM resize) @@ -142,7 +130,6 @@ IrrlichtDevice_setResizable (SCM device, return SCM_UNSPECIFIED; } - SCM IrrlichtDevice_setWindowCaption (SCM device, SCM text) @@ -152,7 +139,6 @@ IrrlichtDevice_setWindowCaption (SCM device, return SCM_UNSPECIFIED; } - SCM IrrlichtDevice_yield (SCM device) { @@ -160,26 +146,21 @@ IrrlichtDevice_yield (SCM device) return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_device (void) - { - 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); - DEFINE_GSUBR ("IrrlichtDevice_getSceneManager", 1, 0, 0, IrrlichtDevice_getSceneManager); - DEFINE_GSUBR ("IrrlichtDevice_getTimer", 1, 0, 0, IrrlichtDevice_getTimer); - DEFINE_GSUBR ("IrrlichtDevice_getVideoDriver", 1, 0, 0, IrrlichtDevice_getVideoDriver); - DEFINE_GSUBR ("IrrlichtDevice_isWindowActive", 1, 0, 0, IrrlichtDevice_isWindowActive); - DEFINE_GSUBR ("IrrlichtDevice_run", 1, 0, 0, IrrlichtDevice_run); - DEFINE_GSUBR ("IrrlichtDevice_setEventReceiver_IEventReceiver", 2, 0, 0, - IrrlichtDevice_setEventReceiver); - DEFINE_GSUBR ("IrrlichtDevice_setResizable", 2, 0, 0, IrrlichtDevice_setResizable); - DEFINE_GSUBR ("IrrlichtDevice_setWindowCaption", 2, 0, 0, IrrlichtDevice_setWindowCaption); - DEFINE_GSUBR ("IrrlichtDevice_yield", 1, 0, 0, IrrlichtDevice_yield); - } - +void +init_device (void) +{ + 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); + DEFINE_GSUBR ("IrrlichtDevice_getSceneManager", 1, 0, 0, IrrlichtDevice_getSceneManager); + DEFINE_GSUBR ("IrrlichtDevice_getTimer", 1, 0, 0, IrrlichtDevice_getTimer); + DEFINE_GSUBR ("IrrlichtDevice_getVideoDriver", 1, 0, 0, IrrlichtDevice_getVideoDriver); + DEFINE_GSUBR ("IrrlichtDevice_isWindowActive", 1, 0, 0, IrrlichtDevice_isWindowActive); + DEFINE_GSUBR ("IrrlichtDevice_run", 1, 0, 0, IrrlichtDevice_run); + DEFINE_GSUBR ("IrrlichtDevice_setEventReceiver_IEventReceiver", 2, 0, 0, + IrrlichtDevice_setEventReceiver); + DEFINE_GSUBR ("IrrlichtDevice_setResizable", 2, 0, 0, IrrlichtDevice_setResizable); + DEFINE_GSUBR ("IrrlichtDevice_setWindowCaption", 2, 0, 0, IrrlichtDevice_setWindowCaption); + DEFINE_GSUBR ("IrrlichtDevice_yield", 1, 0, 0, IrrlichtDevice_yield); } diff --git a/src/device.h b/src/device.h index 6c6a1d9..5081ccd 100644 --- a/src/device.h +++ b/src/device.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_DEVICE_H_INCLUDED__ #define __GUILE_IRRLICHT_DEVICE_H_INCLUDED__ -extern "C" { - void - init_device (void); -} +void +init_device (void); #endif diff --git a/src/dimension2d.cpp b/src/dimension2d.cpp index 03d4fa6..7db4cfc 100644 --- a/src/dimension2d.cpp +++ b/src/dimension2d.cpp @@ -23,10 +23,8 @@ #include #include "dimension2d.h" - using namespace irr; - core::dimension2d scm_to_dimension2d_u32 (SCM dimension2d) { diff --git a/src/driver-types.cpp b/src/driver-types.cpp index d0fec50..d18ecfa 100644 --- a/src/driver-types.cpp +++ b/src/driver-types.cpp @@ -23,10 +23,8 @@ #include #include "driver-types.h" - using namespace irr; - video::E_DRIVER_TYPE scm_to_driver_type (SCM driver_type) { diff --git a/src/event-receiver.cpp b/src/event-receiver.cpp index 293f48f..cae9191 100644 --- a/src/event-receiver.cpp +++ b/src/event-receiver.cpp @@ -25,10 +25,8 @@ #include "gsubr.h" #include "keycodes.h" - using namespace irr; - SCM IEventRecevier_make (SCM proc_on_event) { @@ -52,7 +50,6 @@ IEventRecevier_make (SCM proc_on_event) return scm_from_pointer ((void*)receiver, NULL); } - SCM SEvent_EventType (SCM event) { @@ -60,7 +57,6 @@ SEvent_EventType (SCM event) (((SEvent*)scm_to_pointer (event))->EventType); } - SCM SEvent_SGUIEvent_Caller (SCM event) { @@ -69,7 +65,6 @@ SEvent_SGUIEvent_Caller (SCM event) return scm_from_pointer ((void*)caller, NULL); } - SCM SEvent_SGUIEvent_EventType (SCM event) { @@ -77,7 +72,6 @@ SEvent_SGUIEvent_EventType (SCM event) (((SEvent*)scm_to_pointer (event))->GUIEvent.EventType); } - SCM SEvent_SKeyInput_Key (SCM event) { @@ -85,7 +79,6 @@ SEvent_SKeyInput_Key (SCM event) (((SEvent*)scm_to_pointer (event))->KeyInput.Key); } - SCM SEvent_SKeyInput_PressedDown (SCM event) { @@ -93,20 +86,15 @@ SEvent_SKeyInput_PressedDown (SCM event) (((SEvent*)scm_to_pointer (event))->KeyInput.PressedDown); } - -extern "C" { - - void - init_event_receiver (void) - { - DEFINE_GSUBR ("IEventRecevier_make", 1, 0, 0, IEventRecevier_make); - DEFINE_GSUBR ("SEvent_EventType", 1, 0, 0, SEvent_EventType); - DEFINE_GSUBR ("SEvent_SGUIEvent_Caller", 1, 0, 0, SEvent_SGUIEvent_Caller); - DEFINE_GSUBR ("SEvent_SGUIEvent_EventType", 1, 0, 0, SEvent_SGUIEvent_EventType); - DEFINE_GSUBR ("SEvent_SKeyInput_Key", 1, 0, 0, SEvent_SKeyInput_Key); - DEFINE_GSUBR ("SEvent_SKeyInput_PressedDown", 1, 0, 0, SEvent_SKeyInput_PressedDown); - } - +void +init_event_receiver (void) +{ + DEFINE_GSUBR ("IEventRecevier_make", 1, 0, 0, IEventRecevier_make); + DEFINE_GSUBR ("SEvent_EventType", 1, 0, 0, SEvent_EventType); + DEFINE_GSUBR ("SEvent_SGUIEvent_Caller", 1, 0, 0, SEvent_SGUIEvent_Caller); + DEFINE_GSUBR ("SEvent_SGUIEvent_EventType", 1, 0, 0, SEvent_SGUIEvent_EventType); + DEFINE_GSUBR ("SEvent_SKeyInput_Key", 1, 0, 0, SEvent_SKeyInput_Key); + DEFINE_GSUBR ("SEvent_SKeyInput_PressedDown", 1, 0, 0, SEvent_SKeyInput_PressedDown); } SCM @@ -145,7 +133,6 @@ scm_from_event_type (EEVENT_TYPE event_type) } } - SCM scm_from_gui_event_type (gui::EGUI_EVENT_TYPE gui_event_type) { diff --git a/src/event-receiver.h b/src/event-receiver.h index 510f6dc..5df68b7 100644 --- a/src/event-receiver.h +++ b/src/event-receiver.h @@ -25,10 +25,8 @@ #include #include -extern "C" { - void - init_event_receiver (void); -} +void +init_event_receiver (void); SCM scm_from_event_type (irr::EEVENT_TYPE event_type); diff --git a/src/file-archive.cpp b/src/file-archive.cpp index 10d3dbd..1527520 100644 --- a/src/file-archive.cpp +++ b/src/file-archive.cpp @@ -23,10 +23,8 @@ #include #include "file-archive.h" - using namespace irr; - io::E_FILE_ARCHIVE_TYPE scm_to_file_archive_type (SCM file_archive_type) { diff --git a/src/file-system.cpp b/src/file-system.cpp index 5b872a5..204e25d 100644 --- a/src/file-system.cpp +++ b/src/file-system.cpp @@ -25,10 +25,8 @@ #include "file-system.h" #include "gsubr.h" - using namespace irr; - SCM IFileSystem_addFileArchive (SCM file_system, SCM filename, @@ -55,13 +53,8 @@ IFileSystem_addFileArchive (SCM file_system, retArchiveReference)); } - -extern "C" { - - void - init_file_system (void) - { - DEFINE_GSUBR ("IFileSystem_addFileArchive", 7, 0, 0, IFileSystem_addFileArchive); - } - +void +init_file_system (void) +{ + DEFINE_GSUBR ("IFileSystem_addFileArchive", 7, 0, 0, IFileSystem_addFileArchive); } diff --git a/src/file-system.h b/src/file-system.h index b05df20..947c8cc 100644 --- a/src/file-system.h +++ b/src/file-system.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_FILE_SYSTEM_H_INCLUDED__ #define __GUILE_IRRLICHT_FILE_SYSTEM_H_INCLUDED__ -extern "C" { - void - init_file_system (void); -} +void +init_file_system (void); #endif diff --git a/src/gui-environment.cpp b/src/gui-environment.cpp index 92e4a7b..9c45b35 100644 --- a/src/gui-environment.cpp +++ b/src/gui-environment.cpp @@ -27,10 +27,8 @@ #include "rect.h" #include "wchar.h" - using namespace irr; - template SCM IGUIEnvironment_addButton (SCM gui_environment, @@ -50,7 +48,6 @@ IGUIEnvironment_addButton (SCM gui_environment, return scm_from_pointer ((void*)button, NULL); } - template SCM IGUIEnvironment_addEditBox (SCM gui_environment, @@ -70,7 +67,6 @@ IGUIEnvironment_addEditBox (SCM gui_environment, return scm_from_pointer ((void*)editbox, NULL); } - template SCM IGUIEnvironment_addImage (SCM gui_environment, @@ -92,7 +88,6 @@ IGUIEnvironment_addImage (SCM gui_environment, return scm_from_pointer ((void*) new_image, NULL); } - template SCM IGUIEnvironment_addListBox (SCM gui_environment, @@ -110,7 +105,6 @@ IGUIEnvironment_addListBox (SCM gui_environment, return scm_from_pointer ((void*)listbox, NULL); } - template SCM IGUIEnvironment_addScrollBar (SCM gui_environment, @@ -128,7 +122,6 @@ IGUIEnvironment_addScrollBar (SCM gui_environment, return scm_from_pointer ((void*)scrollbar, NULL); } - template SCM IGUIEnvironment_addStaticText (SCM gui_environment, @@ -152,7 +145,6 @@ IGUIEnvironment_addStaticText (SCM gui_environment, return scm_from_pointer ((void*)static_text, NULL); } - template SCM IGUIEnvironment_addWindow (SCM gui_environment, @@ -172,7 +164,6 @@ IGUIEnvironment_addWindow (SCM gui_environment, return scm_from_pointer ((void*)window, NULL); } - SCM IGUIEnvironment_drawAll (SCM gui_environment) { @@ -180,7 +171,6 @@ IGUIEnvironment_drawAll (SCM gui_environment) return SCM_UNSPECIFIED; } - SCM IGUIEnvironment_getBuiltInFont (SCM gui_environment) { @@ -189,7 +179,6 @@ IGUIEnvironment_getBuiltInFont (SCM gui_environment) return scm_from_pointer ((void*)font, NULL); } - SCM IGUIEnvironment_getFont (SCM gui_environment, SCM filename) @@ -200,7 +189,6 @@ IGUIEnvironment_getFont (SCM gui_environment, return scm_from_pointer ((void*)font, NULL); } - SCM IGUIEnvironment_getSkin (SCM gui_environment) { @@ -209,30 +197,25 @@ IGUIEnvironment_getSkin (SCM gui_environment) return scm_from_pointer ((void*)skin, NULL); } - -extern "C" { - - void - init_gui_environment (void) - { - 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); - } - +void +init_gui_environment (void) +{ + 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-environment.h b/src/gui-environment.h index 95b9277..d621b84 100644 --- a/src/gui-environment.h +++ b/src/gui-environment.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_GUI_ENVIRONMENT_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_ENVIRONMENT_H_INCLUDED__ -extern "C" { - void - init_gui_environment (void); -} +void +init_gui_environment (void); #endif diff --git a/src/gui-in-out-fader.cpp b/src/gui-in-out-fader.cpp index 028c84d..0e39bca 100644 --- a/src/gui-in-out-fader.cpp +++ b/src/gui-in-out-fader.cpp @@ -25,10 +25,8 @@ #include "gsubr.h" #include "gui-in-out-fader.h" - using namespace irr; - SCM IGUIInOutFader_setColor (SCM in_out_fader, SCM color, @@ -47,13 +45,8 @@ IGUIInOutFader_setColor (SCM in_out_fader, return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_gui_in_out_fader (void) - { - DEFINE_GSUBR ("IGUIInOutFader_setColor", 2, 1, 0, IGUIInOutFader_setColor); - } - +void +init_gui_in_out_fader (void) +{ + DEFINE_GSUBR ("IGUIInOutFader_setColor", 2, 1, 0, IGUIInOutFader_setColor); } diff --git a/src/gui-in-out-fader.h b/src/gui-in-out-fader.h index 5f0db12..1e9c4d1 100644 --- a/src/gui-in-out-fader.h +++ b/src/gui-in-out-fader.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_GUI_IN_OUT_FADER_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_IN_OUT_FADER_H_INCLUDED__ -extern "C" { - void - init_gui_in_out_fader (void); -} +void +init_gui_in_out_fader (void); #endif diff --git a/src/gui-listbox.cpp b/src/gui-listbox.cpp index 08b3b22..e53ba49 100644 --- a/src/gui-listbox.cpp +++ b/src/gui-listbox.cpp @@ -25,10 +25,8 @@ #include "gsubr.h" #include "wchar.h" - using namespace irr; - SCM IGUIListBox_addItem (SCM gui_listbox, SCM text, @@ -48,13 +46,8 @@ IGUIListBox_addItem (SCM gui_listbox, return scm_from_uint32 (item_id); } - -extern "C" { - - void - init_gui_listbox (void) - { - DEFINE_GSUBR ("IGUIListBox_addItem", 2, 1, 0, IGUIListBox_addItem); - } - +void +init_gui_listbox (void) +{ + DEFINE_GSUBR ("IGUIListBox_addItem", 2, 1, 0, IGUIListBox_addItem); } diff --git a/src/gui-listbox.h b/src/gui-listbox.h index 4eb425f..0a6d016 100644 --- a/src/gui-listbox.h +++ b/src/gui-listbox.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_GUI_LISTBOX_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_LISTBOX_H_INCLUDED__ -extern "C" { - void - init_gui_listbox (void); -} +void +init_gui_listbox (void); #endif diff --git a/src/gui-scrollbar.cpp b/src/gui-scrollbar.cpp index 37f4f95..236dd75 100644 --- a/src/gui-scrollbar.cpp +++ b/src/gui-scrollbar.cpp @@ -24,10 +24,8 @@ #include "gui-scrollbar.h" #include "gsubr.h" - using namespace irr; - SCM IGUIScrollBar_getPos (SCM gui_scrollbar) { @@ -35,7 +33,6 @@ IGUIScrollBar_getPos (SCM gui_scrollbar) (((gui::IGUIScrollBar*)scm_to_pointer (gui_scrollbar))->getPos ()); } - SCM IGUIScrollBar_setMax (SCM gui_scrollbar, SCM max) @@ -44,7 +41,6 @@ IGUIScrollBar_setMax (SCM gui_scrollbar, return SCM_UNSPECIFIED; } - SCM IGUIScrollBar_setPos (SCM gui_scrollbar, SCM pos) @@ -53,15 +49,10 @@ IGUIScrollBar_setPos (SCM gui_scrollbar, return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_gui_scrollbar (void) - { - 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); - } - +void +init_gui_scrollbar (void) +{ + 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-scrollbar.h b/src/gui-scrollbar.h index 421d8f3..5c55a43 100644 --- a/src/gui-scrollbar.h +++ b/src/gui-scrollbar.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_GUI_SCROLLBAR_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_SCROLLBAR_H_INCLUDED__ -extern "C" { - void - init_gui_scrollbar (void); -} +void +init_gui_scrollbar (void); #endif diff --git a/src/gui-skin.cpp b/src/gui-skin.cpp index abe13f5..f6628f1 100644 --- a/src/gui-skin.cpp +++ b/src/gui-skin.cpp @@ -25,10 +25,8 @@ #include "gsubr.h" #include "gui-skin.h" - using namespace irr; - SCM IGUISkin_getColor (SCM gui_skin, SCM color) @@ -38,7 +36,6 @@ IGUISkin_getColor (SCM gui_skin, return scm_from_color (scolor); } - SCM IGUISkin_getFont (SCM gui_skin, SCM which) @@ -48,7 +45,6 @@ IGUISkin_getFont (SCM gui_skin, return scm_from_pointer ((void*) font, NULL); } - SCM IGUISkin_setColor (SCM gui_skin, SCM which, @@ -60,7 +56,6 @@ IGUISkin_setColor (SCM gui_skin, return SCM_UNSPECIFIED; } - SCM IGUISkin_setFont (SCM gui_skin, SCM font, @@ -72,18 +67,13 @@ IGUISkin_setFont (SCM gui_skin, return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_gui_skin (void) - { - 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); - } - +void +init_gui_skin (void) +{ + 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); } gui::EGUI_DEFAULT_COLOR @@ -197,7 +187,6 @@ scm_to_default_color (SCM default_color) } } - gui::EGUI_DEFAULT_FONT scm_to_default_font (SCM default_font) { diff --git a/src/gui-skin.h b/src/gui-skin.h index 6b3a3d8..57a31d9 100644 --- a/src/gui-skin.h +++ b/src/gui-skin.h @@ -25,10 +25,8 @@ #include #include -extern "C" { - void - init_gui_skin (void); -} +void +init_gui_skin (void); irr::gui::EGUI_DEFAULT_COLOR scm_to_default_color (SCM default_color); diff --git a/src/gui-toolbar.cpp b/src/gui-toolbar.cpp index fb3ca10..997de68 100644 --- a/src/gui-toolbar.cpp +++ b/src/gui-toolbar.cpp @@ -25,10 +25,8 @@ #include "gui-toolbar.h" #include "wchar.h" - using namespace irr; - SCM IGUIToolBar_addButton (SCM gui_toolbar, SCM id, @@ -51,13 +49,8 @@ IGUIToolBar_addButton (SCM gui_toolbar, return scm_from_pointer ((void*) button, NULL); } - -extern "C" { - - void - init_gui_toolbar (void) - { - DEFINE_GSUBR ("IGUIToolBar_addButton", 8, 0, 0, IGUIToolBar_addButton); - } - +void +init_gui_toolbar (void) +{ + DEFINE_GSUBR ("IGUIToolBar_addButton", 8, 0, 0, IGUIToolBar_addButton); } diff --git a/src/gui-toolbar.h b/src/gui-toolbar.h index 537f9ce..9f5b574 100644 --- a/src/gui-toolbar.h +++ b/src/gui-toolbar.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_GUI_TOOLBAR_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_TOOLBAR_H_INCLUDED__ -extern "C" { - void - init_gui_toolbar (void); -} +void +init_gui_toolbar (void); #endif diff --git a/src/gui.cpp b/src/gui.cpp deleted file mode 100644 index 8b435df..0000000 --- a/src/gui.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - This file is part of guile-irrlicht. - - guile-irrlicht is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - guile-irrlicht is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with guile-irrlicht. If not, see - . -*/ - -#include -#include -#include "gui.h" -#include "gui-environment.h" -#include "gui-in-out-fader.h" -#include "gui-listbox.h" -#include "gui-scrollbar.h" -#include "gui-skin.h" -#include "gui-toolbar.h" - - -extern "C" { - - void - init_gui (void) - { - init_gui_environment (); - init_gui_in_out_fader (); - init_gui_listbox (); - init_gui_scrollbar (); - init_gui_skin (); - init_gui_toolbar (); - } - -} diff --git a/src/gui.h b/src/gui.h deleted file mode 100644 index b1a3bea..0000000 --- a/src/gui.h +++ /dev/null @@ -1,30 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - This file is part of guile-irrlicht. - - guile-irrlicht is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - guile-irrlicht is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with guile-irrlicht. If not, see - . -*/ - -#ifndef __GUILE_IRRLICHT_GUI_H_INCLUDED__ -#define __GUILE_IRRLICHT_GUI_H_INCLUDED__ - -extern "C" { - void - init_gui (void); -} - -#endif diff --git a/src/guile-irrlicht.cpp b/src/guile-irrlicht.cpp index ea8aa85..be39e7f 100644 --- a/src/guile-irrlicht.cpp +++ b/src/guile-irrlicht.cpp @@ -26,9 +26,14 @@ #include "cursor-control.h" #include "device.h" #include "event-receiver.h" -#include "gui.h" +#include "file-system.h" +#include "gui-environment.h" +#include "gui-in-out-fader.h" +#include "gui-listbox.h" +#include "gui-scrollbar.h" +#include "gui-skin.h" +#include "gui-toolbar.h" #include "guile-irrlicht.h" -#include "io.h" #include "material.h" #include "reference-counted.h" #include "scene-manager.h" @@ -49,8 +54,13 @@ extern "C" { init_cursor_control (); init_device (); init_event_receiver (); - init_gui (); - init_io (); + init_file_system (); + init_gui_environment (); + init_gui_in_out_fader (); + init_gui_listbox (); + init_gui_scrollbar (); + init_gui_skin (); + init_gui_toolbar (); init_material (); init_reference_counted (); init_scene_manager (); diff --git a/src/io.cpp b/src/io.cpp deleted file mode 100644 index caa8ea1..0000000 --- a/src/io.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - This file is part of guile-irrlicht. - - guile-irrlicht is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - guile-irrlicht is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with guile-irrlicht. If not, see - . -*/ - -#include "file-system.h" -#include "io.h" - -extern "C" { - - void - init_io (void) - { - init_file_system (); - } - -} diff --git a/src/io.h b/src/io.h deleted file mode 100644 index d854d6f..0000000 --- a/src/io.h +++ /dev/null @@ -1,30 +0,0 @@ -/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine - - Copyright (C) 2020 Javier Sancho - - This file is part of guile-irrlicht. - - guile-irrlicht is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - guile-irrlicht is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with guile-irrlicht. If not, see - . -*/ - -#ifndef __GUILE_IRRLICHT_IO_H_INCLUDED__ -#define __GUILE_IRRLICHT_IO_H_INCLUDED__ - -extern "C" { - void - init_io (void); -} - -#endif diff --git a/src/keycodes.cpp b/src/keycodes.cpp index 372ac5a..0f1d132 100644 --- a/src/keycodes.cpp +++ b/src/keycodes.cpp @@ -22,10 +22,8 @@ #include #include - using namespace irr; - SCM scm_from_key_code (EKEY_CODE key_code) { diff --git a/src/material-flags.cpp b/src/material-flags.cpp index 71fe9a4..0b28f00 100644 --- a/src/material-flags.cpp +++ b/src/material-flags.cpp @@ -22,10 +22,8 @@ #include #include - using namespace irr; - video::E_MATERIAL_FLAG scm_to_material_flag (SCM material_flag) { diff --git a/src/material-types.cpp b/src/material-types.cpp index 07d3b61..19511f8 100644 --- a/src/material-types.cpp +++ b/src/material-types.cpp @@ -23,10 +23,8 @@ #include #include "material-types.h" - using namespace irr; - video::E_MATERIAL_TYPE scm_to_material_type (SCM material_type) { diff --git a/src/material.cpp b/src/material.cpp index 4be4054..72467ac 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -27,10 +27,8 @@ #include "material.h" #include "material-types.h" - using namespace irr; - SCM video_SMaterial_make (SCM rest) { @@ -121,18 +119,12 @@ video_SMaterial_make (SCM rest) return scm_from_pointer ((void*) material, NULL); } - -extern "C" { - - void - init_material (void) - { - DEFINE_GSUBR ("video_SMaterial_make", 0, 0, 1, video_SMaterial_make); - } - +void +init_material (void) +{ + DEFINE_GSUBR ("video_SMaterial_make", 0, 0, 1, video_SMaterial_make); } - video::E_ANTI_ALIASING_MODE scm_to_anti_aliasing_mode (SCM anti_aliasing_mode) { @@ -172,7 +164,6 @@ scm_to_anti_aliasing_mode (SCM anti_aliasing_mode) } } - video::E_BLEND_OPERATION scm_to_blend_operation (SCM blend_operation) { @@ -224,7 +215,6 @@ scm_to_blend_operation (SCM blend_operation) } } - video::E_COLOR_MATERIAL scm_to_color_material (SCM color_material) { @@ -260,7 +250,6 @@ scm_to_color_material (SCM color_material) } } - video::E_COLOR_PLANE scm_to_color_plane (SCM color_plane) { @@ -300,7 +289,6 @@ scm_to_color_plane (SCM color_plane) } } - video::E_COMPARISON_FUNC scm_to_comparison_func (SCM comparison_func) { @@ -344,7 +332,6 @@ scm_to_comparison_func (SCM comparison_func) } } - video::E_POLYGON_OFFSET scm_to_polygon_offset (SCM polygon_offset) { diff --git a/src/material.h b/src/material.h index b94ffb1..15c6345 100644 --- a/src/material.h +++ b/src/material.h @@ -25,10 +25,8 @@ #include #include -extern "C" { - void - init_material (void); -} +void +init_material (void); irr::video::E_ANTI_ALIASING_MODE scm_to_anti_aliasing_mode (SCM anti_aliasing_mode); diff --git a/src/matrix4.cpp b/src/matrix4.cpp index 67d58ed..4506166 100644 --- a/src/matrix4.cpp +++ b/src/matrix4.cpp @@ -23,10 +23,8 @@ #include #include "matrix4.h" - using namespace irr; - SCM scm_from_matrix4 (core::matrix4 cmatrix) { @@ -48,7 +46,6 @@ scm_from_matrix4 (core::matrix4 cmatrix) scm_from_double (cmatrix[15]))); } - core::matrix4 scm_to_matrix4 (SCM matrix) { diff --git a/src/position2d.cpp b/src/position2d.cpp index 0e41c50..4d063d4 100644 --- a/src/position2d.cpp +++ b/src/position2d.cpp @@ -23,10 +23,8 @@ #include #include "position2d.h" - using namespace irr; - SCM scm_from_position2d_s32 (core::position2d position2d) { diff --git a/src/primitive-types.cpp b/src/primitive-types.cpp index 8cd2a50..9704803 100644 --- a/src/primitive-types.cpp +++ b/src/primitive-types.cpp @@ -23,10 +23,8 @@ #include #include "primitive-types.h" - using namespace irr; - scene::E_PRIMITIVE_TYPE scm_to_primitive_type (SCM primitive_type) { diff --git a/src/rect.cpp b/src/rect.cpp index 892afc8..ce109c6 100644 --- a/src/rect.cpp +++ b/src/rect.cpp @@ -23,10 +23,8 @@ #include #include "rect.h" - using namespace irr; - core::rect scm_to_rect_s32 (SCM rect) { diff --git a/src/reference-counted.cpp b/src/reference-counted.cpp index ea019b0..1bdc8da 100644 --- a/src/reference-counted.cpp +++ b/src/reference-counted.cpp @@ -24,10 +24,8 @@ #include "gsubr.h" #include "reference-counted.h" - using namespace irr; - template SCM IReferenceCounted_drop (SCM obj) @@ -35,13 +33,8 @@ IReferenceCounted_drop (SCM obj) return scm_from_bool (((T) scm_to_pointer (obj))->drop ()); } - -extern "C" { - - void - init_reference_counted (void) - { - DEFINE_GSUBR ("IrrlichtDevice_drop", 1, 0, 0, IReferenceCounted_drop); - } - +void +init_reference_counted (void) +{ + DEFINE_GSUBR ("IrrlichtDevice_drop", 1, 0, 0, IReferenceCounted_drop); } diff --git a/src/reference-counted.h b/src/reference-counted.h index 47cf799..6c0a87f 100644 --- a/src/reference-counted.h +++ b/src/reference-counted.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_REFERENCE_COUNTED_H_INCLUDED__ #define __GUILE_IRRLICHT_REFERENCE_COUNTED_H_INCLUDED__ -extern "C" { - void - init_reference_counted (void); -} +void +init_reference_counted (void); #endif diff --git a/src/scene-manager.cpp b/src/scene-manager.cpp index f969383..427faf5 100644 --- a/src/scene-manager.cpp +++ b/src/scene-manager.cpp @@ -25,10 +25,8 @@ #include "scene-manager.h" #include "vector3d.h" - using namespace irr; - template SCM ISceneManager_addAnimatedMeshSceneNode (SCM scene_manager, @@ -52,7 +50,6 @@ ISceneManager_addAnimatedMeshSceneNode (SCM scene_manager, return scm_from_pointer ((void*) node, NULL); } - template SCM ISceneManager_addCameraSceneNode (SCM scene_manager, @@ -72,7 +69,6 @@ ISceneManager_addCameraSceneNode (SCM scene_manager, return scm_from_pointer ((void*) camera, NULL); } - template SCM ISceneManager_addCameraSceneNodeFPS (SCM scene_manager, @@ -118,7 +114,6 @@ ISceneManager_addCameraSceneNodeFPS (SCM scene_manager, return scm_from_pointer ((void*) camera, NULL); } - template SCM ISceneManager_addCubeSceneNode (SCM scene_manager, @@ -140,7 +135,6 @@ ISceneManager_addCubeSceneNode (SCM scene_manager, return scm_from_pointer ((void*) node, NULL); } - template SCM ISceneManager_addCustomSceneNode (SCM scene_manager, @@ -226,7 +220,6 @@ ISceneManager_addCustomSceneNode (SCM scene_manager, return scm_from_pointer ((void*) node, NULL); } - template SCM ISceneManager_addOctreeSceneNode (SCM scene_manager, @@ -246,7 +239,6 @@ ISceneManager_addOctreeSceneNode (SCM scene_manager, return scm_from_pointer ((void*) node, NULL); } - template SCM ISceneManager_addSphereSceneNode (SCM scene_manager, @@ -270,7 +262,6 @@ ISceneManager_addSphereSceneNode (SCM scene_manager, return scm_from_pointer ((void*) node, NULL); } - SCM ISceneManager_createFlyCircleAnimator (SCM scene_manager, SCM center, @@ -291,7 +282,6 @@ ISceneManager_createFlyCircleAnimator (SCM scene_manager, return scm_from_pointer ((void*) anim, NULL); } - SCM ISceneManager_createFlyStraightAnimator (SCM scene_manager, SCM start_point, @@ -310,7 +300,6 @@ ISceneManager_createFlyStraightAnimator (SCM scene_manager, return scm_from_pointer ((void*) anim, NULL); } - SCM ISceneManager_createRotationAnimator (SCM scene_manager, SCM rotation_speed) @@ -321,7 +310,6 @@ ISceneManager_createRotationAnimator (SCM scene_manager, return scm_from_pointer ((void*) anim, NULL); } - SCM ISceneManager_drawAll (SCM scene_manager) { @@ -329,7 +317,6 @@ ISceneManager_drawAll (SCM scene_manager) return SCM_UNSPECIFIED; } - SCM ISceneManager_getMesh (SCM scene_manager, SCM filename) @@ -339,7 +326,6 @@ ISceneManager_getMesh (SCM scene_manager, return scm_from_pointer ((void*) mesh, NULL); } - SCM ISceneManager_getRootSceneNode (SCM scene_manager) { @@ -347,37 +333,32 @@ ISceneManager_getRootSceneNode (SCM scene_manager) return scm_from_pointer ((void*) smgr->getRootSceneNode (), NULL); } - -extern "C" { - - void - init_scene_manager (void) - { - 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); - } - +void +init_scene_manager (void) +{ + 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-manager.h b/src/scene-manager.h index 8722c8f..4643336 100644 --- a/src/scene-manager.h +++ b/src/scene-manager.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_SCENE_MANAGER_H_INCLUDED__ #define __GUILE_IRRLICHT_SCENE_MANAGER_H_INCLUDED__ -extern "C" { - void - init_scene_manager (void); -} +void +init_scene_manager (void); #endif diff --git a/src/scene-node.cpp b/src/scene-node.cpp index 0caea37..29d5214 100644 --- a/src/scene-node.cpp +++ b/src/scene-node.cpp @@ -27,10 +27,8 @@ #include "scene-node.h" #include "vector3d.h" - using namespace irr; - template SCM ISceneNode_addAnimator (SCM scene_node, @@ -41,7 +39,6 @@ ISceneNode_addAnimator (SCM scene_node, return SCM_UNSPECIFIED; } - template SCM ISceneNode_getAbsoluteTransformation (SCM scene_node) @@ -50,7 +47,6 @@ ISceneNode_getAbsoluteTransformation (SCM scene_node) return scm_from_matrix4 (node->getAbsoluteTransformation ()); } - template SCM ISceneNode_getPosition (SCM scene_node) @@ -59,7 +55,6 @@ ISceneNode_getPosition (SCM scene_node) return scm_from_vector3df (node->getPosition ()); } - template SCM ISceneNode_setMaterialFlag (SCM scene_node, @@ -71,7 +66,6 @@ ISceneNode_setMaterialFlag (SCM scene_node, return SCM_UNSPECIFIED; } - template SCM ISceneNode_setMaterialTexture (SCM scene_node, @@ -84,7 +78,6 @@ ISceneNode_setMaterialTexture (SCM scene_node, return SCM_UNSPECIFIED; } - template SCM ISceneNode_setPosition (SCM scene_node, @@ -95,7 +88,6 @@ ISceneNode_setPosition (SCM scene_node, return SCM_UNSPECIFIED; } - template SCM ISceneNode_setRotation (SCM scene_node, @@ -106,7 +98,6 @@ ISceneNode_setRotation (SCM scene_node, return SCM_UNSPECIFIED; } - template SCM ISceneNode_setScale (SCM scene_node, @@ -117,57 +108,52 @@ ISceneNode_setScale (SCM scene_node, return SCM_UNSPECIFIED; } - -extern "C" { - - void - init_scene_node (void) - { - 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); - } - +void +init_scene_node (void) +{ + 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/scene-node.h b/src/scene-node.h index 0ff17be..e333075 100644 --- a/src/scene-node.h +++ b/src/scene-node.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_SCENE_NODE_H_INCLUDED__ #define __GUILE_IRRLICHT_SCENE_NODE_H_INCLUDED__ -extern "C" { - void - init_scene_node (void); -} +void +init_scene_node (void); #endif diff --git a/src/timer.cpp b/src/timer.cpp index 48ea549..4a04254 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -24,23 +24,16 @@ #include "gsubr.h" #include "timer.h" - using namespace irr; - SCM ITimer_getTime (SCM timer) { return scm_from_uint32 (((ITimer*) scm_to_pointer (timer))->getTime()); } - -extern "C" { - - void - init_timer (void) - { - DEFINE_GSUBR ("ITimer_getTime", 1, 0, 0, ITimer_getTime); - } - +void +init_timer (void) +{ + DEFINE_GSUBR ("ITimer_getTime", 1, 0, 0, ITimer_getTime); } diff --git a/src/timer.h b/src/timer.h index fbae584..501bf13 100644 --- a/src/timer.h +++ b/src/timer.h @@ -22,9 +22,7 @@ #ifndef __GUILE_IRRLICHT_TIMER_H_INCLUDED__ #define __GUILE_IRRLICHT_TIMER_H_INCLUDED__ -extern "C" { - void - init_timer (void); -} +void +init_timer (void); #endif diff --git a/src/vector2d.cpp b/src/vector2d.cpp index 4e08818..52e8dcc 100644 --- a/src/vector2d.cpp +++ b/src/vector2d.cpp @@ -23,10 +23,8 @@ #include #include "vector2d.h" - using namespace irr; - core::vector2df scm_to_vector2df (SCM vector2d) { diff --git a/src/vector3d.cpp b/src/vector3d.cpp index a192ca6..566a441 100644 --- a/src/vector3d.cpp +++ b/src/vector3d.cpp @@ -23,10 +23,8 @@ #include #include "vector3d.h" - using namespace irr; - SCM scm_from_vector3df (core::vector3df vector3d) { @@ -35,7 +33,6 @@ scm_from_vector3df (core::vector3df vector3d) scm_from_double (vector3d.Z)); } - core::vector3df scm_to_vector3df (SCM vector3d) { diff --git a/src/vertex3d.cpp b/src/vertex3d.cpp index d7629ea..649bc56 100644 --- a/src/vertex3d.cpp +++ b/src/vertex3d.cpp @@ -27,10 +27,8 @@ #include "vector3d.h" #include "vertex3d.h" - using namespace irr; - SCM video_S3DVertex_make (SCM position, SCM normal, @@ -45,26 +43,19 @@ video_S3DVertex_make (SCM position, return scm_from_pointer ((void*) vertex, NULL); } - SCM video_S3DVertex_Pos (SCM vertex) { video::S3DVertex* s3dvertex = (video::S3DVertex*) scm_to_pointer (vertex); return scm_from_vector3df (s3dvertex->Pos); } - -extern "C" { - - void - init_vertex3d (void) - { - DEFINE_GSUBR ("video_S3DVertex_make", 4, 0, 0, video_S3DVertex_make); - DEFINE_GSUBR ("video_S3DVertex_Pos", 1, 0, 0, video_S3DVertex_Pos); - } - +void +init_vertex3d (void) +{ + DEFINE_GSUBR ("video_S3DVertex_make", 4, 0, 0, video_S3DVertex_make); + DEFINE_GSUBR ("video_S3DVertex_Pos", 1, 0, 0, video_S3DVertex_Pos); } - video::E_VERTEX_TYPE scm_to_vertex_type (SCM vertex_type) { diff --git a/src/vertex3d.h b/src/vertex3d.h index 4e8bb20..adca1ea 100644 --- a/src/vertex3d.h +++ b/src/vertex3d.h @@ -25,10 +25,8 @@ #include #include -extern "C" { - void - init_vertex3d (void); -} +void +init_vertex3d (void); irr::video::E_VERTEX_TYPE scm_to_vertex_type (SCM vertex_type); diff --git a/src/video-driver.cpp b/src/video-driver.cpp index e2cb9cf..6ec0183 100644 --- a/src/video-driver.cpp +++ b/src/video-driver.cpp @@ -29,10 +29,8 @@ #include "vertex3d.h" #include "video-driver.h" - using namespace irr; - SCM IVideoDriver_beginScene (SCM video_driver, SCM back_buffer, @@ -58,7 +56,6 @@ IVideoDriver_beginScene (SCM video_driver, sourceRectAddress)); } - SCM IVideoDriver_drawVertexPrimitiveList (SCM video_driver, SCM vertices, @@ -102,7 +99,6 @@ IVideoDriver_drawVertexPrimitiveList (SCM video_driver, return SCM_UNSPECIFIED; } - SCM IVideoDriver_endScene (SCM video_driver) { @@ -110,7 +106,6 @@ IVideoDriver_endScene (SCM video_driver) return scm_from_bool (driver->endScene ()); } - SCM IVideoDriver_getFPS (SCM video_driver) { @@ -118,7 +113,6 @@ IVideoDriver_getFPS (SCM video_driver) return scm_from_int32 (driver->getFPS ()); } - SCM IVideoDriver_getTexture (SCM video_driver, SCM filename) @@ -128,7 +122,6 @@ IVideoDriver_getTexture (SCM video_driver, return scm_from_pointer ((void*) texture, NULL); } - SCM IVideoDriver_setMaterial (SCM video_driver, SCM material) @@ -138,7 +131,6 @@ IVideoDriver_setMaterial (SCM video_driver, return SCM_UNSPECIFIED; } - SCM IVideoDriver_setTransform (SCM video_driver, SCM state, @@ -151,21 +143,17 @@ IVideoDriver_setTransform (SCM video_driver, } -extern "C" { - - void - init_video_driver (void) - { - 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); - } - +void +init_video_driver (void) +{ + 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); } video::E_TRANSFORMATION_STATE diff --git a/src/video-driver.h b/src/video-driver.h index d1b4bab..05dcf13 100644 --- a/src/video-driver.h +++ b/src/video-driver.h @@ -25,10 +25,8 @@ #include #include -extern "C" { - void - init_video_driver (void); -} +void +init_video_driver (void); irr::video::E_TRANSFORMATION_STATE scm_to_transformation_state (SCM transformation_state); -- 2.39.2