这篇教程C++ GetRegion函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetRegion函数的典型用法代码示例。如果您正苦于以下问题:C++ GetRegion函数的具体用法?C++ GetRegion怎么用?C++ GetRegion使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetRegion函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ResetGMVisibilityvoid CUser::UserInOut(uint8 bType){ if (GetRegion() == nullptr) return; Packet result; if (bType != INOUT_OUT) ResetGMVisibility(); GetInOut(result, bType); if (bType == INOUT_OUT) GetRegion()->Remove(this); else GetRegion()->Add(this); SendToRegion(&result, this, GetEventRoom()); if (bType == INOUT_OUT || !isBlinking()) { result.Initialize(AG_USER_INOUT); result.SByte(); result << bType << GetSocketID() << GetName() << m_curx << m_curz; Send_AIServer(&result); }}
开发者ID:R3aLisT,项目名称:X-ShieldProject,代码行数:27,
示例2: whileint ARegion::CanBeStartingCity( ARegionArray *pRA ){ if(type == R_OCEAN) return 0; if (!IsCoastal()) return 0; if (town && town->pop == 5000) return 0; int regs = 0; AList inlist; AList donelist; ARegionPtr * temp = new ARegionPtr; temp->ptr = this; inlist.Add(temp); while(inlist.Num()) { ARegionPtr * reg = (ARegionPtr *) inlist.First(); for (int i=0; i<NDIRS; i++) { ARegion * r2 = reg->ptr->neighbors[i]; if (!r2) continue; if (r2->type == R_OCEAN) continue; if (GetRegion(&inlist,r2->num)) continue; if (GetRegion(&donelist,r2->num)) continue; regs++; if (regs>20) return 1; ARegionPtr * temp = new ARegionPtr; temp->ptr = r2; inlist.Add(temp); } inlist.Remove(reg); donelist.Add(reg); } return 0;}
开发者ID:nedbrek,项目名称:Atlantis,代码行数:33,
示例3: GetStringParamdouble CScript::PlaySound(const char* CmdStr, char* retStr){ CPlayer* pPlayer = dynamic_cast<CPlayer*>(p_SrcShape); if(!pPlayer || !m_pRegion) return 0; char* strFile = GetStringParam(CmdStr, 0); int nToAround = GetIntParam(CmdStr, 1); if (nToAround == ERROR_CODE) { nToAround = 0; } if (strFile) { CMessage msg(MSG_S2C_RGN_PLAYSOUND); msg.Add(strFile); //只发给自己 if(nToAround == 0 && pPlayer) msg.SendToPlayer( pPlayer -> GetExID() ); else msg.SendToAround((CServerRegion*)GetRegion(), pPlayer->GetTileX(), pPlayer->GetTileY()); M_FREE( strFile, sizeof(char)*MAX_VAR_LEN ); } return 1;}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:26,
示例4: SetButtonStatevoid TTabButtonGadget :: SetButtonState ( TState state ) { register TState previous = State ; TShapeButtonGadget :: SetButtonState ( state ) ; if ( Overlap && previous != State ) { TGadget * g = NextGadget ( ) ; TTabButtonGadget * tab = TYPESAFE_DOWNCAST ( g, TTabButtonGadget ) ; if ( previous == Down && State == Up ) { if ( tab && tab -> State == Up ) { TRegion * Region = new TRegion ( ) ; GetRegion ( * Region, OuterRegion ) ; tab -> SetIntersectionRegion ( Region ) ; tab -> Invalidate ( ) ; } } } }
开发者ID:wuthering-bytes,项目名称:cheops,代码行数:28,
示例5: DMM_MapMemory/* * ======== DMM_MapMemory ======== * Purpose: * Add a mapping block to the reserved chunk. DMM assumes that this block * will be mapped in the DSP/IVA's address space. DMM returns an error if a * mapping overlaps another one. This function stores the info that will be * required later while unmapping the block. */DSP_STATUS DMM_MapMemory(struct DMM_OBJECT *hDmmMgr, u32 addr, u32 size){ struct DMM_OBJECT *pDmmObj = (struct DMM_OBJECT *)hDmmMgr; struct MapPage *chunk; DSP_STATUS status = DSP_SOK; GT_3trace(DMM_debugMask, GT_ENTER, "Entered DMM_MapMemory () hDmmMgr %x, " "addr %x, size %x/n", hDmmMgr, addr, size); SYNC_EnterCS(pDmmObj->hDmmLock); /* Find the Reserved memory chunk containing the DSP block to * be mapped */ chunk = (struct MapPage *)GetRegion(addr); if (chunk != NULL) { /* Mark the region 'mapped', leave the 'reserved' info as-is */ chunk->bMapped = true; chunk->MappedSize = (size/PG_SIZE_4K); } else status = DSP_ENOTFOUND; SYNC_LeaveCS(pDmmObj->hDmmLock); GT_2trace(DMM_debugMask, GT_4CLASS, "Leaving DMM_MapMemory status %x, chunk %x/n", status, chunk); return status;}
开发者ID:Racing1,项目名称:zeppelin_kernel,代码行数:33,
示例6: Defaultvoid CSkinWin::OnSize(UINT nType, int cx, int cy){ //Default(); CWnd *pWnd = CWnd::FromHandle(m_hWnd); CRect wr; Default(); pWnd->GetWindowRect(wr); pWnd->Invalidate(); OnNcPaint(0); // if ( m_bTrans )// SetWindowRgn( m_hWnd, GetRegion(wr.Width(), wr.Height() ), TRUE );// else// SetWindowRgn( m_hWnd, NULL, TRUE ); if (m_bTrans) { // The operating system does not make a copy of the region, // so do not make any further function calls with this region handle, // and do not close this region handle HRGN hrgn = GetRegion(wr.Width(), wr.Height()); SetWindowRgn(m_hWnd, hrgn, TRUE); DeleteObject(hrgn); //wyw } else SetWindowRgn(m_hWnd, NULL, TRUE);}
开发者ID:jiangchengxu,项目名称:spreadtrum-w160,代码行数:30,
示例7: assertServerEntry SessionInfo::GetServerEntry() const { if (!HasServerEntry()) { assert(false); throw std::exception("SessionInfo::GetServerEntry(): !HasServerEntry()"); } // It is sometimes the case that we know more about our current server than // is contained in m_serverEntry or in the ServerEntry in the registry. So // we'll construct a new ServerEntry with the best info we have. ServerEntry newServerEntry( GetServerAddress(), GetRegion(), GetWebPort(), GetWebServerSecret(), GetWebServerCertificate(), GetSSHPort(), GetSSHUsername(), GetSSHPassword(), GetSSHHostKey(), GetSSHObfuscatedPort(), GetSSHObfuscatedKey(), GetMeekObfuscatedKey(), GetMeekServerPort(), GetMeekCookieEncryptionPublicKey(), GetMeekFrontingDomain(), GetMeekFrontingHost(), m_serverEntry.meekFrontingAddressesRegex, m_serverEntry.meekFrontingAddresses, m_serverEntry.capabilities); return newServerEntry;}
开发者ID:projectarkc,项目名称:psiphon,代码行数:25,
示例8: whilevoid CRegionView::OnCreatePrimitiveBox( ){ CStringDlg dlg; BOOL bOk; BOOL bValidNumber; CReal thickness; dlg.m_bAllowNumbers = TRUE; bOk = TRUE; bValidNumber = FALSE; uint32 nBoxThickness = ::GetApp()->GetOptions().GetDWordValue("DefaultBoxWidth", 128); dlg.m_EnteredText.Format( "%d", nBoxThickness ); while( bOk && !bValidNumber ) { if( bOk = ( dlg.DoModal(IDS_NEWBRUSHCAPTION, IDS_ENTERBRUSHTHICKNESS) == IDOK )) { thickness = (CReal)atoi( dlg.m_EnteredText ); if( thickness > 0.0f ) bValidNumber = TRUE; else AppMessageBox( IDS_ERROR_BRUSH_THICKNESS, MB_OK ); } } if( bOk ) { DoCreatePrimitiveBox( GetRegion( )->m_vMarker, thickness ); ::GetApp()->GetOptions().SetDWordValue("DefaultBoxWidth", (DWORD)thickness); }}
开发者ID:Joincheng,项目名称:lithtech,代码行数:33,
示例9: GetRegionbool MeaCircleTool::HasRegion(){ // There is always a rectangular region unless // the center and perimeter are coincident. // CRect rect = GetRegion(); return (rect.Height() != 0) && (rect.Width() != 0);}
开发者ID:craigshaw,项目名称:Meazure,代码行数:8,
示例10: GetSelectedGamevoid GameList::OpenGCSaveFolder(){ const auto game = GetSelectedGame(); if (!game) return; bool found = false; for (int i = 0; i < 2; i++) { QUrl url; switch (SConfig::GetInstance().m_EXIDevice[i]) { case ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER: { std::string path = StringFromFormat("%s/%s/%s", File::GetUserPath(D_GCUSER_IDX).c_str(), SConfig::GetDirectoryForRegion(game->GetRegion()), i == 0 ? "Card A" : "Card B"); std::string override_path = i == 0 ? Config::Get(Config::MAIN_GCI_FOLDER_A_PATH_OVERRIDE) : Config::Get(Config::MAIN_GCI_FOLDER_B_PATH_OVERRIDE); if (!override_path.empty()) path = override_path; QDir dir(QString::fromStdString(path)); if (!dir.entryList({QStringLiteral("%1-%2-*.gci") .arg(QString::fromStdString(game->GetMakerID())) .arg(QString::fromStdString(game->GetGameID().substr(0, 4)))}) .empty()) { url = QUrl::fromLocalFile(dir.absolutePath()); } break; } case ExpansionInterface::EXIDEVICE_MEMORYCARD: std::string memcard_path = i == 0 ? Config::Get(Config::MAIN_MEMCARD_A_PATH) : Config::Get(Config::MAIN_MEMCARD_B_PATH); std::string memcard_dir; SplitPath(memcard_path, &memcard_dir, nullptr, nullptr); url = QUrl::fromLocalFile(QString::fromStdString(memcard_dir)); break; } found |= !url.isEmpty(); if (!url.isEmpty()) QDesktopServices::openUrl(url); } if (!found) ModalMessageBox::information(this, tr("Information"), tr("No save data found."));}
开发者ID:booto,项目名称:dolphin,代码行数:56,
示例11: DrawFocusvoid CHTMLSectionLink::DrawFocus( GS::CDrawContext &dc ){ HRGN rgn; if( m_pParent->IsFocused() && GetRegion( rgn ) ) { dc.DrawFocus( rgn ); VAPI( DeleteObject( rgn ) ); }}
开发者ID:F5000,项目名称:spree,代码行数:10,
示例12: GetRegion Region * Planet::GetRegion(Vector3 vec, int level){ if(_sub!=NULL){ for (int i = 0; i < 6; ++i) { if(_sub[i]!=NULL && _sub[i]->InsideRegion(vec)) return GetRegion(_sub[i],vec,level); } } return NULL; }
开发者ID:hdlopesrocha,项目名称:com.enter4ward,代码行数:10,
示例13: GetRegionCountry VolumeGC::GetCountry(const Partition& partition) const{ // The 0 that we use as a default value is mapped to Country::Unknown and Region::Unknown const u8 country = ReadSwapped<u8>(3, partition).value_or(0); const Region region = GetRegion(); if (CountryCodeToRegion(country, Platform::GameCubeDisc, region) != region) return TypicalCountryForRegion(region); return CountryCodeToCountry(country, Platform::GameCubeDisc, region);}
开发者ID:MerryMage,项目名称:dolphin,代码行数:11,
示例14: nsClientRectalready_AddRefed<nsClientRect>nsDOMNotifyPaintEvent::BoundingClientRect(){ nsRefPtr<nsClientRect> rect = new nsClientRect(ToSupports(this)); if (mPresContext) { rect->SetLayoutRect(GetRegion().GetBounds()); } return rect.forget();}
开发者ID:Jaxo,项目名称:releases-mozilla-central,代码行数:11,
示例15: ASSERT/** * @brief Executes the death action. * * @param pKiller The killer. */void CNpc::OnDeath(Unit *pKiller){ if (m_NpcState == NPC_DEAD) return; ASSERT(GetMap() != nullptr); ASSERT(GetRegion() != nullptr); m_NpcState = NPC_DEAD; if (m_byObjectType == SPECIAL_OBJECT) { _OBJECT_EVENT *pEvent = GetMap()->GetObjectEvent(GetEntryID()); if (pEvent != nullptr) pEvent->byLife = 0; } Unit::OnDeath(pKiller); GetRegion()->Remove(TO_NPC(this)); SetRegion();}
开发者ID:TheNewbGuy,项目名称:snoxd-koserver,代码行数:27,
示例16: GetObjectRectvoid CHTMLSectionLink::GetObjectRect( WinHelper::CRect &rcBounds ) const{ HRGN rgn; if( GetRegion( rgn ) ) { GetRgnBox( rgn, rcBounds ); VAPI( DeleteObject( rgn ) ); } else { ASSERT( FALSE ); }}
开发者ID:F5000,项目名称:spree,代码行数:13,
示例17: if Region * Planet::GetRegion(Region * reg ,Vector3 vec, int level){ if(level==0) return reg; else if(reg->_sub!=NULL){ for (int i = 0; i < 4; ++i) { if(reg->_sub[i]!=NULL && reg->_sub[i]->InsideRegion(vec)) return GetRegion(reg->_sub[i],vec,level-1); } } return NULL; }
开发者ID:hdlopesrocha,项目名称:com.enter4ward,代码行数:13,
示例18: msgdouble CScript::PlayAction(const char* CmdStr, char* retStr){ if(p_SrcShape == NULL) return 0; WORD wAction = (WORD)GetIntParam(CmdStr, 0); CMessage msg(MSG_S2C_RGN_PLAYACTION); msg.Add(((CPlayer*)this->GetSrcShape())->GetType()); msg.Add(((CPlayer*)this->GetSrcShape())->GetExID()); msg.Add(wAction); msg.SendToAround((CServerRegion*)GetRegion(), ((CPlayer*)this->GetSrcShape())->GetTileX(), ((CPlayer*)this->GetSrcShape())->GetTileY()); return 1;}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:13,
示例19: ADDTOCALLSTACKint CChar::NPC_GetVendorMarkup( const CChar * pChar ) const{ ADDTOCALLSTACK("CChar::NPC_GetVendorMarkup"); // This vendor marks stuff up/down this percentage. // Base this on KARMA. Random is calculated at Restock time // When vendor sells to players this is the markup value. // fBuy: Client buying // RETURN: // 0-100 if ( !pChar || IsStatFlag(STATF_Pet) ) // Not on a hired vendor. return( 0 ); CVarDefCont *pVar = NULL, *pVarCharDef = NULL; CCharBase * pCharDef = Char_GetDef(); if ( pCharDef ) { // get markup value of NPC-chardef pVarCharDef = pCharDef->m_TagDefs.GetKey("VENDORMARKUP"); } int iHostility = maximum(NPC_GetHostilityLevelToward(pChar), 0); iHostility = minimum(iHostility + 15, 100); pVar = m_TagDefs.GetKey("VENDORMARKUP"); if ( pVar ) { iHostility += static_cast<int>(pVar->GetValNum()); // add NPC's markup to hostility made by karma difference } else { pVar = GetRegion()->m_TagDefs.GetKey("VENDORMARKUP"); if ( pVar ) { iHostility += static_cast<int>(pVar->GetValNum()); // if NPC is unmarked, look if the region is } else { // neither NPC nor REGION are marked, so look for the chardef if ( pVarCharDef ) { iHostility += static_cast<int>(pVarCharDef->GetValNum()); } } } return( iHostility );}
开发者ID:swak,项目名称:Source,代码行数:51,
示例20: void CN3UIIcon::Render(){ if (!IsVisible()) return; CN3UIWndBase::m_pSelectionImage->SetVisible(false);/* if ( m_dwStyle & UISTYLE_ICON_HIGHLIGHT ) { CN3UIWndBase::m_pSelectionImage->SetVisible(true); CN3UIWndBase::m_pSelectionImage->SetRegion(GetRegion()); CN3UIWndBase::m_pSelectionImage->Render(); CN3UIWndBase::m_pSelectionImage->SetVisible(false); }*/ CN3UIImage::Render(); if (m_dwStyle & UISTYLE_DISABLE_SKILL) { CN3UIWndBase::m_pSelectionImage->SetVisible(true); CN3UIWndBase::m_pSelectionImage->SetRegion(GetRegion()); m_dc = CN3UIWndBase::m_pSelectionImage->GetColor(); CN3UIWndBase::m_pSelectionImage->SetColor(D3DCOLOR_RGBA(40,40, 40, 160)); CN3UIWndBase::m_pSelectionImage->RenderIconWrapper(); CN3UIWndBase::m_pSelectionImage->SetColor(m_dc); CN3UIWndBase::m_pSelectionImage->SetVisible(false); } if( m_dwStyle & UISTYLE_DURABILITY_EXHAUST ) { CN3UIWndBase::m_pSelectionImage->SetVisible(true); CN3UIWndBase::m_pSelectionImage->SetRegion(GetRegion()); m_dc = CN3UIWndBase::m_pSelectionImage->GetColor(); CN3UIWndBase::m_pSelectionImage->SetColor(D3DCOLOR_RGBA(200, 20, 20, 100)); CN3UIWndBase::m_pSelectionImage->RenderIconWrapper(); CN3UIWndBase::m_pSelectionImage->SetColor(m_dc); CN3UIWndBase::m_pSelectionImage->SetVisible(false); }}
开发者ID:sailei1,项目名称:knightonline,代码行数:38,
示例21: GetInOutvoid CUser::UserInOut(uint8 bType){ if (GetRegion() == NULL) return; Packet result; GetInOut(result, bType); if (bType == INOUT_OUT) GetRegion()->Remove(this); else GetRegion()->Add(this); SendToRegion(&result, this); if (bType == INOUT_OUT || !isBlinking()) { result.Initialize(AG_USER_INOUT); result.SByte(); result << bType << GetSocketID() << m_pUserData.m_id << m_pUserData.m_curx << m_pUserData.m_curz; g_pMain->Send_AIServer(&result); }}
开发者ID:BrokenWings,项目名称:snoxd-koserver,代码行数:23,
|