當前位置: 首頁>>代碼示例>>C++>>正文


C++ DoUpdate函數代碼示例

本文整理匯總了C++中DoUpdate函數的典型用法代碼示例。如果您正苦於以下問題:C++ DoUpdate函數的具體用法?C++ DoUpdate怎麽用?C++ DoUpdate使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DoUpdate函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: switch

void InterpreterDisAsmFrame::InstrKey(wxListEvent& event)
{
	long i = m_list->GetFirstSelected();
	if(i < 0 || !CPU)
	{
		event.Skip();
		return;
	}

	const u64 start_pc = PC - m_item_count*4;
	const u64 pc = start_pc + i*4;

	switch(event.GetKeyCode())
	{
	case 'E':
		// TODO:: Syphurith: It is said the InstructionEditorDialog would be immediately destroyed.
		InstructionEditorDialog(this, pc, CPU, decoder.get(), disasm);
		DoUpdate();
		return;
	case 'R':
		// TODO:: Syphurith: Eh Similiar for this one.
		RegisterEditorDialog(this, pc, CPU, decoder.get(), disasm);
		DoUpdate();
		return;
	}

	event.Skip();
}
開發者ID:Bigpet,項目名稱:rpcs3,代碼行數:28,代碼來源:InterpreterDisAsm.cpp

示例2: DoUpdate

void CLiveRoomRankManager::OnUpdate(int nTimeElapse)
{
	if (m_bHasUpdateBoard)
	{
		m_nTideUpdateTime += nTimeElapse;
		if (m_nTideUpdateTime >= m_nTideUpdateInterval)
		{
			m_nTideUpdateTime -= m_nTideUpdateInterval;
			DoUpdate();
		}
	}
	else
	{
		time_t tNow = time(NULL);
		struct tm tmNow;
		
		LocalTime(&tNow, &tmNow);

		int nDailySeconds = tmNow.tm_hour * 3600 + tmNow.tm_min * 60 + tmNow.tm_sec;
		if (nDailySeconds >= m_nFirstUpdateTime)
		{
			DoUpdate();
			m_bHasUpdateBoard = true;
		}
	}
}
開發者ID:yzfrs,項目名稱:ddianle_d1,代碼行數:26,代碼來源:LiveRoomRankManager.cpp

示例3: switch

void InterpreterDisAsmFrame::InstrKey(wxListEvent& event)
{
	long i = m_list->GetFirstSelected();
	if (i < 0 || !cpu)
	{
		event.Skip();
		return;
	}

	const u32 start_pc = m_pc - m_item_count * 4;
	const u32 pc = start_pc + i * 4;

	switch (event.GetKeyCode())
	{
	case 'E':
	{
		InstructionEditorDialog dlg(this, pc, cpu, m_disasm.get());
		DoUpdate();
		return;
	}
	case 'R':
	{
		RegisterEditorDialog dlg(this, pc, cpu, m_disasm.get());
		DoUpdate();
		return;
	}
	}

	event.Skip();
}
開發者ID:DreadIsBack,項目名稱:rpcs3,代碼行數:30,代碼來源:InterpreterDisAsm.cpp

示例4: switch

void InterpreterDisAsmFrame::InstrKey(wxListEvent& event)
{
	long i = m_list->GetFirstSelected();
	if(i < 0 || !CPU)
	{
		event.Skip();
		return;
	}

	const u64 start_pc = PC - m_item_count*4;
	const u64 pc = start_pc + i*4;

	switch(event.GetKeyCode())
	{
	case 'E':
		InstructionEditorDialog(this, pc, CPU, decoder, disasm);
		DoUpdate();
		return;
	case 'R':
		RegisterEditorDialog(this, pc, CPU, decoder, disasm);
		DoUpdate();
		return;
	}

	event.Skip();
}
開發者ID:AMMAREN,項目名稱:rpcs3,代碼行數:26,代碼來源:InterpreterDisAsm.cpp

示例5: throw

bool Entity::Update( float ticks ) throw(std::exception)
{
    if ( IsFlagSet( Entity::F_ENABLE )) {
        DoUpdate(ticks);
    }
    return false;
}
開發者ID:juergen0815,項目名稱:sdl-3d-chart,代碼行數:7,代碼來源:entity.cpp

示例6: DoUpdate

//------------------------------------------------------------------------
void CVehicleSeatActionRotateTurret::Update(float frameTime)
{
	if (!m_pUserEntity)
	{
		DoUpdate(frameTime);
	}
}
開發者ID:joewan,項目名稱:pycmake,代碼行數:8,代碼來源:VehicleSeatActionRotateTurret.cpp

