]> git.jsancho.org Git - c-irrlicht.git/commitdiff
Rename functions and fix some little bugs
authorJavier Sancho <jsf@jsancho.org>
Mon, 14 Oct 2019 18:03:10 +0000 (20:03 +0200)
committerJavier Sancho <jsf@jsancho.org>
Mon, 14 Oct 2019 18:03:10 +0000 (20:03 +0200)
19 files changed:
Makefile.am
examples/01.HelloWorld.c
include/IAnimatedMesh.h [new file with mode: 0644]
include/IAnimatedMeshSceneNode.h
include/IGUIEnvironment.h
include/ISceneManager.h
include/ISceneNode.h
include/ITexture.h
include/IVideoDriver.h
include/IrrlichtDevice.h
include/SColor.h
include/vector3d.h
src/CIrrlicht.cpp
src/IAnimatedMeshSceneNode.cpp
src/IGUIEnvironment.cpp
src/ISceneManager.cpp
src/ISceneNode.cpp
src/IVideoDriver.cpp
src/IrrlichtDevice.cpp

index bcec8c1fab6f13c2096787e09511923f7517b826..b2da572c0de96075d46eaacc14e8ab0967c18200 100644 (file)
@@ -15,6 +15,7 @@ pkginclude_HEADERS = \
   include/dimension2d.h \
   include/EDriverTypes.h \
   include/EMaterialFlags.h \
+  include/IAnimatedMesh.h \
   include/IAnimatedMeshMD2.h \
   include/IAnimatedMeshSceneNode.h \
   include/ICameraSceneNode.h \
index 6027d5436d33796e2030faa5aad9a19af1675a95..d630dfc5b922d5f25d7f50c1c5d8bd7308e87864 100644 (file)
@@ -36,55 +36,53 @@ int main()
     }
 
   // set window caption
-  irr_IrrlichtDevice_setWindowCaption(device, "Hello World! - Irrlicht Engine Demo");
+  irr_setWindowCaption(device, "Hello World! - Irrlicht Engine Demo");
 
   // instances for doing things
-  irr_video_IVideoDriver* driver = irr_IrrlichtDevice_getVideoDriver(device);
-  irr_scene_ISceneManager* smgr = irr_IrrlichtDevice_getSceneManager(device);
-  irr_gui_IGUIEnvironment* guienv = irr_IrrlichtDevice_getGUIEnvironment(device);
+  irr_video_IVideoDriver* driver = irr_getVideoDriver(device);
+  irr_scene_ISceneManager* smgr = irr_getSceneManager(device);
+  irr_gui_IGUIEnvironment* guienv = irr_getGUIEnvironment(device);
 
   // add a static text
   irr_core_rect_s32 box = {10, 10, 260, 22};
-  irr_gui_IGUIEnvironment_addStaticText(guienv,
-                                        "Hello World! This is the Irrlicht Software renderer!",
-                                        &box, 1, 1, NULL, -1, 0);
+  irr_gui_addStaticText(guienv,
+                        "Hello World! This is the Irrlicht Software renderer!",
+                        &box, 1, 1, NULL, -1, 0);
 
   // load a quake2 mesh
-  irr_scene_IAnimatedMesh* mesh = irr_scene_ISceneManager_getMesh(smgr, "media/sydney.md2");
+  irr_scene_IAnimatedMesh* mesh = irr_scene_getMesh(smgr, "media/sydney.md2");
   if (!mesh)
     {
-      irr_IrrlichtDevice_drop(device);
+      irr_drop(device);
       return 1;
     }
   irr_scene_IAnimatedMeshSceneNode* node =
-    irr_scene_ISceneManager_addAnimatedMeshSceneNode(smgr, mesh, NULL, -1,
-                                                     NULL, NULL, NULL, 0);
+    irr_scene_addAnimatedMeshSceneNode(smgr, mesh, NULL, -1,
+                                       NULL, NULL, NULL, 0);
 
   if (node)
     {
-      irr_scene_IAnimatedMeshSceneNode_setMaterialFlag(node, irr_video_EMF_LIGHTING, 0);
-      irr_scene_IAnimatedMeshSceneNode_setMD2Animation(node, irr_scene_EMAT_STAND);
-      irr_video_ITexture* texture = irr_video_IVideoDriver_getTexture(driver,
-                                                                      "media/sydney.bmp");
-      irr_scene_IAnimatedMeshSceneNode_setMaterialTexture(node, 0, texture);
+      irr_scene_setMaterialFlagAM(node, irr_video_EMF_LIGHTING, 0);
+      irr_scene_setMD2Animation(node, irr_scene_EMAT_STAND);
+      irr_video_ITexture* texture = irr_video_getTexture(driver, "media/sydney.bmp");
+      irr_scene_setMaterialTextureAM(node, 0, texture);
     }
 
   // camera
   irr_core_vector3df position = {0, 30, -40};
   irr_core_vector3df lookat = {0, 5, 0};
