Commit 27879dd9 authored by cutealien's avatar cutealien

- User can now set characters used for decimal point in fast_atof for localisation.

- Update changes.txt

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4224 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3a608e83
Changes in 1.8 (??.??.2011) Changes in 1.8 (??.??.2011)
- User can now set characters used for decimal point in fast_atof for localisation.
- Add parameter useAlphaChannel to second IGUIEnvironment::addImage function.
- Fix vsync on X11
- Fix MRT disabling. Bug found and fixed by hendu.
- core:::array::reallocate returning now immediately when it has nothing to do. Should reduce a lot of memory thrashing on irrArrays.
- Start mesh animations at first OnAnimate , before start-frame was rather random. Thx @Auria for reporting and patch proposal.
- renderTargetTexture now working with ECF_R5G6B5
- add -fPic in c::b linux fast math shared build. - add -fPic in c::b linux fast math shared build.
- triangle3d::isPointInsideFast now using some epsilon to catch all points on the borders. - triangle3d::isPointInsideFast now using some epsilon to catch all points on the borders.
......
...@@ -6,11 +6,16 @@ ...@@ -6,11 +6,16 @@
#define __FAST_ATOF_H_INCLUDED__ #define __FAST_ATOF_H_INCLUDED__
#include "irrMath.h" #include "irrMath.h"
#include "irrString.h"
namespace irr namespace irr
{ {
namespace core namespace core
{ {
//! Selection of characters which count as decimal point in fast_atof
// TODO: This should probably also be used in irr::core::string, but the float-to-string code
// used there has to be rewritten first.
IRRLICHT_API extern irr::core::stringc LOCALE_DECIMAL_POINTS;
// we write [17] here instead of [] to work around a swig bug // we write [17] here instead of [] to work around a swig bug
const float fast_atof_table[17] = { const float fast_atof_table[17] = {
...@@ -315,7 +320,7 @@ inline const char* fast_atof_move(const char* in, f32& result) ...@@ -315,7 +320,7 @@ inline const char* fast_atof_move(const char* in, f32& result)
f32 value = strtof10(in, &in); f32 value = strtof10(in, &in);
if ('.' == *in) if ( LOCALE_DECIMAL_POINTS.findFirst(*in) >= 0 )
{ {
const char* afterDecimal = ++in; const char* afterDecimal = ++in;
const f32 decimal = strtof10(in, &afterDecimal); const f32 decimal = strtof10(in, &afterDecimal);
......
...@@ -116,6 +116,7 @@ namespace irr ...@@ -116,6 +116,7 @@ namespace irr
namespace core namespace core
{ {
const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY); const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY);
irr::core::stringc LOCALE_DECIMAL_POINTS(".");
} }
namespace video namespace video
......
Tests finished. 1 test of 1 passed. Tests finished. 1 test of 1 passed.
Compiled as DEBUG Compiled as DEBUG
Test suite pass at GMT Wed Jun 27 13:50:47 2012 Test suite pass at GMT Wed Jun 27 19:35:04 2012
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment