本文整理汇总了C++中xr_vector::rend方法的典型用法代码示例。如果您正苦于以下问题:C++ xr_vector::rend方法的具体用法?C++ xr_vector::rend怎么用?C++ xr_vector::rend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xr_vector
的用法示例。
在下文中一共展示了xr_vector::rend方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateSpot
//.........这里部分代码省略.........
bool b_pointer =( GetSpotPointer(sp) && map->NeedShowPointer(wnd_rect));
if(map->Heading())
{
m_position_on_map = map->ConvertRealToLocal(position, true); //for drawing
sp->SetWndPos (m_position_on_map);
}
if(b_pointer)
UpdateSpotPointer( map, GetSpotPointer(sp) );
}
else if ( Level().name() == map->MapName() && GetSpotPointer(sp) )
{
GameGraph::_GRAPH_ID dest_graph_id;
dest_graph_id = m_owner_se_object->m_tGraphID;
map_point_path.clear();
VERIFY( Actor() );
GraphEngineSpace::CGameVertexParams params(Actor()->locations().vertex_types(),flt_max);
bool res = ai().graph_engine().search(
ai().game_graph(),
Actor()->ai_location().game_vertex_id(),
dest_graph_id,
&map_point_path,
params
);
if ( res )
{
xr_vector<u32>::reverse_iterator it = map_point_path.rbegin();
xr_vector<u32>::reverse_iterator it_e = map_point_path.rend();
xr_vector<CLevelChanger*>::iterator lit = g_lchangers.begin();
//xr_vector<CLevelChanger*>::iterator lit_e = g_lchangers.end();
bool bDone = false;
//for(; (it!=it_e)&&(!bDone) ;++it){
// for(lit=g_lchangers.begin();lit!=lit_e; ++lit){
// if((*it)==(*lit)->ai_location().game_vertex_id() )
// {
// bDone = true;
// break;
// }
// }
//}
static bool bbb = false;
if(!bDone&&bbb)
{
Msg("! Error. Path from actor to selected map spot does not contain level changer :(");
Msg("Path:");
xr_vector<u32>::iterator it = map_point_path.begin();
xr_vector<u32>::iterator it_e = map_point_path.end();
for(; it!=it_e;++it){
// Msg("%d-%s",(*it),ai().game_graph().vertex(*it));
Msg("[%d] level[%s]",(*it),*ai().game_graph().header().level(ai().game_graph().vertex(*it)->level_id()).name());
}
Msg("- Available LevelChangers:");
xr_vector<CLevelChanger*>::iterator lit,lit_e;
lit_e = g_lchangers.end();
for(lit=g_lchangers.begin();lit!=lit_e; ++lit){
GameGraph::_GRAPH_ID gid = (*lit)->ai_location().game_vertex_id();
Msg("[%d]",gid);