This commit is contained in:
2025-11-24 14:19:51 +05:30
commit f5c1412b28
6734 changed files with 1527575 additions and 0 deletions

View File

@ -0,0 +1,91 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017-2020, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "DX9_BackbufferGrabber.h"
DX9_BackbufferGrabber::DX9_BackbufferGrabber()
{
pDestSurface=0;
pRenderTargetSurface=0;
deviceUsedToInit=0;
width=0;
height=0;
needsUnlock=false;
}
DX9_BackbufferGrabber::~DX9_BackbufferGrabber()
{
if (pDestSurface)
pDestSurface->Release();
if (pRenderTargetSurface)
pRenderTargetSurface->Release();
}
void DX9_BackbufferGrabber::InitBackbufferGrabber(LPDIRECT3DDEVICE9 pd3dDevice, int _width, int _height)
{
if (width==_width && height==_height && pDestSurface && pRenderTargetSurface)
return;
if (pDestSurface)
pDestSurface->Release();
if (pRenderTargetSurface)
pRenderTargetSurface->Release();
width=_width;
height=_height;
deviceUsedToInit=pd3dDevice;
HRESULT hr;
// KevinJ: Surface to copy to in system memory
hr = deviceUsedToInit->CreateOffscreenPlainSurface(width, height, D3DFMT_A8R8G8B8,D3DPOOL_SYSTEMMEM, &pDestSurface, nullptr);
if (hr!=S_OK) return;
// Surface to downsize to
hr = deviceUsedToInit->CreateRenderTarget(
width,
height,
D3DFMT_A8R8G8B8,
D3DMULTISAMPLE_NONE,
0,
false,
&pRenderTargetSurface,
nullptr
);
}
void DX9_BackbufferGrabber::LockBackbufferCopy(SLNet::RGBImageBlob *blob)
{
LPDIRECT3DDEVICE9 pd3dDevice;
pd3dDevice=deviceUsedToInit;
IDirect3DSurface9 * pBackBuffer;
HRESULT hr;
hr = deviceUsedToInit->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);
hr = deviceUsedToInit->StretchRect(pBackBuffer, nullptr, pRenderTargetSurface, nullptr, D3DTEXF_NONE);
hr = deviceUsedToInit->GetRenderTargetData(pRenderTargetSurface,pDestSurface);
// SLNet::TimeMS t1 = SLNet::GetTimeMS();
D3DLOCKED_RECT lockedRect;
hr = pDestSurface->LockRect(&lockedRect,0,D3DLOCK_DONOTWAIT|D3DLOCK_READONLY|D3DLOCK_NOSYSLOCK);
if (hr==D3D_OK)
{
blob->data=(unsigned char*)(lockedRect.pBits);
// #high - consider changing data types or add error handling
blob->imageHeight=static_cast<uint16_t>(height);
blob->imageWidth=static_cast<uint16_t>(width);
blob->input_components=4;
blob->linePitch=static_cast<uint16_t>(lockedRect.Pitch);
needsUnlock=true;
}
}
void DX9_BackbufferGrabber::ReleaseBackbufferCopy(void)
{
if (needsUnlock)
{
pDestSurface->UnlockRect();
needsUnlock=false;
}
}

View File

@ -0,0 +1,38 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include <d3dx9.h>
#include "SQLiteLoggerCommon.h"
class DX9_BackbufferGrabber
{
public:
// Width and height are size of the surface to copy to
DX9_BackbufferGrabber();
~DX9_BackbufferGrabber();
// Call before using LockBackbufferCopy or ReleaseBackbufferCopy
void InitBackbufferGrabber(LPDIRECT3DDEVICE9 pd3dDevice, int _width, int _height);
// blob is an output parameter. Unchanged if the copy fails.
// blob->data is only valid until you call ReleaseBackbufferCopy
// If pd3dDevice is 0, it will use whatever was passed to InitBackbufferGrabber
void LockBackbufferCopy(SLNet::RGBImageBlob *blob);
// Call ReleaseBackbufferCopy after calling LockBackbufferCopy, when you are done with blob.
void ReleaseBackbufferCopy(void);
protected:
IDirect3DSurface9 * pDestSurface, *pRenderTargetSurface;
int width;
int height;
bool needsUnlock;
LPDIRECT3DDEVICE9 deviceUsedToInit;
};

View File

@ -0,0 +1,13 @@
/*
* This file was taken from RakNet 4.082 without any modifications.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*/
#include "Ogre3D_DX9_BackbufferGrabber.h"
void Ogre3D_DX9_BackbufferGrabber::InitBackbufferGrabber(Ogre::RenderWindow* renderWindow, int _width, int _height)
{
LPDIRECT3DDEVICE9 DX9Device;
renderWindow->getCustomAttribute("D3DDEVICE", &DX9Device);
DX9_BackbufferGrabber::InitBackbufferGrabber(DX9Device, _width, _height);
}

View File

@ -0,0 +1,18 @@
/*
* This file was taken from RakNet 4.082 without any modifications.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*/
#ifndef OGRE3D_DX9_BACKBUFFER_GRABBER_H
#define OGRE3D_DX9_BACKBUFFER_GRABBER_H
#include "DX9_BackbufferGrabber.h"
#include "OgreRenderWindow.h"
class Ogre3D_DX9_BackbufferGrabber : public DX9_BackbufferGrabber
{
public:
void InitBackbufferGrabber(Ogre::RenderWindow* renderWindow, int _width, int _height);
};
#endif

View File

