I have some game which i want to port done over irrlicht 1.4.1. So i of course want to make it works on 1.8.4 because of many reassons (bugfixes and stuff).
Now, i doing all easy things and stuck with some remainin ones.
For example that piece of code:
Code: Select all
//! Sets the projection matrix of the camera. The core::matrix4 class has some methods
//! to build a projection matrix. e.g: core::matrix4::buildProjectionMatrixPerspectiveFovLH
//! \param projection: The new projection matrix of the camera.
void CCameraSceneNode::setProjectionMatrix(const core::matrix4& projection)
{
ViewArea.Matrices [ video::ETS_PROJECTION ] = projection;
ViewArea.setTransformState ( video::ETS_PROJECTION );
}
For first line: error: ‘irr::core::matrix4 irr::scene::SViewFrustum::Matrices [2]’ is private within this context
For second line: error: ‘struct irr::scene::SViewFrustum’ has no member named ‘setTransformState’; did you mean ‘getTransform’?
"ViewArea" are "SViewFrustum ViewArea;"
From irrlicht's SViewFrustum.h i can see that this part start to be private now indeed.
So while compiler is right, how to deal with that and make code works on 1.8.4 as it works on 1.4.1 before ?
And another issue, in all over the place i have that call:
Code: Select all
getSmgr()->getSceneCollisionManager()->getCollisionPoint(line, getLevel()->getMetaSelector(),intersection,tri);
But in newer version of function was added one more parametr, "hitNode". Currently i just doing it like this:
Code: Select all
#ifdef __irrlicht_1_8_4__
scene::ISceneNode* hitNode;
getSmgr()->getSceneCollisionManager()->getCollisionPoint(line, getLevel()->getMetaSelector(),intersection,tri,hitNode);
#else
getSmgr()->getSceneCollisionManager()->getCollisionPoint(line, getLevel()->getMetaSelector(),intersection,tri);
#endif
Thanks !