-  irr_scene_ISceneManager_addCameraSceneNode(smgr, NULL, &position, &lookat,
-                                             -1, 1);
+  irr_scene_addCameraSceneNode(smgr, NULL, &position, &lookat, -1, 1);
                                              
   // loop
   irr_video_SColor bgcolor = {255, 100, 101, 140};
-  while (irr_IrrlichtDevice_run(device))
+  while (irr_run(device))
     {
-      irr_video_IVideoDriver_beginScene(driver, 1, 1, &bgcolor, NULL, NULL);
-      irr_gui_IGUIEnvironment_drawAll(guienv);
-      irr_scene_ISceneManager_drawAll(smgr);
-      irr_video_IVideoDriver_endScene(driver);
+      irr_video_beginScene(driver, 1, 1, &bgcolor, NULL, NULL);
+      irr_gui_drawAll(guienv);
+      irr_scene_drawAll(smgr);
+      irr_video_endScene(driver);
     }
 
-  irr_IrrlichtDevice_drop(device);
+  irr_drop(device);
   return 0;
 }
diff --git a/include/IAnimatedMesh.h b/include/IAnimatedMesh.h
new file mode 100644 (file)
index 0000000..90c4c0c
--- /dev/null
@@ -0,0 +1,27 @@
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+   Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+   This file is part of c-irrlicht.
+
+   c-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.
+
+   c-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
+   <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __C_I_ANIMATED_MESH_H_INCLUDED__
+#define __C_I_ANIMATED_MESH_H_INCLUDED__
+
+typedef void irr_scene_IAnimatedMesh;
+
+#endif
index 27f2f5deae6151ddbb5a8bb2fe87200c477a07ba..7626ad522b1a772d2fea82f921e7d61dbfbb9599 100644 (file)
@@ -19,8 +19,8 @@
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_SCENE_NODE_H_INCLUDED__
-#define __C_SCENE_NODE_H_INCLUDED__
+#ifndef __C_I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
+#define __C_I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
 
 #include "EMaterialFlags.h"
 #include "IAnimatedMeshMD2.h"
@@ -33,18 +33,18 @@ extern "C" {
 #endif
 
   void
-  irr_scene_IAnimatedMeshSceneNode_setMaterialFlag(irr_scene_IAnimatedMeshSceneNode* node,
-                                                   irr_video_E_MATERIAL_FLAG flag,
-                                                   int newvalue);
+  irr_scene_setMaterialFlagAM(irr_scene_IAnimatedMeshSceneNode* node,
+                              irr_video_E_MATERIAL_FLAG flag,
+                              int newvalue);
 
   void
-  irr_scene_IAnimatedMeshSceneNode_setMaterialTexture(irr_scene_IAnimatedMeshSceneNode* node,
-                                                      unsigned int textureLayer,
-                                                      irr_video_ITexture* texture);
+  irr_scene_setMaterialTextureAM(irr_scene_IAnimatedMeshSceneNode* node,
+                                 unsigned int textureLayer,
+                                 irr_video_ITexture* texture);
 
   int
-  irr_scene_IAnimatedMeshSceneNode_setMD2Animation(irr_scene_IAnimatedMeshSceneNode* node,
-                                                   irr_scene_EMD2_ANIMATION_TYPE anim);
+  irr_scene_setMD2Animation(irr_scene_IAnimatedMeshSceneNode* node,
+                            irr_scene_EMD2_ANIMATION_TYPE anim);
 
 #ifdef __cplusplus
 }
