From: Javier Sancho Date: Sun, 10 May 2020 12:00:44 +0000 (+0200) Subject: fixing bugs X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=19663b6c5766b06c73148fdf803ce3555052a23e;p=guile-irrlicht.git fixing bugs --- diff --git a/Makefile.am b/Makefile.am index e5887ad..f814cfa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,7 +45,6 @@ libguile_irrlicht_la_SOURCES = \ src/guile-irrlicht.cpp \ src/io.cpp \ src/keycodes.cpp \ - src/keymap.cpp \ src/material.cpp \ src/material-flags.cpp \ src/material-types.cpp \ diff --git a/src/device.cpp b/src/device.cpp index 95b6429..63db119 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -167,7 +167,6 @@ extern "C" { void init_device (void) { - init_device_type (); DEFINE_GSUBR ("createDevice_IEventReceiver", 7, 0, 0, createDevice); DEFINE_GSUBR ("IrrlichtDevice_getCursorControl", 1, 0, 0, IrrlichtDevice_getCursorControl); DEFINE_GSUBR ("IrrlichtDevice_getFileSystem", 1, 0, 0, IrrlichtDevice_getFileSystem); diff --git a/src/event-receiver.cpp b/src/event-receiver.cpp index 3f2e683..293f48f 100644 --- a/src/event-receiver.cpp +++ b/src/event-receiver.cpp @@ -89,7 +89,7 @@ SEvent_SKeyInput_Key (SCM event) SCM SEvent_SKeyInput_PressedDown (SCM event) { - return scm_from_key_code + return scm_from_bool (((SEvent*)scm_to_pointer (event))->KeyInput.PressedDown); } diff --git a/src/gui-environment.cpp b/src/gui-environment.cpp index 5af4968..420b6a6 100644 --- a/src/gui-environment.cpp +++ b/src/gui-environment.cpp @@ -81,15 +81,15 @@ gui_IGUIEnvironment_addImage (SCM gui_environment, SCM id, SCM text) { - gui::IGUIImage* image = - ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> - addImage ((video::ITexture*)scm_to_pointer (image), - scm_to_position2d_s32 (position), - scm_to_bool (use_alpha_channel), - (TParent)scm_to_pointer (parent), - scm_to_int32 (id), - scm_to_wide_char_string (text)); - return scm_from_pointer ((void*)image, NULL); + gui::IGUIEnvironment* guienv = (gui::IGUIEnvironment*)scm_to_pointer (gui_environment); + gui::IGUIImage* new_image = + guienv->addImage ((video::ITexture*)scm_to_pointer (image), + scm_to_position2d_s32 (position), + scm_to_bool (use_alpha_channel), + (TParent)scm_to_pointer (parent), + scm_to_int32 (id), + scm_to_wide_char_string (text)); + return scm_from_pointer ((void*) new_image, NULL); } diff --git a/src/gui-toolbar.cpp b/src/gui-toolbar.cpp index 3eac377..1f38bdb 100644 --- a/src/gui-toolbar.cpp +++ b/src/gui-toolbar.cpp @@ -21,6 +21,7 @@ #include #include +#include "gsubr.h" #include "gui-toolbar.h" #include "wchar.h" diff --git a/src/guile-irrlicht.cpp b/src/guile-irrlicht.cpp index e0c4282..ea8aa85 100644 --- a/src/guile-irrlicht.cpp +++ b/src/guile-irrlicht.cpp @@ -29,7 +29,6 @@ #include "gui.h" #include "guile-irrlicht.h" #include "io.h" -#include "keymap.h" #include "material.h" #include "reference-counted.h" #include "scene-manager.h" @@ -52,7 +51,6 @@ extern "C" { init_event_receiver (); init_gui (); init_io (); - init_keymap (); init_material (); init_reference_counted (); init_scene_manager (); diff --git a/src/io.cpp b/src/io.cpp index fa315e7..caa8ea1 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -19,6 +19,7 @@ . */ +#include "file-system.h" #include "io.h" extern "C" { @@ -26,7 +27,6 @@ extern "C" { void init_io (void) { - init_file_archive (); init_file_system (); } diff --git a/src/scene-manager.cpp b/src/scene-manager.cpp index d5b9e6c..c1c8e27 100644 --- a/src/scene-manager.cpp +++ b/src/scene-manager.cpp @@ -121,7 +121,7 @@ scene_ISceneManager_addCubeSceneNode (SCM scene_manager, scm_to_vector3df (position), scm_to_vector3df (rotation), scm_to_vector3df (scale)); - return scm_from_pointer ((void*) camera, NULL); + return scm_from_pointer ((void*) node, NULL); } @@ -348,9 +348,9 @@ extern "C" { 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); + (scene_ISceneManager_addOctreeSceneNode)); DEFINE_GSUBR ("scene_ISceneManager_addOctreeSceneNode_ISceneNode_IMesh", 6, 0, 0, - scene_ISceneManager_addOctreeSceneNode); + (scene_ISceneManager_addOctreeSceneNode)); DEFINE_GSUBR ("scene_ISceneManager_addSphereSceneNode_ISceneNode", 8, 0, 0, scene_ISceneManager_addSphereSceneNode); DEFINE_GSUBR ("scene_ISceneManager_createFlyCircleAnimator", 7, 0, 0, diff --git a/src/scene-node.cpp b/src/scene-node.cpp index d8fcd0d..08a1336 100644 --- a/src/scene-node.cpp +++ b/src/scene-node.cpp @@ -37,7 +37,7 @@ scene_ISceneNode_addAnimator (SCM scene_node, SCM animator) { TSceneNode node = (TSceneNode) scm_to_pointer (scene_node); - node->addAnimator (unwrap_scene_node_animator (animator)); + node->addAnimator ((scene::ISceneNodeAnimator*) scm_to_pointer (animator)); return SCM_UNSPECIFIED; } diff --git a/src/video-driver.cpp b/src/video-driver.cpp index 0b015d3..643ad89 100644 --- a/src/video-driver.cpp +++ b/src/video-driver.cpp @@ -26,6 +26,7 @@ #include "matrix4.h" #include "primitive-types.h" #include "rect.h" +#include "vertex3d.h" #include "video-driver.h"