From 4f2ca76c7ddfffc0c32bb4875d4cf7ed31792205 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Thu, 5 Dec 2019 12:28:38 +0100 Subject: [PATCH] Use booleans --- examples/01.HelloWorld.c | 12 ++++++------ examples/02.Quake3Map.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/01.HelloWorld.c b/examples/01.HelloWorld.c index f350f03..ed67469 100644 --- a/examples/01.HelloWorld.c +++ b/examples/01.HelloWorld.c @@ -28,7 +28,7 @@ int main() irr_core_dimension2d_u32 windowSize = {640, 480}; irr_IrrlichtDevice *device = irr_createDevice(irr_video_EDT_SOFTWARE, &windowSize, 16, - 0, 0, 0); + false, false, false); if (!device) { @@ -47,7 +47,7 @@ int main() irr_core_rect_s32 box = {10, 10, 260, 22}; irr_gui_addStaticText(guienv, "Hello World! This is the Irrlicht Software renderer!", - &box, 1, 1, NULL, -1, 0); + &box, true, true, NULL, -1, false); // load a quake2 mesh irr_scene_IAnimatedMesh* mesh = irr_scene_getMesh(smgr, "media/sydney.md2"); @@ -58,11 +58,11 @@ int main() } irr_scene_IAnimatedMeshSceneNode* node = irr_scene_addAnimatedMeshSceneNode(smgr, mesh, NULL, -1, - NULL, NULL, NULL, 0); + NULL, NULL, NULL, false); if (node) { - irr_scene_setMaterialFlag(node, irr_video_EMF_LIGHTING, 0); + irr_scene_setMaterialFlag(node, irr_video_EMF_LIGHTING, false); irr_scene_setMD2Animation(node, irr_scene_EMAT_STAND); irr_video_ITexture* texture = irr_video_getTexture(driver, "media/sydney.bmp"); irr_scene_setMaterialTexture(node, 0, texture); @@ -71,13 +71,13 @@ int main() // camera irr_core_vector3df position = {0, 30, -40}; irr_core_vector3df lookat = {0, 5, 0}; - irr_scene_addCameraSceneNode(smgr, NULL, &position, &lookat, -1, 1); + irr_scene_addCameraSceneNode(smgr, NULL, &position, &lookat, -1, true); // loop irr_video_SColor bgcolor = {255, 100, 101, 140}; while (irr_run(device)) { - irr_video_beginScene(driver, 1, 1, &bgcolor, NULL, NULL); + irr_video_beginScene(driver, true, true, &bgcolor, NULL, NULL); irr_gui_drawAll(guienv); irr_scene_drawAll(smgr); irr_video_endScene(driver); diff --git a/examples/02.Quake3Map.c b/examples/02.Quake3Map.c index bbc2c0f..8d2f279 100644 --- a/examples/02.Quake3Map.c +++ b/examples/02.Quake3Map.c @@ -50,7 +50,7 @@ int main() // create device and exit if creation failed irr_core_dimension2d_u32 windowSize = {640, 480}; irr_IrrlichtDevice *device = - irr_createDevice(driverType, &windowSize, 16, 0, 0, 0); + irr_createDevice(driverType, &windowSize, 16, false, false, false); if (!device) { @@ -63,13 +63,13 @@ int main() // load Quake3 map irr_io_addFileArchive(irr_getFileSystem(device), "media/map-20kdm2.pk3", - 1, 1, irr_io_EFAT_UNKNOWN, "", NULL); + true, true, irr_io_EFAT_UNKNOWN, "", NULL); irr_scene_IAnimatedMesh* mesh = irr_scene_getMesh(smgr, "20kdm2.bsp"); irr_scene_ISceneNode* node; if (mesh) - node = irr_scene_addOctreeSceneNode(smgr, mesh, NULL, -1, 512, 0); + node = irr_scene_addOctreeSceneNode(smgr, mesh, NULL, -1, 512, false); if (node) { @@ -78,8 +78,8 @@ int main() } // FPS camera - irr_scene_addCameraSceneNodeFPS(smgr, NULL, 100, 0.5, -1, NULL, 0, 0, 0, 0, 1); - irr_gui_setVisibleCursor(irr_getCursorControl(device), 0); + irr_scene_addCameraSceneNodeFPS(smgr, NULL, 100, 0.5, -1, NULL, 0, false, 0, false, true); + irr_gui_setVisibleCursor(irr_getCursorControl(device), false); // loop int lastFPS = -1; @@ -88,7 +88,7 @@ int main() { if (irr_isWindowActive(device)) { - irr_video_beginScene(driver, 1, 1, &bgcolor, NULL, NULL); + irr_video_beginScene(driver, true, true, &bgcolor, NULL, NULL); irr_scene_drawAll(smgr); irr_video_endScene(driver); -- 2.39.5