void Interrupt::Write(uint32 A, uint8 V) { //printf("Write: %04x %02x\n", A, V); switch(A) { case 0xB0: IVectorBase = V; Recalc(); break; case 0xB2: IEnable = V; IStatus &= IEnable; Recalc(); break; case 0xB6: IStatus &= ~V; Recalc(); break; } }
void CWndImage::SetZoom(double zoomX, double zoomY) { m_zoomX = zoomX; m_zoomY = zoomY; m_bltMode = bltCustom; Recalc(); }
void CWndImage::SetOriginY(int origY) { m_origin.y = origY; m_alignY = bltCustom; Recalc(); }
BOOL CRollupCtrl::OnCommand(WPARAM wParam, LPARAM lParam) { switch(wParam) { case USRMSG_STATECHANGED: { ChildStateChanged((HWND)lParam, true); break; } case USRMSG_GRIPPERMOVE: { if(Recalc((HWND)lParam)) Invalidate(); break; } case USRMSG_RIGHTCLICK: { if(m_List.GetAt(1)->pHeader->m_hWnd == (HWND)lParam) GetParent()->SendMessage(WM_COMMAND, USRMSG_SWITCHUPLOADLIST, 0); else if(m_List.GetAt(0)->pHeader->m_hWnd == (HWND)lParam) GetParent()->SendMessage(WM_COMMAND, USRMSG_CLEARCOMPLETED, 0); } default: { //GetParent()->PostMessage(WM_COMMAND, wParam, lParam); break; } } return CWnd::OnCommand(wParam, lParam); }
void CIMXFps::Add(double tm) { m_ts.push_back(tm); if (m_ts.size() > DIFFRINGSIZE) m_ts.pop_front(); Recalc(); }
//-------------------------------------------------- TkSens::TkSens(AMSPoint& GCoo,bool MC){ _isMC=MC; Clear(); GlobalCoo = GCoo; for (int ii=0; ii<3; ii++) GlobalDir[ii] = 0; Recalc(); }
void Layout::GetLSize( LSize* pls ) { /* !!!?? if (valid) { *pls = size; return; } */ Recalc(); int i; LSize ls; for ( i = 0; i < lines.count(); i++ ) { ls.y.Plus( lines[i].range ); } for ( i = 0; i < columns.count(); i++ ) { ls.x.Plus( columns[i].range ); } size = ls; *pls = ls; }
//-------------------------------------------------- TkSens::TkSens(AMSPoint& GCoo, AMSDir& GDir,bool MC){ _isMC=MC; Clear(); GlobalCoo = GCoo; GlobalDir = GDir; Recalc(); }
void CPlayerBase::update(float elapsed) { PROFILE_FUNCTION("update base"); if (camera.isValid()) { if (onCinematic) { UpdateCinematic(elapsed); } else if (controlEnabled || only_sense) { bool alive = !checkDead(); if (alive && inputEnabled) { energy_decrease = energy_default_decrease; // Default if nobody change that this frame UpdateSenseVision(); if (!only_sense) { UpdateMoves(); UpdateInputActions(); } setLife(getLife() - getDeltaTime() * energy_decrease); } Recalc(); if (alive) { //UpdateMoves(); myUpdate(); update_msgs(); } } //UpdateAnimation(); } }
bool FreqWindow::Show(bool show) { if (!show) { mFreqPlot->SetCursor(*mArrowCursor); } bool shown = IsShown(); if (show && !shown) { gPrefs->Read(ENV_DB_KEY, &dBRange, ENV_DB_RANGE); if(dBRange < 90.) dBRange = 90.; GetAudio(); // Don't send an event. We need the recalc right away. // so that mAnalyst is valid when we paint. //SendRecalcEvent(); Recalc(); } bool res = wxDialogWrapper::Show(show); return res; }
void CWndImage::SetBltMode(int mode) { if (mode <=0 || mode > blt_MaxMode) mode = bltNormal; if (mode == m_bltMode) return; m_bltMode = mode; Recalc(); }
void Interrupt::Reset() { IAsserted = 0x00; IEnable = 0x00; IStatus = 0x00; IVectorBase = 0x00; Recalc(); }
void IRQ_Reset(void) { Asserted = 0; Status = 0; Mask = 0; Recalc(); }
void IRQ_Power(void) { Asserted = 0; Status = 0; Mask = 0; Recalc(); }
//-------------------------------------------------- TkSens::TkSens(int tkid, AMSPoint& GCoo, AMSDir& GDir,bool MC){ _isMC=MC; Clear(); GlobalCoo = GCoo; GlobalDir = GDir; lad_tkid = tkid; Recalc(); }
static void RotateRight(pNode& p) { pNode a = p; pNode b = a->Left; pNode R = a->Right; pNode L = b->Left; pNode C = b->Right; a->Left = C; a->Right = R; b->Left = L; b->Right = a; FixHeight(a); Recalc(a); FixHeight(b); Recalc(b); p = b; }
BOOL CKCBusyProgressCtrl::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) { BOOL bResult = CWnd::Create(TEXT("STATIC"), TEXT("BusyProgressCtrl"), dwStyle, rect, pParentWnd, nID, pContext); Recalc(); return bResult; }
// Перемещение камеры вперед void CCamera::Forward(void) { double r=length(ViewPoint - position); if (r>4) { position=position+forward*r/20; } Recalc(); }
// Перемещение камеры вниз void CCamera::Down(void) { double r=length(ViewPoint - position); if (asin((position.y - ViewPoint.y)/r)>-1.4) { position=position+(-up+forward*(sqrt(r*r+1)-r))*r/20; } Recalc(); }
// Перемещение камеры назад void CCamera::Back(void) { double r=length(ViewPoint - position); //if (r<60) { position=position-forward*r/20; } Recalc(); }
// Сброс камеры void CCamera::Reset(void) { position=positionDefault; //ViewPoint.x=0; //ViewPoint.y=0; //ViewPoint.z=0; //SaveToFile(); Recalc(); }
GUIBox::GUIBox(RenderWindow* renderWindow_, Vector2f position_, float width, float height, std::string text_, TextStyle *Ñtstyle, GUIStyle *Cgstyle) : IDisplayable(renderWindow_, position_, width, height) { gstyle = Cgstyle; tstyle = Ñtstyle; text.setString(text_); text.setFont(tstyle->font); text.setCharacterSize(tstyle->fontSize); text.setFillColor(tstyle->color); Recalc(); }
GUIBox::GUIBox(RenderWindow* renderWindow_, float x, float y, Vector2f size_, std::string text_, TextStyle *Ñtstyle, GUIStyle *Cgstyle) : IDisplayable(renderWindow_, x, y, size_) { gstyle = Cgstyle; tstyle = Ñtstyle; text.setString(text_); text.setFont(tstyle->font); text.setCharacterSize(tstyle->fontSize); text.setFillColor(tstyle->color); Recalc(); }
Node* ImplicitTreap::Merge(Node* left, Node* right) { if (left == nullptr) { return right; } if (right == nullptr) { return left; } // Смотрим, какой элемент станет корнем будущего дерева. if (left->priority > right->priority) { // Если приоритет левого корня оказался больше приоритета правого, то корнем нового дерева становится корень left. Левым поддеревом нового дерева становится left->left. А для правого дерева нового поддерева рекурсивно вызываем merge от right и left->right. left->right = Merge(left->right, right); Recalc(left); return left; } else { // Симметричная ситуация. right->left = Merge(left, right->left); Recalc(right); return right; } }
void IRQ_SetRegister(unsigned int which, uint32 value) { switch(which) { case IRQ_GSREG_ASSERTED: Asserted = value; Recalc(); break; case IRQ_GSREG_STATUS: Status = value; Recalc(); break; case IRQ_GSREG_MASK: Mask = value; Recalc(); break; } }
void Interrupt::AssertInterrupt(unsigned which, bool asserted) { const uint8 prev_IAsserted = IAsserted; IAsserted &= ~(1U << which); IAsserted |= (unsigned)asserted << which; IStatus |= ((prev_IAsserted ^ IAsserted) & IAsserted) & IEnable; Recalc(); }
void CWndImage::SetAlign(int alignX, int alignY) { if (alignX < 0 || alignX > blt_MaxAlign || alignX == m_alignX) alignX = 0; if (alignY < 0 || alignY > blt_MaxAlign || alignY == m_alignY) alignY = 0; if (alignX == 0 && alignY == 0) return; // no change if (alignX) m_alignX = alignX; if (alignY) m_alignY = alignY; Recalc(); }
void FreqWindow::Plot(int len, float *data, double rate) { mRate = rate; mDataLen = len; if (mData) delete[]mData; mData = new float[len]; for (int i = 0; i < len; i++) mData[i] = data[i]; Recalc(); }
void Camera::Setup(float32 fovyInDegrees, float32 aspectYdivX, float32 zNear, float32 zFar, bool isOrtho) { flags |= REQUIRE_REBUILD_PROJECTION; this->aspect = aspectYdivX; this->fovy = fovyInDegrees; this->znear = zNear; this->zfar = zFar; this->ortho = isOrtho; Recalc(); }
void FreqWindow::OnAlgChoice(wxCommandEvent & event) { // Log-frequency axis works for spectrum plots only. if (mAlgChoice->GetSelection() == 0) { mAxisChoice->Enable(true); mLogAxis = (mAxisChoice->GetSelection())?true:false; } else { mAxisChoice->Disable(); mLogAxis = false; } Recalc(); }