From 6343b5b67dfe68e1e7270ba6c100603f157d1b31 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sun, 10 May 2020 13:46:45 +0200 Subject: [PATCH] useless code --- src/animated-mesh-scene-node.h | 12 ----- src/animated-mesh.h | 8 ---- src/box3d.h | 14 ------ src/color.cpp | 9 ++-- src/cursor-control.h | 10 ----- src/device.h | 53 ---------------------- src/event-receiver.h | 18 -------- src/file-system.h | 12 ----- src/gui-environment.h | 80 ---------------------------------- src/gui-in-out-fader.h | 8 ---- src/gui-listbox.h | 8 ---- src/gui-scrollbar.h | 3 -- src/gui-toolbar.h | 3 -- src/gui.h | 3 -- src/guile-irrlicht.h | 3 -- src/io.h | 2 - src/reference-counted.h | 3 -- src/wrapped.h | 77 -------------------------------- 18 files changed, 6 insertions(+), 320 deletions(-) delete mode 100644 src/wrapped.h diff --git a/src/animated-mesh-scene-node.h b/src/animated-mesh-scene-node.h index 4cd5c7b..ead8ba0 100644 --- a/src/animated-mesh-scene-node.h +++ b/src/animated-mesh-scene-node.h @@ -22,18 +22,6 @@ #ifndef __GUILE_IRRLICHT_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ #define __GUILE_IRRLICHT_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ -#include -#include - -SCM -scene_IAnimatedMeshSceneNode_setFrameLoop (SCM animated_mesh_scene_node, - SCM begin, - SCM end); - -SCM -scene_IAnimatedMeshSceneNode_setMD2Animation (SCM animated_mesh_scene_node, - SCM anim); - extern "C" { void init_animated_mesh_scene_node (void); diff --git a/src/animated-mesh.h b/src/animated-mesh.h index 2795d55..f44df1d 100644 --- a/src/animated-mesh.h +++ b/src/animated-mesh.h @@ -22,14 +22,6 @@ #ifndef __GUILE_IRRLICHT_ANIMATED_MESH_H_INCLUDED__ #define __GUILE_IRRLICHT_ANIMATED_MESH_H_INCLUDED__ -#include -#include - - -SCM -scene_IAnimatedMesh_setAnimationSpeed (SCM animated_mesh, - SCM frames_per_second); - extern "C" { void init_animated_mesh (void); diff --git a/src/box3d.h b/src/box3d.h index 4bb2731..ce91f67 100644 --- a/src/box3d.h +++ b/src/box3d.h @@ -22,20 +22,6 @@ #ifndef __GUILE_IRRLICHT_AABBOX_3D_H_INCLUDED__ #define __GUILE_IRRLICHT_AABBOX_3D_H_INCLUDED__ -#include -#include - -SCM -core_aabbox3d_addInternalPoint (SCM box3d, - SCM point); - -SCM -core_aabbox3d_make (); - -SCM -core_aabbox3d_reset (SCM box3d, - SCM init_value); - extern "C" { void init_box3d (void); diff --git a/src/color.cpp b/src/color.cpp index d21704d..6d836d3 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -24,8 +24,11 @@ #include "color.h" +using namespace irr; + + SCM -scm_from_color (irr::video::SColor color) +scm_from_color (video::SColor color) { return scm_list_4 (scm_from_uint32 (color.getAlpha ()), scm_from_uint32 (color.getRed ()), @@ -34,10 +37,10 @@ scm_from_color (irr::video::SColor color) } -irr::video::SColor +video::SColor scm_to_color (SCM color) { - return irr::video::SColor + return video::SColor (scm_to_uint32 (scm_car (color)), scm_to_uint32 (scm_cadr (color)), scm_to_uint32 (scm_caddr (color)), diff --git a/src/cursor-control.h b/src/cursor-control.h index dba6064..73e3537 100644 --- a/src/cursor-control.h +++ b/src/cursor-control.h @@ -22,16 +22,6 @@ #ifndef __GUILE_IRRLICHT_CURSOR_CONTROL_H_INCLUDED__ #define __GUILE_IRRLICHT_CURSOR_CONTROL_H_INCLUDED__ -#include -#include - -SCM -gui_ICursorControl_getPosition (SCM cursor_control); - -SCM -gui_ICursorControl_setPosition (SCM cursor_control, - SCM position); - extern "C" { void init_cursor_control (void); diff --git a/src/device.h b/src/device.h index 94f63c9..6c6a1d9 100644 --- a/src/device.h +++ b/src/device.h @@ -22,59 +22,6 @@ #ifndef __GUILE_IRRLICHT_DEVICE_H_INCLUDED__ #define __GUILE_IRRLICHT_DEVICE_H_INCLUDED__ -#include -#include - -template -SCM -createDevice (SCM device_type, - SCM window_size, - SCM bits, - SCM fullscreen, - SCM stencilbuffer, - SCM vsync, - SCM receiver); - -SCM -IrrlichtDevice_getCursorControl (SCM device); - -SCM -IrrlichtDevice_getFileSystem (SCM device); - -SCM -IrrlichtDevice_getGUIEnvironment (SCM device); - -SCM -IrrlichtDevice_getSceneManager (SCM device); - -SCM -IrrlichtDevice_getTimer (SCM device); - -SCM -IrrlichtDevice_getVideoDriver (SCM device); - -SCM -IrrlichtDevice_isWindowActive (SCM device); - -SCM -IrrlichtDevice_run (SCM device); - -template -SCM -IrrlichtDevice_setEventReceiver (SCM device, - SCM receiver); - -SCM -IrrlichtDevice_setResizable (SCM device, - SCM resize); - -SCM -IrrlichtDevice_setWindowCaption (SCM device, - SCM text); - -SCM -IrrlichtDevice_yield (SCM device); - extern "C" { void init_device (void); diff --git a/src/event-receiver.h b/src/event-receiver.h index 516c7b5..510f6dc 100644 --- a/src/event-receiver.h +++ b/src/event-receiver.h @@ -25,24 +25,6 @@ #include #include -SCM -IEventRecevier_make (SCM proc_on_event); - -SCM -SEvent_EventType (SCM event); - -SCM -SEvent_SGUIEvent_Caller (SCM event); - -SCM -SEvent_SGUIEvent_EventType (SCM event); - -SCM -SEvent_SKeyInput_Key (SCM event); - -SCM -SEvent_SKeyInput_PressedDown (SCM event); - extern "C" { void init_event_receiver (void); diff --git a/src/file-system.h b/src/file-system.h index 774dbcf..b05df20 100644 --- a/src/file-system.h +++ b/src/file-system.h @@ -22,18 +22,6 @@ #ifndef __GUILE_IRRLICHT_FILE_SYSTEM_H_INCLUDED__ #define __GUILE_IRRLICHT_FILE_SYSTEM_H_INCLUDED__ -#include -#include - -SCM -io_IFileSystem_addFileArchive (SCM file_system, - SCM filename, - SCM ignore_case, - SCM ignore_paths, - SCM archive_type, - SCM password, - SCM ret_archive); - extern "C" { void init_file_system (void); diff --git a/src/gui-environment.h b/src/gui-environment.h index 064cb5d..95b9277 100644 --- a/src/gui-environment.h +++ b/src/gui-environment.h @@ -22,86 +22,6 @@ #ifndef __GUILE_IRRLICHT_GUI_ENVIRONMENT_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_ENVIRONMENT_H_INCLUDED__ -#include -#include - -template -SCM -gui_IGUIEnvironment_addButton (SCM gui_environment, - SCM rectangle, - SCM parent, - SCM id, - SCM text, - SCM tooltiptext); - -template -SCM -gui_IGUIEnvironment_addEditBox (SCM gui_environment, - SCM text, - SCM rectangle, - SCM border, - SCM parent, - SCM id); - -template -SCM -gui_IGUIEnvironment_addImage (SCM gui_environment, - SCM image, - SCM position, - SCM use_alpha_channel, - SCM parent, - SCM id, - SCM text); - -template -SCM -gui_IGUIEnvironment_addListBox (SCM gui_environment, - SCM rectangle, - SCM parent, - SCM id, - SCM draw_background); - -template -SCM -gui_IGUIEnvironment_addScrollBar (SCM gui_environment, - SCM horizontal, - SCM rectangle, - SCM parent, - SCM id); - -template -SCM -gui_IGUIEnvironment_addStaticText (SCM gui_environment, - SCM text, - SCM rectangle, - SCM border, - SCM word_wrap, - SCM parent, - SCM id, - SCM fill_background); - -template -SCM -gui_IGUIEnvironment_addWindow (SCM gui_environment, - SCM rectangle, - SCM modal, - SCM text, - SCM parent, - SCM id); - -SCM -gui_IGUIEnvironment_drawAll (SCM gui_environment); - -SCM -gui_IGUIEnvironment_getBuiltInFont (SCM gui_environment); - -SCM -gui_IGUIEnvironment_getFont (SCM gui_environment, - SCM filename); - -SCM -gui_IGUIEnvironment_getSkin (SCM gui_environment); - extern "C" { void init_gui_environment (void); diff --git a/src/gui-in-out-fader.h b/src/gui-in-out-fader.h index 74c05e1..5f0db12 100644 --- a/src/gui-in-out-fader.h +++ b/src/gui-in-out-fader.h @@ -22,14 +22,6 @@ #ifndef __GUILE_IRRLICHT_GUI_IN_OUT_FADER_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_IN_OUT_FADER_H_INCLUDED__ -#include -#include - -SCM -gui_IGUIInOutFader_setColor (SCM in_out_fader, - SCM color, - SCM dest_color); - extern "C" { void init_gui_in_out_fader (void); diff --git a/src/gui-listbox.h b/src/gui-listbox.h index f4e1ff7..4eb425f 100644 --- a/src/gui-listbox.h +++ b/src/gui-listbox.h @@ -22,14 +22,6 @@ #ifndef __GUILE_IRRLICHT_GUI_LISTBOX_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_LISTBOX_H_INCLUDED__ -#include -#include - -SCM -gui_IGUIListBox_addItem (SCM gui_listbox, - SCM text, - SCM icon); - extern "C" { void init_gui_listbox (void); diff --git a/src/gui-scrollbar.h b/src/gui-scrollbar.h index 5d49a83..421d8f3 100644 --- a/src/gui-scrollbar.h +++ b/src/gui-scrollbar.h @@ -22,9 +22,6 @@ #ifndef __GUILE_IRRLICHT_GUI_SCROLLBAR_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_SCROLLBAR_H_INCLUDED__ -#include -#include - extern "C" { void init_gui_scrollbar (void); diff --git a/src/gui-toolbar.h b/src/gui-toolbar.h index e40a96f..537f9ce 100644 --- a/src/gui-toolbar.h +++ b/src/gui-toolbar.h @@ -22,9 +22,6 @@ #ifndef __GUILE_IRRLICHT_GUI_TOOLBAR_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_TOOLBAR_H_INCLUDED__ -#include -#include - extern "C" { void init_gui_toolbar (void); diff --git a/src/gui.h b/src/gui.h index 13b280e..b1a3bea 100644 --- a/src/gui.h +++ b/src/gui.h @@ -22,9 +22,6 @@ #ifndef __GUILE_IRRLICHT_GUI_H_INCLUDED__ #define __GUILE_IRRLICHT_GUI_H_INCLUDED__ -#include -#include - extern "C" { void init_gui (void); diff --git a/src/guile-irrlicht.h b/src/guile-irrlicht.h index e6276dd..f3ba249 100644 --- a/src/guile-irrlicht.h +++ b/src/guile-irrlicht.h @@ -22,9 +22,6 @@ #ifndef __GUILE_IRRLICHT_H_INCLUDED__ #define __GUILE_IRRLICHT_H_INCLUDED__ -#include -#include - extern "C" { void init_guile_irrlicht (void); diff --git a/src/io.h b/src/io.h index 83f31b6..d854d6f 100644 --- a/src/io.h +++ b/src/io.h @@ -23,10 +23,8 @@ #define __GUILE_IRRLICHT_IO_H_INCLUDED__ extern "C" { - void init_io (void); - } #endif diff --git a/src/reference-counted.h b/src/reference-counted.h index 13d8437..47cf799 100644 --- a/src/reference-counted.h +++ b/src/reference-counted.h @@ -22,9 +22,6 @@ #ifndef __GUILE_IRRLICHT_REFERENCE_COUNTED_H_INCLUDED__ #define __GUILE_IRRLICHT_REFERENCE_COUNTED_H_INCLUDED__ -#include -#include - extern "C" { void init_reference_counted (void); diff --git a/src/wrapped.h b/src/wrapped.h deleted file mode 100644 index daaaa25..0000000 --- a/src/wrapped.h +++ /dev/null @@ -1,77 +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_WRAPPED_H_INCLUDED__ -#define __GUILE_IRRLICHT_WRAPPED_H_INCLUDED__ - -#include - -#define DECLARE_WRAPPED_TYPE(TYPE, INIT, PRED, WRAP, UNWRAP) \ - void \ - INIT (void); \ - \ - SCM \ - WRAP (TYPE foreign_obj); \ - \ - TYPE \ - UNWRAP (SCM wrapped_obj); \ - \ - bool \ - PRED (SCM wrapped_obj); - - -#define DEFINE_WRAPPED_TYPE(TYPE, PRINT_NAME, INIT, PRED, WRAP, UNWRAP) \ - static SCM wrapped_##INIT; \ - \ - void \ - INIT (void) \ - { \ - SCM name, slots; \ - scm_t_struct_finalize finalizer; \ - \ - name = scm_from_utf8_symbol (PRINT_NAME); \ - slots = scm_list_1 (scm_from_utf8_symbol ("data")); \ - finalizer = NULL; \ - \ - wrapped_##INIT = \ - scm_make_foreign_object_type (name, slots, finalizer); \ - } \ - \ - SCM \ - WRAP (TYPE foreign_obj) \ - { \ - return scm_make_foreign_object_1 (wrapped_##INIT, foreign_obj); \ - } \ - \ - TYPE \ - UNWRAP (SCM wrapped_obj) \ - { \ - scm_assert_foreign_object_type (wrapped_##INIT, wrapped_obj); \ - return (TYPE)scm_foreign_object_ref (wrapped_obj, 0); \ - } \ - \ - bool \ - PRED (SCM wrapped_obj) \ - { \ - return SCM_IS_A_P (wrapped_obj, wrapped_##INIT); \ - } - -#endif -- 2.39.2