diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index df642c71..728d7fed 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -2280,8 +2280,8 @@ int64 Unit::getUpdatedProgress(int64 currentProgress, int64 updateFPS, int64 spe char szBuf[8096]=""; - snprintf(szBuf,8095,"currentProgress = " MG_I64_SPECIFIER " updateFPS = " MG_I64_SPECIFIER " speed = " MG_I64_SPECIFIER " diagonalFactor = " MG_I64_SPECIFIER " heightFactor = " MG_I64_SPECIFIER " speedDenominator = " MG_I64_SPECIFIER " progressIncrease = " MG_I64_SPECIFIER " [" MG_I64_SPECIFIER "] height [%f] airHeight [%f] cellUnitHeight [%d] cellObjectHeight [%d]", - currentProgress,updateFPS,speed,diagonalFactor,heightFactor,speedDenominator,progressIncrease,((speed * diagonalFactor * heightFactor) / speedDenominator),height,airHeight,cellUnitHeight,cellObjectHeight); + snprintf(szBuf,8095,"currentProgress = " MG_I64_SPECIFIER " updateFPS = " MG_I64_SPECIFIER " speed = " MG_I64_SPECIFIER " diagonalFactor = " MG_I64_SPECIFIER " heightFactor = " MG_I64_SPECIFIER " speedDenominator = " MG_I64_SPECIFIER " progressIncrease = " MG_I64_SPECIFIER " [" MG_I64_SPECIFIER "] height [%f] airHeight [%f] cellUnitHeight [%d] cellObjectHeight [%d] skill [%s] pos [%s] lastpos [%s]", + currentProgress,updateFPS,speed,diagonalFactor,heightFactor,speedDenominator,progressIncrease,((speed * diagonalFactor * heightFactor) / speedDenominator),height,airHeight,cellUnitHeight,cellObjectHeight,(currSkill != NULL ? currSkill->getName().c_str() : "none"),pos.getString().c_str(),lastPos.getString().c_str()); networkCRCLogInfo = szBuf; //printf("%s\n",szBuf); diff --git a/source/tests/shared_lib/streflop/streflop_test.cpp b/source/tests/shared_lib/streflop/streflop_test.cpp index 4a1df68f..8895452f 100644 --- a/source/tests/shared_lib/streflop/streflop_test.cpp +++ b/source/tests/shared_lib/streflop/streflop_test.cpp @@ -75,6 +75,31 @@ private: public: StreflopTest() { +#ifdef USE_STREFLOP +//#define STREFLOP_NO_DENORMALS +// +//#if defined(STREFLOP_SSE) +// const char *instruction_set = "[SSE]"; +//#elif defined(STREFLOP_X87) +// const char *instruction_set = "[X87]"; +//#elif defined(STREFLOP_SOFT) +// const char *instruction_set = "[SOFTFLOAT]"; +//#else +// const char *instruction_set = "[none]"; +//#endif +// +//#if defined(STREFLOP_NO_DENORMALS) +// const char *denormals = "[no-denormals]"; +//#else +// const char *denormals = "[denormals]"; +//#endif +// +// printf("Tests - using STREFLOP %s - %s\n",instruction_set,denormals); + + streflop_init(); + +#endif + reset(); } @@ -198,21 +223,22 @@ public: void test_known_out_of_synch_cases() { // Documented cases of out of synch go here to test cross platform for // consistency -// int unitTypeHeight = 0; + int unitTypeHeight = 0; + + cellHeight = 2.768517; + currField = fLand; + tileSetAirHeight = 5.000000; + cellLandUnitHeight = -1; + cellObjectHeight = -1; + currSkill = scMove; + curUnitTypeSize = 1; + progress = 35145; + lastPos = Vec2i(40,41); + pos = Vec2i(39,40); + unitTypeHeight = 2; + Vec3f result = getCurrVector(unitTypeHeight); + CPPUNIT_ASSERT_EQUAL( string("x [39.6485] y [3.76852] z [40.6485]"), result.getString() ); -// cellHeight = 1.1; -// currField = fLand; -// tileSetAirHeight = standardAirHeight; -// cellLandUnitHeight = 1; -// cellObjectHeight = 0; -// currSkill = scMove; -// curUnitTypeSize = 1; -// progress = 10; -// lastPos = Vec2i(1,1); -// pos = Vec2i(1,2); -// unitTypeHeight = 1; -// Vec3f result = getCurrVector(unitTypeHeight); -// CPPUNIT_ASSERT_EQUAL( string("x [1] y [1.6] z [1.0001]"), result.getString() ); } // =========================== Helper Methods =================================