@ -0,0 +1,113 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "SQLiteClientLogger_PacketLogger.h"
#include "SQLiteClientLoggerPlugin.h"
#include "slikenet/peerinterface.h"
#include "slikenet/InternalPacket.h"
#include "slikenet/MessageIdentifiers.h"
using namespace SLNet;
static const char *DEFAULT_PACKET_LOGGER_TABLE="PacketLogger";
SQLiteClientLogger_PacketLogger::SQLiteClientLogger_PacketLogger()
{
}
SQLiteClientLogger_PacketLogger::~SQLiteClientLogger_PacketLogger()
{
}
void SQLiteClientLogger_PacketLogger::OnDirectSocketSend(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
{
char str1[64], str2[62], str3[64], str4[64];
SystemAddress localSystemAddress = rakPeerInterface->GetExternalID(remoteSystemAddress);
localSystemAddress.ToString(true, str1, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString(str2, 62);
remoteSystemAddress.ToString(true, str3, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(remoteSystemAddress).ToString(str4, 64);
rakSqlLog(DEFAULT_PACKET_LOGGER_TABLE, "SndRcv,Type,PacketNumber,FrameNumber,PacketID,BitLength,LocalIP,LocalGuid,RemoteIP,RemoteGuid,splitPacketId,SplitPacketIndex,splitPacketCount,orderingIndex,misc", \
("Snd", "Raw",0, 0, IDTOString(data[0]), bitsUsed, str1, str2, str3, str4, "","","","","") );
}
void SQLiteClientLogger_PacketLogger::OnDirectSocketReceive(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
{
char str1[64], str2[62], str3[64], str4[64];
SystemAddress localSystemAddress = rakPeerInterface->GetExternalID(remoteSystemAddress);
localSystemAddress.ToString(true, str1, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString(str2, 62);
remoteSystemAddress.ToString(true, str3, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(remoteSystemAddress).ToString(str4, 64);
rakSqlLog(DEFAULT_PACKET_LOGGER_TABLE, "SndRcv,Type,PacketNumber,FrameNumber,PacketID,BitLength,LocalIP,LocalGuid,RemoteIP,RemoteGuid,splitPacketId,SplitPacketIndex,splitPacketCount,orderingIndex,misc", \
("Rcv", "Raw", "", "", IDTOString(data[0]),bitsUsed, str1, str2, str3, str4, "","","","","") );
}
void SQLiteClientLogger_PacketLogger::OnInternalPacket(InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, SLNet::TimeMS time, bool isSend)
{
// unused parameters
(void)time;
char str1[64], str2[62], str3[64], str4[64];
SystemAddress localSystemAddress = rakPeerInterface->GetExternalID(remoteSystemAddress);
localSystemAddress.ToString(true, str1, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString(str2, 62);
remoteSystemAddress.ToString(true, str3, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(remoteSystemAddress).ToString(str4, 64);
unsigned char typeByte;
char *typeStr;
if (internalPacket->data[0]==ID_TIMESTAMP && BITS_TO_BYTES(internalPacket->dataBitLength)>sizeof(SLNet::TimeMS)+1)
{
typeByte=internalPacket->data[1+sizeof(SLNet::TimeMS)];
typeStr="Timestamp";
}
else
{
typeByte=internalPacket->data[0];
typeStr="Normal";
}
const char* sendType = (isSend) ? "Snd" : "Rcv";
rakSqlLog(DEFAULT_PACKET_LOGGER_TABLE, "SndRcv,Type,PacketNumber,FrameNumber,PacketID,BitLength,LocalIP,LocalGuid,RemoteIP,RemoteGuid,splitPacketId,SplitPacketIndex,splitPacketCount,orderingIndex,misc", \
(sendType, typeStr, internalPacket->reliableMessageNumber, frameNumber, IDTOString(typeByte), internalPacket->dataBitLength, str1, str2, str3, str4, internalPacket->splitPacketId, internalPacket->splitPacketIndex, internalPacket->splitPacketCount, internalPacket->orderingIndex,"") );
}
void SQLiteClientLogger_PacketLogger::OnAck(unsigned int messageNumber, SystemAddress remoteSystemAddress, SLNet::TimeMS time)
{
// unused parameters
(void)time;
char str1[64], str2[62], str3[64], str4[64];
SystemAddress localSystemAddress = rakPeerInterface->GetExternalID(remoteSystemAddress);
localSystemAddress.ToString(true, str1, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString(str2, 62);
remoteSystemAddress.ToString(true, str3, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(remoteSystemAddress).ToString(str4, 64);
rakSqlLog(DEFAULT_PACKET_LOGGER_TABLE, "SndRcv,Type,PacketNumber,FrameNumber,PacketID,BitLength,LocalIP,LocalGuid,RemoteIP,RemoteGuid,splitPacketId,SplitPacketIndex,splitPacketCount,orderingIndex,misc", \
("Rcv", "Ack",messageNumber, "", "", "", str1, str2, str3, str4, "","","","","") );
}
void SQLiteClientLogger_PacketLogger::OnPushBackPacket(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
{
char str1[64], str2[62], str3[64], str4[64];
SystemAddress localSystemAddress = rakPeerInterface->GetExternalID(remoteSystemAddress);
localSystemAddress.ToString(true, str1, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString(str2, 62);
remoteSystemAddress.ToString(true, str3, static_cast<size_t>(64));
rakPeerInterface->GetGuidFromSystemAddress(remoteSystemAddress).ToString(str4, 64);
rakSqlLog(DEFAULT_PACKET_LOGGER_TABLE, "SndRcv,Type,PacketNumber,FrameNumber,PacketID,BitLength,LocalIP,LocalGuid,RemoteIP,RemoteGuid,splitPacketId,SplitPacketIndex,splitPacketCount,orderingIndex,misc", \
("Local", "PushBackPacket","", "", IDTOString(data[0]), bitsUsed, str1, str2, str3, str4, "","","","","") );
}
void SQLiteClientLogger_PacketLogger::WriteMiscellaneous(const char *type, const char *msg)
{
rakSqlLog(DEFAULT_PACKET_LOGGER_TABLE, "SndRcv,Type,PacketNumber,FrameNumber,PacketID,BitLength,LocalIP,LocalGuid,RemoteIP,RemoteGuid,splitPacketId,SplitPacketIndex,splitPacketCount,orderingIndex,misc", \
("Local", type,"", "", "", "", "", "", "","","","","","",msg) );
}

View File

@ -0,0 +1,55 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
/// \file
/// \brief This will write all incoming and outgoing network messages the SQLiteClientLoggerPlugin
///
#ifndef __SQL_LITE_CLIENT_LOGGER_PACKET_LOGGER_H_
#define __SQL_LITE_CLIENT_LOGGER_PACKET_LOGGER_H_
#include "slikenet/PacketLogger.h"
namespace SLNet
{
/// \ingroup PACKETLOGGER_GROUP
/// \brief Packetlogger that outputs to a file
class RAK_DLL_EXPORT SQLiteClientLogger_PacketLogger : public PacketLogger
{
public:
SQLiteClientLogger_PacketLogger();
virtual ~SQLiteClientLogger_PacketLogger();
virtual void OnDirectSocketSend(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress);
virtual void OnDirectSocketReceive(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress);
virtual void OnInternalPacket(InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, SLNet::TimeMS time, bool isSend);
virtual void OnAck(unsigned int messageNumber, SystemAddress remoteSystemAddress, SLNet::TimeMS time);
virtual void OnPushBackPacket(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress);
virtual void WriteMiscellaneous(const char *type, const char *msg);
protected:
virtual void WriteLog(const char *str)
{
// unused parameters
(void)str;
}
};
}
#endif

View File

@ -0,0 +1,112 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "SQLiteClientLogger_RNSLogger.h"
#include "slikenet/time.h"
#include "slikenet/GetTime.h"
#include "slikenet/statistics.h"
#include "slikenet/peerinterface.h"
#include "SQLiteClientLoggerPlugin.h"
using namespace SLNet;
static const char *DEFAULT_RAKNET_STATISTICS_TABLE="RakNetStatistics";
SQLiteClientLogger_RakNetStatistics::SQLiteClientLogger_RakNetStatistics()
{
lastUpdate=0;
}
SQLiteClientLogger_RakNetStatistics::~SQLiteClientLogger_RakNetStatistics()
{
}
void SQLiteClientLogger_RakNetStatistics::Update(void)
{
SLNet::TimeUS time = SLNet::GetTimeUS();
if (time-lastUpdate>1000000)
{
lastUpdate=time;
unsigned int i;
RakNetStatistics rns;
for (i=0; i < rakPeerInterface->GetMaximumNumberOfPeers(); i++)
{
if (rakPeerInterface->GetStatistics( i, &rns ))
{
/*
rns.valueOverLastSecond[USER_MESSAGE_BYTES_PUSHED],
rns.valueOverLastSecond[USER_MESSAGE_BYTES_SENT],
rns.valueOverLastSecond[USER_MESSAGE_BYTES_RESENT],
rns.valueOverLastSecond[USER_MESSAGE_BYTES_RECEIVED_PROCESSED],
rns.valueOverLastSecond[USER_MESSAGE_BYTES_RECEIVED_IGNORED],
rns.valueOverLastSecond[ACTUAL_BYTES_SENT],
rns.valueOverLastSecond[ACTUAL_BYTES_RECEIVED],
rns.runningTotal[USER_MESSAGE_BYTES_PUSHED],
rns.runningTotal[USER_MESSAGE_BYTES_SENT],
rns.runningTotal[USER_MESSAGE_BYTES_RESENT],
rns.runningTotal[USER_MESSAGE_BYTES_RECEIVED_PROCESSED],
rns.runningTotal[USER_MESSAGE_BYTES_RECEIVED_IGNORED],
rns.runningTotal[ACTUAL_BYTES_SENT],
rns.runningTotal[ACTUAL_BYTES_RECEIVED],
rns.connectionStartTime,
rns.BPSLimitByCongestionControl,
rns.isLimitedByCongestionControl,
rns.BPSLimitByOutgoingBandwidthLimit,
rns.isLimitedByOutgoingBandwidthLimit,
rns.messageInSendBuffer[IMMEDIATE_PRIORITY],
rns.messageInSendBuffer[HIGH_PRIORITY],
rns.messageInSendBuffer[MEDIUM_PRIORITY],
rns.messageInSendBuffer[LOW_PRIORITY],
rns.bytesInSendBuffer[IMMEDIATE_PRIORITY],
rns.bytesInSendBuffer[HIGH_PRIORITY],
rns.bytesInSendBuffer[MEDIUM_PRIORITY],
rns.bytesInSendBuffer[LOW_PRIORITY],
rns.messagesInResendBuffer,
rns.bytesInResendBuffer,
rns.packetlossLastSecond,
rns.packetlossTotal,
*/
rakSqlLog(
DEFAULT_RAKNET_STATISTICS_TABLE,
"valueOverLastSecond[USER_MESSAGE_BYTES_PUSHED],"
"valueOverLastSecond[USER_MESSAGE_BYTES_SENT],"
"valueOverLastSecond[USER_MESSAGE_BYTES_RESENT],"
"valueOverLastSecond[USER_MESSAGE_BYTES_RECEIVED_PROCESSED],"
"valueOverLastSecond[USER_MESSAGE_BYTES_RECEIVED_IGNORED],"
"valueOverLastSecond[ACTUAL_BYTES_SENT],"
"valueOverLastSecond[ACTUAL_BYTES_RECEIVED],"
"BPSLimitByCongestionControl,"
"BPSLimitByOutgoingBandwidthLimit,"
"bytesInSendBuffer,"
"messagesInResendBuffer,"
"bytesInResendBuffer,"
"packetlossLastSecond,"
"packetlossTotal",
( \
rns.valueOverLastSecond[USER_MESSAGE_BYTES_PUSHED], \
rns.valueOverLastSecond[USER_MESSAGE_BYTES_SENT], \
rns.valueOverLastSecond[USER_MESSAGE_BYTES_RESENT], \
rns.valueOverLastSecond[USER_MESSAGE_BYTES_RECEIVED_PROCESSED], \
rns.valueOverLastSecond[USER_MESSAGE_BYTES_RECEIVED_IGNORED], \
rns.valueOverLastSecond[ACTUAL_BYTES_SENT], \
rns.valueOverLastSecond[ACTUAL_BYTES_RECEIVED], \
rns.BPSLimitByCongestionControl, \
rns.BPSLimitByOutgoingBandwidthLimit, \
rns.bytesInSendBuffer[IMMEDIATE_PRIORITY]+rns.bytesInSendBuffer[HIGH_PRIORITY]+rns.bytesInSendBuffer[MEDIUM_PRIORITY]+rns.bytesInSendBuffer[LOW_PRIORITY], \
rns.messagesInResendBuffer, \
rns.bytesInResendBuffer, \
rns.packetlossLastSecond, \
rns.packetlossTotal \
));
}
}
}
}

View File

@ -0,0 +1,42 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
/// \file
/// \brief Writes RakNetStatistics for all connected systems once per second to SQLiteClientLogger
///
#ifndef __SQL_LITE_CLIENT_LOGGER_RAKNET_STATISTICS_H_
#define __SQL_LITE_CLIENT_LOGGER_RAKNET_STATISTICS_H_
#include "slikenet/PluginInterface2.h"
namespace SLNet
{
/// \ingroup PACKETLOGGER_GROUP
/// \brief Packetlogger that outputs to a file
class RAK_DLL_EXPORT SQLiteClientLogger_RakNetStatistics : public PluginInterface2
{
public:
SQLiteClientLogger_RakNetStatistics();
virtual ~SQLiteClientLogger_RakNetStatistics();
virtual void Update(void);
protected:
SLNet::TimeUS lastUpdate;
};
}
#endif

View File

@ -0,0 +1,373 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "SQLiteClientLoggerPlugin.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/PacketizedTCP.h"
#include "slikenet/GetTime.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
static const char COLUMN_NAMES_DELIMITER=',';
static const int MAX_COLUMN_NAMES_LENGTH=512;
using namespace SLNet;
SQLiteClientLoggerPlugin* SQLiteClientLoggerPlugin::logger;
SQLiteClientLoggerPlugin::SQLiteClientLoggerPlugin()
{
logger=this;
tickCount=0;
recursiveCheck=false;
memoryConstraint=0;
}
SQLiteClientLoggerPlugin::~SQLiteClientLoggerPlugin()
{
if (logger==this)
logger=0;
}
void SQLiteClientLoggerPlugin::SetServerParameters(const SystemAddress &systemAddress, SLNet::RakString _dbIdentifier)
{
serverAddress=systemAddress;
dbIdentifier=_dbIdentifier;
}
void SQLiteClientLoggerPlugin::SetMemoryConstraint(unsigned int constraint)
{
memoryConstraint=constraint;
}
void SQLiteClientLoggerPlugin::IncrementAutoTickCount(void)
{
tickCount++;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const ParameterListHelper &parameterList )
{
if (recursiveCheck==true)
return SQLLR_RECURSION;
recursiveCheck=true;
SLNet::BitStream bitStream;
// #med - proper bounds check for paramCount required
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, static_cast<unsigned char>(parameterList.paramCount));
// unsigned int i;
//for (i=0; i < parameterList.paramCount; i++)
// parameterList.parms[i].Serialize(&bitStream);
if (parameterList.paramCount>=1)
parameterList.p0.Serialize(&bitStream);
if (parameterList.paramCount>=2)
parameterList.p1.Serialize(&bitStream);
if (parameterList.paramCount>=3)
parameterList.p2.Serialize(&bitStream);
if (parameterList.paramCount>=4)
parameterList.p3.Serialize(&bitStream);
if (parameterList.paramCount>=5)
parameterList.p4.Serialize(&bitStream);
if (parameterList.paramCount>=6)
parameterList.p5.Serialize(&bitStream);
if (parameterList.paramCount>=7)
parameterList.p6.Serialize(&bitStream);
if (parameterList.paramCount>=8)
parameterList.p7.Serialize(&bitStream);
if (parameterList.paramCount>=9)
parameterList.p8.Serialize(&bitStream);
if (parameterList.paramCount>=10)
parameterList.p9.Serialize(&bitStream);
if (parameterList.paramCount>=11)
parameterList.p10.Serialize(&bitStream);
if (parameterList.paramCount>=12)
parameterList.p11.Serialize(&bitStream);
if (parameterList.paramCount>=13)
parameterList.p12.Serialize(&bitStream);
if (parameterList.paramCount>=14)
parameterList.p13.Serialize(&bitStream);
if (parameterList.paramCount>=15)
parameterList.p14.Serialize(&bitStream);
if (memoryConstraint!=0 && tcpInterface)
{
if (tcpInterface->GetOutgoingDataBufferSize(serverAddress)+bitStream.GetNumberOfBytesUsed()>=memoryConstraint)
{
recursiveCheck=false;
return SQLLR_WOULD_EXCEED_MEMORY_CONSTRAINT;
}
}
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
recursiveCheck=false;
return SQLLR_OK;
}
/*
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 0);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 1);
p1->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 2);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 3);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 4);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 5);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 6);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
p6->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 7);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
p6->Serialize(&bitStream);
p7->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 8);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
p6->Serialize(&bitStream);
p7->Serialize(&bitStream);
p8->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 9);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
p6->Serialize(&bitStream);
p7->Serialize(&bitStream);
p8->Serialize(&bitStream);
p9->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9, const LogParameter *p10 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 10);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
p6->Serialize(&bitStream);
p7->Serialize(&bitStream);
p8->Serialize(&bitStream);
p9->Serialize(&bitStream);
p10->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9, const LogParameter *p10, const LogParameter *p11 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 11);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
p6->Serialize(&bitStream);
p7->Serialize(&bitStream);
p8->Serialize(&bitStream);
p9->Serialize(&bitStream);
p10->Serialize(&bitStream);
p11->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
SQLLogResult SQLiteClientLoggerPlugin::SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9, const LogParameter *p10, const LogParameter *p11, const LogParameter *p12 )
{
SLNet::BitStream bitStream;
SerializeHeader(&bitStream, isFunctionCall, tableName, columnNames, file, line, 12);
p1->Serialize(&bitStream);
p2->Serialize(&bitStream);
p3->Serialize(&bitStream);
p4->Serialize(&bitStream);
p5->Serialize(&bitStream);
p6->Serialize(&bitStream);
p7->Serialize(&bitStream);
p8->Serialize(&bitStream);
p9->Serialize(&bitStream);
p10->Serialize(&bitStream);
p11->Serialize(&bitStream);
p12->Serialize(&bitStream);
SendUnified(&bitStream, LOW_PRIORITY, RELIABLE_ORDERED, 1, serverAddress, false);
return SQLLR_OK;
}
*/
SQLLogResult SQLiteClientLoggerPlugin::CheckQuery(bool isFunction, const char *tableName, const char *columnNames, unsigned int numParameters)
{
(void) isFunction;
if (recursiveCheck==true)
return SQLLR_RECURSION;
if (tableName==0 || tableName[0]==0)
return SQLLR_TABLE_NAME_BLANK;
if (isFunction==true)
return SQLLR_OK;
if (columnNames==0 || columnNames[0]==0)
{
if (numParameters==0)
return SQLLR_OK;
return SQLLR_TABLE_DESCRIPTOR_FORMAT_WRONG_PARAMETER_COUNT;
}
recursiveCheck=true;
if (dbIdentifier.IsEmpty())
{
recursiveCheck=false;
return SQLLR_NO_DATABASE_SET;
}
unsigned int parameterCount=1;
unsigned int columnNamesIndex=0;
for (columnNamesIndex=1; columnNamesIndex < 512 && columnNames[columnNamesIndex]; columnNamesIndex++)
{
if (columnNames[columnNamesIndex]==COLUMN_NAMES_DELIMITER)
{
if (columnNames[columnNamesIndex-1]==COLUMN_NAMES_DELIMITER)
{
recursiveCheck=false;
return SQLLR_TABLE_DESCRIPTOR_FORMAT_INVALID_SYNTAX;
}
parameterCount++;
}
}
recursiveCheck=false;
if (columnNamesIndex==MAX_COLUMN_NAMES_LENGTH)
{
return SQLLR_COLUMN_NAMES_NOT_TERMINATED;
}
if (parameterCount!=numParameters)
{
return SQLLR_TABLE_DESCRIPTOR_FORMAT_WRONG_PARAMETER_COUNT;
}
return SQLLR_OK;
}
void SQLiteClientLoggerPlugin::SerializeHeader(SLNet::BitStream *bitStream, bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, unsigned char parameterCount ) const
{
bitStream->Write((MessageID) ID_SQLLITE_LOGGER);
bitStream->Write(dbIdentifier);
bitStream->Write(tableName);
bitStream->Write(line);
bitStream->Write(file);
bitStream->Write(tickCount);
bitStream->Write(SLNet::GetTimeMS());
bitStream->Write(isFunctionCall);
bitStream->Write(parameterCount);
if (isFunctionCall==false && parameterCount>=1)
{
int stringIndices[64];
int strIndex=0;
stringIndices[strIndex++]=0;
char columnNamesCopy[MAX_COLUMN_NAMES_LENGTH];
RakAssert(strlen(columnNames)<MAX_COLUMN_NAMES_LENGTH);
strncpy_s(columnNamesCopy, columnNames, MAX_COLUMN_NAMES_LENGTH);
columnNamesCopy[MAX_COLUMN_NAMES_LENGTH-1]=0;
for (int i=0; columnNamesCopy[i]; i++)
{
if (columnNamesCopy[i]==COLUMN_NAMES_DELIMITER)
{
columnNamesCopy[i]=0;
stringIndices[strIndex++]=i+1;
}
}
RakAssert(strIndex==parameterCount);
for (int i=0; i < parameterCount; i++)
{
bitStream->Write((char*)columnNamesCopy + stringIndices[i]);
}
}
}
void SQLiteClientLoggerPlugin::Update(void)
{
SQLite3ClientPlugin::Update();
}

View File

@ -0,0 +1,510 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
/// \file
/// \brief Contains utility functions to write logs, which are then sent to a connected instance of SQLite3ServerLoggerPlugin
///
#ifndef ___SQLITE_CLIENT_LOGGER_PLUGIN_H
#define ___SQLITE_CLIENT_LOGGER_PLUGIN_H
#include "SQLite3ClientPlugin.h"
#include "SQLiteLoggerCommon.h"
// return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line);
// If you get Error 2 error C2275: 'SLNet::SQLiteClientLoggerPlugin::ParameterListHelper' : illegal use of this type as an expression
// Either:
// 1. You forgot to write the TABLE_DESCRIPTOR
// 2. You forgot to put the parameter list in parenthesis
#define rakSqlLog(TABLE_DESCRIPTOR, COLUMN_NAMES, PARAMETER_LIST) SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, TABLE_DESCRIPTOR, COLUMN_NAMES, _FILE_AND_LINE_, SLNet::SQLiteClientLoggerPlugin::ParameterListHelper PARAMETER_LIST)
#define rakFnLog(TABLE_DESCRIPTOR, PARAMETER_LIST) SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, TABLE_DESCRIPTOR, 0, _FILE_AND_LINE_, SLNet::SQLiteClientLoggerPlugin::ParameterListHelper PARAMETER_LIST)
namespace SLNet
{
/// \ingroup SQL_LITE_3_PLUGIN
/// \brief Result codes for logging
enum SQLLogResult
{
/// OK
SQLLR_OK,
/// Didn't instantiate SQLiteClientLoggerPlugin
SQLLR_NOT_INSTANTIATED,
/// Didn't call SQLiteClientLoggerPlugin::SetServerParameters
SQLLR_NO_DATABASE_SET,
/// String passed for column names unreasonably long (set by MAX_COLUMN_NAMES_LENGTH)
SQLLR_COLUMN_NAMES_NOT_TERMINATED,
/// tableName parameter is blank
SQLLR_TABLE_NAME_BLANK,
/// Syntax of column names doesn't make sense. Should be column1,column2,column3,...
SQLLR_TABLE_DESCRIPTOR_FORMAT_INVALID_SYNTAX,
/// Syntax of column names indicated n columns, but actual number of parameters != n
SQLLR_TABLE_DESCRIPTOR_FORMAT_WRONG_PARAMETER_COUNT,
/// Logging when already in a log function
SQLLR_RECURSION,
/// Out of memory. See SQLiteClientLoggerPlugin::SetMemoryConstraint
SQLLR_WOULD_EXCEED_MEMORY_CONSTRAINT
};
/// \brief Contains utility functions to write logs, which are then sent to a connected instance of SQLite3ServerLoggerPlugin
/// \details Connect with RakPeerInterface or PacketizedTCP first, then use the sqlLog or functionLog to write logs.
/// Don't use this class directly, except to call SetServerParameters()
/// \ingroup SQL_LITE_3_PLUGIN
class RAK_DLL_EXPORT SQLiteClientLoggerPlugin : public SQLite3ClientPlugin
{
public:
SQLiteClientLoggerPlugin();
virtual ~SQLiteClientLoggerPlugin();
/// Required to use the system. Call SetServerParameters() before calling sqlLog() or functionLog()
/// systemAddress Address of the server we are already connected to
/// _dbIdentifier session identifier. If the server is using CREATE_SHARED_NAMED_DB_HANDLE or CREATE_EACH_NAMED_DB_HANDLE then this is the name of the created file. Otherwise, it is the dbIdentifier passed to SQLite3ServerPlugin::AddDBHandle();
void SetServerParameters(const SystemAddress &systemAddress, SLNet::RakString _dbIdentifier);
/// Every entry in the table has a tick count
/// Call this function to increment it by one
void IncrementAutoTickCount(void);
/// If the amount of data buffered to go out on TCP exceeds this amount, then the log is aborted rather than sent
/// This is only used when sending through TCP
/// \param[in] constraint Use 0 for unlimited. Otherwise specify the amount in bytes
void SetMemoryConstraint(unsigned int constraint);
// ---------------------------------- INTERNAL -------------------------------
SQLLogResult CheckQuery(bool isFunction, const char *tableName, const char *columnNames, unsigned int numParameters);
struct ParameterListHelper
{
ParameterListHelper() : paramCount(0) {}
template <class T1>
ParameterListHelper(const T1 &t1) : p0(t1), paramCount(1) {}
template <class T1, class T2>
ParameterListHelper(const T1 &t1, const T2 &t2) : p0(t1), p1(t2), paramCount(2) {}
template <class T1, class T2, class T3>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3) : p0(t1), p1(t2), p2(t3), paramCount(3) {}
template <class T1, class T2, class T3, class T4>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) : p0(t1), p1(t2), p2(t3), p3(t4), paramCount(4) {}
template <class T1, class T2, class T3, class T4, class T5>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), paramCount(5) {}
template <class T1, class T2, class T3, class T4, class T5, class T6>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), paramCount(6) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), paramCount(7) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), paramCount(8) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), p8(t9), paramCount(9) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9, const T10 &t10) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), p8(t9), p9(t10), paramCount(10) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9, const T10 &t10, const T11 &t11) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), p8(t9), p9(t10), p10(t11), paramCount(11) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9, const T10 &t10, const T11 &t11, const T12 &t12) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), p8(t9), p9(t10), p10(t11), p11(t12), paramCount(12) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9, const T10 &t10, const T11 &t11, const T12 &t12, const T13 &t13) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), p8(t9), p9(t10), p10(t11), p11(t12), p12(t13), paramCount(13) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9, const T10 &t10, const T11 &t11, const T12 &t12, const T13 &t13, const T14 &t14) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), p8(t9), p9(t10), p10(t11), p11(t12), p12(t13), p13(t14), paramCount(14) {}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15>
ParameterListHelper(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9, const T10 &t10, const T11 &t11, const T12 &t12, const T13 &t13, const T14 &t14, const T15 &t15) : p0(t1), p1(t2), p2(t3), p3(t4), p4(t5), p5(t6), p6(t7), p7(t8), p8(t9), p9(t10), p10(t11), p11(t12), p12(t13), p13(t14), p14(t15), paramCount(15) {}
// Array doesn't work - no constructor initialization
//const LogParameter parms[12];
const LogParameter p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14;
const unsigned int paramCount;
};
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const ParameterListHelper &parameterList );
/*
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9, const LogParameter *p10 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9, const LogParameter *p10, const LogParameter *p11 );
SQLLogResult SqlLog( bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, const LogParameter *p1, const LogParameter *p2, const LogParameter *p3, const LogParameter *p4, const LogParameter *p5, const LogParameter *p6, const LogParameter *p7, const LogParameter *p8, const LogParameter *p9, const LogParameter *p10, const LogParameter *p11, const LogParameter *p12 );
*/
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const ParameterListHelper &parameterList )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,parameterList.paramCount); if (r!=SQLLR_OK) return r;
r = logger->SqlLog(isFunction, tableName, columnNames, file, line, parameterList);
return r;
}
/*
static SLNet::SQLLogResult __sqlLogInternal( bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line )
{
if (logger==0) return SLNet::SQLLR_NOT_INSTANTIATED;
SLNet::SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,0); if (r!=SLNet::SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line);
}
template <class T1>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,1); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
);
}
template <class T1, class T2>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,2); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
);
}
template <class T1, class T2, class T3>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,3); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
);
}
template <class T1, class T2, class T3, class T4>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,4); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
);
}
template <class T1, class T2, class T3, class T4, class T5>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,5); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
);
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,6); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
,&LogParameter(arg6)
);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,7); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
,&LogParameter(arg6)
,&LogParameter(arg7)
);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,8); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
,&LogParameter(arg6)
,&LogParameter(arg7)
,&LogParameter(arg8)
);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,9); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
,&LogParameter(arg6)
,&LogParameter(arg7)
,&LogParameter(arg8)
,&LogParameter(arg9)
);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,10); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
,&LogParameter(arg6)
,&LogParameter(arg7)
,&LogParameter(arg8)
,&LogParameter(arg9)
,&LogParameter(arg10)
);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10, const T11 &arg11 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,11); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
,&LogParameter(arg6)
,&LogParameter(arg7)
,&LogParameter(arg8)
,&LogParameter(arg9)
,&LogParameter(arg10)
,&LogParameter(arg11)
);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
static SLNet::SQLLogResult __sqlLogInternal(bool isFunction, const char *tableName, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10, const T11 &arg11, const T12 &arg12 )
{
if (logger==0) return SQLLR_NOT_INSTANTIATED;
SQLLogResult r = logger->CheckQuery(isFunction, tableName, columnNames,12); if (r!=SQLLR_OK) return r;
return logger->SqlLog(isFunction, tableName, columnNames, file, line
,&LogParameter(arg1)
,&LogParameter(arg2)
,&LogParameter(arg3)
,&LogParameter(arg4)
,&LogParameter(arg5)
,&LogParameter(arg6)
,&LogParameter(arg7)
,&LogParameter(arg8)
,&LogParameter(arg9)
,&LogParameter(arg10)
,&LogParameter(arg11)
,&LogParameter(arg12)
);
}
*/
virtual void Update(void);
static SQLiteClientLoggerPlugin* logger;
protected:
void SerializeHeader(SLNet::BitStream *bitStream, bool isFunctionCall, const char *tableName, const char *columnNames, const char *file, const int line, unsigned char parameterCount ) const;
SystemAddress serverAddress;
SLNet::RakString dbIdentifier;
uint32_t tickCount;
bool recursiveCheck;
unsigned int memoryConstraint;
};
}
/*
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line);
}
template <class T1>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1);
}
template <class T1, class T2>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2);
}
template <class T1, class T2, class T3>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3);
}
template <class T1, class T2, class T3, class T4>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4);
}
template <class T1, class T2, class T3, class T4, class T5>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5);
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5, arg6);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10, const T11 &arg11 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
SLNet::SQLLogResult __sqlLog(const char *tableDescriptor, const char *columnNames, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10, const T11 &arg11, const T12 &arg12 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(false, tableDescriptor, columnNames, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
}
// TODO - Add _FILE_AND_LINE_ automatically somehow or this is nearly useless
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line);
}
template <class T1>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1);
}
template <class T1, class T2>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2);
}
template <class T1, class T2, class T3>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3);
}
template <class T1, class T2, class T3, class T4>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4);
}
template <class T1, class T2, class T3, class T4, class T5>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5);
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5, arg6);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10, const T11 &arg11 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
}
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12>
SLNet::SQLLogResult __functionLog(const char *functionName, const char *file, const int line, const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10, const T11 &arg11, const T12 &arg12 )
{
return SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal(true, functionName, 0, file, line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
}
*/
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,363 @@
//-----------------------------------------------------------------------------
// File: Matrices.cpp
//
// Desc: Now that we know how to create a device and render some 2D vertices,
// this tutorial goes the next step and renders 3D geometry. To deal with
// 3D geometry we need to introduce the use of 4x4 Matrices to transform
// the geometry with translations, rotations, scaling, and setting up our
// camera.
//
// Geometry is defined in model space. We can move it (translation),
// rotate it (rotation), or stretch it (scaling) using a world transform.
// The geometry is then said to be in world space. Next, we need to
// position the camera, or eye point, somewhere to look at the geometry.
// Another transform, via the view matrix, is used, to position and
// rotate our view. With the geometry then in view space, our last
// transform is the projection transform, which "projects" the 3D scene
// into our 2D viewport.
//
// Note that in this tutorial, we are introducing the use of D3DX, which
// is a set of helper utilities for D3D. In this case, we are using some
// of D3DX's useful matrix initialization functions. To use D3DX, simply
// include <d3dx9.h> and link with d3dx9.lib.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017-2020, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
// RakNet: Logger includes. Include before Windows.h
#include "SQLiteClientLoggerPlugin.h"
#include "slikenet/PacketizedTCP.h"
#include "DX9_BackbufferGrabber.h"
#include <Windows.h>
#include <mmsystem.h>
#include <d3dx9.h>
#include <tchar.h> // used for _T-macro
#pragma warning( disable : 4996 ) // disable deprecated warning
#include <strsafe.h>
#pragma warning( default : 4996 )
//-----------------------------------------------------------------------------
// Global variables
//-----------------------------------------------------------------------------
LPDIRECT3D9 g_pD3D = nullptr; // Used to create the D3DDevice
LPDIRECT3DDEVICE9 g_pd3dDevice = nullptr; // Our rendering device
LPDIRECT3DVERTEXBUFFER9 g_pVB = nullptr; // Buffer to hold vertices
// A structure for our custom vertex type
struct CUSTOMVERTEX
{
FLOAT x, y, z; // The untransformed, 3D position for the vertex
DWORD color; // The vertex color
};
// Our custom FVF, which describes our custom vertex structure
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)
//-----------------------------------------------------------------------------
// Name: InitD3D()
// Desc: Initializes Direct3D
//-----------------------------------------------------------------------------
HRESULT InitD3D( HWND hWnd )
{
// Create the D3D object.
if(nullptr == ( g_pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) )
return E_FAIL;
// Set up the structure used to create the D3DDevice
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof( d3dpp ) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
// KevinJ: Used known backbuffer format of 4 bytes per pixel, and let us lock the backbuffer
d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8; // D3DFMT_UNKNOWN;
d3dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
// Create the D3DDevice
if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &g_pd3dDevice ) ) )
{
return E_FAIL;
}
// Turn off culling, so we see the front and back of the triangle
g_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE );
// Turn off D3D lighting, since we are providing our own vertex colors
g_pd3dDevice->SetRenderState( D3DRS_LIGHTING, FALSE );
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: InitGeometry()
// Desc: Creates the scene geometry
//-----------------------------------------------------------------------------
HRESULT InitGeometry()
{
// Initialize three vertices for rendering a triangle
// ARGB
CUSTOMVERTEX g_Vertices[] =
{
{ -1.0f,-1.0f, 0.0f, 0xffff0000, },
{ 1.0f,-1.0f, 0.0f, 0xff0000ff, },
{ 0.0f, 1.0f, 0.0f, 0xffffffff, },
// { -1.0f,-1.0f, 0.0f, 0xffff0000, },
// { 1.0f,-1.0f, 0.0f, 0xffff0000, },
// { 0.0f, 1.0f, 0.0f, 0xffff0000, },
};
// Create the vertex buffer.
if( FAILED( g_pd3dDevice->CreateVertexBuffer( 3 * sizeof( CUSTOMVERTEX ),
0, D3DFVF_CUSTOMVERTEX,
D3DPOOL_DEFAULT, &g_pVB, nullptr) ) )
{
return E_FAIL;
}
// Fill the vertex buffer.
VOID* pVertices;
if( FAILED( g_pVB->Lock( 0, sizeof( g_Vertices ), ( void** )&pVertices, 0 ) ) )
return E_FAIL;
memcpy( pVertices, g_Vertices, sizeof( g_Vertices ) );
g_pVB->Unlock();
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: Cleanup()
// Desc: Releases all previously initialized objects
//-----------------------------------------------------------------------------
VOID Cleanup()
{
if( g_pVB != nullptr)
g_pVB->Release();
if( g_pd3dDevice != nullptr)
g_pd3dDevice->Release();
if( g_pD3D != nullptr)
g_pD3D->Release();
}
//-----------------------------------------------------------------------------
// Name: SetupMatrices()
// Desc: Sets up the world, view, and projection transform Matrices.
//-----------------------------------------------------------------------------
VOID SetupMatrices()
{
// For our world matrix, we will just rotate the object about the y-axis.
D3DXMATRIXA16 matWorld;
// Set up the rotation matrix to generate 1 full rotation (2*PI radians)
// every 1000 ms. To avoid the loss of precision inherent in very high
// floating point numbers, the system time is modulated by the rotation
// period before conversion to a radian angle.
// UINT iTime = timeGetTime() % 1000;
// FLOAT fAngle = iTime * ( 2.0f * D3DX_PI ) / 1000.0f;
// D3DXMatrixRotationY( &matWorld, fAngle );
// g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
// Set up our view matrix. A view matrix can be defined given an eye point,
// a point to lookat, and a direction for which way is up. Here, we set the
// eye five units back along the z-axis and up three units, look at the
// origin, and define "up" to be in the y-direction.
D3DXVECTOR3 vEyePt( 0.0f, 3.0f,-5.0f );
D3DXVECTOR3 vLookatPt( 0.0f, 0.0f, 0.0f );
D3DXVECTOR3 vUpVec( 0.0f, 1.0f, 0.0f );
D3DXMATRIXA16 matView;
D3DXMatrixLookAtLH( &matView, &vEyePt, &vLookatPt, &vUpVec );
g_pd3dDevice->SetTransform( D3DTS_VIEW, &matView );
// For the projection matrix, we set up a perspective transform (which
// transforms geometry from 3D view space to 2D viewport space, with
// a perspective divide making objects smaller in the distance). To build
// a perpsective transform, we need the field of view (1/4 pi is common),
// the aspect ratio, and the near and far clipping planes (which define at
// what distances geometry should be no longer be rendered).
D3DXMATRIXA16 matProj;
D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI / 4, 1.0f, 1.0f, 100.0f );
g_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj );
}
//-----------------------------------------------------------------------------
// Name: Render()
// Desc: Draws the scene
//-----------------------------------------------------------------------------
VOID Render()
{
// Clear the backbuffer to a black color
g_pd3dDevice->Clear( 0, nullptr, D3DCLEAR_TARGET, D3DCOLOR_XRGB( 0, 0, 0 ), 1.0f, 0 );
// Begin the scene
if( SUCCEEDED( g_pd3dDevice->BeginScene() ) )
{
// Setup the world, view, and projection Matrices
SetupMatrices();
// Render the vertex buffer contents
g_pd3dDevice->SetStreamSource( 0, g_pVB, 0, sizeof( CUSTOMVERTEX ) );
g_pd3dDevice->SetFVF( D3DFVF_CUSTOMVERTEX );
g_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 1 );
// End the scene
g_pd3dDevice->EndScene();
}
// Present the backbuffer contents to the display
g_pd3dDevice->Present(nullptr, nullptr, nullptr, nullptr);
}
//-----------------------------------------------------------------------------
// Name: MsgProc()
// Desc: The window's message handler
//-----------------------------------------------------------------------------
LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
switch( msg )
{
case WM_DESTROY:
Cleanup();
PostQuitMessage( 0 );
return 0;
}
return DefWindowProc( hWnd, msg, wParam, lParam );
}
//-----------------------------------------------------------------------------
// Name: WinMain()
// Desc: The application's entry point
//-----------------------------------------------------------------------------
INT WINAPI wWinMain( HINSTANCE hInst, HINSTANCE, LPWSTR, INT )
{
// Register the window class
WNDCLASSEX wc =
{
sizeof( WNDCLASSEX ), CS_CLASSDC, MsgProc, 0L, 0L,
GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr,
_T("D3D Tutorial"), nullptr
};
RegisterClassEx( &wc );
// Connect to the server if it is running, to store screenshots
SLNet::PacketizedTCP packetizedTCP;
SLNet::SQLiteClientLoggerPlugin loggerPlugin;
packetizedTCP.AttachPlugin(&loggerPlugin);
packetizedTCP.Start(0,0);
loggerPlugin.SetServerParameters(packetizedTCP.Connect("127.0.0.1", 38123, true), "d3dvideo.sqlite");
loggerPlugin.SetMemoryConstraint(8000000);
DX9_BackbufferGrabber backbufferGrabber;
// Create the application's window
HWND hWnd = CreateWindow(_T("D3D Tutorial"), _T("D3D Tutorial 03: Matrices"),
WS_OVERLAPPEDWINDOW, 100, 100, 512, 512,
nullptr, nullptr, hInst, nullptr);
DWORD timeSinceLastLog, timeSinceLastTick, lastLogTime=0;
float lastFps = 0.f; // unnecessary assignment - added to workaround false-positive of C4701
timeSinceLastTick=0;
// Initialize Direct3D
if( SUCCEEDED( InitD3D( hWnd ) ) )
{
// Create the scene geometry
if( SUCCEEDED( InitGeometry() ) )
{
// Show the window
ShowWindow( hWnd, SW_SHOWDEFAULT );
UpdateWindow( hWnd );
// Start backbuffer grabber
backbufferGrabber.InitBackbufferGrabber(g_pd3dDevice, 256, 256);
// Enter the message loop
MSG msg;
ZeroMemory( &msg, sizeof( msg ) );
while( msg.message != WM_QUIT )
{
if( PeekMessage( &msg, nullptr, 0U, 0U, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
else
{
Render();
timeSinceLastLog=timeGetTime()-lastLogTime;
if (packetizedTCP.GetConnectionCount()>0 && timeSinceLastLog>30)
{
SLNet::RGBImageBlob blob;
backbufferGrabber.LockBackbufferCopy(&blob);
RakAssert(blob.data!=0);
rakSqlLog("Screenshots", "screenshot", ( &blob ));
static bool saveToDiskOnce=true;
if (saveToDiskOnce)
{
blob.SaveToTGA("MatricesDemoFirstFrame.tga");
saveToDiskOnce=false;
}
backbufferGrabber.ReleaseBackbufferCopy();
}
float fps;
if (timeSinceLastTick!=0)
{
DWORD elapsedTime = timeGetTime()-timeSinceLastTick;
if (elapsedTime==0)
fps=lastFps;
else
fps = 1000.0f / (float) elapsedTime;
}
else
{
fps=0;
}
lastFps = fps;
timeSinceLastTick=timeGetTime();
rakSqlLog("FPS", "FPS", ( fps ));
loggerPlugin.IncrementAutoTickCount();
}
}
}
}
UnregisterClass(_T("D3D Tutorial"), wc.hInstance );
return 0;
}

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="*"
name="Microsoft.DirectX SDK.Matrices"
type="win32"
/>
<description>DirectX SDK Sample Program.</description>
<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="asInvoker">
</ms_asmv2:requestedExecutionLevel>
</ms_asmv2:requestedPrivileges>
</ms_asmv2:security>
</ms_asmv2:trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

View File

@ -0,0 +1,85 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define IDC_STATIC -1
#include <winresrc.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//
1 RT_MANIFEST "Matrices.manifest"
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MAIN_ICON ICON "DXUT\Optional\\directx.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#define IDC_STATIC -1\r\n"
"#include <winresrc.h>\r\n"
"\r\n"
"\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Matrices", "Matrices.vcxproj", "{D3D09003-96D0-4629-88B8-122C0256058C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D3D09003-96D0-4629-88B8-122C0256058C}.Debug|Win32.ActiveCfg = Debug|Win32
{D3D09003-96D0-4629-88B8-122C0256058C}.Debug|Win32.Build.0 = Debug|Win32
{D3D09003-96D0-4629-88B8-122C0256058C}.Debug|x64.ActiveCfg = Debug|x64
{D3D09003-96D0-4629-88B8-122C0256058C}.Debug|x64.Build.0 = Debug|x64
{D3D09003-96D0-4629-88B8-122C0256058C}.Release|Win32.ActiveCfg = Release|Win32
{D3D09003-96D0-4629-88B8-122C0256058C}.Release|Win32.Build.0 = Release|Win32
{D3D09003-96D0-4629-88B8-122C0256058C}.Release|x64.ActiveCfg = Release|x64
{D3D09003-96D0-4629-88B8-122C0256058C}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,668 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug - Unicode|x64">
<Configuration>Debug - Unicode</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|x64">
<Configuration>Release - Unicode</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|x64">
<Configuration>Retail - Unicode</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|x64">
<Configuration>Retail</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>Matrices</ProjectName>
<ProjectGuid>{D3D09003-96D0-4629-88B8-122C0256058C}</ProjectGuid>
<RootNamespace>Matrices</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">false</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">false</EmbedManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'">$(Platform)\$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'">false</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'">false</EmbedManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</EmbedManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|x64'">$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'">$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'">$(Platform)\$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Retail|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'">false</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Retail|x64'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'">false</EmbedManifest>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Retail|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Retail|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Retail|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9d.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Matrices.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9d.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Matrices.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9d.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Matrices.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;$(ProjectDir)..\..\..\..\..\cat\lib\cat;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9d.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Matrices.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;$(ProjectDir)..\..\..\..\..\cat\lib\cat;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;$(ProjectDir)..\..\..\..\..\cat\lib\cat;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;$(ProjectDir)..\..\..\..\..\cat\lib\cat;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;$(ProjectDir)..\..\..\..\..\cat\lib\cat;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>DXUT\Core;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>d3dxof.lib;dxguid.lib;d3dx9.lib;d3d9.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;$(ProjectDir)..\..\..\..\..\cat\lib\cat;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\Optional\DX9_BackbufferGrabber.cpp" />
<ClCompile Include="..\..\..\..\sqlite3.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|x64'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|x64'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|x64'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|x64'">4127;4244;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\..\SQLite3ClientPlugin.cpp" />
<ClCompile Include="..\..\..\..\SQLite3PluginCommon.cpp" />
<ClCompile Include="..\..\SQLiteClientLoggerPlugin.cpp" />
<ClCompile Include="..\..\..\SQLiteLoggerCommon.cpp" />
<ClCompile Include="Matrices.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Optional\DX9_BackbufferGrabber.h" />
<ClInclude Include="..\..\..\..\sqlite3.h" />
<ClInclude Include="..\..\..\..\SQLite3ClientPlugin.h" />
<ClInclude Include="..\..\..\..\SQLite3PluginCommon.h" />
<ClInclude Include="..\..\SQLiteClientLoggerPlugin.h" />
<ClInclude Include="..\..\..\SQLiteLoggerCommon.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<None Include="DXUT\Optional\directx.ico" />
</ItemGroup>
<ItemGroup>
<Manifest Include="Matrices.manifest" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Matrices.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="ClientLogger">
<UniqueIdentifier>{e35cdb89-b181-45d0-bdea-dd51bd7af3dc}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Optional\DX9_BackbufferGrabber.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\sqlite3.c">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\SQLite3ClientPlugin.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\SQLite3PluginCommon.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\SQLiteClientLoggerPlugin.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SQLiteLoggerCommon.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="Matrices.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Optional\DX9_BackbufferGrabber.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\sqlite3.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\SQLite3ClientPlugin.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\SQLite3PluginCommon.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\SQLiteClientLoggerPlugin.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\..\SQLiteLoggerCommon.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<None Include="DXUT\Optional\directx.ico" />
</ItemGroup>
<ItemGroup>
<Manifest Include="Matrices.manifest" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Matrices.rc" />
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,15 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Matrices.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -0,0 +1,319 @@
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2006 Torus Knot Software Ltd
Also see acknowledgements in Readme.html
You may use this sample code for anything you like, it is not covered by the
LGPL like the rest of the engine.
-----------------------------------------------------------------------------
*/
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017-2020, SLikeSoft UG (haftungsbeschränkt)
*
* Modifications in this file are free to be used for anything you like.
* Alternatively you are permitted to license the modifications under the MIT license, if you so desire. The
* license can be found in the license.txt file in the root directory of this source tree.
*/
/*
-----------------------------------------------------------------------------
Filename: BspCollision.cpp
Description: Somewhere to play in the sand...
-----------------------------------------------------------------------------
*/
#include "OgreReferenceAppLayer.h"
#include "ExampleRefAppApplication.h"
#include "OgreStringConverter.h"
// Hacky globals
ApplicationObject *ball;
SceneNode* targetNode;
RaySceneQuery* rsq = 0;
static const int num_rows = 3;
// RakNet: Logger includes.
#include "SQLiteClientLoggerPlugin.h"
#include "slikenet/PacketizedTCP.h"
#include "Ogre3D_DX9_BackbufferGrabber.h"
#include "slikenet/time.h"
#include "slikenet/GetTime.h"
// Event handler to add ability to alter curvature
class BspCollisionListener : public ExampleRefAppFrameListener
{
protected:
// RakNet: For logging video
PacketizedTCP packetizedTCP;
SLNet::SQLiteClientLoggerPlugin loggerPlugin;
Ogre3D_DX9_BackbufferGrabber backbufferGrabber;
SLNet::TimeMS lastScreenshotTime;
// Also save the world * so we can log it out
World* mWorld;
public:
BspCollisionListener(RenderWindow* win, CollideCamera* cam, World* world)
: ExampleRefAppFrameListener(win, cam)
{
// RakNet: Connect to server using TCP, for logging video
packetizedTCP.AttachPlugin(&loggerPlugin);
packetizedTCP.Start(0,0);
loggerPlugin.SetServerParameters(packetizedTCP.Connect("127.0.0.1", 38123, true), "ogrevideo.sqlite");
// For testing, I'm using 512x512 with a huge memory constraint at 30 FPS
// For a real game, you probably want to limit this to 256x256, with a 8MB memory constraint, at 15-20 FPS
loggerPlugin.SetMemoryConstraint(128000000);
backbufferGrabber.InitBackbufferGrabber(mWindow, 512, 512);
lastScreenshotTime=0;
mWorld=world;
}
bool frameEnded(const FrameEvent& evt)
{
// local just to stop toggles flipping too fast
static Real timeUntilNextToggle = 0;
// Deal with time delays that are too large
// If we exceed this limit, we ignore
static const Real MAX_TIME_INCREMENT = 0.5f;
if (evt.timeSinceLastEvent > MAX_TIME_INCREMENT)
{
return true;
}
if (timeUntilNextToggle >= 0)
timeUntilNextToggle -= evt.timeSinceLastFrame;
// Call superclass
bool ret = ExampleRefAppFrameListener::frameEnded(evt);
if (mKeyboard->isKeyDown(OIS::KC_SPACE) && timeUntilNextToggle <= 0)
{
timeUntilNextToggle = 2;
ball->setPosition(mCamera->getPosition() +
mCamera->getDirection() * mCamera->getNearClipDistance() * 2);
ball->setLinearVelocity(mCamera->getDirection() * 200);
ball->setAngularVelocity(Vector3::ZERO);
// RakNet: Log events, which in this case is only firing the ball. Give the event a color so we can plot it
rakSqlLog("EventData", "x,y,z,name,color",
(mCamera->getPosition().x, mCamera->getPosition().y, mCamera->getPosition().z, "Fired Ball", "green"));
}
// Move the targeter
rsq->setRay(mCamera->getRealCamera()->getCameraToViewportRay(0.5, 0.5));
RaySceneQueryResult& rsqResult = rsq->execute();
RaySceneQueryResult::iterator ri = rsqResult.begin();
if (ri != rsqResult.end())
{
RaySceneQueryResultEntry& res = *ri;
targetNode->setPosition(rsq->getRay().getPoint(res.distance));
}
// RakNet: Send screenshot and FPS info to server if connected, at most once every 30 milliseconds
// This is constrained so we don't overflow the server with screenshots
// Also only do it if we connected to the server
SLNet::TimeMS timeSinceLastLog= SLNet::GetTimeMS()-lastScreenshotTime;
if (packetizedTCP.GetConnectionCount()>0 && timeSinceLastLog>30)
{
SLNet::RGBImageBlob blob;
backbufferGrabber.LockBackbufferCopy(&blob);
RakAssert(blob.data!=0);
// RakNet: Log frame data, including screenshot and FPS
SLNet::SQLLogResult logResult = rakSqlLog("FrameData", "screenshot,averageFPS,lastFPS,bestFPS,worstFPS,numTris,DebugText",
( &blob,mWindow->getAverageFPS(),mWindow->getLastFPS(),mWindow->getBestFPS(),mWindow->getWorstFPS(),(int) mWindow->getTriangleCount(),mDebugText.c_str() ));
// Release backbuffer as soon as possible, after sending frame data
backbufferGrabber.ReleaseBackbufferCopy();
if ( logResult== SLNet::SQLLR_WOULD_EXCEED_MEMORY_CONSTRAINT )
{
/// Sending too large of screenshots, or can't transfer data fast enough. See loggerPlugin.SetMemoryConstraint
}
// Also log out position of all world objects
Entity *entity;
SceneNode *sceneNode;
entity = mWorld->getSceneManager()->getEntity("ball");
sceneNode = entity->getParentSceneNode();
// RakNet: Log object position data over time
rakSqlLog("ObjectData", "x,y,z,name,color",
(sceneNode->getPosition().x, sceneNode->getPosition().y, sceneNode->getPosition().z, entity->getName().c_str(), "blue"));
for (int row = 0; row < num_rows; ++row)
{
for (int i = 0; i < (num_rows-row); ++i)
{
String name = "box";
name += StringConverter::toString((row*num_rows) + i);
entity = mWorld->getSceneManager()->getEntity(name);
sceneNode = entity->getParentSceneNode();
rakSqlLog("ObjectData", "x,y,z,name,color",
(sceneNode->getPosition().x, sceneNode->getPosition().y, sceneNode->getPosition().z, entity->getName().c_str(), "red"));
}
}
lastScreenshotTime= SLNet::GetTimeMS();
}
return ret;
}
};
class BspCollisionApplication : public ExampleRefAppApplication
{
public:
BspCollisionApplication() {
}
~BspCollisionApplication()
{
delete rsq;
}
protected:
void chooseSceneManager(void)
{
mSceneMgr = mRoot->createSceneManager("BspSceneManager");
}
void createWorld(void)
{
// Create BSP-specific world
mWorld = new World(mSceneMgr, World::WT_REFAPP_BSP);
}
void createScene(void)
{
mSceneMgr->setShadowTechnique(SHADOWTYPE_STENCIL_MODULATIVE);
// Set ambient light
mSceneMgr->setAmbientLight(ColourValue(0.2, 0.2, 0.2));
// Create a point light
Light* l = mSceneMgr->createLight("MainLight");
l->setPosition(-100,50,100);
l->setAttenuation(8000,1,0,0);
// Setup World
mWorld->setGravity(Vector3(0, 0, -60));
mWorld->getSceneManager()->setWorldGeometry("ogretestmap.bsp");
// modify camera for close work
mCamera->setNearClipDistance(10);
mCamera->setFarClipDistance(20000);
// Also change position, and set Quake-type orientation
// Get random player start point
ViewPoint vp = mSceneMgr->getSuggestedViewpoint(true);
mCamera->setPosition(vp.position);
mCamera->pitch(Degree(90)); // Quake uses X/Y horizon, Z up
mCamera->rotate(vp.orientation);
// Don't yaw along variable axis, causes leaning
mCamera->setFixedYawAxis(true, Vector3::UNIT_Z);
// Look at the boxes
mCamera->lookAt(-150,40,30);
ball = mWorld->createBall("ball", 7, vp.position + Vector3(0,0,80));
ball->setDynamicsEnabled(true);
ball->getEntity()->setMaterialName("Ogre/Eyes");
OgreRefApp::Box* box = mWorld->createBox("shelf", 75, 125, 5, Vector3(-150, 40, 30));
box->getEntity()->setMaterialName("Examples/Rocky");
static const Real BOX_SIZE = 15.0f;
for (int row = 0; row < num_rows; ++row)
{
for (int i = 0; i < (num_rows-row); ++i)
{
Real row_size = (num_rows - row) * BOX_SIZE * 1.25;
String name = "box";
name += StringConverter::toString((row*num_rows) + i);
box = mWorld->createBox(name, BOX_SIZE,BOX_SIZE,BOX_SIZE ,
Vector3(-150,
40 - (row_size * 0.5) + (i * BOX_SIZE * 1.25) ,
32.5 + (BOX_SIZE / 2) + (row * BOX_SIZE)));
box->setDynamicsEnabled(false, true);
box->getEntity()->setMaterialName("Examples/10PointBlock");
}
}
mCamera->setCollisionEnabled(false);
mCamera->getRealCamera()->setQueryFlags(0);
// Create the targeting sphere
Entity* targetEnt = mSceneMgr->createEntity("testray", "sphere.mesh");
MaterialPtr mat = MaterialManager::getSingleton().create("targeter",
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
Pass* pass = mat->getTechnique(0)->getPass(0);
TextureUnitState* tex = pass->createTextureUnitState();
tex->setColourOperationEx(LBX_SOURCE1, LBS_MANUAL, LBS_CURRENT,
ColourValue::Red);
pass->setLightingEnabled(false);
pass->setSceneBlending(SBT_ADD);
pass->setDepthWriteEnabled(false);
targetEnt->setMaterialName("targeter");
targetEnt->setCastShadows(false);
targetEnt->setQueryFlags(0);
targetNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
targetNode->scale(0.025, 0.025, 0.025);
targetNode->attachObject(targetEnt);
rsq = mSceneMgr->createRayQuery(Ray());
rsq->setSortByDistance(true, 1);
rsq->setWorldFragmentType(SceneQuery::WFT_SINGLE_INTERSECTION);
}
// Create new frame listener
void createFrameListener(void)
{
mFrameListener= new BspCollisionListener(mWindow, mCamera, mWorld);
mRoot->addFrameListener(mFrameListener);
}
public:
};
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
// Create application object
BspCollisionApplication app;
try {
app.go();
} catch( Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox(nullptr, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
std::cerr << "An exception has occured: " << e.getFullDescription();
#endif
}
return 0;
}

View File

@ -0,0 +1,352 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>Demo_BspCollision</ProjectName>
<ProjectGuid>{1982C73F-3D1C-46A6-9DFB-C7B03310365B}</ProjectGuid>
<RootNamespace>Demo_BspCollision</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\include;$(OGRE_HOME)\samples\refapp\include;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>OgreMain_d.lib;OIS_d.lib;ReferenceAppLayer_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OGRE_HOME)\lib\;..\..\..\Dependencies\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Demo_BspCollision.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy $(OGRE_HOME)\bin\$(Configuration)\*.dll .\
copy $(OGRE_HOME)\bin\$(Configuration)\Plugins.cfg .\
copy $(OGRE_HOME)\bin\$(Configuration)\Media.cfg .\
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\include;$(OGRE_HOME)\samples\refapp\include;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>OgreMain_d.lib;OIS_d.lib;ReferenceAppLayer_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OGRE_HOME)\lib\;..\..\..\Dependencies\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Demo_BspCollision.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy $(OGRE_HOME)\bin\$(Configuration)\*.dll .\
copy $(OGRE_HOME)\bin\$(Configuration)\Plugins.cfg .\
copy $(OGRE_HOME)\bin\$(Configuration)\Media.cfg .\
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\include;$(OGRE_HOME)\samples\refapp\include;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>OgreMain.lib;OIS.lib;ReferenceAppLayer.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OGRE_HOME)\lib\;..\..\..\Dependencies\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy $(OGRE_HOME)\bin\$(Configuration)\*.dll .\
copy $(OGRE_HOME)\bin\$(Configuration)\Plugins.cfg .\
copy $(OGRE_HOME)\bin\$(Configuration)\Media.cfg .\
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\include;$(OGRE_HOME)\samples\refapp\include;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<Link>
<AdditionalDependencies>OgreMain.lib;OIS.lib;ReferenceAppLayer.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OGRE_HOME)\lib\;..\..\..\Dependencies\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy $(OGRE_HOME)\bin\$(Configuration)\*.dll .\
copy $(OGRE_HOME)\bin\$(Configuration)\Plugins.cfg .\
copy $(OGRE_HOME)\bin\$(Configuration)\Media.cfg .\
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\include;$(OGRE_HOME)\samples\refapp\include;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>OgreMain.lib;OIS.lib;ReferenceAppLayer.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OGRE_HOME)\lib\;..\..\..\Dependencies\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy $(OGRE_HOME)\bin\$(Configuration)\*.dll .\
copy $(OGRE_HOME)\bin\$(Configuration)\Plugins.cfg .\
copy $(OGRE_HOME)\bin\$(Configuration)\Media.cfg .\
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly\Optional;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\include;$(OGRE_HOME)\samples\refapp\include;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<Link>
<AdditionalDependencies>OgreMain.lib;OIS.lib;ReferenceAppLayer.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OGRE_HOME)\lib\;..\..\..\Dependencies\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>copy $(OGRE_HOME)\bin\$(Configuration)\*.dll .\
copy $(OGRE_HOME)\bin\$(Configuration)\Plugins.cfg .\
copy $(OGRE_HOME)\bin\$(Configuration)\Media.cfg .\
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\Optional\DX9_BackbufferGrabber.cpp" />
<ClCompile Include="..\..\Optional\Ogre3D_DX9_BackbufferGrabber.cpp" />
<ClCompile Include="..\..\..\..\SQLite3ClientPlugin.cpp" />
<ClCompile Include="..\..\..\..\SQLite3PluginCommon.cpp" />
<ClCompile Include="..\..\SQLiteClientLoggerPlugin.cpp" />
<ClCompile Include="..\..\..\SQLiteLoggerCommon.cpp" />
<ClCompile Include="BspCollision.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Optional\DX9_BackbufferGrabber.h" />
<ClInclude Include="..\..\Optional\Ogre3D_DX9_BackbufferGrabber.h" />
<ClInclude Include="..\..\..\..\SQLite3ClientPlugin.h" />
<ClInclude Include="..\..\..\..\SQLite3PluginCommon.h" />
<ClInclude Include="..\..\SQLiteClientLoggerPlugin.h" />
<ClInclude Include="..\..\..\SQLiteLoggerCommon.h" />
<ClInclude Include="$(OGRE_HOME)\include\ExampleRefAppApplication.h" />
<ClInclude Include="$(OGRE_HOME)\include\ExampleRefAppFrameListener.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="ClientLogger">
<UniqueIdentifier>{da331648-1206-4413-98a8-fd872e60570d}</UniqueIdentifier>
</Filter>
<Filter Include="Ogre">
<UniqueIdentifier>{f797064b-17a6-4843-8c81-e899a2d0723c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Optional\DX9_BackbufferGrabber.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\Optional\Ogre3D_DX9_BackbufferGrabber.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\SQLite3ClientPlugin.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\SQLite3PluginCommon.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\SQLiteClientLoggerPlugin.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SQLiteLoggerCommon.cpp">
<Filter>ClientLogger</Filter>
</ClCompile>
<ClCompile Include="BspCollision.cpp">
<Filter>Ogre</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Optional\DX9_BackbufferGrabber.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\Optional\Ogre3D_DX9_BackbufferGrabber.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\SQLite3ClientPlugin.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\SQLite3PluginCommon.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\SQLiteClientLoggerPlugin.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="..\..\..\SQLiteLoggerCommon.h">
<Filter>ClientLogger</Filter>
</ClInclude>
<ClInclude Include="$(OGRE_HOME)\include\ExampleRefAppApplication.h">
<Filter>Ogre</Filter>
</ClInclude>
<ClInclude Include="$(OGRE_HOME)\include\ExampleRefAppFrameListener.h">
<Filter>Ogre</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,267 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{62DCF9E0-63A5-40AD-9A57-324303C3224C}</ProjectGuid>
<RootNamespace>SQLiteClientLogger</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\SQLite3ClientPlugin.cpp" />
<ClCompile Include="..\..\..\..\SQLite3PluginCommon.cpp" />
<ClCompile Include="..\..\Optional\SQLiteClientLogger_PacketLogger.cpp" />
<ClCompile Include="..\..\Optional\SQLiteClientLogger_RNSLogger.cpp" />
<ClCompile Include="..\..\SQLiteClientLoggerPlugin.cpp" />
<ClCompile Include="SQLiteClientLoggerSample.cpp" />
<ClCompile Include="..\..\..\SQLiteLoggerCommon.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\SQLite3ClientPlugin.h" />
<ClInclude Include="..\..\..\..\SQLite3PluginCommon.h" />
<ClInclude Include="..\..\Optional\SQLiteClientLogger_PacketLogger.h" />
<ClInclude Include="..\..\Optional\SQLiteClientLogger_RNSLogger.h" />
<ClInclude Include="..\..\SQLiteClientLoggerPlugin.h" />
<ClInclude Include="..\..\..\SQLiteLoggerCommon.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,149 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "slikenet/peerinterface.h"
#include "SQLiteClientLoggerPlugin.h"
#include "slikenet/BitStream.h"
#include "slikenet/sleep.h"
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
#include "slikenet/PacketizedTCP.h"
#include "slikenet/types.h"
#include "slikenet/rand.h"
#define M_PI 3.14159265358979323846
int main(void)
{
printf("Demonstration of SQLiteClientLoggerPlugin.\n");
SLNet::PacketizedTCP packetizedTCP;
SLNet::SQLiteClientLoggerPlugin loggerPlugin;
packetizedTCP.AttachPlugin(&loggerPlugin);
packetizedTCP.Start(0,0);
printf("Connecting.\n");
SLNet::SystemAddress serverAddress = packetizedTCP.Connect("127.0.0.1", 38123, true);
printf("Connected.\n");
/*
int *heap1=1234, *heap2=2000;
loggerPlugin.SetServerParameters(serverAddress, "memoryReport.sqlite");
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("Heaps/Heap1", "new", 1234, "Heap.cpp", heap1, 15000));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("Heaps/Heap2", "new", 1234, "Heap.cpp", heap2, 10000));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("General/Graphics/3D", "new", 1234, "3DRenderer.cpp", heap1, 500));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("General/Graphics/3D", "new", 1235, "3DRenderer.cpp", heap1+500, 500));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("General/Graphics/2D", "new", 1234, "3DRenderer.cpp", heap1+500*2, 500));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("General/Graphics/2D", "new", 666, "2DRenderer.cpp", heap2, 1000));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("General/Graphics/3D", "new", 668, "2DRenderer.cpp", heap2+1000, 1000));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("Uncategorized", "realloc", 50, "Main.cpp", heap1, -200));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("Uncategorized", "free", 50, "Main.cpp", heap2, -1000));
rakSqlLog("memoryReport", "Category,Operation,Line,File,Address,Amount", ("General/Graphics/3D", "free", 800, "3DRenderer.cpp", heap2+1000, -1000));
*/
loggerPlugin.SetServerParameters(serverAddress, "functionLog.sqlite");
SLNet::SQLLogResult res;
int x=1;
unsigned short y=2;
float c=3;
double d=4;
char *e="HI";
res = rakFnLog("My func", (x,y,c,d,e,&loggerPlugin));
RakAssert(res== SLNet::SQLLR_OK);
res = rakSqlLog("sqlLog", "handle, mapName, positionX, positionY, positionZ, gameMode, connectedPlayers", ("handle1", "mapname1", 1,2,3,"",4));
RakAssert(res== SLNet::SQLLR_OK);
res = rakSqlLog("sqlLog", "handle, mapName, positionX, positionY, positionZ, gameMode, connectedPlayers", ("handle2", "mapname2", 5,6,7,"gameMode2",8));
RakAssert(res== SLNet::SQLLR_OK);
res = rakSqlLog("sqlLog", "x", (999));
RakAssert(res== SLNet::SQLLR_OK);
res = rakFnLog("My func2", ("cat", "carrot", ""));
RakAssert(res== SLNet::SQLLR_OK);
loggerPlugin.IncrementAutoTickCount();
loggerPlugin.SetServerParameters(serverAddress, "scatterPlot.sqlite");
for (int i=0; i < 1000; i++)
{
res = rakSqlLog("ScatterPlot", "x, y, z, Color, Intensity", (i, (cosf((float)i/30.0f)+1.0f)*500.0f, (sinf((float)i/30.0f)+1.0f)*500.0f, (i%2)==0 ? "red" : "blue", frandomMT()));
RakAssert(res== SLNet::SQLLR_OK);
RakSleep(1);
// Calling Receive() is something you should do anyway, and increments autotick count
loggerPlugin.IncrementAutoTickCount();
}
loggerPlugin.IncrementAutoTickCount();
loggerPlugin.SetServerParameters(serverAddress, "gradient.sqlite");
double s;
unsigned int *bytes = new unsigned int[256*256*256];
for (int i=0; i < 4096; i++)
{
for (int j=0; j < 4096; j++)
{
int r,g,b;
float intensity = 1.0f - (float)i/4096.0f;
s = 2.0 * sin(((double)j/4096.0)*(2.0*M_PI));
if (s>0.0)
{
if (s>1.0)
s=1.0;
r=static_cast<int>(255.0*s);
// r=static_cast<int>(pow(r/255.0,.5));
}
else
r=0;
s = 2.0 * sin(((double)j/4096.0)*(2.0*M_PI)+2.0*M_PI/3.0);
if (s>0.0)
{
if (s>1.0)
s=1.0;
g=static_cast<int>(255.0*s);
// g=static_cast<int>(pow(g/255.0,.5));
}
else
g=0;
s = 2.0 * sin(((double)j/4096.0)*(2.0*M_PI)+4.0*M_PI/3.0);
if (s>0.0)
{
if (s>1.0)
s=1.0;
b=static_cast<int>(255.0*s);
// b=static_cast<int>(pow(b/255.0,.5));
}
else
b=0;
if (intensity>.5)
{
r=static_cast<int>(255.0-((255.0-(double)r)*(255-(2*(intensity-.5))*255.0)) /256.0);
g=static_cast<int>(255.0-((255.0-(double)g)*(255-(2*(intensity-.5))*255.0)) /256.0);
b=static_cast<int>(255.0-((255.0-(double)b)*(255-(2*(intensity-.5))*255.0)) /256.0);
}
else
{
r=static_cast<int>((intensity*(double)r*2.0));
g=static_cast<int>((intensity*(double)g*2.0));
b=static_cast<int>((intensity*(double)b*2.0));
}
bytes[i*4096+j]=(r)|(g<<8)|(b<<16);
}
}
SLNet::RGBImageBlob imageblob(bytes, 4096, 4096, 4096 * 4, 4);
// #med - SLNet::SQLiteClientLoggerPlugin::ParameterListHelper requires proper const pointer handling
rakSqlLog("gradient", "gradientImage", (&imageblob));
delete [] bytes;
RakSleep(5000);
return 1;
}

View File

@ -0,0 +1,183 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "SQLiteLoggerCommon.h"
#include "slikenet/BitStream.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
using namespace SLNet;
static const char *sqlDataTypeNames[SQLLPDT_COUNT] =
{
"INTEGER",
"INTEGER",
"NUMERIC",
"TEXT",
"BLOB",
"BLOB",
};
extern "C" const char *GetSqlDataTypeName(SQLLoggerPrimaryDataType idx) {return sqlDataTypeNames[(int)idx];}
void LogParameter::Serialize(SLNet::BitStream *bs) const
{
// #med consider changing SQLLoggerPrimaryDataType to unsigned char type or add bounds checks here?
unsigned char c = static_cast<unsigned char>(type);
bs->Write(c);
bs->Write(size);
switch (type)
{
case SQLLPDT_POINTER:
case SQLLPDT_BLOB:
case SQLLPDT_TEXT:
bs->WriteAlignedBytes(data.ucptr, size);
break;
case SQLLPDT_IMAGE:
bs->WriteAlignedBytes(data.ucptr, size);
bs->Write(imageWidth);
bs->Write(imageHeight);
bs->Write(linePitch);
bs->Write(input_components);
bs->Write(compressionMode);
break;
case SQLLPDT_REAL:
case SQLLPDT_INTEGER:
{
bs->WriteAlignedBytes((const unsigned char*) &data, size);
bs->EndianSwapBytes(bs->GetNumberOfBytesUsed()-size,size);
}
break;
}
}
bool LogParameter::Deserialize(SLNet::BitStream *bs)
{
bool b;
unsigned char c;
bs->Read(c);
type=(SQLLoggerPrimaryDataType)c;
b=bs->Read(size);
if (size==0)
{
data.vptr=0;
return b;
}
switch (type)
{
case SQLLPDT_POINTER:
case SQLLPDT_BLOB:
case SQLLPDT_TEXT:
data.vptr=rakMalloc_Ex(size,_FILE_AND_LINE_);
b=bs->ReadAlignedBytes(data.ucptr, size);
break;
case SQLLPDT_IMAGE:
data.vptr=rakMalloc_Ex(size,_FILE_AND_LINE_);
bs->ReadAlignedBytes(data.ucptr, size);
bs->Read(imageWidth);
bs->Read(imageHeight);
bs->Read(linePitch);
bs->Read(input_components);
b=bs->Read(compressionMode);
break;
case SQLLPDT_REAL:
case SQLLPDT_INTEGER:
{
b=bs->ReadAlignedBytes((unsigned char*) &data, size);
if (bs->DoEndianSwap())
bs->ReverseBytesInPlace((unsigned char *)&data, size);
}
break;
}
return b;
}
void LogParameter::DoNotFree(void)
{
type=SQLLPDT_COUNT;
}
void LogParameter::Free(void)
{
if (type==SQLLPDT_BLOB || type==SQLLPDT_TEXT || type==SQLLPDT_IMAGE || type==SQLLPDT_POINTER)
Free(data.vptr);
}
void LogParameter::Free(void *v)
{
rakFree_Ex(v,_FILE_AND_LINE_);
}
#pragma pack(push)
#pragma pack(1)
// 18 bytes
struct TGAHEADER {
char idlength;
char colourmaptype;
char datatypecode;
short int colourmaporigin;
short int colourmaplength;
char colourmapdepth;
short int x_origin;
short int y_origin;
short width;
short height;
char bitsperpixel;
char imagedescriptor;
};
#pragma pack(pop)
void RGBImageBlob::SaveToTGA(const char *filename)
{
// DirectX Color format in memory is BGRA, and written as such to disk.
// Written to disk is the correct side up (point of triangle facing up, as it should). However, TGA displays this incorrectly (upside down)
// TGA color format, on disk, is BGRA.
// DXT compressor input format is ARGB.
// http://local.wasp.uwa.edu.au/~pbourke/dataformats/tga/
FILE *fptr;
fopen_s(&fptr, filename, "wb");
TGAHEADER h;
memset(&h,0,sizeof(h));
h.datatypecode=2;
h.width=imageWidth;
if (BitStream::IsBigEndian()==true)
BitStream::ReverseBytesInPlace((unsigned char*) &h.width,sizeof(h.width));
h.height=imageHeight;
if (BitStream::IsBigEndian()==true)
BitStream::ReverseBytesInPlace((unsigned char*) &h.height,sizeof(h.height));
h.bitsperpixel=input_components*8;
// TGAs have a flag indicating if they are upside down or right side up
// Be sure to set right side up.
// http://www.gamedev.net/community/forums/topic.asp?topic_id=42001
h.imagedescriptor=(1<<5);
fwrite(&h,1,sizeof(h),fptr);
/*
putc(0,fptr);
putc(0,fptr);
putc(2,fptr);
putc(0,fptr); putc(0,fptr);
putc(0,fptr); putc(0,fptr);
putc(0,fptr);
putc(0,fptr); putc(0,fptr);
putc(0,fptr); putc(0,fptr);
putc((imageWidth & 0x00FF),fptr);
putc((imageWidth & 0xFF00) / 256,fptr);
putc((imageHeight & 0x00FF),fptr);
putc((imageHeight & 0xFF00) / 256,fptr);
putc(input_components*8,fptr);
putc(0,fptr);
*/
for (int row=0; row < imageHeight; row++)
{
fwrite((char*) data+row*linePitch, input_components, imageWidth, fptr);
}
fclose(fptr);
}

View File

@ -0,0 +1,170 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#ifndef _SQLITE_LOGGER_COMMON_H
#define _SQLITE_LOGGER_COMMON_H
#include <string.h>
#include "slikenet/defines.h"
#include "slikenet/NativeTypes.h"
namespace SLNet
{
class BitStream;
enum SQLLoggerPrimaryDataType
{
SQLLPDT_POINTER,
SQLLPDT_INTEGER,
SQLLPDT_REAL,
SQLLPDT_TEXT,
SQLLPDT_BLOB,
SQLLPDT_IMAGE,
SQLLPDT_COUNT,
};
extern "C" {
const char *GetSqlDataTypeName(SQLLoggerPrimaryDataType idx);
};
struct BlobDescriptor
{
BlobDescriptor() {}
BlobDescriptor(void *_data, int _size) : data(_data), size(_size) {}
void *data;
int size;
};
struct RGBImageBlob
{
enum ImageBlobCompressionMode
{
// Fast to compress and read back (1-5 milliseconds to compress depending on image size, server must have NVidia based 3d card)
DXT,
// Good storage, slow to compress (about 20 milliseconds for 320x200 on my system).
JPG
};
RGBImageBlob() {data=0; imageWidth=0; imageHeight=0; linePitch=0; input_components=0; compressionMode=DXT; sourceFormatIsBGRA=true;}
RGBImageBlob(void *_data, uint16_t _imageWidth, uint16_t _imageHeight, uint16_t _linePitch, unsigned char _input_components, bool _sourceFormatIsBGRA=true, ImageBlobCompressionMode mode=DXT) : data(_data), imageWidth(_imageWidth), imageHeight(_imageHeight), linePitch(_linePitch), input_components(_input_components),sourceFormatIsBGRA(_sourceFormatIsBGRA),compressionMode((unsigned char) mode) {}
// This is just for testing
void SaveToTGA(const char *filename);
void *data;
uint16_t imageWidth;
uint16_t imageHeight;
uint16_t linePitch; // bytes per row, may be larger than image width, in which case the excess is discarded
unsigned char input_components; // 3 for RGB, 4 for RGBA
unsigned char compressionMode;
bool sourceFormatIsBGRA; // If true, then G and B will be swapped on the server so that the input is RGBA. This is necessary with Direct3D9
};
#define MAX_SQLLITE_LOGGER_PARAMETERS 12
struct LogParameter
{
LogParameter() {}
/*
template <class T> LogParameter(const T t) : type(SQLLPDT_UNKNOWN), size(sizeof(t)), data(&t) {}
template <> LogParameter(const void *t) : type(SQLLPDT_POINTER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const unsigned char t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const char t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const unsigned int t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const int t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const unsigned short t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const short t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const unsigned long long t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const long long t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(&t) {}
template <> LogParameter(const float t) : type(SQLLPDT_REAL), size(sizeof(t)), data(&t) {}
template <> LogParameter(const double t) : type(SQLLPDT_REAL), size(sizeof(t)), data(&t) {}
template <> LogParameter(const unsigned char *&t) : type(SQLLPDT_TEXT), size((uint32_t) strlen((const char*) t)), data(t) {}
template <> LogParameter(const char *t) : type(SQLLPDT_TEXT), size((uint32_t) strlen(t)), data(t) {}
template <> LogParameter(const BlobDescriptor *t) : type(SQLLPDT_BLOB), size(t->size), data(t->data) {}
template <> LogParameter(const RGBImageBlob *t) : type(SQLLPDT_IMAGE), size(t->size), data(t->data), imageDescriptorFormat(t->imageDescriptorFormat), bytesPerPixel(t->bytesPerPixel), imageWidth(t->imageWidth) {}
template <> LogParameter(const BlobDescriptor t) : type(SQLLPDT_BLOB), size(t.size), data(t.data) {}
template <> LogParameter(const RGBImageBlob t) : type(SQLLPDT_IMAGE), size(t.size), data(t.data), imageDescriptorFormat(t.imageDescriptorFormat), bytesPerPixel(t.bytesPerPixel), imageWidth(t.imageWidth) {}
*/
LogParameter(void *t) : type(SQLLPDT_POINTER), size(sizeof(t)), data(t) {}
LogParameter(unsigned char t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(char t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(unsigned int t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(int t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(unsigned short t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(short t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(unsigned long long t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(long long t) : type(SQLLPDT_INTEGER), size(sizeof(t)), data(t) {}
LogParameter(float t) : type(SQLLPDT_REAL), size(sizeof(t)), data(t) {}
LogParameter(double t) : type(SQLLPDT_REAL), size(sizeof(t)), data(t) {}
LogParameter(unsigned char *t) : type(SQLLPDT_TEXT), size((uint32_t) strlen((const char*) t)), data(t) {}
LogParameter(char *t) : type(SQLLPDT_TEXT), size((uint32_t) strlen(t)), data(t) {}
LogParameter(const char t[]) : type(SQLLPDT_TEXT), size((uint32_t) strlen(t)), data(t) {}
LogParameter(const unsigned char t[]) : type(SQLLPDT_TEXT), size((uint32_t) strlen((const char*) t)), data(t) {}
LogParameter(BlobDescriptor *t) : type(SQLLPDT_BLOB), size(t->size), data(t->data) {}
LogParameter(RGBImageBlob *t) : type(SQLLPDT_IMAGE), size(t->linePitch*t->imageHeight), data(t->data), imageWidth(t->imageWidth), imageHeight(t->imageHeight), linePitch(t->linePitch), input_components(t->input_components), compressionMode(t->compressionMode), sourceFormatIsBGRA(t->sourceFormatIsBGRA) {}
LogParameter(BlobDescriptor t) : type(SQLLPDT_BLOB), size(t.size), data(t.data) {}
LogParameter(RGBImageBlob t) : type(SQLLPDT_IMAGE), size(t.linePitch*t.imageHeight), data(t.data), imageWidth(t.imageWidth), imageHeight(t.imageHeight), linePitch(t.linePitch), input_components(t.input_components), compressionMode(t.compressionMode), sourceFormatIsBGRA(t.sourceFormatIsBGRA) {}
SQLLoggerPrimaryDataType type;
uint32_t size;
union DataUnion
{
DataUnion() {}
DataUnion(void *t) : vptr(t) {}
DataUnion(unsigned char t) : c(t) {}
DataUnion(char t) : c(t) {}
DataUnion(unsigned int t) : i(t) {}
DataUnion(int t) : i(t) {}
DataUnion(unsigned short t) : s(t) {}
DataUnion(short t) : s(t) {}
DataUnion(unsigned long long t) : ll(t) {}
DataUnion(long long t) : ll(t) {}
DataUnion(float t) : f(t) {}
DataUnion(double t) : d(t) {}
DataUnion(unsigned char *t) : ucptr(t) {}
DataUnion(char *t) : cptr(t) {}
DataUnion(const char t[]) : cptr((char*) t) {}
DataUnion(const unsigned char t[]) : cptr((char*) t) {}
DataUnion(BlobDescriptor *t) : vptr(t->data) {}
DataUnion(RGBImageBlob *t) : vptr(t->data) {}
DataUnion(const BlobDescriptor &t) : vptr(t.data) {}
DataUnion(const RGBImageBlob &t) : vptr(t.data) {}
void *vptr;
char c;
int i;
short s;
long long ll;
float f;
double d;
char *cptr;
unsigned char *ucptr;
};
DataUnion data;
// Only used for SQLLPDT_IMAGE
uint16_t imageWidth;
uint16_t imageHeight;
uint16_t linePitch; // Pitch is bytes per row
unsigned char input_components; // Bytes per pixel
unsigned char compressionMode;
bool sourceFormatIsBGRA;
void Serialize(SLNet::BitStream *bs) const;
// Don't forget to deallocate after calling Deserialize
bool Deserialize(SLNet::BitStream *bs);
void DoNotFree(void);
void Free(void);
static void Free(void *v);
};
}
#endif

View File

@ -0,0 +1,594 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E0B645F2-CDE7-4C1B-A0E2-A0457DCCD0E3}</ProjectGuid>
<RootNamespace>SQLiteServerLogger</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\DXTCompressor\Src;$(SolutionDir)DependentExtensions\DXTCompressor\External\include;$(SolutionDir)DependentExtensions\jpeg-7;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ServerOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\DependentExtensions\DXTCompressor\External\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>copy $(SolutionDir)DependentExtensions\DXTCompressor\*.dll .\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\DXTCompressor\Src;$(SolutionDir)DependentExtensions\DXTCompressor\External\include;$(SolutionDir)DependentExtensions\jpeg-7;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ServerOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\DependentExtensions\DXTCompressor\External\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>copy $(SolutionDir)DependentExtensions\DXTCompressor\*.dll .\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\DXTCompressor\Src;$(SolutionDir)DependentExtensions\DXTCompressor\External\include;$(SolutionDir)DependentExtensions\jpeg-7;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ServerOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\DependentExtensions\DXTCompressor\External\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>copy $(SolutionDir)DependentExtensions\DXTCompressor\*.dll .\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\DXTCompressor\Src;$(SolutionDir)DependentExtensions\DXTCompressor\External\include;$(SolutionDir)DependentExtensions\jpeg-7;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ServerOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\DependentExtensions\DXTCompressor\External\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>copy $(SolutionDir)DependentExtensions\DXTCompressor\*.dll .\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\DXTCompressor\Src;$(SolutionDir)DependentExtensions\DXTCompressor\External\include;$(SolutionDir)DependentExtensions\jpeg-7;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ServerOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\DependentExtensions\DXTCompressor\External\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>copy $(SolutionDir)DependentExtensions\DXTCompressor\*.dll .\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)Source/include;$(SolutionDir)DependentExtensions\DXTCompressor\Src;$(SolutionDir)DependentExtensions\DXTCompressor\External\include;$(SolutionDir)DependentExtensions\jpeg-7;$(SolutionDir)DependentExtensions\SQLite3Plugin;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger;$(SolutionDir)DependentExtensions\SQLite3Plugin\Logger\ServerOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>$(SolutionDir)Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\DependentExtensions\DXTCompressor\External\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>copy $(SolutionDir)DependentExtensions\DXTCompressor\*.dll .\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\jpeg-7\cderror.h" />
<ClInclude Include="..\..\..\jpeg-7\cdjpeg.h" />
<ClInclude Include="..\..\..\jpeg-7\jconfig.h" />
<ClInclude Include="..\..\..\jpeg-7\jdct.h" />
<ClInclude Include="..\..\..\jpeg-7\jerror.h" />
<ClInclude Include="..\..\..\jpeg-7\jinclude.h" />
<ClInclude Include="..\..\..\jpeg-7\jmemsys.h" />
<ClInclude Include="..\..\..\jpeg-7\jmorecfg.h" />
<ClInclude Include="..\..\..\jpeg-7\jpegint.h" />
<ClInclude Include="..\..\..\jpeg-7\jpeglib.h" />
<ClInclude Include="..\..\..\jpeg-7\jversion.h" />
<ClInclude Include="..\..\..\jpeg-7\transupp.h" />
<ClInclude Include="..\..\..\DXTCompressor\Src\DDSHeader.h" />
<ClInclude Include="..\..\..\DXTCompressor\Src\DXTCompressor.h" />
<ClInclude Include="..\..\..\DXTCompressor\Src\FrameBufferRenderBuffer.hpp" />
<ClInclude Include="..\..\..\DXTCompressor\Src\OpenGLWindow.hpp" />
<ClInclude Include="..\..\..\DXTCompressor\Src\ShaderSource.h" />
<ClInclude Include="..\..\sqlite3.h" />
<ClInclude Include="..\..\sqlite3ext.h" />
<ClInclude Include="jpeg_memory_dest.h" />
<ClInclude Include="..\..\SQLite3PluginCommon.h" />
<ClInclude Include="..\..\SQLite3ServerPlugin.h" />
<ClInclude Include="..\SQLiteLoggerCommon.h" />
<ClInclude Include="SQLiteServerLoggerPlugin.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\jpeg-7\cdjpeg.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jaricom.c" />
<ClCompile Include="..\..\..\jpeg-7\jcapimin.c" />
<ClCompile Include="..\..\..\jpeg-7\jcapistd.c" />
<ClCompile Include="..\..\..\jpeg-7\jcarith.c" />
<ClCompile Include="..\..\..\jpeg-7\jccoefct.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jccolor.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcdctmgr.c" />
<ClCompile Include="..\..\..\jpeg-7\jchuff.c" />
<ClCompile Include="..\..\..\jpeg-7\jcinit.c" />
<ClCompile Include="..\..\..\jpeg-7\jcmainct.c" />
<ClCompile Include="..\..\..\jpeg-7\jcmarker.c" />
<ClCompile Include="..\..\..\jpeg-7\jcmaster.c" />
<ClCompile Include="..\..\..\jpeg-7\jcomapi.c" />
<ClCompile Include="..\..\..\jpeg-7\jcparam.c" />
<ClCompile Include="..\..\..\jpeg-7\jcprepct.c" />
<ClCompile Include="..\..\..\jpeg-7\jcsample.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jctrans.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdapimin.c" />
<ClCompile Include="..\..\..\jpeg-7\jdapistd.c" />
<ClCompile Include="..\..\..\jpeg-7\jdarith.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdatadst.c" />
<ClCompile Include="..\..\..\jpeg-7\jdatasrc.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdcoefct.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdcolor.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jddctmgr.c" />
<ClCompile Include="..\..\..\jpeg-7\jdhuff.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdinput.c" />
<ClCompile Include="..\..\..\jpeg-7\jdmainct.c" />
<ClCompile Include="..\..\..\jpeg-7\jdmarker.c" />
<ClCompile Include="..\..\..\jpeg-7\jdmaster.c" />
<ClCompile Include="..\..\..\jpeg-7\jdmerge.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdpostct.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdsample.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdtrans.c" />
<ClCompile Include="..\..\..\jpeg-7\jerror.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jfdctflt.c" />
<ClCompile Include="..\..\..\jpeg-7\jfdctfst.c" />
<ClCompile Include="..\..\..\jpeg-7\jfdctint.c" />
<ClCompile Include="..\..\..\jpeg-7\jidctflt.c" />
<ClCompile Include="..\..\..\jpeg-7\jidctfst.c" />
<ClCompile Include="..\..\..\jpeg-7\jidctint.c" />
<ClCompile Include="..\..\..\jpeg-7\jmemansi.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jmemmgr.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jquant1.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jquant2.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jutils.c" />
<ClCompile Include="..\..\..\jpeg-7\memsrc.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdbmp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdcolmap.c" />
<ClCompile Include="..\..\..\jpeg-7\rdgif.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4702</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4702</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4702</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4702</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4702</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4702</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdppm.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdrle.c" />
<ClCompile Include="..\..\..\jpeg-7\rdswitch.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdtarga.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\transupp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrbmp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrgif.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrppm.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrrle.c" />
<ClCompile Include="..\..\..\jpeg-7\wrtarga.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\..\DXTCompressor\Src\DXTCompressor.cpp">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4189;4201;4459;4505;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4189;4201;4459;4505;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4189;4201;4459;4505;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4189;4201;4459;4505;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4189;4201;4459;4505;4706</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4189;4201;4459;4505;4706</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\sqlite3.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="jpeg_memory_dest.cpp" />
<ClCompile Include="..\..\SQLite3PluginCommon.cpp" />
<ClCompile Include="..\..\SQLite3ServerPlugin.cpp" />
<ClCompile Include="..\SQLiteLoggerCommon.cpp" />
<ClCompile Include="SQLiteServerLoggerPlugin.cpp" />
<ClCompile Include="SQLiteServerLoggerSample.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="jpeg">
<UniqueIdentifier>{1a47961f-0528-4848-94f7-0c0bc5541bbf}</UniqueIdentifier>
</Filter>
<Filter Include="DXTCompressor">
<UniqueIdentifier>{a3e487f9-312a-4683-8846-575590d20ba3}</UniqueIdentifier>
</Filter>
<Filter Include="SQLite">
<UniqueIdentifier>{1b366568-a9d5-41bd-a291-8fba4c40d727}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\jpeg-7\cderror.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\cdjpeg.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jconfig.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jdct.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jerror.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jinclude.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jmemsys.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jmorecfg.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jpegint.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jpeglib.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\jversion.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\jpeg-7\transupp.h">
<Filter>jpeg</Filter>
</ClInclude>
<ClInclude Include="..\..\..\DXTCompressor\Src\DDSHeader.h">
<Filter>DXTCompressor</Filter>
</ClInclude>
<ClInclude Include="..\..\..\DXTCompressor\Src\DXTCompressor.h">
<Filter>DXTCompressor</Filter>
</ClInclude>
<ClInclude Include="..\..\..\DXTCompressor\Src\FrameBufferRenderBuffer.hpp">
<Filter>DXTCompressor</Filter>
</ClInclude>
<ClInclude Include="..\..\..\DXTCompressor\Src\OpenGLWindow.hpp">
<Filter>DXTCompressor</Filter>
</ClInclude>
<ClInclude Include="..\..\..\DXTCompressor\Src\ShaderSource.h">
<Filter>DXTCompressor</Filter>
</ClInclude>
<ClInclude Include="..\..\sqlite3.h">
<Filter>SQLite</Filter>
</ClInclude>
<ClInclude Include="..\..\sqlite3ext.h">
<Filter>SQLite</Filter>
</ClInclude>
<ClInclude Include="jpeg_memory_dest.h" />
<ClInclude Include="..\..\SQLite3PluginCommon.h" />
<ClInclude Include="..\..\SQLite3ServerPlugin.h" />
<ClInclude Include="..\SQLiteLoggerCommon.h" />
<ClInclude Include="SQLiteServerLoggerPlugin.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\jpeg-7\cdjpeg.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jaricom.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcapimin.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcapistd.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcarith.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jccoefct.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jccolor.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcdctmgr.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jchuff.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcinit.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcmainct.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcmarker.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcmaster.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcomapi.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcparam.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcprepct.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jcsample.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jctrans.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdapimin.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdapistd.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdarith.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdatadst.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdatasrc.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdcoefct.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdcolor.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jddctmgr.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdhuff.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdinput.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdmainct.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdmarker.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdmaster.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdmerge.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdpostct.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdsample.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jdtrans.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jerror.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jfdctflt.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jfdctfst.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jfdctint.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jidctflt.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jidctfst.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jidctint.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jmemansi.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jmemmgr.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jquant1.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jquant2.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\jutils.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\memsrc.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdbmp.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdcolmap.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdgif.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdppm.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdrle.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdswitch.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\rdtarga.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\transupp.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrbmp.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrgif.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrppm.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrrle.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\jpeg-7\wrtarga.c">
<Filter>jpeg</Filter>
</ClCompile>
<ClCompile Include="..\..\..\DXTCompressor\Src\DXTCompressor.cpp">
<Filter>DXTCompressor</Filter>
</ClCompile>
<ClCompile Include="..\..\sqlite3.c">
<Filter>SQLite</Filter>
</ClCompile>
<ClCompile Include="jpeg_memory_dest.cpp" />
<ClCompile Include="..\..\SQLite3PluginCommon.cpp" />
<ClCompile Include="..\..\SQLite3ServerPlugin.cpp" />
<ClCompile Include="..\SQLiteLoggerCommon.cpp" />
<ClCompile Include="SQLiteServerLoggerPlugin.cpp" />
<ClCompile Include="SQLiteServerLoggerSample.cpp" />
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,209 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
/// \file
/// \brief Extends SQLite3ServerPlugin to support logging functions, including compressing images.
///
#ifndef ___SQLITE_SERVER_LOGGER_PLUGIN_H
#define ___SQLITE_SERVER_LOGGER_PLUGIN_H
#include "SQLite3ServerPlugin.h"
#include "SQLiteLoggerCommon.h"
class RakPeerInterface;
#define MAX_PACKETS_PER_CPU_INPUT_THREAD 16
namespace SLNet
{
/// \brief Extends SQLite3ServerPlugin to support logging functions, including compressing images.
/// \details SQLiteClientLoggerPlugin has the ability to send logs. Logs contain a description of the name of the table, the name of the columns, the types, and the data.<BR>
/// This class will create tables as necessary to support the client inputs.<BR>
/// Also, if images are sent, the server will format them from uncompressed to compressed JPG using jpeg-7 in a thread.<BR>
/// Compatible as a plugin with both RakPeerInterface and PacketizedTCP
/// \ingroup SQL_LITE_3_PLUGIN
class RAK_DLL_EXPORT SQLiteServerLoggerPlugin : public SQLite3ServerPlugin
{
public:
SQLiteServerLoggerPlugin();
virtual ~SQLiteServerLoggerPlugin();
/// Used with SetSessionManagementMode()
enum SessionManagementMode
{
/// \brief USE_ANY_DB_HANDLE is for games where the clients are not allowed to create new databases, and the clients don't care which database is written to. Typically only used if there is only one database ever.
/// \details Ignore SQLiteClientLoggerPlugin::StartSession(), and rely on a prior call to SQLite3ServerPlugin::AddDBHandle().
/// If no handles exist, logging calls silently fail.
USE_ANY_DB_HANDLE,
/// \brief USE_NAMED_DB_HANDLE is for games where the clients are not allowed to create new databases. Instead, they use named databases precreated.
/// \details Interpret the sessionId parameter passed to SQLiteClientLoggerPlugin::StartSession() as the dbIdentifier parameter passed to SQLite3ServerPlugin::AddDBHandle().
/// Use this database if it exists. If not, logging calls silently fail.
USE_NAMED_DB_HANDLE,
/// \brief CREATE_EACH_NAMED_DB_HANDLE is for single player games or multiplayer games where every game has a unique sesionId.
/// \details Use the sessionId parameter passed to SQLiteClientLoggerPlugin::StartSession() as a dbIdentifier.
/// A new database is created for each user
CREATE_EACH_NAMED_DB_HANDLE,
/// \brief CREATE_SHARED_NAMED_DB_HANDLE is for multiplayer games where you don't want to have to transmit and synchronize a unique sessionId. Everyone is in the same sessionId.
/// \details Use the sessionId parameter passed to SQLiteClientLoggerPlugin::StartSession() as a dbIdentifier.
/// A new database is created only if the sessionId is different. Two users using the same sessionId will write to the same database
CREATE_SHARED_NAMED_DB_HANDLE,
};
/// \brief Determine if and how to automatically create databases, rather than call SQLite3ServerPlugin::AddDBHandle()
/// \details Typically you want one database to hold the events of a single application session, rather than one database for all sessions over all time.
/// A user of SQLiteClientLoggerPlugin can optionally call SQLiteClientLoggerPlugin::StartSession() in order to join a session to enable this.
/// Call this before calling AddDBHandle(), and before any clients connect
/// \param[in] _sessionManagementMode See SessionManagementMode. Default is CREATE_EACH_NAMED_DB_HANDLE.
/// \param[in] _createDirectoryForFile If true, uses the current server date as a directory to the filename. This ensures filenames do not overwrite each other, even if the sessionId is reused. Defaults to true.
/// \param[in] _newDatabaseFilePath For CREATE_EACH_NAMED_DB_HANDLE and CREATE_SHARED_NAMED_DB_HANDLE, will create the databases here. Not used for the other modes. Defaults to whatever the operating system picks (usually the application directory).
void SetSessionManagementMode(SessionManagementMode _sessionManagementMode, bool _createDirectoryForFile, const char *_newDatabaseFilePath);
/// Close all connected sessions, writing all databases immediately
void CloseAllSessions(void);
/// \brief Enable using realtime shader based DXT compression on an Nvidia based video card. This will activate OpenGL
/// \details Call this before anyone connects.
/// If not enabled, or initialization fails, then jpg compression is used instead on the CPU.
/// Defaults to false, in case the target system does not support OpenGL
/// \param[in] enable True to enable, false to disable.
void SetEnableDXTCompression(bool enable);
struct ProcessingStatus
{
int packetsBuffered;
int cpuPendingProcessing;
int cpuProcessedAwaitingDeallocation;
int cpuNumThreadsWorking;
int sqlPendingProcessing;
int sqlProcessedAwaitingDeallocation;
int sqlNumThreadsWorking;
};
/// Return the thread and command processing statuses
void GetProcessingStatus(ProcessingStatus *processingStatus);
/// \internal
void Update(void);
/// \internal For plugin handling
virtual PluginReceiveResult OnReceive(Packet *packet);
/// \internal For plugin handling
virtual void OnClosedConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason );
/// \internal For plugin handling
virtual void OnShutdown(void);
virtual void OnAttach(void);
virtual void OnDetach(void);
struct SessionNameAndSystemAddress
{
SLNet::RakString sessionName;
SystemAddress systemAddress;
sqlite3 *referencedPointer;
SLNet::TimeMS timestampDelta;
// SLNet::TimeMS dbAgeWhenCreated;
};
DataStructures::List<SessionNameAndSystemAddress> loggedInSessions;
// An incoming data packet, and when it arrived
struct CPUThreadInputNode
{
SLNet::Packet *packet;
// SLNet::TimeMS whenMessageArrived;
// Time difference from their time to server time, plus the age of the database at the time the session was created
// Applied to CPUThreadOutputNode::clientSendingTime before being passed to SQL
SLNet::TimeMS timestampDelta;
SLNet::RakString dbIdentifier;
};
// As packets arrive, they are added to a CPUThreadInput structure.
// When the structure is full, or when a maximum amount of time has elapsed, whichever is first, then it is pushed to a thread for processing
// Deallocated in the thread
struct CPUThreadInput
{
// One or more incoming data packets, and when those packets arrived
// Processed on the CPU, possibly with batch processing for image compression
CPUThreadInputNode cpuInputArray[MAX_PACKETS_PER_CPU_INPUT_THREAD];
int arraySize;
};
// Each CPUThreadInputNode is unpacked to a CPUThreadOutputNode
// Images are now in compressed format, should the parameter list indeed have a query
struct CPUThreadOutputNode
{
SLNet::Packet *packet; // Passthrough
// SLNet::TimeMS whenMessageArrived; // Passthrough
SLNet::RakString dbIdentifier; // Passthrough
// SystemAddress systemAddress;
char ipAddressString[32];
SLNet::RakString tableName;
SLNet::RakString file;
SLNet::TimeMS clientSendingTime;
unsigned char parameterCount;
bool isFunctionCall;
DataStructures::List<SLNet::RakString> insertingColumnNames;
LogParameter parameterList[MAX_SQLLITE_LOGGER_PARAMETERS];
uint32_t tickCount;
int line;
};
// List of CPUThreadOutputNode
struct CPUThreadOutput
{
// cpuOutputNodeArray pointers are not deallocated, just handed over to SQLThreadInput
// Each element in the array is pushed to one SQLThreadInput
CPUThreadOutputNode *cpuOutputNodeArray[MAX_PACKETS_PER_CPU_INPUT_THREAD];
int arraySize;
};
struct SQLThreadInput
{
sqlite3 *dbHandle;
CPUThreadOutputNode *cpuOutputNode;
};
struct SQLThreadOutput
{
// cpuOutputNode gets deallocated here
CPUThreadOutputNode *cpuOutputNode;
};
protected:
unsigned int CreateDBHandle(SLNet::RakString dbIdentifier);
void CloseUnreferencedSessions(void);
SessionManagementMode sessionManagementMode;
bool createDirectoryForFile;
SLNet::RakString newDatabaseFilePath;
ThreadPool<CPUThreadInput*, CPUThreadOutput*> cpuLoggerThreadPool;
ThreadPool<SQLThreadInput, SQLThreadOutput> sqlLoggerThreadPool;
CPUThreadInput *LockCpuThreadInput(void);
void ClearCpuThreadInput(void);
void UnlockCpuThreadInput(void);
void CancelLockCpuThreadInput(void);
void PushCpuThreadInputIfNecessary(void);
void PushCpuThreadInput(void);
void StopCPUSQLThreads(void);
CPUThreadInput *cpuThreadInput;
SLNet::TimeMS whenCpuThreadInputAllocated;
bool dxtCompressionEnabled;
};
};
#endif

View File

@ -0,0 +1,104 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "slikenet/peerinterface.h"
#include "SQLiteServerLoggerPlugin.h"
#include "slikenet/BitStream.h"
#include "slikenet/sleep.h"
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
#include "slikenet/PacketizedTCP.h"
int main(void)
{
printf("Demonstration of SQLiteServerLoggerPlugin.\n");
SLNet::PacketizedTCP packetizedTCP;
SLNet::SQLiteServerLoggerPlugin loggerPlugin;
// printf("Enable DXT compression (y/n)? ");
// loggerPlugin.SetEnableDXTCompression(_getche()=='y');
loggerPlugin.SetEnableDXTCompression(true);
loggerPlugin.SetSessionManagementMode(SLNet::SQLiteServerLoggerPlugin::CREATE_SHARED_NAMED_DB_HANDLE, true, "");
/*
// printf("Enter path to DB file to create, or enter for memory.\n");
char filePath[256];
Gets(filePath,sizeof(filePath));
filePath[0]=0;
if (filePath[0]==0)
strcpy(filePath, "C:\\EchoChamber\\logger.sqlite");
sqlite3 *database;
if (sqlite3_open_v2(filePath, &database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0)!=SQLITE_OK)
return 1;
loggerPlugin.AddDBHandle("loggerDb", database);
*/
packetizedTCP.AttachPlugin(&loggerPlugin);
packetizedTCP.Start(38123,8);
printf("\nStarted.\n");
bool quit=false;
bool isProcessing=false;
SLNet::SQLiteServerLoggerPlugin::ProcessingStatus processingStatusNew;
SLNet::SQLiteServerLoggerPlugin::ProcessingStatus processingStatusOld;
memset(&processingStatusOld,0,sizeof(processingStatusOld));
SLNet::SystemAddress sa;
while (quit==false || isProcessing==true)
{
SLNet::Packet *p;
for (p = packetizedTCP.Receive(); p; packetizedTCP.DeallocatePacket(p), p = packetizedTCP.Receive())
{
;
}
sa = packetizedTCP.HasNewIncomingConnection();
if (sa!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("New incoming connection from %s\n", sa.ToString(true));
sa = packetizedTCP.HasLostConnection();
if (sa!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
printf("Lost connection from %s\n", sa.ToString(true));
sa = packetizedTCP.HasFailedConnectionAttempt();
sa = packetizedTCP.HasCompletedConnectionAttempt();
RakSleep(0);
if (_kbhit())
{
if (_getch()=='q')
{
printf("Quitting as soon as threads finish.\n");
packetizedTCP.Stop();
quit=true;
}
}
loggerPlugin.GetProcessingStatus(&processingStatusNew);
if (memcmp(&processingStatusNew,&processingStatusOld,sizeof(processingStatusOld))!=0)
{
printf("buffered=%i cpuWait=%i cpuDo=%i cpuDone=%i sqlWait=%i sqlDo=%i sqlDone=%i\n",
processingStatusNew.packetsBuffered,
processingStatusNew.cpuPendingProcessing,processingStatusNew.cpuNumThreadsWorking,processingStatusNew.cpuProcessedAwaitingDeallocation,
processingStatusNew.sqlPendingProcessing,processingStatusNew.sqlNumThreadsWorking,processingStatusNew.sqlProcessedAwaitingDeallocation
);
memcpy(&processingStatusOld,&processingStatusNew,sizeof(processingStatusOld));
}
if (processingStatusNew.cpuNumThreadsWorking==processingStatusNew.cpuPendingProcessing==processingStatusNew.cpuProcessedAwaitingDeallocation==
processingStatusNew.packetsBuffered==processingStatusNew.sqlNumThreadsWorking==processingStatusNew.sqlPendingProcessing==processingStatusNew.sqlProcessedAwaitingDeallocation==0)
isProcessing=false;
else
isProcessing=true;
}
loggerPlugin.CloseAllSessions();
return 1;
}

View File

@ -0,0 +1,168 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschr<68>nkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "jpeg_memory_dest.h"
/* ------------------------------------------------------------- */
/* MEMORY DESTINATION INTERFACE METHODS */
/* ------------------------------------------------------------- */
/* This function is called by the library before any data gets written */
METHODDEF(void)
init_destination (j_compress_ptr cinfo)
{
mem_dest_ptr dest = (mem_dest_ptr)cinfo->dest;
dest->pub.next_output_byte = dest->buffer; /* set destination buffer */
dest->pub.free_in_buffer = dest->bufsize; /* input buffer size */
dest->datasize = 0; /* reset output size */
dest->errcount = 0; /* reset error count */
}
/* This function is called by the library if the buffer fills up
I just reset destination pointer and buffer size here.
Note that this behavior, while preventing seg faults
will lead to invalid output streams as data is over-
written.
*/
METHODDEF(boolean)
empty_output_buffer (j_compress_ptr cinfo)
{
mem_dest_ptr dest = (mem_dest_ptr)cinfo->dest;
dest->pub.next_output_byte = dest->buffer;
dest->pub.free_in_buffer = dest->bufsize;
++dest->errcount; /* need to increase error count */
return TRUE;
}
/* Usually the library wants to flush output here.
I will calculate output buffer size here.
Note that results become incorrect, once
empty_output_buffer was called.
This situation is notified by errcount.
*/
METHODDEF(void)
term_destination (j_compress_ptr cinfo)
{
mem_dest_ptr dest = (mem_dest_ptr)cinfo->dest;
dest->datasize = dest->bufsize - dest->pub.free_in_buffer;
if (dest->outsize) *dest->outsize += (int)dest->datasize;
}
/* Override the default destination manager initialization
provided by jpeglib. Since we want to use memory-to-memory
compression, we need to use our own destination manager.
*/
GLOBAL(void)
jpeg_memory_dest (j_compress_ptr cinfo, JOCTET* buffer, int bufsize, int* outsize)
{
mem_dest_ptr dest;
/* first call for this instance - need to setup */
if (cinfo->dest == 0) {
cinfo->dest = (struct jpeg_destination_mgr *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
sizeof (memory_destination_mgr));
}
dest = (mem_dest_ptr) cinfo->dest;
dest->bufsize = bufsize;
dest->buffer = buffer;
dest->outsize = outsize;
/* set method callbacks */
dest->pub.init_destination = init_destination;
dest->pub.empty_output_buffer = empty_output_buffer;
dest->pub.term_destination = term_destination;
}
/* ------------------------------------------------------------- */
/* MEMORY SOURCE INTERFACE METHODS */
/* ------------------------------------------------------------- */
/* Called before data is read */
METHODDEF(void)
init_source (j_decompress_ptr dinfo)
{
// unused parameters
(void)dinfo;
/* nothing to do here, really. I mean. I'm not lazy or something, but...
we're actually through here. */
}
/* Called if the decoder wants some bytes that we cannot provide... */
METHODDEF(boolean)
fill_input_buffer (j_decompress_ptr dinfo)
{
// unused parameters
(void)dinfo;
/* we can't do anything about this. This might happen if the provided
buffer is either invalid with regards to its content or just a to
small bufsize has been given. */
/* fail. */
return FALSE;
}
/* From IJG docs: "it's not clear that being smart is worth much trouble"
So I save myself some trouble by ignoring this bit.
*/
METHODDEF(void)
skip_input_data (j_decompress_ptr dinfo, INT32 num_bytes)
{
/* There might be more data to skip than available in buffer.
This clearly is an error, so screw this mess. */
if ((size_t)num_bytes > dinfo->src->bytes_in_buffer) {
dinfo->src->next_input_byte = 0; /* no buffer byte */
dinfo->src->bytes_in_buffer = 0; /* no input left */
} else {
dinfo->src->next_input_byte += num_bytes;
dinfo->src->bytes_in_buffer -= num_bytes;
}
}
/* Finished with decompression */
METHODDEF(void)
term_source (j_decompress_ptr dinfo)
{
// unused parameters
(void)dinfo;
/* Again. Absolute laziness. Nothing to do here. Boring. */
}
GLOBAL(void)
jpeg_memory_src (j_decompress_ptr dinfo, unsigned char* buffer, size_t size)
{
struct jpeg_source_mgr* src;
/* first call for this instance - need to setup */
if (dinfo->src == 0) {
dinfo->src = (struct jpeg_source_mgr *)
(*dinfo->mem->alloc_small) ((j_common_ptr) dinfo, JPOOL_PERMANENT,
sizeof (struct jpeg_source_mgr));
}
src = dinfo->src;
src->next_input_byte = buffer;
src->bytes_in_buffer = size;
src->init_source = init_source;
src->fill_input_buffer = fill_input_buffer;
src->skip_input_data = skip_input_data;
src->term_source = term_source;
/* IJG recommend to use their function - as I don't know ****
about how to do better, I follow this recommendation */
src->resync_to_restart = jpeg_resync_to_restart;
}

View File

@ -0,0 +1,49 @@
/*
* This file was taken from RakNet 4.082 without any modifications.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*/
// From http://www.codeguru.com/forum/archive/index.php/t-378333.html
#include "jpeglib.h"
/*
This a custom destination manager for jpeglib that
enables the use of memory to memory compression.
*/
typedef struct {
struct jpeg_destination_mgr pub; /* base class */
JOCTET* buffer; /* buffer start address */
int bufsize; /* size of buffer */
size_t datasize; /* final size of compressed data */
int* outsize; /* user pointer to datasize */
int errcount; /* counts up write errors due to
buffer overruns */
} memory_destination_mgr;
typedef memory_destination_mgr* mem_dest_ptr;
METHODDEF(void)
init_destination (j_compress_ptr cinfo);
METHODDEF(boolean)
empty_output_buffer (j_compress_ptr cinfo);
METHODDEF(void)
term_destination (j_compress_ptr cinfo);
GLOBAL(void)
jpeg_memory_dest (j_compress_ptr cinfo, JOCTET* buffer, int bufsize, int* outsize);
METHODDEF(void)
init_source (j_decompress_ptr dinfo);
METHODDEF(boolean)
fill_input_buffer (j_decompress_ptr dinfo);
METHODDEF(void)
skip_input_data (j_decompress_ptr dinfo, INT32 num_bytes);
METHODDEF(void)
term_source (j_decompress_ptr dinfo);
GLOBAL(void)
jpeg_memory_src (j_decompress_ptr dinfo, unsigned char* buffer, size_t size);

View File

@ -0,0 +1,154 @@
/*
* This file was taken from RakNet 4.082.
* Please see licenses/RakNet license.txt for the underlying license and related copyright.
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "SQLite3ClientPlugin.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
using namespace SLNet;
void SQLite3PluginResultInterface_Printf::_sqlite3_exec(
SLNet::RakString inputStatement,
unsigned int queryId,
SLNet::RakString dbIdentifier,
const SQLite3Table &table,
SLNet::RakString errorMsg)
{
// unused parameters
(void)queryId;
if (errorMsg.IsEmpty()==false)
{
printf("Error for query: %s\n", inputStatement.C_String());
printf("%s\n", errorMsg.C_String());
return;
}
unsigned int idx;
for (idx=0; idx < table.columnNames.Size(); idx++)
printf("%s ", table.columnNames[idx].C_String());
printf("\n");
if (table.rows.Size()==0)
{
printf("<NO ROWS>\n");
}
else
{
for (idx=0; idx < table.rows.Size(); idx++)
{
unsigned int idx2;
for (idx2=0; idx2 < table.rows[idx]->entries.Size(); idx2++)
printf("%s ", table.rows[idx]->entries[idx2].C_String());
printf("\n");
}
}
}
void SQLite3PluginResultInterface_Printf::OnUnknownDBIdentifier(
SLNet::RakString inputStatement,
unsigned int queryId,
SLNet::RakString dbIdentifier)
{
// unused parameters
(void)queryId;
printf("Unknown DB %s\n", dbIdentifier.C_String());
}
SQLite3ClientPlugin::SQLite3ClientPlugin()
{
nextQueryId=0;
}
SQLite3ClientPlugin::~SQLite3ClientPlugin()
{
}
void SQLite3ClientPlugin::AddResultHandler(SQLite3PluginResultInterface *res)
{
resultHandlers.Push(res,_FILE_AND_LINE_);
}
void SQLite3ClientPlugin::RemoveResultHandler(SQLite3PluginResultInterface *res)
{
unsigned int idx = resultHandlers.GetIndexOf(res);
if (idx!=-1)
resultHandlers.RemoveAtIndex(idx);
}
void SQLite3ClientPlugin::ClearResultHandlers(void)
{
resultHandlers.Clear(true,_FILE_AND_LINE_);
}
unsigned int SQLite3ClientPlugin::_sqlite3_exec(SLNet::RakString dbIdentifier, SLNet::RakString inputStatement,
PacketPriority priority, PacketReliability reliability, char orderingChannel, const SystemAddress &systemAddress)
{
SLNet::BitStream bsOut;
bsOut.Write((MessageID)ID_SQLite3_EXEC);
bsOut.Write(nextQueryId);
bsOut.Write(dbIdentifier);
bsOut.Write(inputStatement);
bsOut.Write(true);
SendUnified(&bsOut, priority,reliability,orderingChannel,systemAddress,false);
++nextQueryId;
return nextQueryId-1;
}
PluginReceiveResult SQLite3ClientPlugin::OnReceive(Packet *packet)
{
switch (packet->data[0])
{
case ID_SQLite3_EXEC:
{
unsigned int queryId;
SLNet::RakString dbIdentifier;
SLNet::RakString inputStatement;
SLNet::BitStream bsIn(packet->data, packet->length, false);
bsIn.IgnoreBytes(sizeof(MessageID));
bsIn.Read(queryId);
bsIn.Read(dbIdentifier);
bsIn.Read(inputStatement);
bool isRequest;
bsIn.Read(isRequest);
if (isRequest)
{
// Server code
RakAssert(0);
}
else
{
// Client code
SLNet::RakString errorMsgStr;
SQLite3Table inputTable;
// Read it
bsIn.Read(errorMsgStr);
inputTable.Deserialize(&bsIn);
unsigned int idx;
for (idx=0; idx < resultHandlers.Size(); idx++)
resultHandlers[idx]->_sqlite3_exec(inputStatement, queryId, dbIdentifier, inputTable,errorMsgStr);
}
return RR_STOP_PROCESSING_AND_DEALLOCATE;
}
break;
case ID_SQLite3_UNKNOWN_DB:
{
unsigned int queryId;
SLNet::RakString dbIdentifier;
SLNet::RakString inputStatement;
SLNet::BitStream bsIn(packet->data, packet->length, false);
bsIn.IgnoreBytes(sizeof(MessageID));
bsIn.Read(queryId);
bsIn.Read(dbIdentifier);
bsIn.Read(inputStatement);
unsigned int idx;
for (idx=0; idx < resultHandlers.Size(); idx++)
resultHandlers[idx]->OnUnknownDBIdentifier(inputStatement, queryId, dbIdentifier);
}
}
return RR_CONTINUE_PROCESSING;
}

View File

@ -0,0 +1,133 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
/// \file
/// \brief Contains code to call sqlite3_exec over a network that does not support shared file handles.
///
#ifndef ___SQLITE_3_CLIENT_PLUGIN_H
#define ___SQLITE_3_CLIENT_PLUGIN_H
#include "slikenet/types.h"
#include "slikenet/Export.h"
#include "slikenet/PluginInterface2.h"
#include "slikenet/PacketPriority.h"
#include "slikenet/SocketIncludes.h"
#include "slikenet/DS_Multilist.h"
#include "slikenet/string.h"
#include "SQLite3PluginCommon.h"
class RakPeerInterface;
namespace SLNet
{
/// \brief Handles results of calls to SQLite3Plugin::_sqlite3_exec()
/// Results from calling SQLite3Plugin::_sqlite3_exec() are handled in this callback.
/// You should implement the callback, and let the plugin know about it via SQLite3Plugin::AddResultHandler()
/// Be sure to call SQLite3Plugin::RemoveResultHandler() or SQLite3Plugin::ClearResultHandlers() if you delete the callback
/// \ingroup SQL_LITE_3_PLUGIN
class SQLite3PluginResultInterface
{
public:
/// Query executed, possibly returning data or an error message
///
/// \param[out] inputStatement Passed to SQLite3Plugin::_sqlite3_exec
/// \param[out] queryId Returned from SQLite3Plugin::_sqlite3_exec
/// \param[out] dbIdentifier Passed to SQLite3Plugin::_sqlite3_exec
/// \param[out] table Result of call to _sqlite3_exec, should that statement return a result
/// \param[out] errorMsg If _sqlite3_exec failed, then the error message is here, and table will be empty
/// \ingroup SQL_LITE_3_PLUGIN
virtual void _sqlite3_exec(
SLNet::RakString inputStatement,
unsigned int queryId,
SLNet::RakString dbIdentifier,
const SQLite3Table &table,
SLNet::RakString errorMsg)=0;
/// dbIdentifier is unknown on the remote system
///
/// \param[out] inputStatement Passed to SQLite3Plugin::_sqlite3_exec
/// \param[out] queryId Returned from SQLite3Plugin::_sqlite3_exec
/// \param[out] dbIdentifier Passed to SQLite3Plugin::_sqlite3_exec
/// \ingroup SQL_LITE_3_PLUGIN
virtual void OnUnknownDBIdentifier(
SLNet::RakString inputStatement,
unsigned int queryId,
SLNet::RakString dbIdentifier)=0;
};
/// Sample callback implementation that just prints to the screen the results
/// \ingroup SQL_LITE_3_PLUGIN
class SQLite3PluginResultInterface_Printf : public SQLite3PluginResultInterface
{
virtual void _sqlite3_exec(
SLNet::RakString inputStatement,
unsigned int queryId,
SLNet::RakString dbIdentifier,
const SQLite3Table &table,
SLNet::RakString errorMsg);
virtual void OnUnknownDBIdentifier(
SLNet::RakString inputStatement,
unsigned int queryId,
SLNet::RakString dbIdentifier);
};
/// SQLite version 3 supports remote calls via networked file handles, but not over the regular internet
/// This plugin will serialize calls to and results from sqlite3_exec
/// That's all it does - any remote system can execute SQL queries.
/// Intended as a starting platform to derive from for more advanced functionality (security over who can query, etc).
/// Compatible as a plugin with both RakPeerInterface and PacketizedTCP
/// \ingroup SQL_LITE_3_PLUGIN
class RAK_DLL_EXPORT SQLite3ClientPlugin : public PluginInterface2
{
public:
SQLite3ClientPlugin();
virtual ~SQLite3ClientPlugin();
/// Add an interface to get callbacks for results
/// Up to user to make sure the pointer is valid through the lifetime of use
void AddResultHandler(SQLite3PluginResultInterface *res);
void RemoveResultHandler(SQLite3PluginResultInterface *res);
void ClearResultHandlers(void);
/// Execute a statement on the remote system
/// \note Don't forget to escape your input strings. RakString::SQLEscape() is available for this.
/// \param[in] dbIdentifier Which database to use, added with AddDBHandle()
/// \param[in] inputStatement SQL statement to execute
/// \param[in] priority See RakPeerInterface::Send()
/// \param[in] reliability See RakPeerInterface::Send()
/// \param[in] orderingChannel See RakPeerInterface::Send()
/// \param[in] systemAddress See RakPeerInterface::Send()
/// \return Query ID. Will be returned in _sqlite3_exec
unsigned int _sqlite3_exec(SLNet::RakString dbIdentifier, SLNet::RakString inputStatement,
PacketPriority priority, PacketReliability reliability, char orderingChannel, const SystemAddress &systemAddress);
/// \internal For plugin handling
virtual PluginReceiveResult OnReceive(Packet *packet);
// List of result handlers added with AddResultHandler()
DataStructures::List<SQLite3PluginResultInterface *> resultHandlers;
// Each query returns a numeric id if you want it. This tracks what id to assign next. Increments sequentially.
unsigned int nextQueryId;
};
}
#endif

View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{AB742113-15EC-4B5C-B95D-555BA034F704}</ProjectGuid>
<RootNamespace>SQLite3Plugin</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../Source/include;./ServerOnly;./;./ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../Source/include;./ServerOnly;./;./ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../../Source/include;./ServerOnly;./;./ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../../Source/include;./ServerOnly;./;./ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../../Source/include;./ServerOnly;./;./ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../../Source/include;./ServerOnly;./;./ClientOnly;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="sqlite3.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4127;4244;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4127;4244;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="SQLite3ClientPlugin.cpp" />
<ClCompile Include="SQLite3PluginCommon.cpp" />
<ClCompile Include="SQLite3Sample.cpp" />
<ClCompile Include="SQLite3ServerPlugin.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="sqlite3.h" />
<ClInclude Include="sqlite3ext.h" />
<ClInclude Include="SQLite3ClientPlugin.h" />
<ClInclude Include="SQLite3PluginCommon.h" />
<ClInclude Include="SQLite3ServerPlugin.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sqlite">
<UniqueIdentifier>{b9574685-4bd9-4f44-a1ce-9eaba58e06f2}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="sqlite3.c">
<Filter>Sqlite</Filter>
</ClCompile>
<ClCompile Include="SQLite3ClientPlugin.cpp" />
<ClCompile Include="SQLite3PluginCommon.cpp" />
<ClCompile Include="SQLite3Sample.cpp" />
<ClCompile Include="SQLite3ServerPlugin.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="sqlite3.h">
<Filter>Sqlite</Filter>
</ClInclude>
<ClInclude Include="sqlite3ext.h">
<Filter>Sqlite</Filter>
</ClInclude>
<ClInclude Include="SQLite3ClientPlugin.h" />
<ClInclude Include="SQLite3PluginCommon.h" />
<ClInclude Include="SQLite3ServerPlugin.h" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,71 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "SQLite3PluginCommon.h"
SQLite3Table::SQLite3Table()
{
}
SQLite3Table::~SQLite3Table()
{
for (unsigned int i=0; i < rows.Size(); i++)
SLNet::OP_DELETE(rows[i],_FILE_AND_LINE_);
}
void SQLite3Table::Serialize(SLNet::BitStream *bitStream)
{
bitStream->Write(columnNames.Size());
unsigned int idx1, idx2;
for (idx1=0; idx1 < columnNames.Size(); idx1++)
bitStream->Write(columnNames[idx1]);
bitStream->Write(rows.Size());
for (idx1=0; idx1 < rows.Size(); idx1++)
{
for (idx2=0; idx2 < rows[idx1]->entries.Size(); idx2++)
{
bitStream->Write(rows[idx1]->entries[idx2]);
}
}
}
void SQLite3Table::Deserialize(SLNet::BitStream *bitStream)
{
for (unsigned int i=0; i < rows.Size(); i++)
SLNet::OP_DELETE(rows[i],_FILE_AND_LINE_);
rows.Clear(true,_FILE_AND_LINE_);
columnNames.Clear(true , _FILE_AND_LINE_ );
unsigned int numColumns, numRows;
bitStream->Read(numColumns);
unsigned int idx1,idx2;
SLNet::RakString inputStr;
for (idx1=0; idx1 < numColumns; idx1++)
{
bitStream->Read(inputStr);
columnNames.Push(inputStr, _FILE_AND_LINE_ );
}
bitStream->Read(numRows);
for (idx1=0; idx1 < numRows; idx1++)
{
SQLite3Row *row = SLNet::OP_NEW<SQLite3Row>(_FILE_AND_LINE_);
rows.Push(row,_FILE_AND_LINE_);
for (idx2=0; idx2 < numColumns; idx2++)
{
bitStream->Read(inputStr);
row->entries.Push(inputStr, _FILE_AND_LINE_ );
}
}
}

View File

@ -0,0 +1,48 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#ifndef __SQL_LITE_3_PLUGIN_COMMON_H
#define __SQL_LITE_3_PLUGIN_COMMON_H
#include "slikenet/DS_Multilist.h"
#include "slikenet/string.h"
#include "slikenet/BitStream.h"
/// \defgroup SQL_LITE_3_PLUGIN SQLite3Plugin
/// \brief Code to transmit SQLite3 commands across the network
/// \details
/// \ingroup PLUGINS_GROUP
/// Contains a result row, which is just an array of strings
/// \ingroup SQL_LITE_3_PLUGIN
struct SQLite3Row
{
DataStructures::List<SLNet::RakString> entries;
};
/// Contains a result table, which is an array of column name strings, followed by an array of SQLite3Row
/// \ingroup SQL_LITE_3_PLUGIN
struct SQLite3Table
{
SQLite3Table();
~SQLite3Table();
void Serialize(SLNet::BitStream *bitStream);
void Deserialize(SLNet::BitStream *bitStream);
DataStructures::List<SLNet::RakString> columnNames;
DataStructures::List<SQLite3Row*> rows;
};
#endif

View File

@ -0,0 +1,220 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
/// \file
/// \brief A sample for the SQLite3Plugin, that creates a table to track connections on the server
/// The SQLite3Plugin is used with SQLite version 3 to transmit over the network calls to sqlite3_exec
#include "slikenet/peerinterface.h"
#include "SQLite3ServerPlugin.h"
#include "SQLite3ClientPlugin.h"
#include "slikenet/BitStream.h"
#include "slikenet/sleep.h"
#include "slikenet/Gets.h"
#include "slikenet/Kbhit.h"
#include "slikenet/GetTime.h"
using namespace SLNet;
/// A sample derived implementation that will automatically update the table with all connected systems
class ConnectionStatePlugin : public SQLite3ServerPlugin
{
public:
ConnectionStatePlugin() {lastTimeRemovedDeadRows=0;}
// Custom function to create the table we want
// Assumes the database was already added with AddDBHandle
bool CreateConnectionStateTable(SLNet::RakString dbIdentifier)
{
// dbHandles is a member variable of SQLite3Plugin and contains the mappings of identifiers to sql database pointers
unsigned int idx = dbHandles.GetIndexOf(dbIdentifier);
if (idx==(unsigned int)-1)
return false;
// Store the identifier for the connection state table for use in OnClosedConnection and OnNewConnection
connectionStateIdentifier=dbIdentifier;
// Create the table.
sqlite3_exec(
// Pointer to sqlite instance previously added with SQLite3Plugin::AddDBHandle()
dbHandles[idx].dbHandle,
// Query
"CREATE TABLE connectionState(systemAddress varchar(64),"
"rowCreationTime timestamp DATE DEFAULT (datetime('now','localtime')),"
"lastRowUpdateTime timestamp DATE DEFAULT (datetime('now','localtime')),"
"rakNetGUID varchar(64))",
// Ignore per-row callback, callback parameter, and error message destination
0,0,0);
return true;
}
// Implemented event callback from base class PluginInterface2
virtual void OnClosedConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason )
{
// Call down to the base class in case it does anything in the future (right now it does nothing)
SQLite3ServerPlugin::OnClosedConnection(systemAddress, rakNetGUID, lostConnectionReason);
// Get the database index associated with the table used for this class
unsigned int idx = dbHandles.GetIndexOf(connectionStateIdentifier);
if (idx==(unsigned int)-1)
return;
// Remove dropped system by primary key system address
char systemAddressString[64];
systemAddress.ToString(true,systemAddressString,static_cast<size_t>(64));
SLNet::RakString query("DELETE FROM connectionState WHERE systemAddress='%s';",
SLNet::RakString(systemAddressString).SQLEscape().C_String());
sqlite3_exec(dbHandles[idx].dbHandle,query.C_String(),0,0,0);
}
// Implemented event callback from base class PluginInterface2
virtual void OnNewConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, bool isIncoming)
{
// Call down to the base class in case it does anything in the future (right now it does nothing)
SQLite3ServerPlugin::OnNewConnection(systemAddress, rakNetGUID, isIncoming);
// Get the database index associated with the table used for this class
unsigned int idx = dbHandles.GetIndexOf(connectionStateIdentifier);
if (idx==(unsigned int)-1)
return;
// Store new system's system address and guid. rowCreationTime column is created automatically
char systemAddressString[64];
systemAddress.ToString(true,systemAddressString,static_cast<size_t>(64));
char guidString[128];
rakNetGUID.ToString(guidString, 64);
SLNet::RakString query(
"INSERT INTO connectionState (systemAddress,rakNetGUID) VALUES ('%s','%s');",
SLNet::RakString(systemAddressString).SQLEscape().C_String(),
SLNet::RakString(guidString).SQLEscape().C_String());
sqlite3_exec(dbHandles[idx].dbHandle,query.C_String(),0,0,0);
}
// After I wrote this I realized it's not needed. ID_CONNECTION_LOST does it for us :)
/*
virtual void Update(void)
{
// Call down to the base class or the results of thread processing won't update
SQLite3Plugin::Update();
// Once a second, remove all rows whose timestamp has not been updated in the last 30 seconds
SLNet::TimeMS curTime=SLNet::GetTimeMS();
if (curTime > lastTimeRemovedDeadRows+1000 || curTime < lastTimeRemovedDeadRows) // < is to check overflow
{
lastTimeRemovedDeadRows = curTime;
// Get the database index associated with the table used for this class
unsigned int idx = dbHandles.GetIndexOf(connectionStateIdentifier);
if (idx==(unsigned int)-1)
return;
sqlite3_exec(dbHandles[idx].dbHandle,"DELETE FROM connectionState WHERE lastRowUpdateTime<dateTime('now','localtime','-30 seconds');",0,0,0);
}
}
*/
SLNet::RakString connectionStateIdentifier;
SLNet::TimeMS lastTimeRemovedDeadRows;
};
int main(void)
{
printf("Demonstration of SQLite3Plugin.\n");
printf("Allows you to send SQL queries to a remote system running SQLite3.\n");
printf("System is a basis from which to add more functionality (security, etc.)\n");
printf("Difficulty: Intermediate\n\n");
SLNet::RakPeerInterface *rakClient= SLNet::RakPeerInterface::GetInstance();
SLNet::RakPeerInterface *rakServer= SLNet::RakPeerInterface::GetInstance();
// Client just needs the base class to do sends
SLNet::SQLite3ClientPlugin sqlite3ClientPlugin;
// Server uses our sample derived class to track logins
ConnectionStatePlugin sqlite3ServerPlugin;
// Default result handler to print what happens on the client
SQLite3PluginResultInterface_Printf sqlite3ResultHandler;
rakClient->AttachPlugin(&sqlite3ClientPlugin);
rakServer->AttachPlugin(&sqlite3ServerPlugin);
sqlite3ClientPlugin.AddResultHandler(&sqlite3ResultHandler);
// Create a database, and tell the plugin about it
sqlite3 *database;
// Here :memory: means create the database in memory only.
// Normally the first parameter refers to a path on the disk to the database file
if (sqlite3_open_v2(":memory:", &database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0)!=SQLITE_OK)
return 1;
static const char* DATABASE_IDENTIFIER="ConnectionStateDBInMemory";
sqlite3ServerPlugin.AddDBHandle(DATABASE_IDENTIFIER, database);
sqlite3ServerPlugin.CreateConnectionStateTable(DATABASE_IDENTIFIER);
// Start and connect RakNet as usual
SLNet::SocketDescriptor socketDescriptor(10000,0);
if (rakServer->Startup(1,&socketDescriptor, 1)!=RAKNET_STARTED)
{
printf("Start call failed!\n");
return 0;
}
rakServer->SetMaximumIncomingConnections(1);
socketDescriptor.port=0;
rakClient->Startup(1, &socketDescriptor, 1);
if (rakClient->Connect("127.0.0.1", 10000, 0, 0)!= SLNet::CONNECTION_ATTEMPT_STARTED)
{
printf("Connect call failed\n");
return 0;
}
// Wait for the connection to complete
RakSleep(500);
printf("Enter QUIT to quit, anything else is sent as a query.\n");
for(;;)
{
if (_kbhit())
{
printf("Enter query: ");
char query[512];
Gets(query,sizeof(query));
if (_stricmp(query, "QUIT")==0)
{
printf("Bye\n");
break;
}
else
{
// Send a query to the database through RakNet
// Result will be printed through SQLite3PluginResultInterface_Printf
sqlite3ClientPlugin._sqlite3_exec(DATABASE_IDENTIFIER, query, HIGH_PRIORITY, RELIABLE_ORDERED, 0, rakClient->GetSystemAddressFromIndex(0));
}
}
rakClient->DeallocatePacket(rakClient->Receive());
rakServer->DeallocatePacket(rakServer->Receive());
RakSleep(30);
}
rakClient->Shutdown(100,0);
rakServer->Shutdown(100,0);
SLNet::RakPeerInterface::DestroyInstance(rakClient);
SLNet::RakPeerInterface::DestroyInstance(rakServer);
sqlite3_close(database);
return 0;
}

View File

@ -0,0 +1,272 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include "SQLite3ServerPlugin.h"
#include "slikenet/MessageIdentifiers.h"
#include "slikenet/BitStream.h"
#include "slikenet/GetTime.h"
using namespace SLNet;
bool operator<( const DataStructures::MLKeyRef<SLNet::RakString> &inputKey, const SQLite3ServerPlugin::NamedDBHandle &cls ) {return inputKey.Get() < cls.dbIdentifier;}
bool operator>( const DataStructures::MLKeyRef<SLNet::RakString> &inputKey, const SQLite3ServerPlugin::NamedDBHandle &cls ) {return inputKey.Get() > cls.dbIdentifier;}
bool operator==( const DataStructures::MLKeyRef<SLNet::RakString> &inputKey, const SQLite3ServerPlugin::NamedDBHandle &cls ) {return inputKey.Get() == cls.dbIdentifier;}
int PerRowCallback(void *userArgument, int argc, char **argv, char **azColName)
{
SQLite3Table *outputTable = (SQLite3Table*)userArgument;
unsigned int idx;
if (outputTable->columnNames.Size()==0)
{
for (idx=0; idx < (unsigned int) argc; idx++)
outputTable->columnNames.Push(azColName[idx], _FILE_AND_LINE_ );
}
SQLite3Row *row = SLNet::OP_NEW<SQLite3Row>(_FILE_AND_LINE_);
outputTable->rows.Push(row,_FILE_AND_LINE_);
for (idx=0; idx < (unsigned int) argc; idx++)
{
if (argv[idx])
row->entries.Push(argv[idx], _FILE_AND_LINE_ );
else
row->entries.Push("", _FILE_AND_LINE_ );
}
return 0;
}
SQLite3ServerPlugin::SQLite3ServerPlugin()
{
}
SQLite3ServerPlugin::~SQLite3ServerPlugin()
{
StopThreads();
}
bool SQLite3ServerPlugin::AddDBHandle(SLNet::RakString dbIdentifier, sqlite3 *dbHandle, bool dbAutoCreated)
{
if (dbIdentifier.IsEmpty())
return false;
unsigned int idx = dbHandles.GetInsertionIndex(dbIdentifier);
if (idx==(unsigned int)-1)
return false;
NamedDBHandle ndbh;
ndbh.dbHandle=dbHandle;
ndbh.dbIdentifier=dbIdentifier;
ndbh.dbAutoCreated=dbAutoCreated;
ndbh.whenCreated= SLNet::GetTimeMS();
dbHandles.InsertAtIndex(ndbh,idx,_FILE_AND_LINE_);
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
if (sqlThreadPool.WasStarted()==false)
sqlThreadPool.StartThreads(1,0);
#endif
return true;
}
void SQLite3ServerPlugin::RemoveDBHandle(SLNet::RakString dbIdentifier, bool alsoCloseConnection)
{
unsigned int idx = dbHandles.GetIndexOf(dbIdentifier);
if (idx!=(unsigned int)-1)
{
if (alsoCloseConnection)
{
printf("Closed %s\n", dbIdentifier.C_String());
sqlite3_close(dbHandles[idx].dbHandle);
}
dbHandles.RemoveAtIndex(idx,_FILE_AND_LINE_);
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
if (dbHandles.GetSize()==0)
StopThreads();
#endif // SQLite3_STATEMENT_EXECUTE_THREADED
}
}
void SQLite3ServerPlugin::RemoveDBHandle(sqlite3 *dbHandle, bool alsoCloseConnection)
{
unsigned int idx;
for (idx=0; idx < dbHandles.GetSize(); idx++)
{
if (dbHandles[idx].dbHandle==dbHandle)
{
if (alsoCloseConnection)
{
printf("Closed %s\n", dbHandles[idx].dbIdentifier.C_String());
sqlite3_close(dbHandles[idx].dbHandle);
}
dbHandles.RemoveAtIndex(idx,_FILE_AND_LINE_);
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
if (dbHandles.GetSize()==0)
StopThreads();
#endif // SQLite3_STATEMENT_EXECUTE_THREADED
return;
}
}
}
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
void SQLite3ServerPlugin::Update(void)
{
SQLExecThreadOutput output;
while (sqlThreadPool.HasOutputFast() && sqlThreadPool.HasOutput())
{
output = sqlThreadPool.GetOutput();
SLNet::BitStream bsOut((unsigned char*) output.data, output.length,false);
SendUnified(&bsOut, MEDIUM_PRIORITY,RELIABLE_ORDERED,0,output.sender,false);
rakFree_Ex(output.data,_FILE_AND_LINE_);
}
}
SQLite3ServerPlugin::SQLExecThreadOutput ExecStatementThread(SQLite3ServerPlugin::SQLExecThreadInput threadInput, bool *returnOutput, void* perThreadData)
{
// unused parameters
(void)perThreadData;
unsigned int queryId;
SLNet::RakString dbIdentifier;
SLNet::RakString inputStatement;
SLNet::BitStream bsIn((unsigned char*) threadInput.data, threadInput.length, false);
bsIn.IgnoreBytes(sizeof(MessageID));
bsIn.Read(queryId);
bsIn.Read(dbIdentifier);
bsIn.Read(inputStatement);
// bool isRequest;
// bsIn.Read(isRequest);
bsIn.IgnoreBits(1);
char *errorMsg;
SLNet::RakString errorMsgStr;
SQLite3Table outputTable;
sqlite3_exec(threadInput.dbHandle, inputStatement.C_String(), PerRowCallback, &outputTable, &errorMsg);
if (errorMsg)
{
errorMsgStr=errorMsg;
sqlite3_free(errorMsg);
}
SLNet::BitStream bsOut;
bsOut.Write((MessageID)ID_SQLite3_EXEC);
bsOut.Write(queryId);
bsOut.Write(dbIdentifier);
bsOut.Write(inputStatement);
bsOut.Write(false);
bsOut.Write(errorMsgStr);
outputTable.Serialize(&bsOut);
// Free input data
rakFree_Ex(threadInput.data,_FILE_AND_LINE_);
// Copy to output data
SQLite3ServerPlugin::SQLExecThreadOutput threadOutput;
threadOutput.data=(char*) rakMalloc_Ex(bsOut.GetNumberOfBytesUsed(),_FILE_AND_LINE_);
memcpy(threadOutput.data,bsOut.GetData(),bsOut.GetNumberOfBytesUsed());
threadOutput.length=bsOut.GetNumberOfBytesUsed();
threadOutput.sender=threadInput.sender;
// SendUnified(&bsOut, MEDIUM_PRIORITY,RELIABLE_ORDERED,0,packet->systemAddress,false);
*returnOutput=true;
return threadOutput;
}
#endif // SQLite3_STATEMENT_EXECUTE_THREADED
PluginReceiveResult SQLite3ServerPlugin::OnReceive(Packet *packet)
{
switch (packet->data[0])
{
case ID_SQLite3_EXEC:
{
unsigned int queryId;
SLNet::RakString dbIdentifier;
SLNet::RakString inputStatement;
SLNet::BitStream bsIn(packet->data, packet->length, false);
bsIn.IgnoreBytes(sizeof(MessageID));
bsIn.Read(queryId);
bsIn.Read(dbIdentifier);
bsIn.Read(inputStatement);
bool isRequest;
bsIn.Read(isRequest);
if (isRequest)
{
// Server code
unsigned int idx = dbHandles.GetIndexOf(dbIdentifier);
if (idx==-1)
{
SLNet::BitStream bsOut;
bsOut.Write((MessageID)ID_SQLite3_UNKNOWN_DB);
bsOut.Write(queryId);
bsOut.Write(dbIdentifier);
bsOut.Write(inputStatement);
SendUnified(&bsOut, MEDIUM_PRIORITY,RELIABLE_ORDERED,0,packet->systemAddress,false);
}
else
{
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
// Push to the thread
SQLExecThreadInput input;
input.data=(char*) rakMalloc_Ex(packet->length, _FILE_AND_LINE_);
memcpy(input.data,packet->data,packet->length);
input.dbHandle=dbHandles[idx].dbHandle;
input.length=packet->length;
input.sender=packet->systemAddress;
sqlThreadPool.AddInput(ExecStatementThread, input);
#else
char *errorMsg;
SLNet::RakString errorMsgStr;
SQLite3Table outputTable;
sqlite3_exec(dbHandles[idx].dbHandle, inputStatement.C_String(), PerRowCallback, &outputTable, &errorMsg);
if (errorMsg)
{
errorMsgStr=errorMsg;
sqlite3_free(errorMsg);
}
SLNet::BitStream bsOut;
bsOut.Write((MessageID)ID_SQLite3_EXEC);
bsOut.Write(queryId);
bsOut.Write(dbIdentifier);
bsOut.Write(inputStatement);
bsOut.Write(false);
bsOut.Write(errorMsgStr);
outputTable.Serialize(&bsOut);
SendUnified(&bsOut, MEDIUM_PRIORITY,RELIABLE_ORDERED,0,packet->systemAddress,false);
#endif
}
}
return RR_STOP_PROCESSING_AND_DEALLOCATE;
}
break;
}
return RR_CONTINUE_PROCESSING;
}
void SQLite3ServerPlugin::OnAttach(void)
{
}
void SQLite3ServerPlugin::OnDetach(void)
{
StopThreads();
}
void SQLite3ServerPlugin::StopThreads(void)
{
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
sqlThreadPool.StopThreads();
unsigned int i;
for (i=0; i < sqlThreadPool.InputSize(); i++)
{
SLNet::OP_DELETE(sqlThreadPool.GetInputAtIndex(i).data, _FILE_AND_LINE_);
}
sqlThreadPool.ClearInput();
for (i=0; i < sqlThreadPool.OutputSize(); i++)
{
SLNet::OP_DELETE(sqlThreadPool.GetOutputAtIndex(i).data, _FILE_AND_LINE_);
}
sqlThreadPool.ClearOutput();
#endif
}

View File

@ -0,0 +1,131 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
/// \file
/// \brief Contains code to call sqlite3_exec over a network that does not support shared file handles.
#ifndef ___SQLITE_3_SERVER_PLUGIN_H
#define ___SQLITE_3_SERVER_PLUGIN_H
/// \brief Control if SQLite3 statements execute in a thread
/// \details sqlite3_exec is blocking and will therefore block other operations in the same program<BR>
/// If defined, sqlite3_exec executes in a thread so that doesn't happen<BR>
/// If the only thing this system is doing is running SQLite, then you'll get marginally better performance by commenting it out.
/// \ingroup SQL_LITE_3_PLUGIN
#define SQLite3_STATEMENT_EXECUTE_THREADED
#include "slikenet/types.h"
#include "slikenet/Export.h"
#include "slikenet/PluginInterface2.h"
#include "slikenet/PacketPriority.h"
#include "slikenet/SocketIncludes.h"
#include "slikenet/DS_Multilist.h"
#include "slikenet/string.h"
#include "sqlite3.h"
#include "SQLite3PluginCommon.h"
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
#include "slikenet/ThreadPool.h"
#endif
class RakPeerInterface;
namespace SLNet
{
/// \brief Exec SQLLite commands over the network
/// \details SQLite version 3 supports remote calls via networked file handles, but not over the regular internet<BR>
/// This plugin will serialize calls to and results from sqlite3_exec<BR>
/// That's all it does - any remote system can execute SQL queries.<BR>
/// Intended as a starting platform to derive from for more advanced functionality (security over who can query, etc).<BR>
/// Compatible as a plugin with both RakPeerInterface and PacketizedTCP
/// \ingroup SQL_LITE_3_PLUGIN
class RAK_DLL_EXPORT SQLite3ServerPlugin : public PluginInterface2
{
public:
SQLite3ServerPlugin();
virtual ~SQLite3ServerPlugin();
/// Associate identifier with dbHandle, so when we get calls to operate on identifier, we use dbhandle
/// If SQLite3_STATEMENT_EXECUTE_THREADED is defined, will start the execution thread the first time a dbHandle is added.
/// \return true on success, false on dbIdentifier empty, or already in use
virtual bool AddDBHandle(SLNet::RakString dbIdentifier, sqlite3 *dbHandle, bool dbAutoCreated=false);
/// Stop using a dbHandle, lookup either by identifier or by pointer.
/// If SQLite3_STATEMENT_EXECUTE_THREADED is defined, do not call this while processing commands, since the commands run in a thread and might be using the dbHandle
/// Call before closing the handle or else SQLite3Plugin won't know that it was closed, and will continue using it
void RemoveDBHandle(SLNet::RakString dbIdentifier, bool alsoCloseConnection=false);
void RemoveDBHandle(sqlite3 *dbHandle, bool alsoCloseConnection=false);
/// \internal For plugin handling
virtual PluginReceiveResult OnReceive(Packet *packet);
virtual void OnAttach(void);
virtual void OnDetach(void);
/// \internal
struct NamedDBHandle
{
SLNet::RakString dbIdentifier;
sqlite3 *dbHandle;
bool dbAutoCreated;
SLNet::TimeMS whenCreated;
};
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
virtual void Update(void);
/// \internal
struct SQLExecThreadInput
{
SQLExecThreadInput() {data=0; packet=0;}
char *data;
unsigned int length;
SystemAddress sender;
SLNet::TimeMS whenMessageArrived;
sqlite3 *dbHandle;
SLNet::Packet *packet;
};
/// \internal
struct SQLExecThreadOutput
{
SQLExecThreadOutput() {data=0; packet=0;}
char *data;
unsigned int length;
SystemAddress sender;
SLNet::Packet *packet;
};
#endif // SQLite3_STATEMENT_EXECUTE_THREADED
protected:
virtual void StopThreads(void);
// List of databases added with AddDBHandle()
DataStructures::Multilist<ML_ORDERED_LIST, NamedDBHandle, SLNet::RakString> dbHandles;
#ifdef SQLite3_STATEMENT_EXECUTE_THREADED
// The point of the sqlThreadPool is so that SQL queries, which are blocking, happen in the thread and don't slow down the rest of the application
// The sqlThreadPool has a queue for incoming processing requests. As systems disconnect their pending requests are removed from the list.
ThreadPool<SQLExecThreadInput, SQLExecThreadOutput> sqlThreadPool;
#endif
};
};
extern bool operator<( const DataStructures::MLKeyRef<SLNet::RakString> &inputKey, const SLNet::SQLite3ServerPlugin::NamedDBHandle &cls );
extern bool operator>( const DataStructures::MLKeyRef<SLNet::RakString> &inputKey, const SLNet::SQLite3ServerPlugin::NamedDBHandle &cls );
extern bool operator==( const DataStructures::MLKeyRef<SLNet::RakString> &inputKey, const SLNet::SQLite3ServerPlugin::NamedDBHandle &cls );
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,380 @@
/*
** 2006 June 7
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the SQLite interface for use by
** shared libraries that want to be imported as extensions into
** an SQLite instance. Shared libraries that intend to be loaded
** as extensions by SQLite should #include this file instead of
** sqlite3.h.
**
** @(#) $Id: sqlite3ext.h,v 1.25 2008/10/12 00:27:54 shane Exp $
*/
#ifndef _SQLite3EXT_H_
#define _SQLite3EXT_H_
#include "sqlite3.h"
typedef struct sqlite3_api_routines sqlite3_api_routines;
/*
** The following structure holds pointers to all of the SQLite API
** routines.
**
** WARNING: In order to maintain backwards compatibility, add new
** interfaces to the end of this structure only. If you insert new
** interfaces in the middle of this structure, then older different
** versions of SQLite will not be able to load each others' shared
** libraries!
*/
struct sqlite3_api_routines {
void * (*aggregate_context)(sqlite3_context*,int nBytes);
int (*aggregate_count)(sqlite3_context*);
int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
int (*bind_double)(sqlite3_stmt*,int,double);
int (*bind_int)(sqlite3_stmt*,int,int);
int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
int (*bind_null)(sqlite3_stmt*,int);
int (*bind_parameter_count)(sqlite3_stmt*);
int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
const char * (*bind_parameter_name)(sqlite3_stmt*,int);
int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
int (*busy_timeout)(sqlite3*,int ms);
int (*changes)(sqlite3*);
int (*close)(sqlite3*);
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
const void * (*column_blob)(sqlite3_stmt*,int iCol);
int (*column_bytes)(sqlite3_stmt*,int iCol);
int (*column_bytes16)(sqlite3_stmt*,int iCol);
int (*column_count)(sqlite3_stmt*pStmt);
const char * (*column_database_name)(sqlite3_stmt*,int);
const void * (*column_database_name16)(sqlite3_stmt*,int);
const char * (*column_decltype)(sqlite3_stmt*,int i);
const void * (*column_decltype16)(sqlite3_stmt*,int);
double (*column_double)(sqlite3_stmt*,int iCol);
int (*column_int)(sqlite3_stmt*,int iCol);
sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
const char * (*column_name)(sqlite3_stmt*,int);
const void * (*column_name16)(sqlite3_stmt*,int);
const char * (*column_origin_name)(sqlite3_stmt*,int);
const void * (*column_origin_name16)(sqlite3_stmt*,int);
const char * (*column_table_name)(sqlite3_stmt*,int);
const void * (*column_table_name16)(sqlite3_stmt*,int);
const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
const void * (*column_text16)(sqlite3_stmt*,int iCol);
int (*column_type)(sqlite3_stmt*,int iCol);
sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
int (*complete)(const char*sql);
int (*complete16)(const void*sql);
int (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
int (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
int (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
int (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
int (*data_count)(sqlite3_stmt*pStmt);
sqlite3 * (*db_handle)(sqlite3_stmt*);
int (*declare_vtab)(sqlite3*,const char*);
int (*enable_shared_cache)(int);
int (*errcode)(sqlite3*db);
const char * (*errmsg)(sqlite3*);
const void * (*errmsg16)(sqlite3*);
int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
int (*expired)(sqlite3_stmt*);
int (*finalize)(sqlite3_stmt*pStmt);
void (*free)(void*);
void (*free_table)(char**result);
int (*get_autocommit)(sqlite3*);
void * (*get_auxdata)(sqlite3_context*,int);
int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
int (*global_recover)(void);
void (*interruptx)(sqlite3*);
sqlite_int64 (*last_insert_rowid)(sqlite3*);
const char * (*libversion)(void);
int (*libversion_number)(void);
void *(*malloc)(int);
char * (*mprintf)(const char*,...);
int (*open)(const char*,sqlite3**);
int (*open16)(const void*,sqlite3**);
int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
void *(*realloc)(void*,int);
int (*reset)(sqlite3_stmt*pStmt);
void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
void (*result_double)(sqlite3_context*,double);
void (*result_error)(sqlite3_context*,const char*,int);
void (*result_error16)(sqlite3_context*,const void*,int);
void (*result_int)(sqlite3_context*,int);
void (*result_int64)(sqlite3_context*,sqlite_int64);
void (*result_null)(sqlite3_context*);
void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
void (*result_value)(sqlite3_context*,sqlite3_value*);
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
char * (*snprintf)(int,char*,const char*,...);
int (*step)(sqlite3_stmt*);
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
void (*thread_cleanup)(void);
int (*total_changes)(sqlite3*);
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
void * (*user_data)(sqlite3_context*);
const void * (*value_blob)(sqlite3_value*);
int (*value_bytes)(sqlite3_value*);
int (*value_bytes16)(sqlite3_value*);
double (*value_double)(sqlite3_value*);
int (*value_int)(sqlite3_value*);
sqlite_int64 (*value_int64)(sqlite3_value*);
int (*value_numeric_type)(sqlite3_value*);
const unsigned char * (*value_text)(sqlite3_value*);
const void * (*value_text16)(sqlite3_value*);
const void * (*value_text16be)(sqlite3_value*);
const void * (*value_text16le)(sqlite3_value*);
int (*value_type)(sqlite3_value*);
char *(*vmprintf)(const char*,va_list);
/* Added ??? */
int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
/* Added by 3.3.13 */
int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
int (*clear_bindings)(sqlite3_stmt*);
/* Added by 3.4.1 */
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
/* Added by 3.5.0 */
int (*bind_zeroblob)(sqlite3_stmt*,int,int);
int (*blob_bytes)(sqlite3_blob*);
int (*blob_close)(sqlite3_blob*);
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
int (*blob_read)(sqlite3_blob*,void*,int,int);
int (*blob_write)(sqlite3_blob*,const void*,int,int);
int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
int (*file_control)(sqlite3*,const char*,int,void*);
sqlite3_int64 (*memory_highwater)(int);
sqlite3_int64 (*memory_used)(void);
sqlite3_mutex *(*mutex_alloc)(int);
void (*mutex_enter)(sqlite3_mutex*);
void (*mutex_free)(sqlite3_mutex*);
void (*mutex_leave)(sqlite3_mutex*);
int (*mutex_try)(sqlite3_mutex*);
int (*open_v2)(const char*,sqlite3**,int,const char*);
int (*release_memory)(int);
void (*result_error_nomem)(sqlite3_context*);
void (*result_error_toobig)(sqlite3_context*);
int (*sleep)(int);
void (*soft_heap_limit)(int);
sqlite3_vfs *(*vfs_find)(const char*);
int (*vfs_register)(sqlite3_vfs*,int);
int (*vfs_unregister)(sqlite3_vfs*);
int (*xthreadsafe)(void);
void (*result_zeroblob)(sqlite3_context*,int);
void (*result_error_code)(sqlite3_context*,int);
int (*test_control)(int, ...);
void (*randomness)(int,void*);
sqlite3 *(*context_db_handle)(sqlite3_context*);
int (*extended_result_codes)(sqlite3*,int);
int (*limit)(sqlite3*,int,int);
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
const char *(*sql)(sqlite3_stmt*);
int (*status)(int,int*,int*,int);
};
/*
** The following macros redefine the API routines so that they are
** redirected throught the global sqlite3_api structure.
**
** This header file is also used by the loadext.c source file
** (part of the main SQLite library - not an extension) so that
** it can get access to the sqlite3_api_routines structure
** definition. But the main library does not want to redefine
** the API. So the redefinition macros are only valid if the
** SQLITE_CORE macros is undefined.
*/
#ifndef SQLITE_CORE
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
#endif
#define sqlite3_bind_blob sqlite3_api->bind_blob
#define sqlite3_bind_double sqlite3_api->bind_double
#define sqlite3_bind_int sqlite3_api->bind_int
#define sqlite3_bind_int64 sqlite3_api->bind_int64
#define sqlite3_bind_null sqlite3_api->bind_null
#define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
#define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
#define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
#define sqlite3_bind_text sqlite3_api->bind_text
#define sqlite3_bind_text16 sqlite3_api->bind_text16
#define sqlite3_bind_value sqlite3_api->bind_value
#define sqlite3_busy_handler sqlite3_api->busy_handler
#define sqlite3_busy_timeout sqlite3_api->busy_timeout
#define sqlite3_changes sqlite3_api->changes
#define sqlite3_close sqlite3_api->close
#define sqlite3_collation_needed sqlite3_api->collation_needed
#define sqlite3_collation_needed16 sqlite3_api->collation_needed16
#define sqlite3_column_blob sqlite3_api->column_blob
#define sqlite3_column_bytes sqlite3_api->column_bytes
#define sqlite3_column_bytes16 sqlite3_api->column_bytes16
#define sqlite3_column_count sqlite3_api->column_count
#define sqlite3_column_database_name sqlite3_api->column_database_name
#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
#define sqlite3_column_decltype sqlite3_api->column_decltype
#define sqlite3_column_decltype16 sqlite3_api->column_decltype16
#define sqlite3_column_double sqlite3_api->column_double
#define sqlite3_column_int sqlite3_api->column_int
#define sqlite3_column_int64 sqlite3_api->column_int64
#define sqlite3_column_name sqlite3_api->column_name
#define sqlite3_column_name16 sqlite3_api->column_name16
#define sqlite3_column_origin_name sqlite3_api->column_origin_name
#define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16
#define sqlite3_column_table_name sqlite3_api->column_table_name
#define sqlite3_column_table_name16 sqlite3_api->column_table_name16
#define sqlite3_column_text sqlite3_api->column_text
#define sqlite3_column_text16 sqlite3_api->column_text16
#define sqlite3_column_type sqlite3_api->column_type
#define sqlite3_column_value sqlite3_api->column_value
#define sqlite3_commit_hook sqlite3_api->commit_hook
#define sqlite3_complete sqlite3_api->complete
#define sqlite3_complete16 sqlite3_api->complete16
#define sqlite3_create_collation sqlite3_api->create_collation
#define sqlite3_create_collation16 sqlite3_api->create_collation16
#define sqlite3_create_function sqlite3_api->create_function
#define sqlite3_create_function16 sqlite3_api->create_function16
#define sqlite3_create_module sqlite3_api->create_module
#define sqlite3_create_module_v2 sqlite3_api->create_module_v2
#define sqlite3_data_count sqlite3_api->data_count
#define sqlite3_db_handle sqlite3_api->db_handle
#define sqlite3_declare_vtab sqlite3_api->declare_vtab
#define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
#define sqlite3_errcode sqlite3_api->errcode
#define sqlite3_errmsg sqlite3_api->errmsg
#define sqlite3_errmsg16 sqlite3_api->errmsg16
#define sqlite3_exec sqlite3_api->exec
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_expired sqlite3_api->expired
#endif
#define sqlite3_finalize sqlite3_api->finalize
#define sqlite3_free sqlite3_api->free
#define sqlite3_free_table sqlite3_api->free_table
#define sqlite3_get_autocommit sqlite3_api->get_autocommit
#define sqlite3_get_auxdata sqlite3_api->get_auxdata
#define sqlite3_get_table sqlite3_api->get_table
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_global_recover sqlite3_api->global_recover
#endif
#define sqlite3_interrupt sqlite3_api->interruptx
#define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
#define sqlite3_libversion sqlite3_api->libversion
#define sqlite3_libversion_number sqlite3_api->libversion_number
#define sqlite3_malloc sqlite3_api->malloc
#define sqlite3_mprintf sqlite3_api->mprintf
#define sqlite3_open sqlite3_api->open
#define sqlite3_open16 sqlite3_api->open16
#define sqlite3_prepare sqlite3_api->prepare
#define sqlite3_prepare16 sqlite3_api->prepare16
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
#define sqlite3_profile sqlite3_api->profile
#define sqlite3_progress_handler sqlite3_api->progress_handler
#define sqlite3_realloc sqlite3_api->realloc
#define sqlite3_reset sqlite3_api->reset
#define sqlite3_result_blob sqlite3_api->result_blob
#define sqlite3_result_double sqlite3_api->result_double
#define sqlite3_result_error sqlite3_api->result_error
#define sqlite3_result_error16 sqlite3_api->result_error16
#define sqlite3_result_int sqlite3_api->result_int
#define sqlite3_result_int64 sqlite3_api->result_int64
#define sqlite3_result_null sqlite3_api->result_null
#define sqlite3_result_text sqlite3_api->result_text
#define sqlite3_result_text16 sqlite3_api->result_text16
#define sqlite3_result_text16be sqlite3_api->result_text16be
#define sqlite3_result_text16le sqlite3_api->result_text16le
#define sqlite3_result_value sqlite3_api->result_value
#define sqlite3_rollback_hook sqlite3_api->rollback_hook
#define sqlite3_set_authorizer sqlite3_api->set_authorizer
#define sqlite3_set_auxdata sqlite3_api->set_auxdata
#define sqlite3_snprintf sqlite3_api->snprintf
#define sqlite3_step sqlite3_api->step
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
#define sqlite3_total_changes sqlite3_api->total_changes
#define sqlite3_trace sqlite3_api->trace
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
#endif
#define sqlite3_update_hook sqlite3_api->update_hook
#define sqlite3_user_data sqlite3_api->user_data
#define sqlite3_value_blob sqlite3_api->value_blob
#define sqlite3_value_bytes sqlite3_api->value_bytes
#define sqlite3_value_bytes16 sqlite3_api->value_bytes16
#define sqlite3_value_double sqlite3_api->value_double
#define sqlite3_value_int sqlite3_api->value_int
#define sqlite3_value_int64 sqlite3_api->value_int64
#define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
#define sqlite3_value_text sqlite3_api->value_text
#define sqlite3_value_text16 sqlite3_api->value_text16
#define sqlite3_value_text16be sqlite3_api->value_text16be
#define sqlite3_value_text16le sqlite3_api->value_text16le
#define sqlite3_value_type sqlite3_api->value_type
#define sqlite3_vmprintf sqlite3_api->vmprintf
#define sqlite3_overload_function sqlite3_api->overload_function
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
#define sqlite3_clear_bindings sqlite3_api->clear_bindings
#define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob
#define sqlite3_blob_bytes sqlite3_api->blob_bytes
#define sqlite3_blob_close sqlite3_api->blob_close
#define sqlite3_blob_open sqlite3_api->blob_open
#define sqlite3_blob_read sqlite3_api->blob_read
#define sqlite3_blob_write sqlite3_api->blob_write
#define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2
#define sqlite3_file_control sqlite3_api->file_control
#define sqlite3_memory_highwater sqlite3_api->memory_highwater
#define sqlite3_memory_used sqlite3_api->memory_used
#define sqlite3_mutex_alloc sqlite3_api->mutex_alloc
#define sqlite3_mutex_enter sqlite3_api->mutex_enter
#define sqlite3_mutex_free sqlite3_api->mutex_free
#define sqlite3_mutex_leave sqlite3_api->mutex_leave
#define sqlite3_mutex_try sqlite3_api->mutex_try
#define sqlite3_open_v2 sqlite3_api->open_v2
#define sqlite3_release_memory sqlite3_api->release_memory
#define sqlite3_result_error_nomem sqlite3_api->result_error_nomem
#define sqlite3_result_error_toobig sqlite3_api->result_error_toobig
#define sqlite3_sleep sqlite3_api->sleep
#define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit
#define sqlite3_vfs_find sqlite3_api->vfs_find
#define sqlite3_vfs_register sqlite3_api->vfs_register
#define sqlite3_vfs_unregister sqlite3_api->vfs_unregister
#define sqlite3_threadsafe sqlite3_api->xthreadsafe
#define sqlite3_result_zeroblob sqlite3_api->result_zeroblob
#define sqlite3_result_error_code sqlite3_api->result_error_code
#define sqlite3_test_control sqlite3_api->test_control
#define sqlite3_randomness sqlite3_api->randomness
#define sqlite3_context_db_handle sqlite3_api->context_db_handle
#define sqlite3_extended_result_codes sqlite3_api->extended_result_codes
#define sqlite3_limit sqlite3_api->limit
#define sqlite3_next_stmt sqlite3_api->next_stmt
#define sqlite3_sql sqlite3_api->sql
#define sqlite3_status sqlite3_api->status
#endif /* SQLITE_CORE */
#define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;
#define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v;
#endif /* _SQLite3EXT_H_ */