本文整理汇总了C++中OUT_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ OUT_DEBUG函数的具体用法?C++ OUT_DEBUG怎么用?C++ OUT_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OUT_DEBUG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OUT_DEBUG
void H86Project::Add_VDevList(vector<pair<string, string> >& vdevList){
try{
xml_node<>* node=m_doc->first_node("Hard86Project");
if(!node){
OUT_DEBUG("RapidXML failed to locate node");
return;
}
xml_node<>* test=node->first_node("VDevs");
if(!test){
node->append_node(m_doc->allocate_node(node_element, "VDevs"));
node=node->last_node();
}
else{
node=test;
}
for(vector<pair<string, string> >::iterator it=vdevList.begin();
it!=vdevList.end();
++it){
node->append_node(m_doc->allocate_node(node_element, "VDev"));
xml_node<> *appendedNode=node->last_node();
appendedNode->append_attribute(m_doc->allocate_attribute("name", m_doc->allocate_string(it->first.c_str())));
appendedNode->append_attribute(m_doc->allocate_attribute("path", m_doc->allocate_string(it->second.c_str())));
}
}
catch(rapidxml::parse_error e){
OUT_DEBUG("RapidXML parse error encountered");
return;
}
}
开发者ID:zsteve,项目名称:hard86,代码行数:31,代码来源:h86project.cpp
示例2: ASSERT
bool CCollideInterface::ActivateTile(uint32 mapId, uint32 tileX, uint32 tileY)
{
ASSERT(m_mapLocks[mapId] != NULL);
if( !CollisionMgr )
return false;
// acquire write lock
m_mapLocks[mapId]->m_lock.AcquireWriteLock();
if( m_mapLocks[mapId]->m_tileLoadCount[tileX][tileY] == 0 )
{
if(CollisionMgr->loadMap(sWorld.vMapPath.c_str(), mapId, tileX, tileY))
OUT_DEBUG("Loading VMap [%u/%u] successful", tileX, tileY);
else
{
OUT_DEBUG("Loading VMap [%u/%u] unsuccessful", tileX, tileY);
m_mapLocks[mapId]->m_lock.ReleaseWriteLock();
return false;
}
}
// increment count
m_mapLocks[mapId]->m_tileLoadCount[tileX][tileY]++;
// release lock
m_mapLocks[mapId]->m_lock.ReleaseWriteLock();
return true;
}
开发者ID:Refuge89,项目名称:Hearthstone,代码行数:27,代码来源:CollideInterface.cpp
示例3: DEBUG_LOG
void WorldSession::HandleQuestgiverHelloOpcode( WorldPacket & recv_data )
{
DEBUG_LOG( "WORLD"," Received CMSG_QUESTGIVER_HELLO." );
CHECK_INWORLD_RETURN;
uint64 guid;
recv_data >> guid;
Creature* qst_giver = _player->GetMapMgr()->GetCreature(GET_LOWGUID_PART(guid));
if (!qst_giver)
{
OUT_DEBUG("WORLD: Invalid questgiver GUID.");
return;
}
if (!qst_giver->isQuestGiver())
{
OUT_DEBUG("WORLD: Creature is not a questgiver.");
return;
}
if(qst_giver->GetAIInterface()) // NPC Stops moving for 3 minutes
qst_giver->GetAIInterface()->StopMovement(180000);
//qst_giver->Emote(EMOTE_ONESHOT_TALK); // this doesnt work
sQuestMgr.OnActivateQuestGiver(qst_giver, GetPlayer());
}
开发者ID:SkyFire,项目名称:sandshroud,代码行数:28,代码来源:QuestHandler.cpp
示例4: OUT_DEBUG
bool AddonMgr::IsAddonBanned(std::string name, uint32 crc)
{
std::map<std::string,AddonEntry*>::iterator i = KnownAddons.find(name);
if(i != KnownAddons.end())
{
if(i->second->banned)
{
OUT_DEBUG("Addon %s is banned.", name.c_str());
return true;
}
}
else
{
// New addon. It'll be saved to db at server shutdown.
AddonEntry *ent = new AddonEntry;
ent->name = name;
ent->crc = crc;
ent->banned = false; // by default.. we can change this I guess..
ent->isNew = true;
ent->showinlist = (crc == 0x4C1C776D ? false : true);
OUT_DEBUG("Discovered new addon %s sent by client.", name.c_str());
KnownAddons[ent->name] = ent;
}
return false;
}
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:28,代码来源:AddonMgr.cpp
示例5: vdevList
vector<pair<string, string> > H86Project::Get_VDevList(){
vector<pair<string, string> > vdevList(0);
try{
xml_node<>* node=m_doc->first_node("Hard86Project");
if(!node){
OUT_DEBUG("RapidXML failed to locate node");
return vector<pair<string, string> >(0);
}
node=node->first_node("VDevs");
if(!node){
OUT_DEBUG("RapidXML failed to locate node");
return vector<pair<string, string> >(0);
}
node=node->first_node();
while(node){
xml_attribute<> *name, *path;
name=node->first_attribute("name");
path=node->first_attribute("path");
vdevList.push_back(make_pair(string(name->value()), string(path->value())));
node=node->next_sibling();
}
return vdevList;
}
catch(rapidxml::parse_error e){
OUT_DEBUG("RapidXML parse error encountered");
return vector<pair<string, string> >(0);
}
}
开发者ID:zsteve,项目名称:hard86,代码行数:30,代码来源:h86project.cpp
示例6: bpList
vector<pair<uint16, uint16> > H86Project::Get_BPList(){
vector<pair<uint16, uint16> > bpList(0);
try{
xml_node<>* node=m_doc->first_node("Hard86Project");
if(!node){
OUT_DEBUG("RapidXML failed to locate node");
return vector<pair<uint16, uint16> >(0);
}
node=node->first_node("BPList");
if(!node){
OUT_DEBUG("RapidXML failed to locate node");
return vector<pair<uint16, uint16> >(0);
}
node=node->first_node();
while(node){
xml_attribute<> *name, *path;
name=node->first_attribute("seg");
path=node->first_attribute("addr");
bpList.push_back(make_pair((uint16)strtol(name->value(), NULL, 16), (uint16)strtol(path->value(), NULL, 16)));
node=node->next_sibling();
}
return bpList;
}
catch(rapidxml::parse_error e){
OUT_DEBUG("RapidXML parse error encountered");
return vector<pair<uint16, uint16> >(0);
}
}
开发者ID:zsteve,项目名称:hard86,代码行数:30,代码来源:h86project.cpp
示例7: CallBack_TextStatusReport
void CallBack_TextStatusReport(u8 fo,u8 msg_ref, u8* phone_num, QlSysTimer* scts, QlSysTimer* dt, u8 st)
{
OUT_DEBUG(debug_buffer,"\r\nCB_TextStatusReport: fo=%d,msg_ref=%d,phone_num=%s,st=%d\r\n",
fo,msg_ref,phone_num,st);
OUT_DEBUG(debug_buffer,"scts=20%d-%d-%d %d:%d:%d\r\n",
scts->year,scts->month,scts->day,scts->hour,scts->minute,scts->second);
OUT_DEBUG(debug_buffer,"dt=20%d-%d-%d %d:%d:%d\r\n",
scts->year,scts->month,scts->day,scts->hour,scts->minute,scts->second);
}
开发者ID:handledeck,项目名称:OpenCPU_GS2_SDK_V2.3,代码行数:9,代码来源:example_sms.c
示例8: CallBack_getipbyname
void CallBack_getipbyname(u8 contexid, bool result, s32 error, u8 num_entry, u8 *entry_address)
{
u8 i;
OUT_DEBUG(textBuf,"CallBack_getipbyname(contexid=%d, result=%d,error=%d,num_entry=%d)\r\n",contexid, result,error,num_entry);
for(i=0;i<num_entry;i++)
{
entry_address += (i*4);
OUT_DEBUG(textBuf,"entry=%d, ip=%d.%d.%d.%d\r\n",i,entry_address[0],entry_address[1],entry_address[2],entry_address[3]);
}
}
开发者ID:handledeck,项目名称:OpenCPU_GS2_SDK_V2.3,代码行数:10,代码来源:example_tcpip.c
示例9: CallBack_network_actived
void CallBack_network_actived(u8 contexid)
{
s8 ret;
u8 ip_addr[4];
OUT_DEBUG(textBuf,"CallBack_network_actived(contexid=%d)\r\n",contexid);
ret = Ql_GetLocalIpAddress(contexid, ip_addr);
OUT_DEBUG(textBuf,"Ql_GetLocalIpAddress(contexid=%d)=%d, ip=%d.%d.%d.%d\r\n",contexid, ret,ip_addr[0],ip_addr[1],ip_addr[2],ip_addr[3]);
}
开发者ID:handledeck,项目名称:OpenCPU_GS2_SDK_V2.3,代码行数:10,代码来源:example_tcpip.c
示例10: FATAL_ERROR
/**
* @author Petr Djakow
*/
void Utils::signalIgnore(const int signum)
{
#ifdef _GNU_SOURCE
if(sigignore(signum) == -1)
FATAL_ERROR(("sigignore(%d)", signum));
OUT_DEBUG(("Signal '%s' will be ignored", strsignal(signum)));
#else
set_signal_handler(signum, SIG_IGN);
OUT_DEBUG(("Signal '%d' will be ignored", signum));
#endif
}
开发者ID:azevedo-252,项目名称:msc-thesis,代码行数:14,代码来源:amautils.cpp
示例11: data
void LogonCommClientSocket::CompressAndSend(ByteBuffer & uncompressed)
{
// I still got no idea where this came from :p
size_t destsize = uncompressed.size() + uncompressed.size()/10 + 16;
// w000t w000t kat000t for gzipped packets
WorldPacket data(RCMSG_ACCOUNT_CHARACTER_MAPPING_REPLY, destsize + 4);
data.resize(destsize + 4);
z_stream stream;
stream.zalloc = 0;
stream.zfree = 0;
stream.opaque = 0;
if(deflateInit(&stream, 1) != Z_OK)
{
OUT_DEBUG("deflateInit failed.");
return;
}
// set up stream pointers
stream.next_out = (Bytef*)((uint8*)data.contents())+4;
stream.avail_out = (uInt)destsize;
stream.next_in = (Bytef*)uncompressed.contents();
stream.avail_in = (uInt)uncompressed.size();
// call the actual process
if(deflate(&stream, Z_NO_FLUSH) != Z_OK ||
stream.avail_in != 0)
{
OUT_DEBUG("deflate failed.");
return;
}
// finish the deflate
if(deflate(&stream, Z_FINISH) != Z_STREAM_END)
{
OUT_DEBUG("deflate failed: did not end stream");
return;
}
// finish up
if(deflateEnd(&stream) != Z_OK)
{
OUT_DEBUG("deflateEnd failed.");
return;
}
*(uint32*)data.contents() = (uint32)uncompressed.size();
data.resize(stream.total_out + 4);
SendPacket(&data);
}
开发者ID:h4s0n,项目名称:Sandshroud,代码行数:52,代码来源:LogonCommClient.cpp
示例12: EndFishing
void GameObject::UseFishingNode(Player* player)
{
sEventMgr.RemoveEvents( this );
if( GetUInt32Value( GAMEOBJECT_FLAGS ) != 32 ) // Clicking on the bobber before something is hooked
{
player->GetSession()->OutPacket( SMSG_FISH_NOT_HOOKED );
EndFishing( player, true );
return;
}
FishingZoneEntry *entry = NULL;
uint32 zone = player->GetAreaID();
if(zone != 0)
{
entry = FishingZoneStorage.LookupEntry( zone );
if( entry == NULL ) // No fishing information found for area, log an error
{
OUT_DEBUG( "ERROR: Fishing area information for area %d not found!", zone );
}
}
if(zone == 0 || entry == NULL)
{
zone = player->GetZoneId();
entry = FishingZoneStorage.LookupEntry( zone );
if( entry == NULL ) // No fishing information found for area, log an error
{
OUT_DEBUG( "ERROR: Fishing zone information for zone %d not found!", zone );
EndFishing( player, true );
return;
}
}
uint32 maxskill = entry->MaxSkill;
uint32 minskill = entry->MinSkill;
if( player->_GetSkillLineCurrent( SKILL_FISHING, false ) < maxskill )
player->_AdvanceSkillLine( SKILL_FISHING, float2int32( 1.0f * sWorld.getRate( RATE_SKILLRATE ) ) );
// Open loot on success, otherwise FISH_ESCAPED.
if( Rand(((player->_GetSkillLineCurrent( SKILL_FISHING, true ) - minskill) * 100) / maxskill) )
{
lootmgr.FillFishingLoot( &m_loot, zone );
player->SendLoot( GetGUID(), LOOT_FISHING );
EndFishing( player, false );
}
else // Failed
{
player->GetSession()->OutPacket( SMSG_FISH_ESCAPED );
EndFishing( player, true );
}
}
开发者ID:arcticdev,项目名称:arctic-test,代码行数:52,代码来源:GameObject.cpp
示例13: CallBack_socket_write
void CallBack_socket_write(u8 contexid, s8 sock, bool result, s32 error)
{
s32 ret;
s32 i;
OUT_DEBUG(textBuf,"CallBack_socket_write(contexid=%d,sock=%d,result=%d,error=%d)\r\n",contexid,sock,result,error);
//now , here , you can continue use Ql_SocketSend to send data
for(i=0;i<2;i++)
{
if(socketonly[i] == sock)
{
break;
}
}
if(i>=2)
{
OUT_DEBUG(textBuf,"unknown socket\r\n");
return;
}
while(send_dataLen[i] > 0)
{
ret = Ql_SocketSend(sock, data_p + send_dataLen[i] ,dataLen[i] - send_dataLen[i]);
OUT_DEBUG(textBuf,"Ql_SocketSend(socket=%d,dataLen=%d)=%d\r\n",socketonly[i],dataLen[i],ret);
if(ret == (dataLen[i] - send_dataLen[i]))
{
//send compelete
send_dataLen[i] = 0;
break;
}
else if((ret < 0) && (ret == -2))
{
//you must wait next CallBack_socket_write, then send data;
break;
}
else if(ret < 0)
{
//error , Ql_SocketClose
Ql_SocketClose(sock); //you can close this socket
socketonly[i] = 0xFF;
send_dataLen[i] = 0;
break;
}
else if(ret <= dataLen[i])
{
send_dataLen[i] += ret;
//continue send
}
}
}
开发者ID:handledeck,项目名称:OpenCPU_GS2_SDK_V2.3,代码行数:52,代码来源:example_tcpip.c
示例14: CallBack_PDUStatusReport
void CallBack_PDUStatusReport(u16 length, u8* pdu_string)
{
OUT_DEBUG(debug_buffer,"\r\nCB_PDUStatusReport: length=%d\r\n",length);
if(length)
{
int i;
for(i=0;i<length;i++)
{
OUT_DEBUG(debug_buffer,"%02X",pdu_string[i]);
}
OUT_DEBUG(debug_buffer,"\r\n");
}
}
开发者ID:handledeck,项目名称:OpenCPU_GS2_SDK_V2.3,代码行数:13,代码来源:example_sms.c
示例15: OUT_DEBUG
bool Master::_StartDB()
{
string hostname, username, password, database;
int port = 0;
// Configure Main Database
bool result = Config.ClusterConfig.GetString( "WorldDatabase", "Username", &username );
Config.ClusterConfig.GetString( "WorldDatabase", "Password", &password );
result = !result ? result : Config.ClusterConfig.GetString( "WorldDatabase", "Hostname", &hostname );
result = !result ? result : Config.ClusterConfig.GetString( "WorldDatabase", "Name", &database );
result = !result ? result : Config.ClusterConfig.GetInt( "WorldDatabase", "Port", &port );
Database_World = Database::Create();
if(result == false)
{
OUT_DEBUG( "SQL: One or more parameters were missing from WorldDatabase directive." );
return false;
}
// Initialize it
if( !WorldDatabase.Initialize(hostname.c_str(), (unsigned int)port, username.c_str(),
password.c_str(), database.c_str(), Config.ClusterConfig.GetIntDefault( "WorldDatabase", "ConnectionCount", 5 ), 16384 ) )
{
OUT_DEBUG( "SQL: Main database initialization failed. Exiting." );
return false;
}
result = Config.ClusterConfig.GetString( "CharacterDatabase", "Username", &username );
Config.ClusterConfig.GetString( "CharacterDatabase", "Password", &password );
result = !result ? result : Config.ClusterConfig.GetString( "CharacterDatabase", "Hostname", &hostname );
result = !result ? result : Config.ClusterConfig.GetString( "CharacterDatabase", "Name", &database );
result = !result ? result : Config.ClusterConfig.GetInt( "CharacterDatabase", "Port", &port );
Database_Character = Database::Create();
if(result == false)
{
OUT_DEBUG( "SQL: One or more parameters were missing from Database directive." );
return false;
}
// Initialize it
if( !CharacterDatabase.Initialize( hostname.c_str(), (unsigned int)port, username.c_str(),
password.c_str(), database.c_str(), Config.ClusterConfig.GetIntDefault( "CharacterDatabase", "ConnectionCount", 5 ), 16384 ) )
{
OUT_DEBUG( "sql: Main database initialization failed. Exiting." );
return false;
}
return true;
}
开发者ID:Bootz,项目名称:Ascent_NG,代码行数:50,代码来源:Master.cpp
示例16: CallBack_NewFlashPDUSMS
void CallBack_NewFlashPDUSMS(u16 length, u8* pdu_string)
{
OUT_DEBUG(debug_buffer,"\r\nCB_NewFlashPDUSMS: length=%d\r\n",length);
if(pdu_string)
{
int i;
for(i=0;i<length;i++)
{
OUT_DEBUG(debug_buffer,"%02X",pdu_string[i]);
}
OUT_DEBUG(debug_buffer,"\r\n");
}
}
开发者ID:handledeck,项目名称:OpenCPU_GS2_SDK_V2.3,代码行数:14,代码来源:example_sms.c
示例17: printf
void Vehicle::Load(CreatureProto * proto_, uint32 mode, float x, float y, float z, float o /* = 0.0f */)
{
proto = proto_;
if(!proto)
return;
if(proto->vehicle_entry != -1)
{
m_vehicleEntry = proto->vehicle_entry;
}
else
{
m_vehicleEntry = 124;
if(sLog.IsOutDevelopement())
printf("Attempted to create vehicle %u with invalid vehicle_entry, defaulting to 124, check your creature_proto table.\n", proto->Id);
else
OUT_DEBUG("Attempted to create vehicle %u with invalid vehicle_entry, defaulting to 124, check your creature_proto table.", proto->Id);
}
m_maxPassengers = 0;
m_seatSlotMax = 0;
VehicleEntry * ve = dbcVehicle.LookupEntry( m_vehicleEntry );
if(!ve)
{
if(sLog.IsOutDevelopement())
printf("Attempted to create non-existant vehicle %u.\n", GetVehicleEntry());
else
OUT_DEBUG("Attempted to create non-existant vehicle %u.", GetVehicleEntry());
return;
}
for( uint32 i = 0; i < 8; i++ )
{
if( ve->m_seatID[i] )
{
m_vehicleSeats[i] = dbcVehicleSeat.LookupEntry( ve->m_seatID[i] );
m_seatSlotMax = i+1;
if(m_vehicleSeats[i]->IsUsable())
{
seatisusable[i] = true;
++m_maxPassengers;
}
}
}
Initialised = true;
Creature::Load(proto_, mode, x, y, z, o);
}
开发者ID:SkyFire,项目名称:sandshroud,代码行数:50,代码来源:Vehicle.cpp
示例18: data
void WorldSession::HandleQuestgiverCancelOpcode(WorldPacket& recvPacket)
{
WorldPacket data(SMSG_GOSSIP_COMPLETE, 0);
SendPacket(&data);
OUT_DEBUG("WORLD: Sent SMSG_GOSSIP_COMPLETE");
}
开发者ID:Bootz,项目名称:arcticdev,代码行数:7,代码来源:QuestHandler.cpp
示例19: getMSTime
void WorldSocket::_HandleAuthSession(WorldPacket* recvPacket)
{
std::string account;
uint32 unk2, unk3;
_latency = getMSTime() - _latency;
try
{
*recvPacket >> mClientBuild;
*recvPacket >> unk2;
*recvPacket >> account;
*recvPacket >> unk3;
*recvPacket >> mClientSeed;
}
catch(ByteBuffer::error &)
{
OUT_DEBUG("Incomplete copy of AUTH_SESSION Received.");
return;
}
// Send out a request for this account.
mRequestID = sLogonCommHandler.ClientConnected(account, this);
if(mRequestID == 0xFFFFFFFF)
{
Disconnect();
return;
}
// shitty hash !
m_fullAccountName = new string( account );
// Set the authentication packet
pAuthenticationPacket = recvPacket;
}
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:35,代码来源:WorldSocket.cpp
示例20: CallBack_network_deactived
void CallBack_network_deactived(u8 contexid, s32 error_cause, s32 error)
{
OUT_DEBUG(textBuf,"CallBack_network_deactived(contexid=%d,error_cause=%d, error=%d)\r\n",contexid,error_cause,error);
if(socketonly[0] >= 0)
{
Ql_SocketClose(socketonly[0]);
socketonly[0] = 0xFF;
send_dataLen[0] = 0;
}
if(socketonly[1] >= 0)
{
Ql_SocketClose(socketonly[1]);
socketonly[1] = 0xFF;
send_dataLen[1] = 0;
}
if(udponly[0] >= 0)
{
Ql_SocketClose(udponly[0]);
udponly[0] = 0xFF;
send_dataLen[0] = 0;
}
if(udponly[1] >= 0)
{
Ql_SocketClose(udponly[1]);
udponly[1] = 0xFF;
send_dataLen[1] = 0;
}
}
开发者ID:handledeck,项目名称:OpenCPU_GS2_SDK_V2.3,代码行数:30,代码来源:example_tcpip.c
注:本文中的OUT_DEBUG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论