本文整理匯總了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();
}
示例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;
}
}
}
示例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();
}
示例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();
}
示例5: throw
bool Entity::Update( float ticks ) throw(std::exception)
{
if ( IsFlagSet( Entity::F_ENABLE )) {
DoUpdate(ticks);
}
return false;
}
示例6: DoUpdate
//------------------------------------------------------------------------
void CVehicleSeatActionRotateTurret::Update(float frameTime)
{
if (!m_pUserEntity)
{
DoUpdate(frameTime);
}
}
示例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);
}
示例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;
}
示例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();
}
示例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;
}
示例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();
}
示例12: DoUpdate
/*************************************************************//**
*
* @brief 更新処理を行う
* @param なし
* @return タスク続行:true
* @return タスク終了:false
*
****************************************************************/
bool C_BaseEffect::Update()
{
// フレーム數のカウンタを更新
frameCounter_.Update();
DoUpdate();
return C_GameObject::existenceFlag_;
}
示例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;
}
}
示例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;
}
示例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);
}
}