include/dimension2d.h \
include/EDriverTypes.h \
include/EMaterialFlags.h \
+ include/IAnimatedMesh.h \
include/IAnimatedMeshMD2.h \
include/IAnimatedMeshSceneNode.h \
include/ICameraSceneNode.h \
}
// 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;
}
--- /dev/null
+/* 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
<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"
#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
}
<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"
#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
}
<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
}
<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"
#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
}
<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;
<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"
#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
}
#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
}
<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
{
<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
{
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);
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);
}
}
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();
}
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 ?
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 ?
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);
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);
}
}
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,
}
// 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);
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);
}
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;
}