index 8cb15b33d1ac588d54a1c717fddb2ce88bb89bf0..e97f3d38d13d837f84e0c64b13a6bd498ef95637 100644 (file)
@@ -19,8 +19,8 @@
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_GUI_ENVIRONMENT_H_INCLUDED__
-#define __C_GUI_ENVIRONMENT_H_INCLUDED__
+#ifndef __C_I_GUI_ENVIRONMENT_H_INCLUDED__
+#define __C_I_GUI_ENVIRONMENT_H_INCLUDED__
 
 #include "IGUIElement.h"
 #include "IGUIStaticText.h"
@@ -33,17 +33,17 @@ extern "C" {
 #endif
 
   irr_gui_IGUIStaticText*
-  irr_gui_IGUIEnvironment_addStaticText(irr_gui_IGUIEnvironment* guienv,
-                                        const char* text,
-                                        const irr_core_rect_s32* rectangle,
-                                        int border,
-                                        int wordWrap,
-                                        irr_gui_IGUIElement* parent,
-                                        int id,
-                                        int fillBackground);
+  irr_gui_addStaticText(irr_gui_IGUIEnvironment* guienv,
+                        const char* text,
+                        const irr_core_rect_s32* rectangle,
+                        int border,
+                        int wordWrap,
+                        irr_gui_IGUIElement* parent,
+                        int id,
+                        int fillBackground);
 
   void
-  irr_gui_IGUIEnvironment_drawAll(irr_gui_IGUIEnvironment* guienv);
+  irr_gui_drawAll(irr_gui_IGUIEnvironment* guienv);
 
 #ifdef __cplusplus
 }
index 0be8e3c6604eb06d58ec3b7981474ad507a0803e..509836b2901b4fed42a67f229f97d6122c6860d9 100644 (file)
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_SCENE_MANAGER_H_INCLUDED__
-#define __C_SCENE_MANAGER_H_INCLUDED__
+#ifndef __C_I_SCENE_MANAGER_H_INCLUDED__
+#define __C_I_SCENE_MANAGER_H_INCLUDED__
 
+#include "IAnimatedMesh.h"
 #include "IAnimatedMeshSceneNode.h"
 #include "ICameraSceneNode.h"
+#include "ISceneNode.h"
 #include "vector3d.h"
 
-typedef void irr_scene_IAnimatedMesh;
 typedef void irr_scene_ISceneManager;
-typedef void irr_scene_ISceneNode;
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
   irr_scene_IAnimatedMeshSceneNode*
-  irr_scene_ISceneManager_addAnimatedMeshSceneNode(irr_scene_ISceneManager* smgr,
-                                                   irr_scene_IAnimatedMesh* mesh,
-                                                   irr_scene_ISceneNode* parent,
-                                                   int id,
-                                                   irr_core_vector3df* position,
-                                                   irr_core_vector3df* rotation,
-                                                   irr_core_vector3df* scale,
-                                                   int alsoAddIfMeshPointerZero);
+  irr_scene_addAnimatedMeshSceneNode(irr_scene_ISceneManager* smgr,
+                                     irr_scene_IAnimatedMesh* mesh,
+                                     irr_scene_ISceneNode* parent,
+                                     int id,
+                                     irr_core_vector3df* position,
+                                     irr_core_vector3df* rotation,
+                                     irr_core_vector3df* scale,
+                                     int alsoAddIfMeshPointerZero);
 
   irr_scene_ICameraSceneNode*
-  irr_scene_ISceneManager_addCameraSceneNode(irr_scene_ISceneManager* smgr,
-                                             irr_scene_ISceneNode* parent,
-                                             irr_core_vector3df* position,
-                                             irr_core_vector3df* lookat,
-                                             int id,
-                                             int makeActive);
+  irr_scene_addCameraSceneNode(irr_scene_ISceneManager* smgr,
+                               irr_scene_ISceneNode* parent,
+                               irr_core_vector3df* position,
+                               irr_core_vector3df* lookat,
+                               int id,
+                               int makeActive);
 
   void
-  irr_scene_ISceneManager_drawAll(irr_scene_ISceneManager* smgr);
+  irr_scene_drawAll(irr_scene_ISceneManager* smgr);
 
   irr_scene_IAnimatedMesh*
-  irr_scene_ISceneManager_getMesh(irr_scene_ISceneManager* smgr,
-                                  const char* filename);
+  irr_scene_getMesh(irr_scene_ISceneManager* smgr,
+                    const char* filename);
 
 #ifdef __cplusplus
 }
