?? cdatapacket.cpp
字號:
/*******************************************************************
* Advanced 3D Game Programming using DirectX 9.0
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* copyright (c) 2003 by Peter A Walsh and Adrian Perez
* See license.txt for modification and distribution information
******************************************************************/
// cDataPacket.cpp: implementation of the cDataPacket class.
//
//////////////////////////////////////////////////////////////////////
#include "cDataPacket.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cDataPacket::cDataPacket()
{
d_timesSent = 1;
}
cDataPacket::~cDataPacket()
{
}
void cDataPacket::Init( DWORD time, DWORD id, unsigned short len, char *pData )
{
d_firstTime = time;
d_lastTime = time;
d_id = id;
d_length = len;
memcpy( d_data, pData, len );
}
cDataPacket &cDataPacket::operator=( const cDataPacket &otherPacket )
{
d_timesSent = otherPacket.d_timesSent;
d_firstTime = otherPacket.d_firstTime;
d_lastTime = otherPacket.d_lastTime;
d_id = otherPacket.d_id;
d_length = otherPacket.d_length;
memcpy( d_data, otherPacket.d_data, d_length );
return *this;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -