本文整理汇总了C++中xr_vector类的典型用法代码示例。如果您正苦于以下问题:C++ xr_vector类的具体用法?C++ xr_vector怎么用?C++ xr_vector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了xr_vector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
CUIXml::~CUIXml()
{
#ifdef LOG_ALL_XMLS
xr_vector<DBGList_>::iterator _it = dbg_list_xmls.begin();
bool bOK = false;
for(;_it!=dbg_list_xmls.end();++_it){
if( (*_it).num==m_dbg_id && !(*_it).closed){
bOK = true;
(*_it).closed = true;
dbg_list_xmls.erase(_it);
break;
}
if( (*_it).num==m_dbg_id && (*_it).closed){
Msg("--XML [%d] already deleted", m_dbg_id);
bOK = true;
}
}
if(!bOK)
Msg("CUIXml::~CUIXml.[%d] cannot find xml in list", m_dbg_id);
#endif
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:21,代码来源:xrUIXmlParser.cpp
示例2:
void CSE_InventoryBox::add_offline (const xr_vector<ALife::_OBJECT_ID> &saved_children, const bool &update_registries)
{
CSE_ALifeDynamicObjectVisual *object = (this);
for (u32 i=0, n=saved_children.size(); i<n; ++i) {
CSE_ALifeDynamicObject *child = smart_cast<CSE_ALifeDynamicObject*>(ai().alife().objects().object(saved_children[i],true));
R_ASSERT (child);
child->m_bOnline = false;
CSE_ALifeInventoryItem *inventory_item = smart_cast<CSE_ALifeInventoryItem*>(child);
VERIFY2 (inventory_item,"Non inventory item object has parent?!");
#ifdef DEBUG
// if (psAI_Flags.test(aiALife))
// Msg ("[LSS] Destroying item [%s][%s][%d]",inventory_item->base()->name_replace(),*inventory_item->base()->s_name,inventory_item->base()->ID);
Msg (
"[LSS][%d] Going offline [%d][%s][%d] with parent [%d][%s] on '%s'",
Device.dwFrame,
Device.dwTimeGlobal,
inventory_item->base()->name_replace(),
inventory_item->base()->ID,
ID,
name_replace(),
"*SERVER*"
);
#endif
ALife::_OBJECT_ID item_id = inventory_item->base()->ID;
inventory_item->base()->ID = object->alife().server().PerformIDgen(item_id);
if (!child->can_save()) {
object->alife().release (child);
--i;
--n;
continue;
}
#ifdef DEBUG
if (!client_data.empty())
Msg ("CSE_InventoryBox::add_offline: client_data is cleared for [%d][%s]",ID,name_replace());
#endif // DEBUG
if (!child->keep_saved_data_anyway())
child->client_data.clear ();
object->alife().graph().add (child,child->m_tGraphID,false);
// object->alife().graph().attach (*object,inventory_item,child->m_tGraphID,true);
alife().graph().remove (child,child->m_tGraphID);
children.push_back (child->ID);
child->ID_Parent = ID;
}
CSE_ALifeDynamicObjectVisual::add_offline(saved_children, update_registries);
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:52,代码来源:alife_dynamic_object.cpp
示例3:
void SaveUVM (LPCSTR fname, xr_vector<b_rc_face>& vm)
{
IWriter* W = FS.w_open(fname);
string256 tmp;
// vertices
for (u32 v_idx=0; v_idx<vm.size(); v_idx++){
b_rc_face& rcf = vm[v_idx];
sprintf (tmp,"f %d %d [%3.2f,%3.2f]-[%3.2f,%3.2f]-[%3.2f,%3.2f]",rcf.dwMaterial,rcf.dwMaterialGame,
rcf.t[0].x,rcf.t[0].y, rcf.t[1].x,rcf.t[1].y, rcf.t[2].x,rcf.t[2].y);
W->w_string (tmp);
}
FS.w_close (W);
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:13,代码来源:xrBuildRapidModel.cpp
示例4: fill_exhaust_vector
IC void CCar::fill_exhaust_vector(LPCSTR S,xr_vector<SExhaust>& exhausts)
{
IKinematics* pKinematics =smart_cast<IKinematics*>(Visual());
string64 S1;
int count = _GetItemCount(S);
for (int i=0 ;i<count; ++i)
{
_GetItem (S,i,S1);
u16 bone_id = pKinematics->LL_BoneID(S1);
exhausts.push_back (SExhaust(this));
SExhaust& exhaust = exhausts.back();
exhaust.bone_id = bone_id;
BONE_P_PAIR_IT J = bone_map.find(bone_id);
if (J == bone_map.end())
{
bone_map.insert(mk_pair(bone_id,physicsBone()));
}
}
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:23,代码来源:Car.cpp
示例5: xrSimulate
int xrSimulate (xr_vector<u16> &indices, int iCacheSize )
{
VertexCache C(iCacheSize);
int count=0;
for (u32 i=0; i<indices.size(); i++)
{
int id = indices[i];
if (C.InCache(id)) continue;
count++;
C.AddEntry(id);
}
return count;
}
开发者ID:2asoft,项目名称:xray,代码行数:14,代码来源:OGF_Face_Stripify.cpp
示例6:
BOOL testSKIP (LPCSTR path)
{
string256 p_name;
string256 p_ext;
_splitpath (path, 0, 0, p_name, p_ext );
if (0==stricmp(p_ext,".swatch"))return TRUE;
if (0==stricmp(p_ext,".db")) return TRUE;
if (PatternMatch(p_ext,"*avi*"))return TRUE;
if (0==stricmp(p_ext,".key")) return TRUE;
if (0==stricmp(p_ext,".tga")) return TRUE;
if (0==stricmp(p_ext,".txt")) return TRUE;
if (0==stricmp(p_ext,".smf")) return TRUE;
if (0==stricmp(p_ext,".uvm")) return TRUE;
if (0==stricmp(p_ext,".raw")) return TRUE;
if (0==stricmp(p_name,"build")) return TRUE;
if ('~'==p_ext[1]) return TRUE;
if ('_'==p_ext[1]) return TRUE;
for (xr_vector<shared_str>::iterator it=exclude_exts.begin(); it!=exclude_exts.end(); it++)
if (PatternMatch(p_ext,it->c_str()))return TRUE;
return FALSE;
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:24,代码来源:xrCompress.cpp
示例7: xrSaveNodes
void xrSaveNodes(LPCSTR N, LPCSTR out_name)
{
Msg ("NS: %d, CNS: %d, ratio: %f%%",sizeof(vertex),sizeof(CLevelGraph::CVertex),100*float(sizeof(CLevelGraph::CVertex))/float(sizeof(vertex)));
Msg ("Renumbering nodes...");
string_path fName;
strconcat (sizeof(fName),fName,N,out_name);
IWriter *fs = FS.w_open(fName);
// Header
Status ("Saving header...");
hdrNODES H;
H.version = XRAI_CURRENT_VERSION;
H.count = g_nodes.size();
H.size = g_params.fPatchSize;
H.size_y = CalculateHeight(H.aabb);
H.guid = generate_guid();
fs->w (&H,sizeof(H));
// fs->w_u32 (g_covers_palette.size());
// for (u32 j=0; j<g_covers_palette.size(); ++j)
// fs->w (&g_covers_palette[j],sizeof(g_covers_palette[j]));
// All nodes
Status ("Saving nodes...");
for (u32 i=0; i<g_nodes.size(); ++i) {
vertex &N = g_nodes[i];
NodeCompressed NC;
Compress (NC,N,H);
compressed_nodes.push_back(NC);
}
xr_vector<u32> sorted;
xr_vector<u32> renumbering;
CNodeRenumberer A(compressed_nodes,sorted,renumbering);
for (u32 i=0; i<g_nodes.size(); ++i) {
fs->w (&compressed_nodes[i],sizeof(NodeCompressed));
Progress (float(i)/float(g_nodes.size()));
}
// Stats
u32 SizeTotal = fs->tell();
Msg ("%dK saved",SizeTotal/1024);
FS.w_close (fs);
}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:48,代码来源:compiler_save.cpp
示例8: dfComputeEvalResults
REAL dfComputeEvalResults(xr_vector<xr_vector<REAL> > &daEvalResults, xr_vector<xr_vector<REAL> > &A, xr_vector<xr_vector<REAL> > &B, xr_vector<REAL> &C, xr_vector<REAL> &D)
{
REAL dResult = 0.0;
u32 dwTestCount = (u32)B.size();
u32 dwParameterCount = (u32)B[0].size();
for (u32 i=0; i<dwTestCount; i++) {
for (u32 j=0; j<dwParameterCount; j++) {
daEvalResults[i][j] = dfEvaluation(A[i][j],C[j],D[j]);
REAL dTemp = B[i][j] - daEvalResults[i][j];
dResult += dTemp*dTemp;
}
}
return (dResult);
}
开发者ID:2asoft,项目名称:xray,代码行数:16,代码来源:fitter.cpp
示例9: ProcessFolder
void ProcessFolder(xr_vector<char*>& list, LPCSTR path)
{
xr_vector<char*>* i_list = FS.file_list_open ("$target_folder$",path,FS_ListFiles|FS_RootOnly);
if (!i_list){
Log ("ERROR: Unable to open file list:", path);
return;
}
xr_vector<char*>::iterator it = i_list->begin();
xr_vector<char*>::iterator itE = i_list->end();
for (;it!=itE;++it){
xr_string tmp_path = xr_string(path)+xr_string(*it);
if (!testSKIP(tmp_path.c_str())){
list.push_back (xr_strdup(tmp_path.c_str()));
//. Msg ("+f: %s",tmp_path.c_str());
}else{
Msg ("-f: %s",tmp_path.c_str());
}
}
FS.file_list_close (i_list);
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:20,代码来源:xrCompress.cpp
示例10: CreateList
void CUIMMShniaga::CreateList(xr_vector<CUIStatic*>& lst, CUIXml& xml_doc, LPCSTR path){
CGameFont* pF;
u32 color;
float button_height = xml_doc.ReadAttribFlt("button", 0, "h");
R_ASSERT (button_height);
CUIXmlInit::InitFont (xml_doc, path, 0, color, pF);
R_ASSERT (pF);
int nodes_num = xml_doc.GetNodesNum(path, 0, "btn");
XML_NODE* tab_node = xml_doc.NavigateToNode(path,0);
xml_doc.SetLocalRoot (tab_node);
CUIStatic* st;
for (int i = 0; i < nodes_num; ++i)
{
st = new CUIStatic();
st->SetWndPos (Fvector2().set(0,0));
st->SetWndSize (Fvector2().set(m_view->GetDesiredChildWidth(), button_height));
st->SetTextComplexMode (false);
st->SetTextST (xml_doc.ReadAttrib ("btn", i, "caption"));
if (pF)
st->SetFont (pF);
float font_height = st->GetFont()->GetHeight();
UI()->ClientToScreenScaledHeight(font_height);
st->SetTextY ( (button_height-font_height)/2.0f );
st->SetTextColor (color);
st->SetTextAlignment (CGameFont::alCenter);
st->SetWindowName (xml_doc.ReadAttrib("btn", i, "name"));
st->SetMessageTarget (this);
lst.push_back(st);
}
xml_doc.SetLocalRoot(xml_doc.GetRoot());
}
开发者ID:2asoft,项目名称:xray,代码行数:41,代码来源:UIMMShniaga.cpp
示例11: stats
IC void CSmartCastStats::show ()
{
if (m_stats.empty()) {
Msg ("CONGRATULATIONS : SmartCast stats is empty!!!");
return;
}
m_temp.clear ();
m_temp.insert (m_temp.begin(),m_stats.begin(),m_stats.end());
std::sort (m_temp.begin(),m_temp.end(),CStatsPredicate());
u32 total = 0;
xr_vector<CStats>::const_iterator I = m_temp.begin();
xr_vector<CStats>::const_iterator E = m_temp.end();
for ( ; I != E; ++I)
total += (*I).m_count;
Msg ("SmartCast stats (different %d, total %d) : ",(u32)m_stats.size(),total);
I = m_temp.begin();
for ( ; I != E; ++I)
Msg ("%8d %6.2f% : smart_cast<%s>(%s)",(*I).m_count,float((*I).m_count)*100.f/float(total),(*I).m_to,(*I).m_from);
}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:23,代码来源:smart_cast_stats.cpp
示例12: GetMapEntities
void game_cl_TeamDeathmatch::GetMapEntities(xr_vector<SZoneMapEntityData>& dst)
{
SZoneMapEntityData D;
u32 color_self_team = 0xff00ff00;
D.color = color_self_team;
s16 local_team = local_player->team;
PLAYERS_MAP_IT it = players.begin();
for(;it!=players.end();++it){
if(local_team == it->second->team){
u16 id = it->second->GameID;
CObject* pObject = Level().Objects.net_Find(id);
if (!pObject) continue;
if (!pObject || pObject->CLS_ID != CLSID_OBJECT_ACTOR) continue;
VERIFY(pObject);
D.pos = pObject->Position();
dst.push_back(D);
}
}
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:22,代码来源:game_cl_teamdeathmatch.cpp
示例13:
void xrStripify (xr_vector<u16> &indices, xr_vector<u16> &perturb, int iCacheSize, int iMinStripLength)
{
SetCacheSize (iCacheSize);
SetMinStripSize (iMinStripLength);
SetListsOnly (true);
// Generate strips
xr_vector<PrimitiveGroup> PGROUP;
GenerateStrips (&*indices.begin(),(u32)indices.size(),PGROUP);
R_ASSERT (PGROUP.size()==1);
R_ASSERT (PGROUP[0].type==PT_LIST);
if (indices.size()!=PGROUP[0].numIndices) throw "Stripify failed.";
// Remap indices
xr_vector<PrimitiveGroup> xPGROUP;
RemapIndices (PGROUP,u16(perturb.size()),xPGROUP);
R_ASSERT (xPGROUP.size()==1);
R_ASSERT (xPGROUP[0].type==PT_LIST);
// Build perturberation table
for(u32 index = 0; index < PGROUP[0].numIndices; index++)
{
u16 oldIndex = PGROUP[0].indices [index];
int newIndex = xPGROUP[0].indices [index];
R_ASSERT(oldIndex<(int)perturb.size());
R_ASSERT(newIndex<(int)perturb.size());
perturb[newIndex] = oldIndex;
}
// Copy indices
Memory.mem_copy (&*indices.begin(),xPGROUP[0].indices,(u32)indices.size()*sizeof(u16));
// Release memory
xPGROUP.clear ();
PGROUP.clear ();
}
开发者ID:2asoft,项目名称:xray,代码行数:36,代码来源:OGF_Face_Stripify.cpp
示例14:
//----------------------------------------------------------------------
int CObjectSpace::GetNearest ( xr_vector<ISpatial*>& q_spatial, xr_vector<CObject*>& q_nearest, const Fvector &point, float range, CObject* ignore_object )
{
q_spatial.clear_not_free ( );
// Query objects
q_nearest.clear_not_free ( );
Fsphere Q; Q.set (point,range);
Fvector B; B.set (range,range,range);
g_SpatialSpace->q_box(q_spatial,0,STYPE_COLLIDEABLE,point,B);
// Iterate
xr_vector<ISpatial*>::iterator it = q_spatial.begin ();
xr_vector<ISpatial*>::iterator end = q_spatial.end ();
for (; it!=end; it++) {
CObject* O = (*it)->dcast_CObject ();
if (0==O) continue;
if (O==ignore_object) continue;
Fsphere mS = { O->spatial.sphere.P, O->spatial.sphere.R };
if (Q.intersect(mS)) q_nearest.push_back(O);
}
return q_nearest.size();
}
开发者ID:2asoft,项目名称:xray,代码行数:23,代码来源:xr_area.cpp
示例15:
void OGF::adjacent_select (xr_vector<u32>& dest, xr_vector<bool>& vmark, xr_vector<bool>& fmark)
{
// 0. Search for the group
for (u32 fit=0; fit<faces.size(); fit++) {
OGF_Face& F = faces [fit];
if (fmark[fit]) continue; // already registered
// new face - if empty - just put it in, else check connectivity
if (dest.empty()) {
fmark[fit] = true ;
dest.push_back (F.v[0]); vmark[F.v[0]]=true;
dest.push_back (F.v[1]); vmark[F.v[1]]=true;
dest.push_back (F.v[2]); vmark[F.v[2]]=true;
} else {
// check connectivity
BOOL bConnected = FALSE;
for (u32 vid=0; vid<3; vid++) {
u32 id = F.v [vid]; // search in already registered verts
for (u32 sid=0; sid<dest.size(); sid++)
{
if (id==dest[sid]) {
bConnected = TRUE; // this face shares at least one vertex with already selected faces
break;
}
}
if (bConnected) break;
}
if (bConnected) {
// add this face's vertices
fmark[fit] = true ;
if (!vmark[F.v[0]]) { dest.push_back (F.v[0]); vmark[F.v[0]]=true; }
if (!vmark[F.v[1]]) { dest.push_back (F.v[1]); vmark[F.v[1]]=true; }
if (!vmark[F.v[2]]) { dest.push_back (F.v[2]); vmark[F.v[2]]=true; }
}
}
}
}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:37,代码来源:OGF_Face.cpp
示例16: fill_mender_input
void fill_mender_input( const vecOGF_V &vertices,
const vecOGF_F &faces,
xr_vector<float> &i_position,
xr_vector<float> &i_normal,
xr_vector<float> &i_tc,
xr_vector<float> &i_color,
xr_vector<int> &i_indices )
{
// fill inputs (verts&indices)
for (citOGF_V vert_it=vertices.begin(); vert_it!=vertices.end(); vert_it++){
const OGF_Vertex &iV = *vert_it;
i_position.push_back(iV.P.x); i_position.push_back(iV.P.y); i_position.push_back(iV.P.z);
i_normal.push_back (iV.N.x); i_normal.push_back (iV.N.y); i_normal.push_back (iV.N.z);
i_color.push_back (iV.Color._x); i_color.push_back (iV.Color._y); i_color.push_back (iV.Color._z);
i_tc.push_back (iV.UV[0].x); i_tc.push_back (iV.UV[0].y); i_tc.push_back (0);
}
for (citOGF_F face_it=faces.begin(); face_it!=faces.end(); face_it++){
const OGF_Face &iF = *face_it;
i_indices.push_back (iF.v[0]);
i_indices.push_back (iF.v[1]);
i_indices.push_back (iF.v[2]);
}
}
开发者ID:2asoft,项目名称:xray,代码行数:23,代码来源:OGF_CalculateTB2002.cpp
示例17: vfOptimizeParameters
void vfOptimizeParameters(xr_vector<xr_vector<REAL> > &A, xr_vector<xr_vector<REAL> > &B, xr_vector<REAL> &C, xr_vector<REAL> &D, REAL dEpsilon, REAL dAlpha, REAL dBeta, REAL dNormaFactor, u32 dwMaxIterationCount)
{
u32 dwTestCount = (u32)B.size();
xr_vector<REAL> daGradient;
xr_vector<REAL> daDelta;
xr_vector<xr_vector<REAL> > daEvalResults; daEvalResults.resize(dwTestCount);
if (!B.size()) {
clMsg ("! ERROR : there are no parameters to fit!");
return;
}
u32 dwParameterCount = (u32)B[0].size();
C.assign (dwParameterCount,1.0f);
D.assign (dwParameterCount,0.0f);
daDelta.assign (dwParameterCount,0);
daGradient.assign (dwParameterCount,0);
{
for (u32 i=0; i<dwTestCount; i++)
daEvalResults[i].resize(dwParameterCount);
}
u32 i = 0;
REAL dFunctional = dfComputeEvalResults(daEvalResults,A,B,C,D), dPreviousFunctional;
//clMsg ("* MU-fitter: %6d : %17.8f (%17.8f)",i,dFunctional,dFunctional/dwTestCount);
do {
dPreviousFunctional = dFunctional;
dafGradient (daEvalResults, daGradient, B, dNormaFactor);
std::transform (daGradient.begin(), daGradient.end(), daGradient.begin(), std::bind2nd(std::multiplies<REAL>(), -dAlpha));
std::transform (daDelta.begin(), daDelta.end(), daDelta.begin(), std::bind2nd(std::multiplies<REAL>(), dBeta));
std::transform (daGradient.begin(), daGradient.end(), daDelta.begin(), daDelta.begin(), std::plus<REAL>());
std::transform (C.begin(), C.end(), daDelta.begin(), C.begin(), std::plus<REAL>());
std::transform (D.begin(), D.end(), daDelta.begin(), D.begin(), std::plus<REAL>());
dFunctional = dfComputeEvalResults(daEvalResults,A,B,C,D);
i++;
}
while ((((dPreviousFunctional - dFunctional)/dwTestCount) > dEpsilon) && (i <= dwMaxIterationCount));
if (dPreviousFunctional < dFunctional) {
std::transform (daDelta.begin(), daDelta.end(), daDelta.begin(), std::bind2nd(std::multiplies<REAL>(), -1));
std::transform (C.begin(), C.end(), daDelta.begin(), C.begin(), std::plus<REAL>());
std::transform (D.begin(), D.end(), daDelta.begin(), D.begin(), std::plus<REAL>());
}
dFunctional = dfComputeEvalResults(daEvalResults,A,B,C,D);
//clMsg ("* MU-fitter: %6d : %17.8f (%17.8f)",i,dFunctional,dFunctional/dwTestCount);
}
开发者ID:2asoft,项目名称:xray,代码行数:46,代码来源:fitter.cpp
示例18: if
void sort_tlist_mat
(
xr_vector<mapMatrixTextures::TNode*,render_alloc<mapMatrixTextures::TNode*> >& lst,
xr_vector<mapMatrixTextures::TNode*,render_alloc<mapMatrixTextures::TNode*> >& temp,
mapMatrixTextures& textures,
BOOL bSSA
)
{
int amount = textures.begin()->key->size();
if (bSSA)
{
if (amount<=1)
{
// Just sort by SSA
textures.getANY_P (lst);
std::sort (lst.begin(), lst.end(), cmp_textures_ssa_mat);
}
else
{
// Split into 2 parts
mapMatrixTextures::TNode* _it = textures.begin ();
mapMatrixTextures::TNode* _end = textures.end ();
for (; _it!=_end; _it++) {
if (_it->val.ssa > r_ssaHZBvsTEX) lst.push_back (_it);
else temp.push_back (_it);
}
// 1st - part - SSA, 2nd - lexicographically
std::sort (lst.begin(), lst.end(), cmp_textures_ssa_mat);
if (2==amount) std::sort (temp.begin(), temp.end(), cmp_textures_lex2_mat);
else if (3==amount) std::sort (temp.begin(), temp.end(), cmp_textures_lex3_mat);
else std::sort (temp.begin(), temp.end(), cmp_textures_lexN_mat);
// merge lists
lst.insert (lst.end(),temp.begin(),temp.end());
}
}
else
{
textures.getANY_P (lst);
if (2==amount) std::sort (lst.begin(), lst.end(), cmp_textures_lex2_mat);
else if (3==amount) std::sort (lst.begin(), lst.end(), cmp_textures_lex3_mat);
else std::sort (lst.begin(), lst.end(), cmp_textures_lexN_mat);
}
}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:45,代码来源:r__dsgraph_render.cpp
示例19: read
void read( INetReader &r, CDB::MODEL* &m, xrLC_GlobalData &lc_global_data )
{
verts.clear();
tris.clear();
r_pod_vector( r, verts );
u32 tris_count = r.r_u32();
tris.resize( tris_count );
for( u32 i = 0; i < tris_count; ++i)
::read( r, tris[i], lc_global_data );
VERIFY(!m);
m = xr_new<CDB::MODEL> ();
m->build( &*verts.begin(), (int)verts.size(), &*tris.begin(), (int)tris.size() );
verts.clear();
tris.clear();
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:18,代码来源:xrLC_GlobalData.cpp
示例20: GetGlobalData
bool GetGlobalData( IAgent* agent,
DWORD sessionId )
{
if(!inlc_global_data())
{
VERIFY( agent );
net_pool.clear();
/*
IGenericStream* globalDataStream=0;
HRESULT rz = agent->GetData(sessionId, dataDesc, &globalDataStream);
if (rz!=S_OK)
return false;
*/
string_path cache_dir;
HRESULT rz = agent->GetSessionCacheDirectory( sessionId, cache_dir );
if (rz!=S_OK)
return false;
strconcat(sizeof(cache_dir),cache_dir,cache_dir,gl_data_net_file_name);
/*
IWriter* file = FS.w_open( cache_dir );
R_ASSERT(file);
file->w( globalDataStream->GetCurPointer(), globalDataStream->GetLength() );
free(globalDataStream->GetCurPointer());
FS.w_close(file);
agent->FreeCachedData(sessionId, dataDesc);
ULONG r =globalDataStream->AddRef();
r = globalDataStream->Release();
if(r>0)
globalDataStream->Release();
agent->FreeCachedData(sessionId, dataDesc);
Memory.mem_compact ();
*/
DataReadCreate( cache_dir );
return true;
}
return true;
}
开发者ID:2asoft,项目名称:xray,代码行数:52,代码来源:net_execution_lightmaps.cpp
注:本文中的xr_vector类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论