void GetScienceAndSensorReading(int idx) { char str[1024]; printf("=== SCIENCE READING ===\n"); FillKeyboardBufferString("SCI-OV 32 .READINGS\n"); Continue(); sprintf(str, "%i %i SENSE-ADDR 1.5!\n", planets[idx].instanceoffset&0xFFFF, planets[idx].instanceoffset>>16 ); FillKeyboardBufferString(str); Continue(); FillKeyboardBufferString("AN-OV\n"); Continue(); // Patch science level Write16(0xedc9, 0x0f30-2); // 1 Write16(0xedc9+2, 0x1692-2); // EXIT printf("=== SENSOR READING ===\n"); FillKeyboardBufferString("32 (/ANALYSIS)\n"); Continue(); fflush(stdout); }
void GetAtmosphere(int idx) { char str[1024]; FillKeyboardBufferString("ATMO @ .\n"); Continue(); //FillKeyboardBufferString("PLSET-OV ATMO.ACTIVITY @ ATMO.DENSITY C@\n"); FillKeyboardBufferString("PLSET-OV SURFTYPE C@ ATMO @ ATMO.DENSITY C@ ATMO.ACTIVITY @\n"); Continue(); printf("planet %i x=%3i y=%3i orbit=%i surftype=%i atmo=%2i atmospheric_density=%2i atmospheric_activity=%2i\n", idx, planets[idx].x, planets[idx].y, planets[idx].orbit, Read16(regsp+8), Read16(regsp+6), Read16(regsp+4), Read16(regsp+2) ); Pop(); Pop(); Pop(); Pop(); }
void introTest(WINDOW *win) { werase(win); wmove(win, height / 2 - 5, width / 2); wvline(win, ACS_VLINE, 10); wmove(win, height / 2, width / 2 - 10); whline(win, ACS_HLINE, 20); Continue(win); beep(); werase(win); box(win, ACS_VLINE, ACS_HLINE); wrefresh(win); cbreak(); mvwaddstr(win, 1, 1, "You should have a rectangle in the middle of the screen"); mvwaddstr(win, 2, 1, "You should have heard a beep"); Continue(win); flash(); mvwaddstr(win, 3, 1, "You should have seen a flash"); Continue(win); }
void GetRegions() { FillKeyboardBufferString("BIO\n"); Continue(); printf("=== MAPS READING ===\n"); FillKeyboardBufferString("MAPS- WF4F4\n"); Continue(); FillKeyboardBufferString("DPART-OV WF166 OTHER-DELETE\n"); Continue(); fflush(stdout); }
void resizeTest(WINDOW *dummy) { WINDOW *win1; int nwidth = 135, nheight = 52; int owidth = COLS, oheight = LINES; savetty(); resize_term(nheight, nwidth); clear(); refresh(); win1 = newwin(10, 50, 14, 25); if (win1 == NULL) { endwin(); return; } #ifdef A_COLOR if (has_colors()) { init_pair(3, COLOR_BLUE, COLOR_WHITE); wattrset(win1, COLOR_PAIR(3)); } wclear(win1); #endif mvwaddstr(win1, 0, 0, "The screen may now be resized"); mvwprintw(win1, 1, 4, "Given size: %d by %d", nwidth, nheight); mvwprintw(win1, 2, 4, "Actual size: %d by %d", COLS, LINES); Continue(win1); wclear(win1); resetty(); mvwaddstr(win1, 0, 0, "The screen should now be reset"); mvwprintw(win1, 1, 6, "Old size: %d by %d", owidth, oheight); mvwprintw(win1, 2, 6, "Size now: %d by %d", COLS, LINES); Continue(win1); delwin(win1); clear(); refresh(); }
void NodeJSDebugger::OnDebugStart(clDebugEvent& event) { event.Skip(); CHECK_COND_RET(NodeJSWorkspace::Get()->IsOpen()); // Our to handle event.Skip(false); if(m_socket && m_socket->IsConnected()) { Continue(); return; }; NodeJSDebuggerDlg dlg(EventNotifier::Get()->TopFrame(), NodeJSDebuggerDlg::kDebug); if(dlg.ShowModal() != wxID_OK) { return; } wxString command = dlg.GetCommand(); if(!m_node.ExecuteConsole(command, "", false, command)) { ::wxMessageBox(_("Failed to start NodeJS application"), "CodeLite", wxOK | wxICON_ERROR | wxCENTER); m_socket.Reset(NULL); } // already connected? m_socket.Reset(new NodeJSSocket(this)); NodeJSWorkspaceUser userConf(NodeJSWorkspace::Get()->GetFilename().GetFullPath()); userConf.Load(); m_socket->Connect("127.0.0.1", userConf.GetDebuggerPort()); }
void NodeJSDebugger::OnDebugContinue(clDebugEvent& event) { event.Skip(); CHECK_RUNNING(); event.Skip(false); Continue(); }
void UnitMng::issueCommands() { if(conUnit) { //double *inputs,*outputs; //inputs=generateInputs(); generateInputs(); //outputs=generateOutputs(inputs); generateOutputs(); //Keep Last Command incase of CONTINUE lastCommand=act; if(outputs[0]>outputs[1]&&outputs[0]>outputs[2])//&&outputs[0]>=outputs[3]) { act=ATTACK; attack(); } else if(outputs[1]>outputs[0]&&outputs[1]>outputs[2])//&&outputs[1]>=outputs[3]) { act=MOVE; move(); } else if(outputs[2]>outputs[0]&&outputs[2]>outputs[1])//&&outputs[2]>=outputs[3]) { act=HOLD; hold(); } else { Continue(); } } }
void Model::ContinuePauseButton() { if (m_printing) Pause(); else Continue(); }
TEST_F(BasicThreadTest, ValidateThreadTimes) { AutoCurrentContext ctxt; ctxt->Initiate(); static const size_t spinCount = 10000000; auto spinsThenQuits = ctxt->Construct<SpinsAndThenQuits>(spinCount); // Instantaneous benchmark on the time it takes to decrement the counter value: std::chrono::nanoseconds benchmark; { auto startTime = std::chrono::high_resolution_clock::now(); for(volatile size_t i = spinCount; i--;); benchmark = std::chrono::high_resolution_clock::now() - startTime; } // By this point, not much should have happened: std::chrono::milliseconds kernelTime; std::chrono::milliseconds userTime; spinsThenQuits->GetThreadTimes(kernelTime, userTime); // Kick off the thread and wait for it to exit: spinsThenQuits->Continue(); ASSERT_TRUE(spinsThenQuits->WaitFor(std::chrono::seconds(10))) << "Spin-then-quit test took too long to execute"; // Thread should not have been able to complete in less time than we completed, by a factor of ten or so at least ASSERT_LE(benchmark, spinsThenQuits->m_userTime * 10) << "Reported execution time could not possibly be correct, spin operation took less time to execute than should have been possible with the CPU"; }
bool Player::SlowMotion(int repeats) { if (input.videoTrack && !isHttp && isPlaying) { if (isPaused) { Continue(); } switch (repeats) { case 2: case 4: case 8: { isSlowMotion = true; break; } default: { repeats = 0; } } output.SlowMotion(repeats); return true; } fprintf(stderr, "[player.cpp] slowmotion not possible\n"); return false; }
NS_IMETHODIMP DOMCursor::Continue() { ErrorResult rv; Continue(rv); return rv.ErrorCode(); }
NS_IMETHODIMP DOMCursor::Continue() { ErrorResult rv; Continue(rv); return rv.StealNSResult(); }
void WindowsService::HandleControlCode(DWORD opcode) { // Handle the requested control code. switch(opcode) { case SERVICE_CONTROL_STOP: // Stop the service. status.dwCurrentState= SERVICE_STOP_PENDING; Stop(); break; case SERVICE_CONTROL_PAUSE: status.dwCurrentState= SERVICE_PAUSE_PENDING; Pause(); break; case SERVICE_CONTROL_CONTINUE: status.dwCurrentState= SERVICE_CONTINUE_PENDING; Continue(); break; case SERVICE_CONTROL_SHUTDOWN: Shutdown(); break; case SERVICE_CONTROL_INTERROGATE: ReportStatus(status.dwCurrentState); break; default: // invalid control code break; } }
void CPDF_ProgressiveRenderer::Start(IFX_Pause* pPause) { if (!m_pContext || !m_pDevice || m_Status != Ready) { m_Status = Failed; return; } m_Status = ToBeContinued; Continue(pPause); }
void Printer::ContinuePauseButton() { if (device==NULL) return; if (printing) Pause(); else Continue(); }
void CProgressDlg::SetCaption(LPCTSTR szCaption) { ASSERT (GetSafeHwnd()); SetWindowText(szCaption); Continue(); }
/* virtual */ OP_STATUS ES_RemoteDebugFrontend::StoppedAt(unsigned dbg_runtime_id, unsigned dbg_thread_id, const ES_DebugStoppedAtData &data) { if (!IsConnected()) return Continue(dbg_runtime_id, RUN); TRAPD(status, StoppedAtL(dbg_runtime_id, dbg_thread_id, data)); return status; }
void CProgressDlg::SetDescription(LPCTSTR szDescription) { ASSERT (GetSafeHwnd()); m_sDescription = szDescription; UpdateData(FALSE); Continue(); }
void Scene::MainFunction() { static bool init = false; if (AsyncHandler::IsImportantFilePending() || Graphics::IsTransitionPending()) { Player::Update(false); } else if (!init) { // Initialization after scene switch switch (push_pop_operation) { case ScenePushed: Start(); initialized = true; break; case ScenePopped: if (!initialized) { Start(); initialized = true; } else { Continue(); } break; default:; } push_pop_operation = 0; TransitionIn(); Resume(); init = true; return; } else { Player::Update(); } if (Scene::instance.get() != this) { // Shutdown after scene switch assert(Scene::instance == instances.back() && "Don't set Scene::instance directly, use Push instead!"); Graphics::Update(true); Suspend(); TransitionOut(); switch (push_pop_operation) { case ScenePushed: Graphics::Push(Scene::instance->DrawBackground()); break; // Graphics::Pop done in Player Loop default:; } init = false; } }
bool OsProc::Remove() { if ( is_suspended ) { Continue(); } requested_exit = true; daemonCore->Send_Signal(JobPid, rm_kill_sig); return false; // return false says shutdown is pending }
bool ScriptProc::Hold() { if ( is_suspended ) { Continue(); } requested_exit = true; daemonCore->Send_Signal(JobPid, hold_kill_sig); return false; // return false says shutdown is pending }
void XDLink::RunUntil ( const JCharacter* fileName, const JIndex lineIndex ) { SetBreakpoint(fileName, lineIndex, kJTrue); Continue(); }
void Printer::Kick() { #if IOCHANNEL if (!IsConnected()) return; cerr << "Kick" << endl; #else if (device==NULL) return; rr_dev_kick (device); #endif Continue(); }
void ModelViewController::ContinuePauseButton() { if( !strcmp (gui->ContinueButton->label(), "Pause") ) { Pause(); } else { Continue(); } }
void CProgressDlg::SetProgress(int nProgress) { ASSERT (GetSafeHwnd()); m_progress.SetPos(nProgress); if (GetDlgItem(IDCANCEL)->GetSafeHwnd()) GetDlgItem(IDCANCEL)->EnableWindow(TRUE); Continue(); }
FX_BOOL CPDF_ImageRenderer::Continue(IFX_Pause* pPause) { if (m_Status == 1) { if (m_pQuickStretcher->Continue(pPause)) { return TRUE; } if (m_pQuickStretcher->m_pBitmap->IsAlphaMask()) m_pRenderStatus->m_pDevice->SetBitMask( m_pQuickStretcher->m_pBitmap, m_pQuickStretcher->m_ResultLeft, m_pQuickStretcher->m_ResultTop, m_FillArgb); else m_pRenderStatus->m_pDevice->SetDIBits( m_pQuickStretcher->m_pBitmap, m_pQuickStretcher->m_ResultLeft, m_pQuickStretcher->m_ResultTop, m_BlendType); return FALSE; } if (m_Status == 2) { if (m_pTransformer->Continue(pPause)) { return TRUE; } CFX_DIBitmap* pBitmap = m_pTransformer->m_Storer.Detach(); if (pBitmap == NULL) { return FALSE; } if (pBitmap->IsAlphaMask()) { if (m_BitmapAlpha != 255) { m_FillArgb = FXARGB_MUL_ALPHA(m_FillArgb, m_BitmapAlpha); } m_Result = m_pRenderStatus->m_pDevice->SetBitMask( pBitmap, m_pTransformer->m_ResultLeft, m_pTransformer->m_ResultTop, m_FillArgb); } else { if (m_BitmapAlpha != 255) { pBitmap->MultiplyAlpha(m_BitmapAlpha); } m_Result = m_pRenderStatus->m_pDevice->SetDIBits( pBitmap, m_pTransformer->m_ResultLeft, m_pTransformer->m_ResultTop, m_BlendType); } delete pBitmap; return FALSE; } if (m_Status == 3) { return m_pRenderStatus->m_pDevice->ContinueDIBits(m_DeviceHandle, pPause); } if (m_Status == 4) { if (m_Loader.Continue(m_LoadHandle, pPause)) { return TRUE; } if (StartRenderDIBSource()) { return Continue(pPause); } } return FALSE; }
//------------------------------------------------------------------------------ // Summary - Player selects continue/new game. //------------------------------------------------------------------------------ void Player::Summary(void) { // Set the UI. emit SetUI(SUMMARY); // Wait for the user to select 'New Game/Continue'. QEventLoop* loop = new QEventLoop(); connect(this, SIGNAL(Continue()), loop, SLOT(quit())); connect(this, SIGNAL(ExitLoop()), loop, SLOT(quit())); loop->exec(); delete loop; }
void Printer::ContinuePauseButton(bool paused) { #if IOCHANNEL if (!IsConnected()) return; #else if (device==NULL) return; #endif if (paused) Pause(); else Continue(); }
void CProgressDlg::SetProgress(LPCTSTR szProgress) { ASSERT (GetSafeHwnd()); m_sProgress = szProgress; UpdateData(FALSE); if (GetDlgItem(IDCANCEL)->GetSafeHwnd()) GetDlgItem(IDCANCEL)->EnableWindow(TRUE); Continue(); }