void QuitLabel::constructLabelSurface() { std::string textWithToggle = toggle? (text + " Yes"): (text + " No"); labelSurface = TTF_RenderText_Blended( ResourceData::font, textWithToggle.c_str(), color); Rect<int> blitRect(get_rect(labelSurface)); blitRect.setCenter(rect.getCenter()); blitRect.clipRect(rect); srcrect = Rect<int>(Vector2<int>(), blitRect.diagonal).getSDL_Rect(); dstrect = Rect<int>(blitRect.pos, Vector2<int>()).getSDL_Rect(); }
void MoSyncStub::updateScreen(uint8 shakeOffset) { if (shakeOffset == 0) { for (int i = 0; i < _numBlitRects; ++i) { blitRect(&_blitRects[i], _blitRects[i].left, _blitRects[i].top); } } else { MARect bsr, bdr; bdr.left = 0; bdr.top = 0; bdr.width = _screenW; bdr.height = shakeOffset; bsr.left = 0; bsr.top = 0; bsr.width = _screenW; bsr.height = (_screenH - shakeOffset); blitRect(&bsr, 0, shakeOffset); } _numBlitRects = 0; maUpdateScreen(); maResetBacklight(); }