您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ u32函数代码示例

51自学网 2021-06-03 09:02:53
  C++
这篇教程C++ u32函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中u32函数的典型用法代码示例。如果您正苦于以下问题:C++ u32函数的具体用法?C++ u32怎么用?C++ u32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了u32函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: xr_delete

void	CCharacterPhysicsSupport::	destroy_animation_collision		( ){ 	xr_delete( m_physics_shell_animated );	m_physics_shell_animated_time_destroy = u32(-1);}
开发者ID:2asoft,项目名称:xray,代码行数:5,


示例2: u32

 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ void CSReporter::testCaseEnded(const Catch::TestCaseStats& in_testCaseStats) noexcept {     StreamingReporterBase::testCaseEnded(in_testCaseStats);          if (m_currentFailedSections.empty() == false)     {         m_currentFailedTestCases.push_back(FailedTestCase(in_testCaseStats.testInfo.name, m_sectionsPerTestCaseCount, u32(in_testCaseStats.totals.assertions.total()), m_currentFailedSections));         m_currentFailedSections.clear();         m_sectionsPerTestCaseCount = 0;     } }
开发者ID:ChilliWorks,项目名称:CSTest,代码行数:13,


示例3: new_from_zip

  // return new out_buf else error text  std::string new_from_zip(const uint8_t* const in_buf,                           const size_t in_size,                           const size_t in_offset,                           uint8_t** out_buf,                           size_t* out_size) {    // pointer to the output buffer that will be created using new    *out_buf = NULL;    *out_size = 0;    // validate the buffer range    if (in_size < in_offset + 30) {      // nothing to do      return "zip region too small";    }    const uint8_t* const b = in_buf + in_offset;    const uint32_t compr_size=u32(b+18);    const uint32_t uncompr_size=u32(b+22);    const uint16_t name_len=u16(b+26);    const uint16_t extra_field_len=u16(b+28);    // validate name length    if (name_len == 0 || name_len > zip_name_len_max) {      return "invalid zip metadata";    }    // calculate offset to compressed data    uint32_t compressed_offset = in_offset + 30 + name_len + extra_field_len;    // offset must be inside the buffer    if (compressed_offset >= in_size) {      return "zip read request outside data range";    }    // size of compressed data    const uint32_t compressed_size = (compr_size == 0 ||               compressed_offset + compr_size > in_size)                           ? in_size - compressed_offset : compr_size;    // size of uncompressed data    const uint32_t potential_uncompressed_size =               (compr_size == 0 || compr_size > uncompressed_size_max)                                  ? uncompressed_size_max : uncompr_size;        // skip if uncompressed size is too small    if (potential_uncompressed_size < uncompressed_size_min) {      return "zip uncompress size too small";    }    // create the uncompressed buffer    *out_buf = new (std::nothrow) uint8_t[potential_uncompressed_size]();    if (*out_buf == NULL) {      // comment that the buffer acquisition request failed      hashdb::tprint(std::cout, "# bad memory allocation in zip uncompression");      return "bad memory allocation in zip uncompression";    }    // set up zlib data    z_stream zs;    memset(&zs, 0, sizeof(zs));    zs.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(                                         in_buf + compressed_offset));    zs.avail_in = compressed_size;    zs.next_out = *out_buf;    zs.avail_out = potential_uncompressed_size;    // initialize zlib for this decompression    int r = inflateInit2(&zs, -15);    if (r == 0) {      // inflate      inflate(&zs, Z_SYNC_FLUSH);      // set out_size      *out_size = zs.total_out;      // close zlib      inflateEnd(&zs);      return "";    } else {      // inflate failed      delete[] *out_buf;      *out_buf = NULL;      return "zip zlib inflate failed";    }  }
开发者ID:NPS-DEEP,项目名称:hashdb,代码行数:91,


示例4: GetGameDayTimeMS

u32 CLevel::GetGameDayTimeMS(){	return	(u32(s64(GetGameTime() % (24*60*60*1000))));}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:4,


示例5: sizeof

