More of the VS2015 stuff

This commit is contained in:
kaetemi 2016-01-15 12:29:05 +01:00
parent 8405248a32
commit 9c1d333924
11 changed files with 24 additions and 24 deletions

View file

@ -578,7 +578,7 @@ void handleReceivedPong (CClient *client, sint64 pongTime)
uint32 blockNumber = 0;
msgin.serial(blockNumber);
// nlinfo ("receive a pong from %s pongnb %d %"NL_I64"d", CurrentInMsg->AddrFrom.asString().c_str(), pongNumber, pongTime - pingTime);
// nlinfo ("receive a pong from %s pongnb %d %" NL_I64 "d", CurrentInMsg->AddrFrom.asString().c_str(), pongNumber, pongTime - pingTime);
client->updatePong (pingTime, pongTime, pongNumber, blockNumber);
}

View file

@ -142,7 +142,7 @@ void sendUDPNow (CUdpSock *client, const uint8 *packet, uint32 packetSize, const
client->sendTo (packet, packetSize, *addr);
uint32 packetNumber = *(uint32 *)packet;
// nlinfo ("time %"NL_I64"u sending now packet %5u", CTime::getLocalTime (), packetNumber);
// nlinfo ("time %" NL_I64 "u sending now packet %5u", CTime::getLocalTime (), packetNumber);
}
void sendUDP (CUdpSock *client, const uint8 *packet, uint32 packetSize, const CInetAddress *addr)

View file

@ -255,7 +255,7 @@ bool CCDBSynchronised::setProp(const string &name, sint64 value)
}
#ifdef TRACE_SET_VALUE
nlinfo("Set value %"NL_I64"d for Prop %s", value,name.c_str() );
nlinfo("Set value %" NL_I64 "d for Prop %s", value,name.c_str() );
#endif
// Set the property.

View file

