From: Javier Sancho Date: Thu, 5 Dec 2019 12:25:11 +0000 (+0100) Subject: Booleans X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=a1869c8cf8ce8428397728c6f96aa5f72ae55fa4;p=c-irrlicht.git Booleans --- diff --git a/include/IrrlichtDevice.h b/include/IrrlichtDevice.h index 335fe4b..b328be2 100644 --- a/include/IrrlichtDevice.h +++ b/include/IrrlichtDevice.h @@ -22,6 +22,8 @@ #ifndef __C_IRRLICHT_DEVICE_H_INCLUDED__ #define __C_IRRLICHT_DEVICE_H_INCLUDED__ +#include + #include "ICursorControl.h" #include "IFileSystem.h" #include "IGUIEnvironment.h" @@ -49,17 +51,17 @@ extern "C" { irr_video_IVideoDriver* irr_getVideoDriver(irr_IrrlichtDevice* device); - int + bool irr_isWindowActive(irr_IrrlichtDevice* device); void irr_setWindowCaption(irr_IrrlichtDevice* device, const char* text); - int + bool irr_run(irr_IrrlichtDevice* device); - int + bool irr_drop(irr_IrrlichtDevice* device); void diff --git a/src/IrrlichtDevice.cpp b/src/IrrlichtDevice.cpp index d00ba45..32feec3 100644 --- a/src/IrrlichtDevice.cpp +++ b/src/IrrlichtDevice.cpp @@ -54,10 +54,10 @@ extern "C" { return ((irr::IrrlichtDevice*)device)->getVideoDriver(); } - int + bool irr_isWindowActive(irr_IrrlichtDevice* device) { - return ((irr::IrrlichtDevice*)device)->isWindowActive() ? 1 : 0; + return ((irr::IrrlichtDevice*)device)->isWindowActive(); } void @@ -69,16 +69,16 @@ extern "C" { ((irr::IrrlichtDevice*)device)->setWindowCaption(wtext); } - int + bool irr_run(irr_IrrlichtDevice* device) { - return ((irr::IrrlichtDevice*)device)->run() ? 1 : 0; + return ((irr::IrrlichtDevice*)device)->run(); } - int + bool irr_drop(irr_IrrlichtDevice* device) { - return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0; + return ((irr::IrrlichtDevice*)device)->drop(); } void