index 334c4e23b2b6eff86837ca1fba9b6f162476f858..107b78887be3371e567dc606debbc421415b6d55 100644 (file)
@@ -19,8 +19,8 @@
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_SCENE_NODE_H_INCLUDED__
-#define __C_SCENE_NODE_H_INCLUDED__
+#ifndef __C_I_SCENE_NODE_H_INCLUDED__
+#define __C_I_SCENE_NODE_H_INCLUDED__
 
 #include "EMaterialFlags.h"
 #include "ITexture.h"
@@ -32,14 +32,14 @@ extern "C" {
 #endif
 
   void
-  irr_scene_ISceneNode_setMaterialFlag(irr_scene_ISceneNode* node,
-                                       irr_video_E_MATERIAL_FLAG flag,
-                                       bool newvalue);
+  irr_scene_setMaterialFlag(irr_scene_ISceneNode* node,
+                            irr_video_E_MATERIAL_FLAG flag,
+                            int newvalue);
 
   void
-  irr_scene_ISceneNode_setMaterialTexture(irr_scene_ISceneNode* node,
-                                          u_int32_t textureLayer,
-                                          irr_video_ITexture* texture);
+  irr_scene_setMaterialTexture(irr_scene_ISceneNode* node,
+                               unsigned int textureLayer,
+                               irr_video_ITexture* texture);
 
 #ifdef __cplusplus
 }
index 50c2c7640606b47cda50d5dbd2ad48e91b2b6f0d..fdd279a89f1d971c511fbb4f6d575fee6eb1ea19 100644 (file)
@@ -19,8 +19,8 @@
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_TEXTURE_H_INCLUDED__
-#define __C_TEXTURE_H_INCLUDED__
+#ifndef __C_I_TEXTURE_H_INCLUDED__
+#define __C_I_TEXTURE_H_INCLUDED__
 
 typedef void irr_video_ITexture;
 
index 98a837e163771e506aa52cf960aa98fbb778dfef..b37cde8d3915ad84c8c309e68c3b2aa78d259b8c 100644 (file)
@@ -19,8 +19,8 @@
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_IRR_I_VIDEO_DRIVER_H_INCLUDED__
-#define __C_IRR_I_VIDEO_DRIVER_H_INCLUDED__
+#ifndef __C_I_VIDEO_DRIVER_H_INCLUDED__
+#define __C_I_VIDEO_DRIVER_H_INCLUDED__
 
 #include "ITexture.h"
 #include "SColor.h"
@@ -34,19 +34,19 @@ extern "C" {
 #endif
 
   int
-  irr_video_IVideoDriver_beginScene(irr_video_IVideoDriver* driver,
-                                    int backBuffer,
-                                    int zBuffer,
-                                    const irr_video_SColor* color,
-                                    irr_video_SExposedVideoData* videoData,
-                                    const irr_core_rect_s32* sourceRect);
+  irr_video_beginScene(irr_video_IVideoDriver* driver,
+                       int backBuffer,
+                       int zBuffer,
+                       const irr_video_SColor* color,
+                       irr_video_SExposedVideoData* videoData,
+                       const irr_core_rect_s32* sourceRect);
 
   int
-  irr_video_IVideoDriver_endScene(irr_video_IVideoDriver* driver);
+  irr_video_endScene(irr_video_IVideoDriver* driver);
 
   irr_video_ITexture*
-  irr_video_IVideoDriver_getTexture(irr_video_IVideoDriver* driver,
-                                    const char* filename);
+  irr_video_getTexture(irr_video_IVideoDriver* driver,
+                       const char* filename);
 
 #ifdef __cplusplus
 }