@ -8399,7 +8399,7 @@ ADD_METHOD(void CCharacterCL::displayDebug(float x, float &y, float lineStep)) /
if(isPlayer() || isUser())
{
SPropVisualA visualA = *(SPropVisualA *)(&prop);
TextContext->printfAt(x, y, "VPA: %"NL_I64"X : Chest(%d,%d) Legs(%d,%d) Arms(%d,%d) Hat(%d,%d) RH(%d) LH(%d)", prop,
TextContext->printfAt(x, y, "VPA: %" NL_I64 "X : Chest(%d,%d) Legs(%d,%d) Arms(%d,%d) Hat(%d,%d) RH(%d) LH(%d)", prop,
(uint)visualA.PropertySubData.JacketModel, (uint)visualA.PropertySubData.JacketColor,
(uint)visualA.PropertySubData.TrouserModel, (uint)visualA.PropertySubData.TrouserColor,
(uint)visualA.PropertySubData.ArmModel, (uint)visualA.PropertySubData.ArmColor,
@ -8408,29 +8408,29 @@ ADD_METHOD(void CCharacterCL::displayDebug(float x, float &y, float lineStep)) /
(uint)visualA.PropertySubData.WeaponLeftHand);
}
else
TextContext->printfAt(x, y, "VPA: %"NL_I64"X", prop);
TextContext->printfAt(x, y, "VPA: %" NL_I64 "X", prop);
y += lineStep;
// VPB
prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
if(isPlayer() || isUser())
{
SPropVisualB visualB = *(SPropVisualB *)(&prop);
TextContext->printfAt(x, y, "VPB: %"NL_I64"X : Hands(%d,%d) Feet(%d,%d).", prop,
TextContext->printfAt(x, y, "VPB: %" NL_I64 "X : Hands(%d,%d) Feet(%d,%d).", prop,
(uint)visualB.PropertySubData.HandsModel, (uint)visualB.PropertySubData.HandsColor,
(uint)visualB.PropertySubData.FeetModel, (uint)visualB.PropertySubData.FeetColor);
}
else
TextContext->printfAt(x, y, "VPB: %"NL_I64"X", prop);
TextContext->printfAt(x, y, "VPB: %" NL_I64 "X", prop);
y += lineStep;
// VPC
prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", _Slot)+":P"+toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
if(isPlayer() || isUser())
{
SPropVisualC visualC = *(SPropVisualC *)(&prop);
TextContext->printfAt(x, y, "VPC: %"NL_I64"X : EyesColor(%d) Tattoo(%d).", prop, visualC.PropertySubData.EyesColor, visualC.PropertySubData.Tattoo);
TextContext->printfAt(x, y, "VPC: %" NL_I64 "X : EyesColor(%d) Tattoo(%d).", prop, visualC.PropertySubData.EyesColor, visualC.PropertySubData.Tattoo);
}
else
TextContext->printfAt(x, y, "VPC: %"NL_I64"X", prop);
TextContext->printfAt(x, y, "VPC: %" NL_I64 "X", prop);
y += lineStep;
}// displayDebug //

View file

@ -34,7 +34,7 @@ using namespace NLMISC;
static std::string uint64ToHex(uint64 size)
{
char data[256];
sprintf(data, "%"NL_I64"X", size);
sprintf(data, "%" NL_I64 "X", size);
return std::string(data);
}

View file

@ -189,7 +189,7 @@ void displayReceiveLog()
TReceiveDateLog::iterator idl;
for ( idl=ReceivePosDateLog[i].begin(); idl!=ReceivePosDateLog[i].end(); ++idl )
{
ReceiveLogger.displayRawNL( "%u\t%u\t%"NL_I64"u", (*idl).ServerCycle, (*idl).PredictedInterval, (*idl).LocalTime );
ReceiveLogger.displayRawNL( "%u\t%u\t%" NL_I64 "u", (*idl).ServerCycle, (*idl).PredictedInterval, (*idl).LocalTime );
}
}
}
@ -1156,7 +1156,7 @@ void CNetworkConnection::receiveSystemSync(CBitMemStream &msgin)
_CurrentClientTick = uint32(_CurrentServerTick - (_LCT+_MsPerTick)/_MsPerTick);
_CurrentClientTime = _UpdateTime - (_LCT+_MsPerTick);
//nlinfo( "CNET[%p]: received SYNC %"NL_I64"u %"NL_I64"u - _CurrentReceivedNumber=%d _CurrentServerTick=%d", this, (uint64)_Synchronize, (uint64)stime, _CurrentReceivedNumber, _CurrentServerTick );
//nlinfo( "CNET[%p]: received SYNC %" NL_I64 "u %" NL_I64 "u - _CurrentReceivedNumber=%d _CurrentServerTick=%d", this, (uint64)_Synchronize, (uint64)stime, _CurrentReceivedNumber, _CurrentServerTick );
sendSystemAckSync();
}
@ -1704,7 +1704,7 @@ void CNetworkConnection::decodeVisualProperties( CBitMemStream& msgin )
{
nlinfo( "CLIENT: recvd property %hu (%s) for slot %hu, date %u", (uint16)PROPERTY_ORIENTATION, getPropText(PROPERTY_ORIENTATION), (uint16)slot, timestamp );
}
//nldebug("CLPROPNET[%p]: received property %d for entity %d: %"NL_I64"u", this, action->PropIndex, action->CLEntityId, action->getValue());
//nldebug("CLPROPNET[%p]: received property %d for entity %d: %" NL_I64 "u", this, action->PropIndex, action->CLEntityId, action->getValue());
}
}
@ -1964,7 +1964,7 @@ void CNetworkConnection::decodeDiscreetProperty( CBitMemStream& msgin, TPropInde
{
nlinfo( "CLIENT: recvd property %hu (%s) for slot %hu, date %u", (uint16)propIndex, getPropText(propIndex), (uint16)slot, TVPNodeClient::SlotContext.Timestamp );
}
//nldebug("CLPROPNET[%p]: received property %d for entity %d: %"NL_I64"u", this, action->PropIndex, action->CLEntityId, action->getValue());
//nldebug("CLPROPNET[%p]: received property %d for entity %d: %" NL_I64 "u", this, action->PropIndex, action->CLEntityId, action->getValue());
}
}
}

View file

@ -107,7 +107,7 @@ void CPropertyDecoder::receive(TPacketNumber /* packetNumber */, CAction *action
property.LastReceived = act->getValue();
nldebug("CLPROPD: Received (Id=%d,Act=%d)=(%"NL_I64"d)(Pck=%d)", act->Slot, act->Code, property.LastReceived, packetNumber);
nldebug("CLPROPD: Received (Id=%d,Act=%d)=(%" NL_I64 "d)(Pck=%d)", act->Slot, act->Code, property.LastReceived, packetNumber);
}
*/
}

View file

