diff --git a/changes.txt b/changes.txt index 6591f635..81444e63 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,7 @@ Changes in version 1.6 + - position2d is now a synonym for vector2d. position2d is therefore marked as deprecated, although it's unlikely to be removed. + - ISceneNodeAnimator now has a hasFinished() method. - ISceneNodeAnimatorCollisionResponse exposes the target node. Setting the node again resets the last position, allowing the node to be teleported. diff --git a/include/position2d.h b/include/position2d.h index d9e465fb..b4755424 100644 --- a/include/position2d.h +++ b/include/position2d.h @@ -2,25 +2,29 @@ // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h +//! As of Irrlicht 1.6, position2d is a synonym for vector2d. +/** You should consider position2d to be deprecated, and use vector2d by preference. */ + #ifndef __IRR_POSITION_H_INCLUDED__ #define __IRR_POSITION_H_INCLUDED__ -// position2d is deprecated. It is currently defined as a vector2d, but -// vector2d should be used directly. #include "vector2d.h" namespace irr { namespace core { -// Use explicit typedefs where possible +// Use typedefs where possible as they are more explicit... + +//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly. typedef vector2d position2df; +//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly. typedef vector2d position2di; }; // namespace core }; // namespace irr -// And a #define to catch the rest +// ...and use a #define to catch the rest, for (e.g.) position2d #define position2d vector2d #endif // __IRR_POSITION_H_INCLUDED__ diff --git a/tests/irrCoreEquals.cpp b/tests/irrCoreEquals.cpp new file mode 100644 index 00000000..d9ba56d4 --- /dev/null +++ b/tests/irrCoreEquals.cpp @@ -0,0 +1,84 @@ +// Copyright (C) 2008 Colin MacDonald +// No rights reserved: this software is in the public domain. + +#include "testUtils.h" +#include "irrlicht.h" +#include + +bool irrCoreEquals(void) +{ + if(!irr::core::equals(99.f, 99.f)) + { + logTestString("irr::core::equals(f32, f32 (, default)) failed.\n"); + return false; + } + + if(!irr::core::equals(99.f, 98.f, 1.f)) + { + logTestString("irr::core::equals(f32, f32, f32) failed.\n"); + return false; + } + + if(!irr::core::equals(99.0, 99.0)) + { + logTestString("irr::core::equals(f64, f64 (,default)) failed.\n"); + return false; + } + + if(!irr::core::equals(99.0, 98.0, 1.0)) + { + logTestString("irr::core::equals(f64, f64, f64) failed.\n"); + return false; + } + + if(!irr::core::equals(99, 99)) + { + logTestString("irr::core::equals(s32, s32 (,default)) failed.\n"); + return false; + } + + if(!irr::core::equals(99, 98, 1)) + { + logTestString("irr::core::equals(s32, s32, s32) failed.\n"); + return false; + } + + if(irr::core::equals(99, 98)) + { + logTestString("irr::core::equals(s32, s32 (,default)) failed.\n"); + return false; + } + + if(irr::core::equals(99, 98, 0)) + { + logTestString("irr::core::equals(s32, s32, 0) failed.\n"); + return false; + } + + if(!irr::core::equals(-99, -99)) + { + logTestString("irr::core::equals(s32, s32 (,default)) failed.\n"); + return false; + } + + if(!irr::core::equals(-99, -98, 1)) + { + logTestString("irr::core::equals(s32, s32, s32) failed.\n"); + return false; + } + + if(irr::core::equals(-99, -98)) + { + logTestString("irr::core::equals(s32, s32 (,default)) failed.\n"); + return false; + } + + if(irr::core::equals(-99, -98, 0)) + { + logTestString("irr::core::equals(s32, s32, 0) failed.\n"); + return false; + } + + + return true; +} \ No newline at end of file diff --git a/tests/tests-last-passed-at.txt b/tests/tests-last-passed-at.txt index c23705c4..6f1387c7 100644 --- a/tests/tests-last-passed-at.txt +++ b/tests/tests-last-passed-at.txt @@ -1,2 +1,2 @@ -Test suite pass at GMT Mon Dec 29 16:01:24 2008 +Test suite pass at GMT Mon Dec 29 16:29:44 2008