void	CKinematics::Load(const char* N, IReader *data, u32 dwFlags){	//Msg				("skeleton: %s",N);	inherited::Load	(N, data, dwFlags);    pUserData		= NULL;    m_lod			= NULL;    // loading lods	IReader* LD 	= data->open_chunk(OGF_S_LODS);    if (LD)	{        string_path		short_name;        strcpy_s		(short_name,sizeof(short_name),N);        if (strext(short_name)) *strext(short_name)=0;        // From stream		{			string_path		lod_name;			LD->r_string	(lod_name, sizeof(lod_name));//.         strconcat		(sizeof(name_load),name_load, short_name, ":lod:", lod_name.c_str());            m_lod 			= (dxRender_Visual*) ::Render->model_CreateChild(lod_name, NULL);			if ( CKinematics* lod_kinematics = dynamic_cast<CKinematics*>(m_lod) )			{				lod_kinematics->m_is_original_lod = true;			}            VERIFY3(m_lod,"Cant create LOD model for", N);//.			VERIFY2			(m_lod->Type==MT_HIERRARHY || m_lod->Type==MT_PROGRESSIVE || m_lod->Type==MT_NORMAL,lod_name.c_str());/*			strconcat		(name_load, short_name, ":lod:1");            m_lod 			= ::Render->model_CreateChild(name_load,LD);			VERIFY			(m_lod->Type==MT_SKELETON_GEOMDEF_PM || m_lod->Type==MT_SKELETON_GEOMDEF_ST);*/        }        LD->close	();    }#ifndef _EDITOR    	// User data	IReader* UD 	= data->open_chunk(OGF_S_USERDATA);    pUserData		= UD?new CInifile(UD,FS.get_path("$game_config$")->m_Path):0;    if (UD)			UD->close();#endif	// Globals	bone_map_N		= new accel();	bone_map_P		= new accel();	bones			= new vecBones();	bone_instances	= NULL;	// Load bones#pragma todo("container is created in stack!")	xr_vector<shared_str>	L_parents;	R_ASSERT		(data->find_chunk(OGF_S_BONE_NAMES));    visimask.zero	();	int dwCount 	= data->r_u32();	// Msg				("! %d bones",dwCount);	// if (dwCount >= 64)	Msg			("! More than 64 bones is a crazy thing! (%d), %s",dwCount,N);	VERIFY3			(dwCount < 64, "More than 64 bones is a crazy thing!",N);	for (; dwCount; dwCount--)		{		string256	buf;		// Bone		u16			ID				= u16(bones->size());		data->r_stringZ				(buf,sizeof(buf));	strlwr(buf);		CBoneData* pBone 			= CreateBoneData(ID);		pBone->name					= shared_str(buf);		pBone->child_faces.resize	(children.size());		bones->push_back			(pBone);		bone_map_N->push_back		(mk_pair(pBone->name,ID));		bone_map_P->push_back		(mk_pair(pBone->name,ID));		// It's parent		data->r_stringZ				(buf,sizeof(buf));	strlwr(buf);		L_parents.push_back			(buf);		data->r						(&pBone->obb,sizeof(Fobb));        visimask.set				(u64(1)<<ID,TRUE);	}	std::sort	(bone_map_N->begin(),bone_map_N->end(),pred_sort_N);	std::sort	(bone_map_P->begin(),bone_map_P->end(),pred_sort_P);	// Attach bones to their parents	iRoot = BI_NONE;	for (u32 i=0; i<bones->size(); i++) {		shared_str	P 		= L_parents[i];		CBoneData* B	= (*bones)[i];		if (!P||!P[0]) {			// no parent - this is root bone			R_ASSERT	(BI_NONE==iRoot);			iRoot		= u16(i);			B->SetParentID(BI_NONE);			continue;		} else {			u16 ID		= LL_BoneID(P);			R_ASSERT	(ID!=BI_NONE);//.........这里部分代码省略.........
开发者ID:2asoft,项目名称:xray,代码行数:101,


示例6: r_string

u32 CInifileEx::r_u32(LPCSTR S, LPCSTR L){	LPCSTR		C = r_string(S,L);	return		u32(atoi(C));}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:5,


示例7: i32

	int i32(expr* e) {        return static_cast<int>(u32(e));    }
开发者ID:Moondee,项目名称:Artemis,代码行数:3,


示例8: DBG

//.........这里部分代码省略.........				case eStateAttack_Run:							sprintf(st,"Attack :: Run");				break;		case eStateAttack_Melee:						sprintf(st,"Attack :: Melee");				break;		case eStateAttack_RunAttack:					sprintf(st,"Attack :: Run Attack");			break;		case eStateAttack_RunAway:						sprintf(st,"Attack :: Run Away");			break;		case eStateAttack_FindEnemy:					sprintf(st,"Attack :: Find Enemy");			break;		case eStateAttack_Steal:						sprintf(st,"Attack :: Steal");				break;		case eStateAttack_AttackHidden:					sprintf(st,"Attack :: Attack Hidden");		break;				case eStateAttackCamp_Hide:						sprintf(st,"Attack Camp:: Hide");			break;		case eStateAttackCamp_Camp:						sprintf(st,"Attack Camp:: Camp");			break;		case eStateAttackCamp_StealOut:					sprintf(st,"Attack Camp:: Steal Out");		break;		case eStateAttack_HideInCover:					sprintf(st,"Attack :: Hide In Cover");		break;		case eStateAttack_MoveOut:						sprintf(st,"Attack :: Move Out From Cover");break;		case eStateAttack_CampInCover:					sprintf(st,"Attack :: Camp In Cover");		break;		case eStateAttack_Psy:							sprintf(st,"Attack :: Psy");				break;		case eStateAttack_MoveToHomePoint:				sprintf(st,"Attack :: Move To Home Point");	break;		case eStateAttack_HomePoint_Hide:				sprintf(st,"Attack :: Home Point :: Hide");	break;		case eStateAttack_HomePoint_Camp:				sprintf(st,"Attack :: Home Point :: Camp");	break;		case eStateAttack_HomePoint_LookOpenPlace:		sprintf(st,"Attack :: Home Point :: Look Open Place");	break;				case eStatePanic_Run:							sprintf(st,"Panic :: Run Away");				break;		case eStatePanic_FaceUnprotectedArea:			sprintf(st,"Panic :: Face Unprotected Area");	break;		case eStatePanic_HomePoint_Hide:				sprintf(st,"Panic :: Home Point :: Hide");		break;		case eStatePanic_HomePoint_LookOpenPlace:		sprintf(st,"Panic :: Home Point :: Look Open Place");	break;		case eStatePanic_HomePoint_Camp:				sprintf(st,"Panic :: Home Point :: Camp");		break;		case eStateHitted_Hide:							sprintf(st,"Hitted :: Hide");					break;		case eStateHitted_MoveOut:						sprintf(st,"Hitted :: MoveOut");				break;		case eStateHitted_Home:							sprintf(st,"Hitted :: Home");				break;		case eStateHearDangerousSound_Hide:				sprintf(st,"Dangerous Snd :: Hide");			break;		case eStateHearDangerousSound_FaceOpenPlace:	sprintf(st,"Dangerous Snd :: FaceOpenPlace");	break;		case eStateHearDangerousSound_StandScared:		sprintf(st,"Dangerous Snd :: StandScared");		break;		case eStateHearDangerousSound_Home:				sprintf(st,"Dangerous Snd :: Home");			break;		case eStateHearInterestingSound_MoveToDest:		sprintf(st,"Interesting Snd :: MoveToDest");	break;		case eStateHearInterestingSound_LookAround:		sprintf(st,"Interesting Snd :: LookAround");	break;				case eStateHearHelpSound:						sprintf(st,"Hear Help Sound");	break;		case eStateHearHelpSound_MoveToDest:			sprintf(st,"Hear Help Sound :: MoveToDest");	break;		case eStateHearHelpSound_LookAround:			sprintf(st,"Hear Help Sound :: LookAround");	break;		case eStateControlled_Follow_Wait:				sprintf(st,"Controlled :: Follow : Wait");			break;		case eStateControlled_Follow_WalkToObject:		sprintf(st,"Controlled :: Follow : WalkToObject");	break;		case eStateControlled_Attack:					sprintf(st,"Controlled :: Attack");					break;		case eStateThreaten:							sprintf(st,"Threaten :: ");							break;		case eStateFindEnemy_Run:						sprintf(st,"Find Enemy :: Run");							break;		case eStateFindEnemy_LookAround_MoveToPoint:	sprintf(st,"Find Enemy :: Look Around : Move To Point");	break;		case eStateFindEnemy_LookAround_LookAround:		sprintf(st,"Find Enemy :: Look Around : Look Around");		break;		case eStateFindEnemy_LookAround_TurnToPoint:	sprintf(st,"Find Enemy :: Look Around : Turn To Point");	break;		case eStateFindEnemy_Angry:						sprintf(st,"Find Enemy :: Angry");							break;		case eStateFindEnemy_WalkAround:				sprintf(st,"Find Enemy :: Walk Around");					break;		case eStateSquad_Rest_Idle:						sprintf(st,"Squad :: Rest : Idle");					break;		case eStateSquad_Rest_WalkAroundLeader:			sprintf(st,"Squad :: Rest : WalkAroundLeader");		break;		case eStateSquad_RestFollow_Idle:				sprintf(st,"Squad :: Follow Leader : Idle");		break;		case eStateSquad_RestFollow_WalkToPoint:		sprintf(st,"Squad :: Follow Leader : WalkToPoint");	break;		case eStateCustom_Vampire:						sprintf(st,"Attack :: Vampire");					break;		case eStateVampire_ApproachEnemy:				sprintf(st,"Vampire :: Approach to enemy");			break;		case eStateVampire_Execute:						sprintf(st,"Vampire :: Hit");						break;		case eStateVampire_RunAway:						sprintf(st,"Vampire :: Run Away");					break;		case eStateVampire_Hide:						sprintf(st,"Vampire :: Hide");						break;		case eStatePredator:							sprintf(st,"Predator");								break;		case eStatePredator_MoveToCover:				sprintf(st,"Predator :: MoveToCover");				break;		case eStatePredator_LookOpenPlace:				sprintf(st,"Predator :: Look Open Place");			break;		case eStatePredator_Camp:						sprintf(st,"Predator :: Camp");						break;		case eStateBurerAttack_Tele:					sprintf(st,"Attack :: Telekinesis");			break;		case eStateBurerAttack_Gravi:					sprintf(st,"Attack :: Gravi Wave");				break;		case eStateBurerAttack_RunAround:				sprintf(st,"Attack :: Run Around");			break;		case eStateBurerAttack_FaceEnemy:				sprintf(st,"Attack :: Face Enemy");			break;		case eStateBurerAttack_Melee:					sprintf(st,"Attack :: Melee");				break;		case eStateBurerScanning:						sprintf(st,"Attack :: Scanning");			break;		case eStateCustomMoveToRestrictor:				sprintf(st,"Moving To Restrictor :: Position not accessible");	break;		case eStateSmartTerrainTask:					sprintf(st,"ALIFE");	break;		case eStateSmartTerrainTaskGamePathWalk:		sprintf(st,"ALIFE :: Game Path Walk");	break;		case eStateSmartTerrainTaskLevelPathWalk:		sprintf(st,"ALIFE :: Level Path Walk");	break;		case eStateSmartTerrainTaskWaitCapture:			sprintf(st,"ALIFE :: Wait till smart terrain will capture me");	break;		case eStateUnknown:								sprintf(st,"Unknown State :: ");			break;		default:										sprintf(st,"Undefined State ::");			break;	}		DBG().object_info(this,this).remove_item (u32(0));	DBG().object_info(this,this).remove_item (u32(1));	DBG().object_info(this,this).remove_item (u32(2));	DBG().object_info(this,this).add_item	 (*cName(), D3DCOLOR_XRGB(255,0,0), 0);	DBG().object_info(this,this).add_item	 (st, D3DCOLOR_XRGB(255,0,0), 1);		sprintf(st, "Team[%u]Squad[%u]Group[%u]", g_Team(), g_Squad(), g_Group());	DBG().object_info(this,this).add_item	 (st, D3DCOLOR_XRGB(255,0,0), 2);	CEntityAlive *entity = smart_cast<CEntityAlive *>(Level().CurrentEntity());	if (entity && entity->character_physics_support()->movement()) {		sprintf(st,"VELOCITY [%f,%f,%f] Value[%f]",VPUSH(entity->character_physics_support()->movement()->GetVelocity()),entity->character_physics_support()->movement()->GetVelocityActual());		DBG().text(this).clear();		DBG().text(this).add_item(st,200,100,COLOR_GREEN,100);	}}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:101,


示例9: mci_send_cmd

/* * Entered into mmc structure during driver init * * Sends a command out on the bus and deals with the block data. * Takes the mmc pointer, a command pointer, and an optional data pointer. */static intmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data){	atmel_mci_t *mci = (atmel_mci_t *)mmc->priv;	u32 cmdr;	u32 error_flags = 0;	u32 status;	if (!initialized) {		puts ("MCI not initialized!/n");		return COMM_ERR;	}	/* Figure out the transfer arguments */	cmdr = mci_encode_cmd(cmd, data, &error_flags);	/* For multi blocks read/write, set the block register */	if ((cmd->cmdidx == MMC_CMD_READ_MULTIPLE_BLOCK)			|| (cmd->cmdidx == MMC_CMD_WRITE_MULTIPLE_BLOCK))		writel(data->blocks | MMCI_BF(BLKLEN, mmc->read_bl_len),			&mci->blkr);	/* Send the command */	writel(cmd->cmdarg, &mci->argr);	writel(cmdr, &mci->cmdr);#ifdef DEBUG	dump_cmd(cmdr, cmd->cmdarg, 0, "DEBUG");#endif	/* Wait for the command to complete */	while (!((status = readl(&mci->sr)) & MMCI_BIT(CMDRDY)));	if (status & error_flags) {		dump_cmd(cmdr, cmd->cmdarg, status, "Command Failed");		return COMM_ERR;	}	/* Copy the response to the response buffer */	if (cmd->resp_type & MMC_RSP_136) {		cmd->response[0] = readl(&mci->rspr);		cmd->response[1] = readl(&mci->rspr1);		cmd->response[2] = readl(&mci->rspr2);		cmd->response[3] = readl(&mci->rspr3);	} else		cmd->response[0] = readl(&mci->rspr);	/* transfer all of the blocks */	if (data) {		u32 word_count, block_count;		u32* ioptr;		u32 sys_blocksize, dummy, i;		u32 (*mci_data_op)			(atmel_mci_t *mci, u32* data, u32 error_flags);		if (data->flags & MMC_DATA_READ) {			mci_data_op = mci_data_read;			sys_blocksize = mmc->read_bl_len;			ioptr = (u32*)data->dest;		} else {			mci_data_op = mci_data_write;			sys_blocksize = mmc->write_bl_len;			ioptr = (u32*)data->src;		}		status = 0;		for (block_count = 0;				block_count < data->blocks && !status;				block_count++) {			word_count = 0;			do {				status = mci_data_op(mci, ioptr, error_flags);				word_count++;				ioptr++;			} while (!status && word_count < (data->blocksize/4));#ifdef DEBUG			if (data->flags & MMC_DATA_READ)			{				printf("Read Data:/n");				print_buffer(0, data->dest, 1,					word_count*4, 0);			}#endif#ifdef DEBUG			if (!status && word_count < (sys_blocksize / 4))				printf("filling rest of block.../n");#endif			/* fill the rest of a full block */			while (!status && word_count < (sys_blocksize / 4)) {				status = mci_data_op(mci, &dummy,					error_flags);				word_count++;			}			if (status) {//.........这里部分代码省略.........
开发者ID:AeroGirl,项目名称:u-boot-kern3.2,代码行数:101,


示例10: u32

sf::String GUI::Widget::stringFromUtf8(const std::string& s) {	std::size_t l = sf::Utf<8>::count(s.begin(), s.end());	std::basic_string<sf::Uint32> u32(l, ' ');	sf::Utf<8>::toUtf32(s.begin(), s.end(), u32.begin());	return sf::String(u32);}
开发者ID:haensen,项目名称:PutkaRTS,代码行数:6,


示例11: findIndexOf_

u32 CUICaption::findIndexOf(const shared_str& key_){	u32 res = findIndexOf_(key_);	R_ASSERT3(res!=u32(-1),"cannot find msg ",*key_);	return res;}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:6,


示例12: u32

#include "stdafx.h"#include "control_manager.h"#include "control_combase.h"#include "BaseMonster/base_monster.h"enum EActiveComAction {	eRemove			= u32(0),	eAdd			};// DEBUG purpose onlychar *dbg_control_name_table[] = {		"Control_Movement",		"Control_Path",		"Control_Dir",		"Control_Animation",		"Control_Sequencer",		"Control_RotationJump",		"Control_Animation_BASE",		"Control_Movement_BASE",		"Control_Path_BASE",		"Control_Dir_BASE"};	CControl_Manager::CControl_Manager(CBaseMonster *obj){	m_object			= obj;	m_animation			= xr_new<CControlAnimation>	();
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:31,


示例13: Top

void CSheduler::ProcessStep			(){	// Normal priority	u32		dwTime					= Device.dwTimeGlobal;	CTimer							eTimer;	for (int i=0;!Items.empty() && Top().dwTimeForExecute < dwTime; ++i) {		u32		delta_ms			= dwTime - Top().dwTimeForExecute;		// Update		Item	T					= Top	();#ifdef DEBUG_SCHEDULER		Msg		("SCHEDULER: process step [%s][%x][false]",*T.scheduled_name,T.Object);#endif // DEBUG_SCHEDULER		u32		Elapsed				= dwTime-T.dwTimeOfLastExecute;		bool	condition;				condition					= (NULL==T.Object || !T.Object->shedule_Needed());		if (condition) {			// Erase element#ifdef DEBUG_SCHEDULER			Msg						("SCHEDULER: process unregister [%s][%x][%s]",*T.scheduled_name,T.Object,"false");#endif // DEBUG_SCHEDULER//			if (T.Object)//				Msg					("0x%08x UNREGISTERS because shedule_Needed() returned false",T.Object);//			else//				Msg					("UNREGISTERS unknown object");			Pop						();			continue;		}		// Insert into priority Queue		Pop							();		// Real update call		// Msg						("------- %d:",Device.dwFrame);#ifdef DEBUG		T.Object->dbg_startframe	= Device.dwFrame;		eTimer.Start				();//		LPCSTR		_obj_name		= T.Object->shedule_Name().c_str();#endif // DEBUG		// Calc next update interval		u32		dwMin				= _max(u32(30),T.Object->shedule.t_min);		u32		dwMax				= (1000+T.Object->shedule.t_max)/2;		float	scale				= T.Object->shedule_Scale	(); 		u32		dwUpdate			= dwMin+iFloor(float(dwMax-dwMin)*scale);		clamp	(dwUpdate,u32(_max(dwMin,u32(20))),dwMax);				m_current_step_obj = T.Object;//			try {			T.Object->shedule_Update	(clampr(Elapsed,u32(1),u32(_max(u32(T.Object->shedule.t_max),u32(1000)))) );			if (!m_current_step_obj)			{#ifdef DEBUG_SCHEDULER				Msg						("SCHEDULER: process unregister (self unregistering) [%s][%x][%s]",*T.scheduled_name,T.Object,"false");#endif // DEBUG_SCHEDULER				continue;			}//			} catch (...) {#ifdef DEBUG//				Msg		("! xrSheduler: object '%s' raised an exception", _obj_name);//				throw	;#endif // DEBUG//			}		m_current_step_obj = NULL;#ifdef DEBUG//		u32	execTime				= eTimer.GetElapsed_ms		();#endif // DEBUG		// Fill item structure		Item						TNext;		TNext.dwTimeForExecute		= dwTime+dwUpdate;		TNext.dwTimeOfLastExecute	= dwTime;		TNext.Object				= T.Object;		TNext.scheduled_name		= T.Object->shedule_Name();		ItemsProcessed.push_back	(TNext);#ifdef DEBUG//		u32	execTime				= eTimer.GetElapsed_ms		();		// VERIFY3					(T.Object->dbg_update_shedule == T.Object->dbg_startframe, "Broken sequence of calls to 'shedule_Update'", _obj_name );		if (delta_ms> 3*dwUpdate)	{			//Msg	("! xrSheduler: failed to shedule object [%s] (%dms)",	_obj_name, delta_ms	);		}//		if (execTime> 15)			{//			Msg	("* xrSheduler: too much time consumed by object [%s] (%dms)",	_obj_name, execTime	);//		}#endif // DEBUG		// 		if ((i % 3) != (3 - 1))			continue;		if (Device.dwPrecacheFrame==0 && CPU::QPC() > cycles_limit)				{			// we have maxed out the load - increase heap			psShedulerTarget		+= (psShedulerReaction * 3);//.........这里部分代码省略.........
开发者ID:BeaconDev,项目名称:xray-16,代码行数:101,


示例14: Msg

//.........这里部分代码省略.........		m_sEntranceParticlesSmall = pSettings->r_string(section,"entrance_small_particles");	if(pSettings->line_exist(section,"entrance_big_particles")) 		m_sEntranceParticlesBig = pSettings->r_string(section,"entrance_big_particles");	if(pSettings->line_exist(section,"hit_small_particles")) 		m_sHitParticlesSmall = pSettings->r_string(section,"hit_small_particles");	if(pSettings->line_exist(section,"hit_big_particles")) 		m_sHitParticlesBig = pSettings->r_string(section,"hit_big_particles");	if(pSettings->line_exist(section,"idle_small_particles")) 		m_sIdleObjectParticlesBig = pSettings->r_string(section,"idle_big_particles");		if(pSettings->line_exist(section,"idle_big_particles")) 		m_sIdleObjectParticlesSmall = pSettings->r_string(section,"idle_small_particles");		if(pSettings->line_exist(section,"idle_particles_dont_stop"))		m_zone_flags.set(eIdleObjectParticlesDontStop, pSettings->r_bool(section,"idle_particles_dont_stop"));	if(pSettings->line_exist(section,"postprocess")) 	{		m_actor_effector				= xr_new<CZoneEffector>();		m_actor_effector->Load			(pSettings->r_string(section,"postprocess"));	};	if(pSettings->line_exist(section,"bolt_entrance_particles")) 	{		m_sBoltEntranceParticles	= pSettings->r_string(section, "bolt_entrance_particles");		m_zone_flags.set			(eBoltEntranceParticles, (m_sBoltEntranceParticles.size()!=0));	}	if(pSettings->line_exist(section,"blowout_particles_time")) 	{		m_dwBlowoutParticlesTime = pSettings->r_u32(section,"blowout_particles_time");		if (s32(m_dwBlowoutParticlesTime)>m_StateTime[eZoneStateBlowout])	{			m_dwBlowoutParticlesTime=m_StateTime[eZoneStateBlowout];#ifndef MASTER_GOLD			Msg("! ERROR: invalid 'blowout_particles_time' in '%s'",section);#endif // #ifndef MASTER_GOLD		}	}	else		m_dwBlowoutParticlesTime = 0;	if(pSettings->line_exist(section,"blowout_light_time")) 	{		m_dwBlowoutLightTime = pSettings->r_u32(section,"blowout_light_time");		if (s32(m_dwBlowoutLightTime)>m_StateTime[eZoneStateBlowout])	{			m_dwBlowoutLightTime=m_StateTime[eZoneStateBlowout];#ifndef MASTER_GOLD			Msg("! ERROR: invalid 'blowout_light_time' in '%s'",section);#endif // #ifndef MASTER_GOLD		}	}	else		m_dwBlowoutLightTime = 0;	if(pSettings->line_exist(section,"blowout_sound_time")) 	{		m_dwBlowoutSoundTime = pSettings->r_u32(section,"blowout_sound_time");		if (s32(m_dwBlowoutSoundTime)>m_StateTime[eZoneStateBlowout])	{			m_dwBlowoutSoundTime=m_StateTime[eZoneStateBlowout];#ifndef MASTER_GOLD			Msg("! ERROR: invalid 'blowout_sound_time' in '%s'",section);#endif // #ifndef MASTER_GOLD		}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:67,


示例15: if

void debug_view_disasm::view_update(){	const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source);	offs_t pc = source.device()->safe_pcbase();	offs_t pcbyte = source.m_space.address_to_byte(pc) & source.m_space.logbytemask();	// update our context; if the expression is dirty, recompute	if (m_expression.dirty())		m_recompute = true;	// if we're tracking a value, make sure it is visible	u64 previous = m_expression.last_value();	u64 result = m_expression.value();	if (result != previous)	{		offs_t resultbyte = source.m_space.address_to_byte(result) & source.m_space.logbytemask();		// see if the new result is an address we already have		u32 row;		for (row = 0; row < m_byteaddress.size(); row++)			if (m_byteaddress[row] == resultbyte)				break;		// if we didn't find it, or if it's really close to the bottom, recompute		if (row == m_byteaddress.size() || row >= m_total.y - m_visible.y)			m_recompute = true;		// otherwise, if it's not visible, adjust the view so it is		else if (row < m_topleft.y || row >= m_topleft.y + m_visible.y - 2)			m_topleft.y = (row > 3) ? row - 3 : 0;	}	// if the opcode base has changed, rework things	if (source.m_decrypted_space.direct().ptr() != m_last_direct_decrypted || source.m_space.direct().ptr() != m_last_direct_raw)		m_recompute = true;	// if the comments have changed, redo it	if (m_last_change_count != source.device()->debug()->comment_change_count())		m_recompute = true;	// if we need to recompute, do it	bool recomputed_this_time = false;recompute:	if (m_recompute)	{		// recompute the view		if (!m_byteaddress.empty() && m_last_change_count != source.device()->debug()->comment_change_count())		{			// smoosh us against the left column, but not the top row			m_topleft.x = 0;			// recompute from where we last recomputed!			recompute(source.m_space.byte_to_address(m_byteaddress[0]), 0, m_total.y);		}		else		{			// determine the addresses of what we will display			offs_t backpc = find_pc_backwards(u32(m_expression.value()), m_backwards_steps);			// put ourselves back in the top left			m_topleft.y = 0;			m_topleft.x = 0;			recompute(backpc, 0, m_total.y);		}		recomputed_this_time = true;	}	// figure out the row where the PC is and recompute the disassembly	if (pcbyte != m_last_pcbyte)	{		// find the row with the PC on it		for (u32 row = 0; row < m_visible.y; row++)		{			u32 effrow = m_topleft.y + row;			if (effrow >= m_byteaddress.size())				break;			if (pcbyte == m_byteaddress[effrow])			{				// see if we changed				bool changed = recompute(pc, effrow, 1);				if (changed && !recomputed_this_time)				{					m_recompute = true;					goto recompute;				}				// set the effective row and PC				m_cursor.y = effrow;				view_notify(VIEW_NOTIFY_CURSOR_CHANGED);			}		}		m_last_pcbyte = pcbyte;	}	// loop over visible rows	debug_view_char *dest = &m_viewdata[0];	for (u32 row = 0; row < m_visible.y; row++)	{//.........这里部分代码省略.........
开发者ID:Robbbert,项目名称:store1,代码行数:101,


示例16: eflt

static eflt(uint8_t *p, uint8_t i){ mix uf;  uf.u = u32(p,i);  return uf.f; }
开发者ID:rmoorman,项目名称:virtual_forwarder,代码行数:4,


示例17: ALIAS

void	Compress			(LPCSTR path, LPCSTR base, BOOL bFast){	filesTOTAL		++;	if (testSKIP(path))		{		filesSKIP	++;		printf		(" - a SKIP");		Msg			("%-80s   - SKIP",path);		return;	}	string_path		fn;					strconcat		(sizeof(fn),fn,base,"//",path);	if (::GetFileAttributes(fn)==u32(-1))	{		filesSKIP	++;		printf		(" - CAN'T OPEN");		Msg			("%-80s   - CAN'T OPEN",path);		return;	}	IReader*		src				=	FS.r_open	(fn);	if (0==src)	{		filesSKIP	++;		printf		(" - CAN'T OPEN");		Msg			("%-80s   - CAN'T OPEN",path);		return;	}	bytesSRC						+=	src->length	();	u32			c_crc32				=	crc32		(src->pointer(),src->length());	u32			c_ptr				=	0;	u32			c_size_real			=	0;	u32			c_size_compressed	=	0;	u32			a_tests				=	0;	ALIAS*		A					=	testALIAS	(src,c_crc32,a_tests);	printf							("%3da ",a_tests);	if (A) 	{		filesALIAS			++;		printf				("ALIAS");		Msg					("%-80s   - ALIAS (%s)",path,A->path);		// Alias found		c_ptr				= A->c_ptr;		c_size_real			= A->c_size_real;		c_size_compressed	= A->c_size_compressed;	} else 	{		if (testVFS(path))			{			filesVFS			++;			// Write into BaseFS			c_ptr				= fs->tell	();			c_size_real			= src->length();			c_size_compressed	= src->length();			fs->w				(src->pointer(),c_size_real);			printf				("VFS");			Msg					("%-80s   - VFS",path);		} else 		{			// Compress into BaseFS			c_ptr				=	fs->tell();			c_size_real			=	src->length();			if (0!=c_size_real)			{				u32 c_size_max		=	rtc_csize		(src->length());				u8*	c_data			=	xr_alloc<u8>	(c_size_max);				t_compress.Begin	();				{					// c_size_compressed	=	rtc_compress	(c_data,c_size_max,src->pointer(),c_size_real);					c_size_compressed	= c_size_max;					if (bFast){								R_ASSERT(LZO_E_OK == lzo1x_1_compress	((u8*)src->pointer(),c_size_real,c_data,&c_size_compressed,c_heap));					}else{						R_ASSERT(LZO_E_OK == lzo1x_999_compress	((u8*)src->pointer(),c_size_real,c_data,&c_size_compressed,c_heap));					}				}				t_compress.End		();				if ((c_size_compressed+16) >= c_size_real)				{					// Failed to compress - revert to VFS					filesVFS			++;					c_size_compressed	= c_size_real;					fs->w				(src->pointer(),c_size_real);					printf				("VFS (R)");					Msg					("%-80s   - VFS (R)",path);				} else 				{					// Compressed OK - optimize					if (!bFast){						u8*		c_out	= xr_alloc<u8>	(c_size_real);						u32		c_orig	= c_size_real;						R_ASSERT		(LZO_E_OK	== lzo1x_optimize	(c_data,c_size_compressed,c_out,&c_orig, NULL));						R_ASSERT		(c_orig		== c_size_real		);//.........这里部分代码省略.........
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:101,


示例18: autoLock

arx_noreturn void CrashHandlerWindows::handleCrash(int crashType, void * crashExtraInfo, int fpeCode) {		Autolock autoLock(&m_Lock);		// Run the callbacks	for(std::vector<CrashHandler::CrashCallback>::iterator it = m_crashCallbacks.begin();	    it != m_crashCallbacks.end(); ++it) {		(*it)();	}		m_pCrashInfo->signal = crashType;	m_pCrashInfo->code = fpeCode;		PEXCEPTION_POINTERS pointers = reinterpret_cast<PEXCEPTION_POINTERS>(crashExtraInfo);		// Copy CONTEXT to crash info structure	PCONTEXT context = reinterpret_cast<PCONTEXT>(m_pCrashInfo->contextRecord);	ARX_STATIC_ASSERT(sizeof(m_pCrashInfo->contextRecord) >= sizeof(*context),	                  "buffer too small");	memset(context, 0, sizeof(*context));	EXCEPTION_POINTERS fakePointers;	EXCEPTION_RECORD exception;	if(pointers) {		u32 code = m_pCrashInfo->exceptionCode = pointers->ExceptionRecord->ExceptionCode;		m_pCrashInfo->address = u64(pointers->ExceptionRecord->ExceptionAddress);		m_pCrashInfo->hasAddress = true;		if(code == EXCEPTION_ACCESS_VIOLATION || code == EXCEPTION_IN_PAGE_ERROR) {			m_pCrashInfo->memory = pointers->ExceptionRecord->ExceptionInformation[1];			m_pCrashInfo->hasMemory = true;		}		#if ARX_ARCH == ARX_ARCH_X86		m_pCrashInfo->stack =  pointers->ContextRecord->Esp;		m_pCrashInfo->hasStack = true;		m_pCrashInfo->frame =  pointers->ContextRecord->Ebp;		m_pCrashInfo->hasFrame = true;		#elif ARX_ARCH == ARX_ARCH_X86_64		m_pCrashInfo->stack =  pointers->ContextRecord->Rsp;		m_pCrashInfo->hasStack = true;		#endif		std::memcpy(context, pointers->ContextRecord, sizeof(*context));	} else {		RtlCaptureContext(context);		std::memset(&exception, 0, sizeof(exception));		fakePointers.ContextRecord = context;		fakePointers.ExceptionRecord = &exception;		pointers = &fakePointers;	}		// Get current thread id	m_pCrashInfo->threadId = u32(GetCurrentThreadId());		writeCrashDump(pointers);		// Try to spawn a sub-process to process the crash info	STARTUPINFO si;	memset(&si, 0, sizeof(STARTUPINFO));	si.cb = sizeof(STARTUPINFO);	PROCESS_INFORMATION pi;	memset(&pi, 0, sizeof(PROCESS_INFORMATION));	BOOL created = CreateProcessW(m_exe, m_args.data(), NULL, NULL, FALSE,	                              0, NULL, NULL, &si, &pi);	if(created) {		while(true) {			if(m_pCrashInfo->exitLock.try_wait()) {				break;			}			if(WaitForSingleObject(pi.hProcess, 100) != WAIT_TIMEOUT) {				break;			}		}		TerminateProcess(GetCurrentProcess(), 1);		unregisterCrashHandlers();		std::abort();	}		// Fallback: process the crash info in-process	unregisterCrashHandlers();	processCrash();		std::abort();}
开发者ID:arx,项目名称:ArxLibertatis,代码行数:81,


示例19: GetCommandLine

int __cdecl main	(int argc, char* argv[]){	g_temporary_stuff	= &trivial_encryptor::decode;	g_dummy_stuff		= &trivial_encryptor::encode;	Core._initialize("xrCompress",0,FALSE);	printf			("/n/n");	LPCSTR params = GetCommandLine();#ifndef MOD_COMPRESS	if(strstr(params,"-store"))	{		bStoreFiles = TRUE;	};	{		LPCSTR					temp = strstr(params,"-max_size");		if (temp) {			u64					test = u64(1024*1024)*u64(atoi(temp+9));			if (u64(test) >= u64(u32(1) << 31))				printf			("! too large max_size (%I64u), restoring previous (%I64u)/n",test,u64(XRP_MAX_SIZE));			else				XRP_MAX_SIZE	= u32(test);		};	}#else	bStoreFiles = TRUE;#endif#ifndef MOD_COMPRESS	if(strstr(params,"-diff"))	{		ProcessDifference	();	}else#endif	{		#ifndef MOD_COMPRESS		if (argc<2)			{			printf("ERROR: u must pass folder name as parameter./n");			printf("-diff /? option to get information about creating difference./n");			printf("-fast	- fast compression./n");			printf("-store	- store files. No compression./n");			printf("-ltx <file_name.ltx> - pathes to compress./n");			printf("/n");			printf("LTX format:/n");			printf("	[config]/n");			printf("	;<path>     = <recurse>/n");			printf("	.//         = false/n");			printf("	textures    = true/n");						Core._destroy();			return 3;		}		#endif		string_path		folder;				strconcat		(sizeof(folder),folder,argv[1],"//");		_strlwr_s		(folder,sizeof(folder));		printf			("/nCompressing files (%s).../n/n",folder);		FS._initialize	(CLocatorAPI::flTargetFolderOnly|CLocatorAPI::flScanAppRoot,folder);		BOOL bFast		= 0!=strstr(params,"-fast");		LPCSTR p		= strstr(params,"-ltx");#ifndef MOD_COMPRESS		if(0!=p)		{			ProcessLTX		(argv[1],p+4,bFast);		}else{			ProcessNormal	(argv[1],bFast);		}#else		R_ASSERT2		(p, "wrong params passed. -ltx option needed");		ProcessLTX		(argv[1],p+4,bFast);#endif	}	Core._destroy		();	return 0;}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:81,


示例20: dm365_enable_clock

static int dm365_enable_clock(enum vpss_clock_sel clock_sel, int en){	unsigned long flags;	u32 utemp, mask = 0x1, shift = 0, offset = DM365_ISP5_PCCR;	u32 (*read)(u32 offset) = isp5_read;	void(*write)(u32 val, u32 offset) = isp5_write;	switch (clock_sel) {	case VPSS_BL_CLOCK:		break;	case VPSS_CCDC_CLOCK:		shift = 1;		break;	case VPSS_H3A_CLOCK:		shift = 2;		break;	case VPSS_RSZ_CLOCK:		shift = 3;		break;	case VPSS_IPIPE_CLOCK:		shift = 4;		break;	case VPSS_IPIPEIF_CLOCK:		shift = 5;		break;	case VPSS_PCLK_INTERNAL:		shift = 6;		break;	case VPSS_PSYNC_CLOCK_SEL:		shift = 7;		break;	case VPSS_VPBE_CLOCK:		read = vpss_regr;		write = vpss_regw;		offset = DM365_VPBE_CLK_CTRL;		break;	case VPSS_VENC_CLOCK_SEL:		shift = 2;		read = vpss_regr;		write = vpss_regw;		offset = DM365_VPBE_CLK_CTRL;		break;	case VPSS_LDC_CLOCK:		shift = 3;		read = vpss_regr;		write = vpss_regw;		offset = DM365_VPBE_CLK_CTRL;		break;	case VPSS_FDIF_CLOCK:		shift = 4;		read = vpss_regr;		write = vpss_regw;		offset = DM365_VPBE_CLK_CTRL;		break;	case VPSS_OSD_CLOCK_SEL:		shift = 6;		read = vpss_regr;		write = vpss_regw;		offset = DM365_VPBE_CLK_CTRL;		break;	case VPSS_LDC_CLOCK_SEL:		shift = 7;		read = vpss_regr;		write = vpss_regw;		offset = DM365_VPBE_CLK_CTRL;		break;	default:		printk(KERN_ERR "dm365_enable_clock: Invalid selector: %d/n",		       clock_sel);		return -1;	}	spin_lock_irqsave(&oper_cfg.vpss_lock, flags);	utemp = read(offset);	if (!en) {		mask = ~mask;		utemp &= (mask << shift);	} else		utemp |= (mask << shift);	write(utemp, offset);	spin_unlock_irqrestore(&oper_cfg.vpss_lock, flags);	return 0;}
开发者ID:AiWinters,项目名称:linux,代码行数:85,


示例21: if

void CSceneNodeAnimatorCameraFPS::animateNode(ISceneNode* node, u32 timeMs){    if (!node || node->getType() != ESNT_CAMERA)        return;    ICameraSceneNode* camera = static_cast<ICameraSceneNode*>(node);    if (firstUpdate)    {        camera->updateAbsolutePosition();        if (CursorControl && camera)        {            CursorControl->setPosition(0.5f, 0.5f);            CursorPos = CenterCursor = CursorControl->getRelativePosition();        }        LastAnimationTime = timeMs;        firstUpdate = false;    }    // If the camera isn't the active camera, and receiving input, then don't process it.    if(!camera->isInputReceiverEnabled())        return;    scene::ISceneManager * smgr = camera->getSceneManager();    if(smgr && smgr->getActiveCamera() != camera)        return;    // get time    f32 timeDiff = (f32) ( timeMs - LastAnimationTime );    LastAnimationTime = timeMs;    // update position    core::vector3df pos = camera->getPosition();    // Update rotation    core::vector3df target = (camera->getTarget() - camera->getAbsolutePosition());    core::vector3df relativeRotation = target.getHorizontalAngle();    if (CursorControl)    {        if (CursorPos != CenterCursor)        {            relativeRotation.Y -= (0.5f - CursorPos.X) * RotateSpeed;            relativeRotation.X -= (0.5f - CursorPos.Y) * RotateSpeed * MouseYDirection;            // X < MaxVerticalAngle or X > 360-MaxVerticalAngle            if (relativeRotation.X > MaxVerticalAngle*2 &&                    relativeRotation.X < 360.0f-MaxVerticalAngle)            {                relativeRotation.X = 360.0f-MaxVerticalAngle;            }            else if (relativeRotation.X > MaxVerticalAngle &&                     relativeRotation.X < 360.0f-MaxVerticalAngle)            {                relativeRotation.X = MaxVerticalAngle;            }            // Do the fix as normal, special case below            // reset cursor position to the centre of the window.            CursorControl->setPosition(0.5f, 0.5f);            CenterCursor = CursorControl->getRelativePosition();            // needed to avoid problems when the event receiver is disabled            CursorPos = CenterCursor;        }        // Special case, mouse is whipped outside of window before it can update.        video::IVideoDriver* driver = smgr->getVideoDriver();        core::vector2d<u32> mousepos(u32(CursorControl->getPosition().X), u32(CursorControl->getPosition().Y));        core::rect<u32> screenRect(0, 0, driver->getScreenSize().Width, driver->getScreenSize().Height);        // Only if we are moving outside quickly.        bool reset = !screenRect.isPointInside(mousepos);        if(reset)        {            // Force a reset.            CursorControl->setPosition(0.5f, 0.5f);            CenterCursor = CursorControl->getRelativePosition();            CursorPos = CenterCursor;        }    }    // set target    target.set(0,0, core::max_(1.f, pos.getLength()));    core::vector3df movedir = target;    core::matrix4 mat;    mat.setRotationDegrees(core::vector3df(relativeRotation.X, relativeRotation.Y, 0));    mat.transformVect(target);    if (NoVerticalMovement)    {        mat.setRotationDegrees(core::vector3df(0, relativeRotation.Y, 0));        mat.transformVect(movedir);    }//.........这里部分代码省略.........
开发者ID:RaptorFactor,项目名称:pseuwow,代码行数:101,


示例22: CLSID2TEXT

u32	CGameObject::ef_detector_type		() const{	string16	temp; CLSID2TEXT(CLS_ID,temp);	R_ASSERT3	(false,"Invalid detector type request, virtual function is not properly overridden!",temp);	return		(u32(-1));}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:6,


示例23: strstr

CLevel::CLevel():IPureClient	(Device.GetTimerGlobal())#ifdef PROFILE_CRITICAL_SECTIONS	,DemoCS(MUTEX_PROFILE_ID(DemoCS))#endif // PROFILE_CRITICAL_SECTIONS{	g_bDebugEvents				= strstr(Core.Params,"-debug_ge")?TRUE:FALSE;	Server						= NULL;	game						= NULL;//	game						= xr_new<game_cl_GameState>();	game_events					= xr_new<NET_Queue_Event>();	spawn_events				= xr_new<NET_Queue_Event>();	game_configured				= FALSE;	m_bGameConfigStarted		= FALSE;	eChangeRP					= Engine.Event.Handler_Attach	("LEVEL:ChangeRP",this);	eDemoPlay					= Engine.Event.Handler_Attach	("LEVEL:PlayDEMO",this);	eChangeTrack				= Engine.Event.Handler_Attach	("LEVEL:PlayMusic",this);	eEnvironment				= Engine.Event.Handler_Attach	("LEVEL:Environment",this);	eEntitySpawn				= Engine.Event.Handler_Attach	("LEVEL:spawn",this);	m_pBulletManager			= xr_new<CBulletManager>();	if(!g_dedicated_server)		m_map_manager				= xr_new<CMapManager>();	else		m_map_manager				= NULL;//	m_pFogOfWarMngr				= xr_new<CFogOfWarMngr>();//----------------------------------------------------	m_bNeed_CrPr				= false;	m_bIn_CrPr					= false;	m_dwNumSteps				= 0;	m_dwDeltaUpdate				= u32(fixed_step*1000);	m_dwLastNetUpdateTime		= 0;	physics_step_time_callback	= (PhysicsStepTimeCallback*) &PhisStepsCallback;	m_seniority_hierarchy_holder= xr_new<CSeniorityHierarchyHolder>();	if(!g_dedicated_server)	{		m_level_sound_manager		= xr_new<CLevelSoundManager>();		m_space_restriction_manager = xr_new<CSpaceRestrictionManager>();		m_client_spawn_manager		= xr_new<CClientSpawnManager>();		m_autosave_manager			= xr_new<CAutosaveManager>();	#ifdef DEBUG		m_debug_renderer			= xr_new<CDebugRenderer>();		m_level_debug				= xr_new<CLevelDebug>();	#endif	}else	{		m_level_sound_manager		= NULL;		m_client_spawn_manager		= NULL;		m_autosave_manager			= NULL;		m_space_restriction_manager = NULL;	#ifdef DEBUG		m_debug_renderer			= NULL;		m_level_debug				= NULL;	#endif	}		m_ph_commander				= xr_new<CPHCommander>();	m_ph_commander_scripts		= xr_new<CPHCommander>();#ifdef DEBUG	m_bSynchronization			= false;#endif		//---------------------------------------------------------	pStatGraphR = NULL;	pStatGraphS = NULL;	//---------------------------------------------------------	pObjects4CrPr.clear();	pActors4CrPr.clear();	//---------------------------------------------------------	pCurrentControlEntity = NULL;	//---------------------------------------------------------	m_dwCL_PingLastSendTime = 0;	m_dwCL_PingDeltaSend = 1000;	m_dwRealPing = 0;	//---------------------------------------------------------		m_sDemoName[0] = 0;	m_bDemoSaveMode = FALSE;	m_dwStoredDemoDataSize = 0;	m_pStoredDemoData = NULL;	m_pOldCrashHandler = NULL;	m_we_used_old_crach_handler	= false;//	if ( !strstr( Core.Params, "-tdemo " ) && !strstr(Core.Params,"-tdemof "))//	{//		Demo_PrepareToStore();//	};//.........这里部分代码省略.........
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:101,


示例24: u32

u32	CCustomZone::ef_weapon_type() const{	VERIFY	(m_ef_weapon_type != u32(-1));	return	(m_ef_weapon_type);}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:5,


示例25: R_ASSERT

void CRender::LoadSectors(IReader* fs){	// allocate memory for portals	u32 size = fs->find_chunk(fsL_PORTALS); 	R_ASSERT(0==size%sizeof(b_portal));	u32 count = size/sizeof(b_portal);	Portals.resize	(count);	for (u32 c=0; c<count; c++)		Portals[c]	= xr_new<CPortal> ();	// load sectors	IReader* S = fs->open_chunk(fsL_SECTORS);	for (u32 i=0; ; i++)	{		IReader* P = S->open_chunk(i);		if (0==P) break;		CSector* __S		= xr_new<CSector> ();		__S->load			(*P);		Sectors.push_back	(__S);		P->close();	}	S->close();	// load portals	if (count) 	{		CDB::Collector	CL;		fs->find_chunk	(fsL_PORTALS);		for (u32 i=0; i<count; i++)		{			b_portal	P;			fs->r		(&P,sizeof(P));			CPortal*	__P	= (CPortal*)Portals[i];			__P->Setup	(P.vertices.begin(),P.vertices.size(),				(CSector*)getSector(P.sector_front),				(CSector*)getSector(P.sector_back));			for (u32 j=2; j<P.vertices.size(); j++)				CL.add_face_packed_D(				P.vertices[0],P.vertices[j-1],P.vertices[j],				u32(i)				);		}		if (CL.getTS()<2)		{			Fvector					v1,v2,v3;			v1.set					(-20000.f,-20000.f,-20000.f);			v2.set					(-20001.f,-20001.f,-20001.f);			v3.set					(-20002.f,-20002.f,-20002.f);			CL.add_face_packed_D	(v1,v2,v3,0);		}		// build portal model		rmPortals = xr_new<CDB::MODEL> ();		rmPortals->build	(CL.getV(),int(CL.getVS()),CL.getT(),int(CL.getTS()));	} else {		rmPortals = 0;	}	// debug	//	for (int d=0; d<Sectors.size(); d++)	//		Sectors[d]->DebugDump	();	pLastSector = 0;}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:66,


示例26: u32

//!//! Update the value part.//!void StringPair::setV(unsigned int v){    U32 u32(v);    v_ = u32.toString();}
开发者ID:thanhtphung,项目名称:cppware,代码行数:8,



注:本文中的u32函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ u3k函数代码示例
C++ u2nc函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。