#ifndef __C_I_CURSOR_CONTROL_H_INCLUDED__
#define __C_I_CURSOR_CONTROL_H_INCLUDED__
+#include <stdbool.h>
+
typedef void irr_gui_ICursorControl;
#ifdef __cplusplus
void
irr_gui_setVisibleCursor(irr_gui_ICursorControl* cursorControl,
- int visible);
+ bool visible);
#ifdef __cplusplus
}
#ifndef __C_I_FILE_SYSTEM_H_INCLUDED__
#define __C_I_FILE_SYSTEM_H_INCLUDED__
+#include <stdbool.h>
#include "IFileArchive.h"
typedef void irr_io_IFileSystem;
int irr_io_addFileArchive(irr_io_IFileSystem* filesystem,
const char* filename,
- int ignoreCase,
- int ignorePaths,
+ bool ignoreCase,
+ bool ignorePaths,
irr_io_E_FILE_ARCHIVE_TYPE archiveType,
const char* password,
irr_io_IFileArchive** retArchive);
#ifndef __C_I_GUI_ENVIRONMENT_H_INCLUDED__
#define __C_I_GUI_ENVIRONMENT_H_INCLUDED__
+#include <inttypes.h>
+#include <stdbool.h>
+
#include "IGUIElement.h"
#include "IGUIStaticText.h"
#include "rect.h"
irr_gui_addStaticText(irr_gui_IGUIEnvironment* guienv,
const char* text,
const irr_core_rect_s32* rectangle,
- int border,
- int wordWrap,
+ bool border,
+ bool wordWrap,
irr_gui_IGUIElement* parent,
- int id,
- int fillBackground);
+ int32_t id,
+ bool fillBackground);
void
irr_gui_drawAll(irr_gui_IGUIEnvironment* guienv);
#ifndef __C_I_SCENE_MANAGER_H_INCLUDED__
#define __C_I_SCENE_MANAGER_H_INCLUDED__
+#include <inttypes.h>
+#include <math.h>
+#include <stdbool.h>
+
#include "aabbox3d.h"
#include "IAnimatedMesh.h"
#include "IAnimatedMeshSceneNode.h"
irr_scene_addAnimatedMeshSceneNode(irr_scene_ISceneManager* smgr,
irr_scene_IAnimatedMesh* mesh,
irr_scene_ISceneNode* parent,
- int id,
+ int32_t id,
irr_core_vector3df* position,
irr_core_vector3df* rotation,
irr_core_vector3df* scale,
- int alsoAddIfMeshPointerZero);
+ bool alsoAddIfMeshPointerZero);
irr_scene_ICameraSceneNode*
irr_scene_addCameraSceneNode(irr_scene_ISceneManager* smgr,
irr_scene_ISceneNode* parent,
irr_core_vector3df* position,
irr_core_vector3df* lookat,
- int id,
- int makeActive);
+ int32_t id,
+ bool makeActive);
irr_scene_ICameraSceneNode*
irr_scene_addCameraSceneNodeFPS(irr_scene_ISceneManager* smgr,
irr_scene_ISceneNode* parent,
- float rotateSpeed,
- float moveSpeed,
- int id,
+ float_t rotateSpeed,
+ float_t moveSpeed,
+ int32_t id,
irr_SkeyMap* keyMapArray,
- int keyMapSize,
- int noVerticalMovement,
- float jumpSpeed,
- int invertMouse,
- int makeActive);
+ int32_t keyMapSize,
+ bool noVerticalMovement,
+ float_t jumpSpeed,
+ bool invertMouse,
+ bool makeActive);
irr_scene_ISceneNode*
irr_scene_addCustomSceneNode(irr_scene_ISceneManager* smgr,
irr_scene_ISceneNode* parent,
- int id,
+ int32_t id,
irr_core_vector3df* position,
irr_core_vector3df* rotation,
irr_core_vector3df* scale,
void (*render)(),
irr_core_aabbox3d_f32* (*getBoundingBox)(),
- int (*getMaterialCount)(),
+ uint32_t (*getMaterialCount)(),
irr_video_SMaterial* (*getMaterial)(unsigned int i));
irr_scene_IMeshSceneNode*
irr_scene_addOctreeSceneNode(irr_scene_ISceneManager* smgr,
irr_scene_IAnimatedMesh* mesh,
irr_scene_ISceneNode* parent,
- int id,
- int minimalPolysPerNode,
- int alsoAddIfMeshPointerZero);
+ int32_t id,
+ int32_t minimalPolysPerNode,
+ bool alsoAddIfMeshPointerZero);
void
irr_scene_drawAll(irr_scene_ISceneManager* smgr);
#ifndef __C_I_SCENE_NODE_H_INCLUDED__
#define __C_I_SCENE_NODE_H_INCLUDED__
+#include <inttypes.h>
+#include <stdbool.h>
+
#include "EMaterialFlags.h"
#include "ITexture.h"
#include "matrix4.h"
void
irr_scene_setMaterialFlag(irr_scene_ISceneNode* node,
irr_video_E_MATERIAL_FLAG flag,
- int newvalue);
+ bool newvalue);
void
irr_scene_setMaterialTexture(irr_scene_ISceneNode* node,
- unsigned int textureLayer,
+ uint32_t textureLayer,
irr_video_ITexture* texture);
void
#ifndef __C_I_VIDEO_DRIVER_H_INCLUDED__
#define __C_I_VIDEO_DRIVER_H_INCLUDED__
+#include <inttypes.h>
+#include <stdbool.h>
+
#include "EPrimitiveTypes.h"
#include "ITexture.h"
#include "matrix4.h"
int
irr_video_beginScene(irr_video_IVideoDriver* driver,
- int backBuffer,
- int zBuffer,
+ bool backBuffer,
+ bool zBuffer,
const irr_video_SColor* color,
irr_video_SExposedVideoData* videoData,
const irr_core_rect_s32* sourceRect);
void
irr_video_drawVertexPrimitiveList(irr_video_IVideoDriver* driver,
const void* vertices,
- unsigned int vertexCount,
+ uint32_t vertexCount,
const void* indexList,
- unsigned int primCount,
+ uint32_t primCount,
irr_video_E_VERTEX_TYPE vType,
irr_scene_E_PRIMITIVE_TYPE pType,
irr_video_E_INDEX_TYPE iType);
void
irr_setWindowCaption(irr_IrrlichtDevice* device,
- const char* text);
+ const char* text);
int
irr_run(irr_IrrlichtDevice* device);
#ifndef __C_IRR_COLOR_H_INCLUDED__
#define __C_IRR_COLOR_H_INCLUDED__
+#include <inttypes.h>
+
typedef struct
{
- unsigned int a;
- unsigned int r;
- unsigned int g;
- unsigned int b;
+ uint32_t a;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
} irr_video_SColor;
#endif
#ifndef __C_IRR_S_MATERIAL_H_INCLUDED__
#define __C_IRR_S_MATERIAL_H_INCLUDED__
+#include <stdbool.h>
+
typedef struct
{
- int wireframe;
- int lighting;
+ bool wireframe;
+ bool lighting;
} irr_video_SMaterial;
#endif
#ifndef __C_IRRLICHT_H_INCLUDED__
#define __C_IRRLICHT_H_INCLUDED__
+#include <inttypes.h>
+#include <stdbool.h>
+
#include "aabbox3d.h"
#include "dimension2d.h"
#include "EDriverTypes.h"
irr_IrrlichtDevice*
irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
const irr_core_dimension2d_u32* windowSize,
- unsigned int bits,
- int fullscreen,
- int stencilbuffer,
- int vsync);
+ uint32_t bits,
+ bool fullscreen,
+ bool stencilbuffer,
+ bool vsync);
#ifdef __cplusplus
}
#ifndef __C_IRR_DIMENSION2D_H_INCLUDED__
#define __C_IRR_DIMENSION2D_H_INCLUDED__
+#include <inttypes.h>
+
typedef struct
{
- unsigned int width;
- unsigned int height;
+ uint32_t width;
+ uint32_t height;
} irr_core_dimension2d_u32;
#endif
#ifndef __C_IRR_RECT_H_INCLUDED__
#define __C_IRR_RECT_H_INCLUDED__
+#include <inttypes.h>
+
typedef struct
{
- int x;
- int y;
- int x2;
- int y2;
+ int32_t x;
+ int32_t y;
+ int32_t x2;
+ int32_t y2;
} irr_core_rect_s32;
#endif
#ifndef __C_IRR_VECTOR_2D_H_INCLUDED__
#define __C_IRR_VECTOR_2D_H_INCLUDED__
+#include <math.h>
+
typedef struct
{
- float x;
- float y;
+ float_t x;
+ float_t y;
} irr_core_vector2df;
#endif
#ifndef __C_IRR_VECTOR_3D_H_INCLUDED__
#define __C_IRR_VECTOR_3D_H_INCLUDED__
+#include <math.h>
+
typedef struct
{
- float x;
- float y;
- float z;
+ float_t x;
+ float_t y;
+ float_t z;
} irr_core_vector3df;
#endif
irr_IrrlichtDevice*
irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
const irr_core_dimension2d_u32* windowSize,
- unsigned int bits,
- int fullscreen,
- int stencilbuffer,
- int vsync)
+ uint32_t bits,
+ bool fullscreen,
+ bool stencilbuffer,
+ bool vsync)
{
irr::core::dimension2d<irr::u32> wsize =
irr::core::dimension2d<irr::u32>(windowSize->width,
extern "C" {
void
irr_gui_setVisibleCursor(irr_gui_ICursorControl* cursorControl,
- int visible)
+ bool visible)
{
((irr::gui::ICursorControl*)cursorControl)
->setVisible(visible);
extern "C" {
int irr_io_addFileArchive(irr_io_IFileSystem* filesystem,
const char* filename,
- int ignoreCase,
- int ignorePaths,
+ bool ignoreCase,
+ bool ignorePaths,
irr_io_E_FILE_ARCHIVE_TYPE archiveType,
const char* password,
irr_io_IFileArchive** retArchive)
irr_gui_addStaticText(irr_gui_IGUIEnvironment* guienv,
const char* text,
const irr_core_rect_s32* rectangle,
- int border,
- int wordWrap,
+ bool border,
+ bool wordWrap,
irr_gui_IGUIElement* parent,
- int id,
- int fillBackground)
+ int32_t id,
+ bool fillBackground)
{
// Convert to wide char text
wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t));
{
void (*Render)();
irr_core_aabbox3d_f32* (*GetBoundingBox)();
- int (*GetMaterialCount)();
+ uint32_t (*GetMaterialCount)();
irr_video_SMaterial* (*GetMaterial)(unsigned int i);
public:
const irr::core::vector3df& scale,
void (*render)(),
irr_core_aabbox3d_f32* (*getBoundingBox)(),
- int (*getMaterialCount)(),
+ uint32_t (*getMaterialCount)(),
irr_video_SMaterial* (*getMaterial)(unsigned int i))
: irr::scene::ISceneNode(parent, smgr, id, position, rotation, scale)
{
irr_scene_addAnimatedMeshSceneNode(irr_scene_ISceneManager* smgr,
irr_scene_IAnimatedMesh* mesh,
irr_scene_ISceneNode* parent,
- int id,
+ int32_t id,
irr_core_vector3df* position,
irr_core_vector3df* rotation,
irr_core_vector3df* scale,
- int alsoAddIfMeshPointerZero)
+ bool alsoAddIfMeshPointerZero)
{
const irr::core::vector3df iPosition =
position ?
irr_scene_ISceneNode* parent,
irr_core_vector3df* position,
irr_core_vector3df* lookat,
- int id,
- int makeActive)
+ int32_t id,
+ bool makeActive)
{
const irr::core::vector3df& iPosition =
position ?
irr_scene_ICameraSceneNode*
irr_scene_addCameraSceneNodeFPS(irr_scene_ISceneManager* smgr,
irr_scene_ISceneNode* parent,
- float rotateSpeed,
- float moveSpeed,
- int id,
+ float_t rotateSpeed,
+ float_t moveSpeed,
+ int32_t id,
irr_SkeyMap* keyMapArray,
- int keyMapSize,
- int noVerticalMovement,
- float jumpSpeed,
- int invertMouse,
- int makeActive)
+ int32_t keyMapSize,
+ bool noVerticalMovement,
+ float_t jumpSpeed,
+ bool invertMouse,
+ bool makeActive)
{
return ((irr::scene::ISceneManager*)smgr)
->addCameraSceneNodeFPS((irr::scene::ISceneNode*)parent,
irr_scene_ISceneNode*
irr_scene_addCustomSceneNode(irr_scene_ISceneManager* smgr,
irr_scene_ISceneNode* parent,
- int id,
+ int32_t id,
irr_core_vector3df* position,
irr_core_vector3df* rotation,
irr_core_vector3df* scale,
void (*render)(),
irr_core_aabbox3d_f32* (*getBoundingBox)(),
- int (*getMaterialCount)(),
+ uint32_t (*getMaterialCount)(),
irr_video_SMaterial* (*getMaterial)(unsigned int i))
{
if (parent == NULL)
getBoundingBox,
getMaterialCount,
getMaterial);
- //node->drop();
- //node = 0;
- //return NULL;
return node;
}
irr_scene_addOctreeSceneNode(irr_scene_ISceneManager* smgr,
irr_scene_IAnimatedMesh* mesh,
irr_scene_ISceneNode* parent,
- int id,
- int minimalPolysPerNode,
- int alsoAddIfMeshPointerZero)
+ int32_t id,
+ int32_t minimalPolysPerNode,
+ bool alsoAddIfMeshPointerZero)
{
return ((irr::scene::ISceneManager*)smgr)
->addOctreeSceneNode((irr::scene::IAnimatedMesh*)mesh,
void
irr_scene_setMaterialFlag(irr_scene_ISceneNode* node,
irr_video_E_MATERIAL_FLAG flag,
- int newvalue)
+ bool newvalue)
{
((irr::scene::ISceneNode*)node)
->setMaterialFlag((irr::video::E_MATERIAL_FLAG)flag,
void
irr_scene_setMaterialTexture(irr_scene_ISceneNode* node,
- unsigned int textureLayer,
+ uint32_t textureLayer,
irr_video_ITexture* texture)
{
((irr::scene::ISceneNode*)node)
extern "C" {
int
irr_video_beginScene(irr_video_IVideoDriver* driver,
- int backBuffer,
- int zBuffer,
+ bool backBuffer,
+ bool zBuffer,
const irr_video_SColor* color,
irr_video_SExposedVideoData* videoData,
const irr_core_rect_s32* sourceRect)
void
irr_video_drawVertexPrimitiveList(irr_video_IVideoDriver* driver,
const void* vertices,
- unsigned int vertexCount,
+ uint32_t vertexCount,
const void* indexList,
- unsigned int primCount,
+ uint32_t primCount,
irr_video_E_VERTEX_TYPE vType,
irr_scene_E_PRIMITIVE_TYPE pType,
irr_video_E_INDEX_TYPE iType)
for (int i=0; i<primCount*3; i++)
{
- unsigned int *index = (unsigned int*)indexList + i;
if (iType == irr_video_EIT_16BIT)
{
+ uint16_t *index = (uint16_t*)indexList + i;
((irr::u16*)irrIndexList)[i] = *index;
}
else
{
+ uint32_t *index = (uint32_t*)indexList + i;
((irr::u32*)irrIndexList)[i] = *index;
}
}