From 482d9e598cce378cdb7f5568c9efe5befe579494 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Tue, 3 Dec 2019 10:19:36 +0100 Subject: [PATCH] Appropiate method bindings --- examples/01.HelloWorld.c | 4 ++-- examples/02.Quake3Map.c | 2 +- include/IAnimatedMeshSceneNode.h | 12 ------------ include/ISceneManager.h | 12 ++++++------ src/IAnimatedMeshSceneNode.cpp | 20 -------------------- src/ISceneManager.cpp | 12 ++++++------ 6 files changed, 15 insertions(+), 47 deletions(-) diff --git a/examples/01.HelloWorld.c b/examples/01.HelloWorld.c index d630dfc..f350f03 100644 --- a/examples/01.HelloWorld.c +++ b/examples/01.HelloWorld.c @@ -62,10 +62,10 @@ int main() if (node) { - irr_scene_setMaterialFlagAM(node, irr_video_EMF_LIGHTING, 0); + irr_scene_setMaterialFlag(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); + irr_scene_setMaterialTexture(node, 0, texture); } // camera diff --git a/examples/02.Quake3Map.c b/examples/02.Quake3Map.c index fe1351e..bbc2c0f 100644 --- a/examples/02.Quake3Map.c +++ b/examples/02.Quake3Map.c @@ -69,7 +69,7 @@ int main() irr_scene_ISceneNode* node; if (mesh) - node = irr_scene_addOctreeSceneNodeAM(smgr, mesh, NULL, -1, 512, 0); + node = irr_scene_addOctreeSceneNode(smgr, mesh, NULL, -1, 512, 0); if (node) { diff --git a/include/IAnimatedMeshSceneNode.h b/include/IAnimatedMeshSceneNode.h index 7626ad5..9f42475 100644 --- a/include/IAnimatedMeshSceneNode.h +++ b/include/IAnimatedMeshSceneNode.h @@ -22,9 +22,7 @@ #ifndef __C_I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ #define __C_I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ -#include "EMaterialFlags.h" #include "IAnimatedMeshMD2.h" -#include "ITexture.h" typedef void irr_scene_IAnimatedMeshSceneNode; @@ -32,16 +30,6 @@ typedef void irr_scene_IAnimatedMeshSceneNode; extern "C" { #endif - void - irr_scene_setMaterialFlagAM(irr_scene_IAnimatedMeshSceneNode* node, - irr_video_E_MATERIAL_FLAG flag, - int newvalue); - - void - irr_scene_setMaterialTextureAM(irr_scene_IAnimatedMeshSceneNode* node, - unsigned int textureLayer, - irr_video_ITexture* texture); - int irr_scene_setMD2Animation(irr_scene_IAnimatedMeshSceneNode* node, irr_scene_EMD2_ANIMATION_TYPE anim); diff --git a/include/ISceneManager.h b/include/ISceneManager.h index fdcd419..e87b5a7 100644 --- a/include/ISceneManager.h +++ b/include/ISceneManager.h @@ -82,12 +82,12 @@ extern "C" { irr_video_SMaterial* (*getMaterial)(unsigned int i)); irr_scene_IMeshSceneNode* - irr_scene_addOctreeSceneNodeAM(irr_scene_ISceneManager* smgr, - irr_scene_IAnimatedMesh* mesh, - irr_scene_ISceneNode* parent, - int id, - int minimalPolysPerNode, - int alsoAddIfMeshPointerZero); + irr_scene_addOctreeSceneNode(irr_scene_ISceneManager* smgr, + irr_scene_IAnimatedMesh* mesh, + irr_scene_ISceneNode* parent, + int id, + int minimalPolysPerNode, + int alsoAddIfMeshPointerZero); void irr_scene_drawAll(irr_scene_ISceneManager* smgr); diff --git a/src/IAnimatedMeshSceneNode.cpp b/src/IAnimatedMeshSceneNode.cpp index 319046b..b8920fc 100644 --- a/src/IAnimatedMeshSceneNode.cpp +++ b/src/IAnimatedMeshSceneNode.cpp @@ -23,26 +23,6 @@ #include "IAnimatedMeshSceneNode.h" extern "C" { - void - 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); - } - - void - irr_scene_setMaterialTextureAM(irr_scene_IAnimatedMeshSceneNode* node, - unsigned int textureLayer, - irr_video_ITexture* texture) - { - ((irr::scene::IAnimatedMeshSceneNode*)node) - ->setMaterialTexture(textureLayer, - (irr::video::ITexture*)texture); - } - int irr_scene_setMD2Animation(irr_scene_IAnimatedMeshSceneNode* node, irr_scene_EMD2_ANIMATION_TYPE anim) diff --git a/src/ISceneManager.cpp b/src/ISceneManager.cpp index 7edf4cf..3585216 100644 --- a/src/ISceneManager.cpp +++ b/src/ISceneManager.cpp @@ -224,12 +224,12 @@ extern "C" { } irr_scene_IMeshSceneNode* - irr_scene_addOctreeSceneNodeAM(irr_scene_ISceneManager* smgr, - irr_scene_IAnimatedMesh* mesh, - irr_scene_ISceneNode* parent, - int id, - int minimalPolysPerNode, - int alsoAddIfMeshPointerZero) + irr_scene_addOctreeSceneNode(irr_scene_ISceneManager* smgr, + irr_scene_IAnimatedMesh* mesh, + irr_scene_ISceneNode* parent, + int id, + int minimalPolysPerNode, + int alsoAddIfMeshPointerZero) { return ((irr::scene::ISceneManager*)smgr) ->addOctreeSceneNode((irr::scene::IAnimatedMesh*)mesh, -- 2.39.5