@ -3552,7 +3552,7 @@ void CUserEntity::CSpeedFactor::update(ICDBNode *node) // virtual
{
CCDBNodeLeaf *leaf = safe_cast<CCDBNodeLeaf *>(node);
_Value = ((float)leaf->getValue64())/100.0f;
//nlinfo("SpeedFactor changed to %f / %"NL_I64"u", _Value, leaf->getValue64());
//nlinfo("SpeedFactor changed to %f / %" NL_I64 "u", _Value, leaf->getValue64());
// clamp the value (2.0 is the egg item or the level 6 speed up power up, nothing should be faster)
// commented because ring editor speed is in fact faster

View file

@ -1550,12 +1550,12 @@ void CMirroredDataSet::displayPropValue( const std::string& propName, const T
}
case TypeUint64:
{
displayValueLine( propName, "%"NL_I64"u", "U64", (uint64*)NULL, this, entityIndex, propIndex, flagsStr, log );
displayValueLine( propName, "%" NL_I64 "u", "U64", (uint64*)NULL, this, entityIndex, propIndex, flagsStr, log );
break;
}
case TypeSint64:
{
displayValueLine( propName, "%"NL_I64"d", "S64", (sint64*)NULL, this, entityIndex, propIndex, flagsStr, log );
displayValueLine( propName, "%" NL_I64 "d", "S64", (sint64*)NULL, this, entityIndex, propIndex, flagsStr, log );
break;
}
case TypeFloat:
@ -1635,12 +1635,12 @@ void CMirroredDataSet::setValueFromString( const TDataSetRow& entityIndex, TP
}
case TypeUint64:
{
assignValue( this, entityIndex, propIndex, valueStr.c_str(), "%"NL_I64"u", (uint64*)NULL );
assignValue( this, entityIndex, propIndex, valueStr.c_str(), "%" NL_I64 "u", (uint64*)NULL );
break;
}
case TypeSint64:
{
assignValue( this, entityIndex, propIndex, valueStr.c_str(), "%"NL_I64"d", (sint64*)NULL );
assignValue( this, entityIndex, propIndex, valueStr.c_str(), "%" NL_I64 "d", (sint64*)NULL );
break;
}
case TypeFloat:
@ -1726,12 +1726,12 @@ void CMirroredDataSet::getValueToString( const TDataSetRow& entityIndex, TPro
}
case TypeUint64:
{
displayValue( this, entityIndex, propIndex, tmpStr, "%"NL_I64"u", (uint64*)NULL );
displayValue( this, entityIndex, propIndex, tmpStr, "%" NL_I64 "u", (uint64*)NULL );
break;
}
case TypeSint64:
{
displayValue( this, entityIndex, propIndex, tmpStr, "%"NL_I64"d", (sint64*)NULL );
displayValue( this, entityIndex, propIndex, tmpStr, "%" NL_I64 "d", (sint64*)NULL );
break;
}
case TypeFloat:

View file

@ -138,7 +138,7 @@ void sendUDPNow (CUdpSock *client, const uint8 *packet, uint32 packetSize, const
client->sendTo (packet, packetSize, *addr);
// uint32 packetNumber = *(uint32 *)packet;
// nlinfo ("time %"NL_I64"u sending now packet %5u", CTime::getLocalTime (), packetNumber);
// nlinfo ("time %" NL_I64 "u sending now packet %5u", CTime::getLocalTime (), packetNumber);
}
void sendUDP (CUdpSock *client, const uint8 *packet, uint32 packetSize, const CInetAddress *addr)

View file

@ -379,7 +379,7 @@ void updateNetwork()
TextContext->setHotSpot (UTextContext::MiddleTop);
TextContext->setColor (CRGBA(255, 255, 255, 255));
TextContext->setFontSize (14);
TextContext->printfAt (0.5f, 0.99f, "d:%"NL_I64"u u:%"NL_I64"u / d:%"NL_I64"u u:%"NL_I64"u / d:%"NL_I64"u u:%"NL_I64"u",
TextContext->printfAt (0.5f, 0.99f, "d:%" NL_I64 "u u:%" NL_I64 "u / d:%" NL_I64 "u u:%" NL_I64 "u / d:%" NL_I64 "u u:%" NL_I64 "u",
Connection->bytesDownloaded (), Connection->bytesUploaded (),
Connection->getBytesReceived (),Connection->getBytesSent (),
newBytesDownloaded, newBytesUploaded);