]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
fixing bugs
authorJavier Sancho <jsf@jsancho.org>
Sun, 10 May 2020 12:00:44 +0000 (14:00 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sun, 10 May 2020 12:00:44 +0000 (14:00 +0200)
Makefile.am
src/device.cpp
src/event-receiver.cpp
src/gui-environment.cpp
src/gui-toolbar.cpp
src/guile-irrlicht.cpp
src/io.cpp
src/scene-manager.cpp
src/scene-node.cpp
src/video-driver.cpp

index e5887ad4f073402c5470e420d25f96c463dbd4eb..f814cfa55fd664e263bc3d1509f5c3b9237d3f39 100644 (file)
@@ -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 \
index 95b6429d8c129f12e7b19357fb606d0b6c5fc9bb..63db119696fe5513bdd2c94238b903ad77db948f 100644 (file)
@@ -167,7 +167,6 @@ extern "C" {
   void
   init_device (void)
   {
-    init_device_type ();
     DEFINE_GSUBR ("createDevice_IEventReceiver", 7, 0, 0, createDevice<IEventReceiver*>);
     DEFINE_GSUBR ("IrrlichtDevice_getCursorControl", 1, 0, 0, IrrlichtDevice_getCursorControl);
     DEFINE_GSUBR ("IrrlichtDevice_getFileSystem", 1, 0, 0, IrrlichtDevice_getFileSystem);
index 3f2e6839ade8f84d31894bf015b6a3df0808787b..293f48f794f1a6b028003aa50c9b5ad2d438f11e 100644 (file)
@@ -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);
 }
 
index 5af49682d673585a1865eb8d88c561d41872d7a9..420b6a67129eb743fc10a9563f1c84bd12b63f66 100644 (file)
@@ -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);
 }
 
 
index 3eac3772beddb973413e924528d5f8ef888375e9..1f38bdbcdcba46fc6e8622cb8456645b4e08962e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <irrlicht/irrlicht.h>
 #include <libguile.h>
+#include "gsubr.h"
 #include "gui-toolbar.h"
 #include "wchar.h"
 
index e0c42821406d81216e79e5d8ac36cddef8de3e45..ea8aa852ddf1b7bcf12ac896e1e6c31caf40a425 100644 (file)
@@ -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 ();
index fa315e7eb5075530f8e62539531afcefd5f967a8..caa8ea1529bda39bbb18b9599e68458b2109be0c 100644 (file)
@@ -19,6 +19,7 @@
    <http://www.gnu.org/licenses/>.
 */
 
+#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 ();
   }
 
index d5b9e6cf18f529b0b58dd3c1cefcabd58aa9871c..c1c8e270611c294a92fe6cc8822cbe0f58e9369b 100644 (file)
@@ -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<scene::ISceneNode*>);
     DEFINE_GSUBR ("scene_ISceneManager_addOctreeSceneNode_ISceneNode_IAnimatedMesh", 6, 0, 0,
-                  scene_ISceneManager_addOctreeSceneNode<scene::ISceneNode*, scene::IAnimatedMesh*>);
+                  (scene_ISceneManager_addOctreeSceneNode<scene::ISceneNode*, scene::IAnimatedMesh*>));
     DEFINE_GSUBR ("scene_ISceneManager_addOctreeSceneNode_ISceneNode_IMesh", 6, 0, 0,
-                  scene_ISceneManager_addOctreeSceneNode<scene::ISceneNode*, scene::IMesh*>);
+                  (scene_ISceneManager_addOctreeSceneNode<scene::ISceneNode*, scene::IMesh*>));
     DEFINE_GSUBR ("scene_ISceneManager_addSphereSceneNode_ISceneNode", 8, 0, 0,
                   scene_ISceneManager_addSphereSceneNode<scene::ISceneNode*>);
     DEFINE_GSUBR ("scene_ISceneManager_createFlyCircleAnimator", 7, 0, 0,
index d8fcd0d3b9a05b3c503b600ee1d02840df245b59..08a133669364bb21e703c93b9ce60c3b2993c4eb 100644 (file)
@@ -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;
 }
 
index 0b015d3bb02bea6464e1437d69b34f1cd0af93a2..643ad89e809b488f34cc3581b1705b46896e282a 100644 (file)
@@ -26,6 +26,7 @@
 #include "matrix4.h"
 #include "primitive-types.h"
 #include "rect.h"
+#include "vertex3d.h"
 #include "video-driver.h"