*/
#include <irrlicht/irrlicht.h>
+#include <wchar.h>
#include "IrrlichtDevice.h"
extern "C" {
+ void* irr_IrrlichtDevice_getGUIEnvironment(void* device)
+ {
+ return ((irr::IrrlichtDevice*)device)->getGUIEnvironment();
+ }
+
void* irr_IrrlichtDevice_getSceneManager(void* device)
{
return ((irr::IrrlichtDevice*)device)->getSceneManager();
{
return ((irr::IrrlichtDevice*)device)->getVideoDriver();
}
+
+ void irr_IrrlichtDevice_setWindowCaption(void* device, const char* text)
+ {
+ wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t));
+ mbsrtowcs(wtext, &text, strlen(text) + 1, NULL);
+ ((irr::IrrlichtDevice*)device)->setWindowCaption(wtext);
+ }
+
+ int irr_IrrlichtDevice_run(void* device)
+ {
+ return ((irr::IrrlichtDevice*)device)->run() ? 1 : 0;
+ }
+
+ int irr_IrrlichtDevice_drop(void* device)
+ {
+ return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0;
+ }
}