示例7: OnCharPrintchar

void CBCGPMaskEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	const BOOL bIsReadOnly = ((GetStyle() & ES_READONLY) == ES_READONLY);
	if (bIsReadOnly)
	{
		CBCGPEdit::OnChar(nChar, nRepCnt, nFlags);
		return;
	}

	TCHAR chChar = (TCHAR) nChar;
	if (_istprint(chChar) && !(::GetKeyState(VK_CONTROL)&0x80))
	{
		OnCharPrintchar(nChar, nRepCnt, nFlags);	
		return;
	}
	else if ((nChar == VK_DELETE || nChar == VK_BACK) && (!m_strMask.IsEmpty()))
	{
		return;
	}

	int nBeginOld, nEndOld;
	CBCGPEdit::GetSel(nBeginOld, nEndOld);

	CBCGPEdit::OnChar(nChar, nRepCnt, nFlags);

	DoUpdate (TRUE, nBeginOld, nEndOld);
} 
開發者ID:cugxiangzhenwei,項目名稱:WorkPlatForm,代碼行數:27,代碼來源:BCGPMaskEdit.cpp

示例8: timeout

bool CTUI::Run(int delay)
{
    if (m_bQuit)
        return false;
    
    timeout(delay);
    
    // Handle keys
    chtype key = getch();
    
    if (key != static_cast<chtype>(ERR)) // Input available?
    {
        if (!m_pWinManager->HandleKey(key) && IsEscape(key))
            return false;
    }
    
    Move(m_CursorPos.first, m_CursorPos.second);
    
    while (!m_QueuedDrawWidgets.empty())
    {
        CWidget *w = m_QueuedDrawWidgets.front();
        
        m_QueuedDrawWidgets.pop_front();
        
        // Draw after widget has been removed from queue, this way the widget or childs from the
        // widget can queue themselves while being drawn.
        w->Draw();
        
        if (m_QueuedDrawWidgets.empty())
            DoUpdate(); // Commit real drawing after last widget
    }
    
    return true;
}
開發者ID:BackupTheBerlios,項目名稱:nixstaller-svn,代碼行數:34,代碼來源:tui.cpp

示例9: SPU_DisAsm

void InterpreterDisAsmFrame::OnSelectUnit(wxCommandEvent& event)
{
	CPU = (PPCThread*)event.GetClientData();

	delete decoder;
	//delete disasm;
	decoder = nullptr;
	disasm = nullptr;

	if(CPU)
	{
		if(CPU->GetType() != PPC_THREAD_PPU)
		{
			SPU_DisAsm& dis_asm = *new SPU_DisAsm(*CPU, InterpreterMode);
			decoder = new SPU_Decoder(dis_asm);
			disasm = &dis_asm;
		}
		else
		{
			PPU_DisAsm& dis_asm = *new PPU_DisAsm(*CPU, InterpreterMode);
			decoder = new PPU_Decoder(dis_asm);
			disasm = &dis_asm;
		}
	}

	DoUpdate();
}
開發者ID:Deidara387,項目名稱:rpcs3,代碼行數:27,代碼來源:InterpreterDisAsm.cpp

示例10: FbLogWarning

int FbUpdateItem::Execute()
{
	FbLogWarning(_("Update collection"), m_url);
	bool ok = FbInternetBook::Download(m_url, m_filename);
	if (ok) ok = OpenZip();
	if (ok) return DoUpdate();
	return 0;
}
開發者ID:EvgeniiFrolov,項目名稱:myrulib,代碼行數:8,代碼來源:FbUpdateThread.cpp

示例11: SPUDecoder

void InterpreterDisAsmFrame::OnSelectUnit(wxCommandEvent& event)
{
	CPU = (CPUThread*)event.GetClientData();

	decoder.reset();
	disasm = nullptr;

	class SPUDecoder : public CPUDecoder
	{
		std::unique_ptr<SPUDisAsm> disasm;

	public:
		SPUDecoder(SPUDisAsm* disasm)
			: disasm(disasm)
		{
		}

		virtual u32 DecodeMemory(const u32 address) override
		{
			disasm->do_disasm(vm::ps3::read32(address));

			return 4;
		}
	};

	if(CPU)
	{
		switch(CPU->get_type())
		{
		case CPU_THREAD_PPU:
		{
			PPUDisAsm* dis_asm = new PPUDisAsm(CPUDisAsm_InterpreterMode);
			decoder = std::make_unique<PPUDecoder>(dis_asm);
			disasm = dis_asm;
		}
		break;

		case CPU_THREAD_SPU:
		case CPU_THREAD_RAW_SPU:
		{
			SPUDisAsm* dis_asm = new SPUDisAsm(CPUDisAsm_InterpreterMode);
			decoder = std::make_unique<SPUDecoder>(dis_asm);
			disasm = dis_asm;
		}
		break;

		case CPU_THREAD_ARMv7:
		{
			//ARMv7DisAsm& dis_asm = *new ARMv7DisAsm(CPUDisAsm_InterpreterMode);
			//decoder = new ARMv7Decoder(dis_asm);
			//disasm = &dis_asm;
		}
		break;
		}
	}

	DoUpdate();
}
開發者ID:Bigpet,項目名稱:rpcs3,代碼行數:58,代碼來源:InterpreterDisAsm.cpp

