Thread: [Opentnl-cvs] tnl/tnl bitStream.cpp,1.5,1.6 platform.cpp,1.6,1.7 tnlNetConnection.h,1.6,1.7
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2004-08-20 18:27:08
|
Update of /cvsroot/opentnl/tnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27814/tnl Modified Files: bitStream.cpp platform.cpp tnlNetConnection.h Log Message: Fixed BitStream::writeSignedFloat bug Fixed constructor issues with gameWeapons and ProjectileInfo in Zap Fixed build on MinGW with heapchk Made NetConnection::TerminationReason public Index: platform.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/platform.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** platform.cpp 23 Jul 2004 23:08:45 -0000 1.6 --- platform.cpp 20 Aug 2004 18:26:58 -0000 1.7 *************** *** 175,179 **** --- 175,183 ---- bool Platform::checkHeap() { + #ifdef TNL_COMPILER_VISUALC return _heapchk() == _HEAPOK; + #else + return true; + #endif } Index: bitStream.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/bitStream.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** bitStream.cpp 11 Jun 2004 19:16:34 -0000 1.5 --- bitStream.cpp 20 Aug 2004 18:26:58 -0000 1.6 *************** *** 288,297 **** void BitStream::writeSignedFloat(F32 f, U8 bitCount) { ! writeSignedInt(S32(((f + 1) * .5f) * ((1 << bitCount) - 1)), bitCount); } F32 BitStream::readSignedFloat(U8 bitCount) { ! return readSignedInt(bitCount) * 2 / F32((1 << bitCount) - 1) - 1.0f; } --- 288,297 ---- void BitStream::writeSignedFloat(F32 f, U8 bitCount) { ! writeSignedInt(S32(f * ((1 << (bitCount - 1)) - 1)), bitCount); } F32 BitStream::readSignedFloat(U8 bitCount) { ! return readSignedInt(bitCount) / F32((1 << (bitCount - 1)) - 1); } Index: tnlNetConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlNetConnection.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tnlNetConnection.h 20 Jul 2004 18:09:51 -0000 1.6 --- tnlNetConnection.h 20 Aug 2004 18:26:58 -0000 1.7 *************** *** 199,203 **** ~NetConnection(); - protected: enum TerminationReason { ReasonTimedOut, --- 199,202 ---- *************** *** 210,213 **** --- 209,214 ---- }; + protected: + virtual void onConnectTerminated(TerminationReason reason, const char *rejectionString); ///< Called when a pending connection is terminated virtual void onConnectionTerminated(TerminationReason, const char *errorDisconnectString); ///< Called when this established connection is terminated for any reason |