index 9ca9589e56253fd21a630ac9d50ec34d488400d2..df717e759771957e86d4f62605d047eec04fd696 100644 (file)
@@ -33,23 +33,23 @@ extern "C" {
 #endif
 
   irr_gui_IGUIEnvironment*
-  irr_IrrlichtDevice_getGUIEnvironment(irr_IrrlichtDevice* device);
+  irr_getGUIEnvironment(irr_IrrlichtDevice* device);
 
   irr_scene_ISceneManager*
-  irr_IrrlichtDevice_getSceneManager(irr_IrrlichtDevice* device);
+  irr_getSceneManager(irr_IrrlichtDevice* device);
 
   irr_video_IVideoDriver*
-  irr_IrrlichtDevice_getVideoDriver(irr_IrrlichtDevice* device);
+  irr_getVideoDriver(irr_IrrlichtDevice* device);
 
   void
-  irr_IrrlichtDevice_setWindowCaption(irr_IrrlichtDevice* device,
+  irr_setWindowCaption(irr_IrrlichtDevice* device,
                                       const char* text);
 
   int
-  irr_IrrlichtDevice_run(irr_IrrlichtDevice* device);
+  irr_run(irr_IrrlichtDevice* device);
 
   int
-  irr_IrrlichtDevice_drop(irr_IrrlichtDevice* device);
+  irr_drop(irr_IrrlichtDevice* device);
 
 #ifdef __cplusplus
 }
index 4409a74e7c4872ef6e99c75adcaf348ea98ff95b..0c6e80932b4ecabd6f3f59769087ef9183f01b94 100644 (file)
@@ -19,8 +19,8 @@
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_COLOR_H_INCLUDED__
-#define __C_COLOR_H_INCLUDED__
+#ifndef __C_IRR_COLOR_H_INCLUDED__
+#define __C_IRR_COLOR_H_INCLUDED__
 
 typedef struct
 {
index 36de9a9e5dc101cdf105dc9627b4081be566d917..fd9402669f7210f323a5c38cd9a7d56d214dc153 100644 (file)
@@ -19,8 +19,8 @@
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_IRR_POINT_3D_H_INCLUDED__
-#define __C_IRR_POINT_3D_H_INCLUDED__
+#ifndef __C_IRR_VECTOR_3D_H_INCLUDED__
+#define __C_IRR_VECTOR_3D_H_INCLUDED__
 
 typedef struct
 {
index f04f999757649ca72d5a592383f66c42c31762d7..c17daa28dc3b77f1aed1e34bddd4441000f75c14 100644 (file)
@@ -31,10 +31,10 @@ extern "C" {
                    int stencilbuffer,
                    int vsync)
   {
-    irr::core::dimension2d<irr::u32> wsize =                    \
+    irr::core::dimension2d<irr::u32> wsize =
       irr::core::dimension2d<irr::u32>(windowSize->width,
                                        windowSize->height);
-    irr::IrrlichtDevice *device =                               \
+    irr::IrrlichtDevice *device =
       irr::createDevice((irr::video::E_DRIVER_TYPE)deviceType,
                         wsize, bits, fullscreen, stencilbuffer,
                         vsync);
index f7348fc96f5c7ccf8897f2d4ece657ad71f9fbac..319046b00acb7dbfd1c0cfc37a6bbc7c721a82d8 100644 (file)
 
 extern "C" {
   void
-  irr_scene_IAnimatedMeshSceneNode_setMaterialFlag(irr_scene_IAnimatedMeshSceneNode* node,
-                                                   irr_video_E_MATERIAL_FLAG flag,
-                                                   int newvalue)
+  irr_scene_setMaterialFlagAM(irr_scene_IAnimatedMeshSceneNode* node,
+                              irr_video_E_MATERIAL_FLAG flag,
+                              int newvalue)
   {
-    ((irr::scene::IAnimatedMeshSceneNode*)node)->setMaterialFlag((irr::video::E_MATERIAL_FLAG)flag,
-                                                                 newvalue);
+    ((irr::scene::IAnimatedMeshSceneNode*)node)
+      ->setMaterialFlag((irr::video::E_MATERIAL_FLAG)flag,
+                        newvalue);
   }
 
   void
-  irr_scene_IAnimatedMeshSceneNode_setMaterialTexture(irr_scene_IAnimatedMeshSceneNode* node,
-                                                      unsigned int textureLayer,
-                                                      irr_video_ITexture* texture)
+  irr_scene_setMaterialTextureAM(irr_scene_IAnimatedMeshSceneNode* node,
+                                 unsigned int textureLayer,
+                                 irr_video_ITexture* texture)
   {
-    ((irr::scene::IAnimatedMeshSceneNode*)node)->setMaterialTexture(textureLayer,
-                                                                    (irr::video::ITexture*)texture);
+    ((irr::scene::IAnimatedMeshSceneNode*)node)
+      ->setMaterialTexture(textureLayer,
+                           (irr::video::ITexture*)texture);
   }
 
   int
-  irr_scene_IAnimatedMeshSceneNode_setMD2Animation(irr_scene_IAnimatedMeshSceneNode* node,
-                                                   irr_scene_EMD2_ANIMATION_TYPE anim)
+  irr_scene_setMD2Animation(irr_scene_IAnimatedMeshSceneNode* node,
+                            irr_scene_EMD2_ANIMATION_TYPE anim)
   {
-    return ((irr::scene::IAnimatedMeshSceneNode*)node)->setMD2Animation((irr::scene::EMD2_ANIMATION_TYPE)anim);
+    return ((irr::scene::IAnimatedMeshSceneNode*)node)
+      ->setMD2Animation((irr::scene::EMD2_ANIMATION_TYPE)anim);
   }
 
 }
index 4a5d68b5d2b24234fa70f44e5287352b35779a78..927c0b986b943441ec061e29a687e49766e9fa92 100644 (file)
 
 extern "C" {
   irr_gui_IGUIStaticText*
-  irr_gui_IGUIEnvironment_addStaticText(irr_gui_IGUIEnvironment* guienv,
-                                        const char* text,
-                                        const irr_core_rect_s32* rectangle,
-                                        int border,
-                                        int wordWrap,
-                                        irr_gui_IGUIElement* parent,
-                                        int id,
-                                        int fillBackground)
+  irr_gui_addStaticText(irr_gui_IGUIEnvironment* guienv,
+                        const char* text,
+                        const irr_core_rect_s32* rectangle,
+                        int border,
+                        int wordWrap,
+                        irr_gui_IGUIElement* parent,
+                        int id,
+                        int fillBackground)
   {
     // Convert to wide char text
     wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t));
     mbsrtowcs(wtext, &text, strlen(text) + 1, NULL);
 
     // Make rectangle
-    irr::core::rect<irr::s32> rect =            \
+    irr::core::rect<irr::s32> rect =
       irr::core::rect<irr::s32>(rectangle->x,
                                 rectangle->y,
                                 rectangle->x2,
                                 rectangle->y2);
 
     // Add static text
-    irr::gui::IGUIStaticText *staticText =                              \
-      ((irr::gui::IGUIEnvironment*)guienv)->addStaticText(wtext,
-                                                          rect,
-                                                          border,
-                                                          wordWrap,
-                                                          (irr::gui::IGUIElement*)parent,
-                                                          id,
-                                                          fillBackground);
+    irr::gui::IGUIStaticText *staticText =
+      ((irr::gui::IGUIEnvironment*)guienv)
+      ->addStaticText(wtext,
+                      rect,
+                      border,
+                      wordWrap,
+                      (irr::gui::IGUIElement*)parent,
+                      id,
+                      fillBackground);
     return staticText;
   }
 
   void
-  irr_gui_IGUIEnvironment_drawAll(irr_gui_IGUIEnvironment* guienv)
+  irr_gui_drawAll(irr_gui_IGUIEnvironment* guienv)
   {
     ((irr::gui::IGUIEnvironment*)guienv)->drawAll();
   }
index e88bd00a95a0246994ce026e18668040ae90365a..bef569bd9ea46e09e54ed4c76a65350c70bacb75 100644 (file)
 
 extern "C" {
   irr_scene_IAnimatedMeshSceneNode*
-  irr_scene_ISceneManager_addAnimatedMeshSceneNode(irr_scene_ISceneManager* smgr,
-                                                   irr_scene_IAnimatedMesh* mesh,
-                                                   irr_scene_ISceneNode* parent,
-                                                   int id,
-                                                   irr_core_vector3df* position,
-                                                   irr_core_vector3df* rotation,
-                                                   irr_core_vector3df* scale,
-                                                   int alsoAddIfMeshPointerZero)
+  irr_scene_addAnimatedMeshSceneNode(irr_scene_ISceneManager* smgr,
+                                     irr_scene_IAnimatedMesh* mesh,
+                                     irr_scene_ISceneNode* parent,
+                                     int id,
+                                     irr_core_vector3df* position,
+                                     irr_core_vector3df* rotation,
+                                     irr_core_vector3df* scale,
+                                     int alsoAddIfMeshPointerZero)
   {
     const irr::core::vector3df iPosition =
       position ?
@@ -49,22 +49,23 @@ extern "C" {
       irr::core::vector3df(1, 1, 1);
 
     return (irr_scene_IAnimatedMeshSceneNode*)
-      ((irr::scene::ISceneManager*)smgr)->addAnimatedMeshSceneNode((irr::scene::IAnimatedMesh*)mesh,
-                                                                   (irr::scene::ISceneNode*)parent,
-                                                                   id,
-                                                                   iPosition,
-                                                                   iRotation,
-                                                                   iScale,
-                                                                   alsoAddIfMeshPointerZero);
+      ((irr::scene::ISceneManager*)smgr)
+      ->addAnimatedMeshSceneNode((irr::scene::IAnimatedMesh*)mesh,
+                                 (irr::scene::ISceneNode*)parent,
+                                 id,
+                                 iPosition,
+                                 iRotation,
+                                 iScale,
+                                 alsoAddIfMeshPointerZero);
   }
 
   irr_scene_ICameraSceneNode*
-  irr_scene_ISceneManager_addCameraSceneNode(irr_scene_ISceneManager* smgr,
-                                             irr_scene_ISceneNode* parent,
-                                             irr_core_vector3df* position,
-                                             irr_core_vector3df* lookat,
-                                             int id,
-                                             int makeActive)
+  irr_scene_addCameraSceneNode(irr_scene_ISceneManager* smgr,
+                               irr_scene_ISceneNode* parent,
+                               irr_core_vector3df* position,
+                               irr_core_vector3df* lookat,
+                               int id,
+                               int makeActive)
   {
     const irr::core::vector3df& iPosition =
       position ?
@@ -77,23 +78,24 @@ extern "C" {
       irr::core::vector3df(0, 0, 100);
 
     return (irr_scene_ICameraSceneNode*)
-      ((irr::scene::ISceneManager*)smgr)->addCameraSceneNode((irr::scene::ISceneNode*)parent,
-                                                             iPosition,
-                                                             iLookat,
-                                                             id,
-                                                             makeActive);
+      ((irr::scene::ISceneManager*)smgr)
+      ->addCameraSceneNode((irr::scene::ISceneNode*)parent,
+                           iPosition,
+                           iLookat,
+                           id,
+                           makeActive);
   }
 
   void
-  irr_scene_ISceneManager_drawAll(irr_scene_ISceneManager* smgr)
+  irr_scene_drawAll(irr_scene_ISceneManager* smgr)
   {
     ((irr::scene::ISceneManager*)smgr)->drawAll();
   }
 
 
   irr_scene_IAnimatedMesh*
-  irr_scene_ISceneManager_getMesh(irr_scene_ISceneManager* smgr,
-                                  const char* filename)
+  irr_scene_getMesh(irr_scene_ISceneManager* smgr,
+                    const char* filename)
   {
     return (irr_scene_IAnimatedMesh*)
       ((irr::scene::ISceneManager*)smgr)->getMesh(filename);
index 635ba976653116eebaca44017b5694810fed702a..ea77119dccbabf94fc49f2520d9d77d4f901fabe 100644 (file)
 
 extern "C" {
   void
-  irr_scene_ISceneNode_setMaterialFlag(irr_scene_ISceneNode* node,
-                                       irr_video_E_MATERIAL_FLAG flag,
-                                       bool newvalue)
+  irr_scene_setMaterialFlag(irr_scene_ISceneNode* node,
+                            irr_video_E_MATERIAL_FLAG flag,
+                            int newvalue)
   {
-    ((irr::scene::ISceneNode*)node)->setMaterialFlag((irr::video::E_MATERIAL_FLAG)flag,
-                                                     newvalue);
+    ((irr::scene::ISceneNode*)node)
+      ->setMaterialFlag((irr::video::E_MATERIAL_FLAG)flag,
+                        newvalue);
   }
 
   void
-  irr_scene_ISceneNode_setMaterialTexture(irr_scene_ISceneNode* node,
-                                          u_int32_t textureLayer,
-                                          irr_video_ITexture* texture)
+  irr_scene_setMaterialTexture(irr_scene_ISceneNode* node,
+                               unsigned int textureLayer,
+                               irr_video_ITexture* texture)
   {
-    ((irr::scene::ISceneNode*)node)->setMaterialTexture(textureLayer,
-                                                        (irr::video::ITexture*)texture);
+    ((irr::scene::ISceneNode*)node)
+      ->setMaterialTexture(textureLayer,
+                           (irr::video::ITexture*)texture);
   }
 }
index ea27d4c735a7bb8184b9b59ace5fd0fe543c5692..7101961ac5e23a7d8ba2e8337fbb0bb603e6feea 100644 (file)
 
 extern "C" {
   int
-  irr_video_IVideoDriver_beginScene(irr_video_IVideoDriver* driver,
-                                    int backBuffer,
-                                    int zBuffer,
-                                    const irr_video_SColor* color,
-                                    irr_video_SExposedVideoData* videoData,
-                                    const irr_core_rect_s32* sourceRect)
+  irr_video_beginScene(irr_video_IVideoDriver* driver,
+                       int backBuffer,
+                       int zBuffer,
+                       const irr_video_SColor* color,
+                       irr_video_SExposedVideoData* videoData,
+                       const irr_core_rect_s32* sourceRect)
   {
     // Color
     irr::video::SColor col = irr::video::SColor(color->a, color->r,
@@ -50,22 +50,23 @@ extern "C" {
       }
 
     // Begin scene
-    return ((irr::video::IVideoDriver*)driver)->beginScene(backBuffer,
-                                                           zBuffer,
-                                                           col,
-                                                           vdata,
-                                                           sourceRect != NULL ? &rect : 0);
+    return ((irr::video::IVideoDriver*)driver)
+      ->beginScene(backBuffer,
+                   zBuffer,
+                   col,
+                   vdata,
+                   sourceRect != NULL ? &rect : 0);
   }
 
   int
-  irr_video_IVideoDriver_endScene(irr_video_IVideoDriver* driver)
+  irr_video_endScene(irr_video_IVideoDriver* driver)
   {
     return ((irr::video::IVideoDriver*)driver)->endScene();
   }
 
   irr_video_ITexture*
-  irr_video_IVideoDriver_getTexture(irr_video_IVideoDriver* driver,
-                                    const char* filename)
+  irr_video_getTexture(irr_video_IVideoDriver* driver,
+                       const char* filename)
   {
     return (irr_video_ITexture*)
       ((irr::video::IVideoDriver*)driver)->getTexture(filename);
index 190800e7c647ffef323d0214a3d701c1c2c94b6e..b877d256624208b9274cbc80c5a1ee6a1e528a61 100644 (file)
 
 extern "C" {
   irr_gui_IGUIEnvironment*
-  irr_IrrlichtDevice_getGUIEnvironment(irr_IrrlichtDevice* device)
+  irr_getGUIEnvironment(irr_IrrlichtDevice* device)
   {
     return ((irr::IrrlichtDevice*)device)->getGUIEnvironment();
   }
 
   irr_scene_ISceneManager*
-  irr_IrrlichtDevice_getSceneManager(irr_IrrlichtDevice* device)
+  irr_getSceneManager(irr_IrrlichtDevice* device)
   {
     return ((irr::IrrlichtDevice*)device)->getSceneManager();
   }
 
   irr_video_IVideoDriver*
-  irr_IrrlichtDevice_getVideoDriver(irr_IrrlichtDevice* device)
+  irr_getVideoDriver(irr_IrrlichtDevice* device)
   {
     return ((irr::IrrlichtDevice*)device)->getVideoDriver();
   }
 
   void
-  irr_IrrlichtDevice_setWindowCaption(irr_IrrlichtDevice* device,
-                                      const char* text)
+  irr_setWindowCaption(irr_IrrlichtDevice* device,
+                       const char* text)
   {
     wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t));
     mbsrtowcs(wtext, &text, strlen(text) + 1, NULL);
@@ -52,13 +52,13 @@ extern "C" {
   }
 
   int
-  irr_IrrlichtDevice_run(irr_IrrlichtDevice* device)
+  irr_run(irr_IrrlichtDevice* device)
   {
     return ((irr::IrrlichtDevice*)device)->run() ? 1 : 0;
   }
 
   int
-  irr_IrrlichtDevice_drop(irr_IrrlichtDevice* device)
+  irr_drop(irr_IrrlichtDevice* device)
   {
     return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0;
   }