示例12: DoUpdate

/*************************************************************//**
 *
 *  @brief  更新処理を行う
 *  @param  なし
 *  @return タスク続行:true
 *  @return タスク終了:false
 *
 ****************************************************************/
bool C_BaseEffect::Update()
{
    // フレーム數のカウンタを更新
    frameCounter_.Update();

    DoUpdate();

    return C_GameObject::existenceFlag_;
}
開發者ID:risaki-masa,項目名稱:OpenGL_Framework,代碼行數:17,代碼來源:BaseEffect.cpp

示例13: Sys_SendKeyEvents

/*
==================
Sys_SendKeyEvents
==================
*/
void Sys_SendKeyEvents (void) {
	Boolean		   gotEvent;
	EventRecord	   event;
	
	if ( !glConfig.isFullscreen || sys_waitNextEvent->value ) {
		// this call involves 68k code and task switching.
		// do it on the desktop, or if they explicitly ask for
		// it when fullscreen
		gotEvent = WaitNextEvent(everyEvent, &event, 0, nil);
	} else {
		gotEvent = GetOSEvent( everyEvent, &event );
	}
	
	// generate faked events from modifer changes
	Sys_ModifierEvents( event.modifiers );

	sys_lastEventTic = event.when;

	if ( !gotEvent ) {
		return;
	}
	if ( Sys_ConsoleEvent(&event) ) {
		return;
	}
	switch(event.what)
	{
		case mouseDown:
			DoMouseDown(&event);
		break;
		case mouseUp:
			DoMouseUp(&event);
		break;
		case keyDown:
			DoKeyDown(&event);
		break;
		case keyUp:
			DoKeyUp(&event);
		break;
		case autoKey:
			DoKeyDown(&event);
		break;
		case updateEvt:
			DoUpdate((WindowPtr) event.message);
		break;
		case diskEvt:
			DoDiskEvent(&event);
		break;
		case activateEvt:
			DoActivate((WindowPtr) event.message, event.modifiers);
		break;
		case osEvt:
			DoOSEvent(&event);
		break;
		default:
		break;
	}
}
開發者ID:5Quintessential,項目名稱:jedioutcast,代碼行數:62,代碼來源:mac_event.c

示例14: recurve

LRESULT C_BranchProperties::OnSpin(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	C_STLException::install();

	try {

		if (!m_bIsLoading && m_pBranch) {

			short s;
			C_SupportsRecurvePtr recurve(m_pBranch);

			switch (lParam) {

			case 0://m_spinWidth
				s = static_cast<short>(m_spinWidth->GetValue());
				m_pBranch->put_Width(s);
				break;

#ifdef SMARTACE

			case 1://m_spinRecurveHeight

				if (recurve) {

					s = static_cast<short>(m_spinRecurveHeight->GetValue());
					recurve->put_RecurveHeight(s);
				}
				break;

			case 2://m_spinRecurveRate

				if (recurve) {

					s = static_cast<short>(m_spinRecurveRate->GetValue());
					recurve->put_RecurveCount(s);
				}
				break;

#endif
			}

			C_ItemPtr item(m_pBranch);

			if (item) {
				item->put_IsDirty(TRUE);
			}

			DoUpdate();
		}
	}
	catch (C_STLNonStackException const &exception) {
		exception.Log(_T("Exception in C_BranchProperties::OnSpin"));
	}

	return S_OK;
}
開發者ID:ElliottBignell,項目名稱:HeadCase,代碼行數:56,代碼來源:BranchProperties.cpp

示例15: DoUpdate

void GameObject::Update(const float ticks)
{
    DoUpdate(ticks);

    GameObjectPtrList::iterator iter = m_children.begin();
    for ( ; iter != m_children.end(); ++iter)
    {
        (*iter)->Update(ticks);
    }
}
開發者ID:kenhilf,項目名稱:SFPC,代碼行數:10,代碼來源:gameobject.cpp


注:本文中的DoUpdate函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。