本文整理汇总了C++中GfxView::isScaleable方法的典型用法代码示例。如果您正苦于以下问题:C++ GfxView::isScaleable方法的具体用法?C++ GfxView::isScaleable怎么用?C++ GfxView::isScaleable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GfxView
的用法示例。
在下文中一共展示了GfxView::isScaleable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: kernelBaseSetter
void GfxCompare::kernelBaseSetter(reg_t object) {
if (lookupSelector(_segMan, object, SELECTOR(brLeft), NULL, NULL) == kSelectorVariable) {
int16 x = readSelectorValue(_segMan, object, SELECTOR(x));
int16 y = readSelectorValue(_segMan, object, SELECTOR(y));
int16 z = (SELECTOR(z) > -1) ? readSelectorValue(_segMan, object, SELECTOR(z)) : 0;
int16 yStep = readSelectorValue(_segMan, object, SELECTOR(yStep));
GuiResourceId viewId = readSelectorValue(_segMan, object, SELECTOR(view));
int16 loopNo = readSelectorValue(_segMan, object, SELECTOR(loop));
int16 celNo = readSelectorValue(_segMan, object, SELECTOR(cel));
uint16 scaleSignal = 0;
if (getSciVersion() >= SCI_VERSION_1_1)
scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal));
Common::Rect celRect;
GfxView *tmpView = _cache->getView(viewId);
if (!tmpView->isScaleable())
scaleSignal = 0;
if (scaleSignal & kScaleSignalDoScaling) {
celRect = getNSRect(object);
} else {
tmpView->getCelRect(loopNo, celNo, x, y, z, celRect);
}
celRect.bottom = y + 1;
celRect.top = celRect.bottom - yStep;
writeSelectorValue(_segMan, object, SELECTOR(brLeft), celRect.left);
writeSelectorValue(_segMan, object, SELECTOR(brRight), celRect.right);
writeSelectorValue(_segMan, object, SELECTOR(brTop), celRect.top);
writeSelectorValue(_segMan, object, SELECTOR(brBottom), celRect.bottom);
}
}
示例2: kernelBaseSetter
void GfxCompare::kernelBaseSetter(reg_t object) {
if (lookupSelector(_segMan, object, SELECTOR(brLeft), NULL, NULL) == kSelectorVariable) {
int16 x = readSelectorValue(_segMan, object, SELECTOR(x));
int16 y = readSelectorValue(_segMan, object, SELECTOR(y));
int16 z = (SELECTOR(z) > -1) ? readSelectorValue(_segMan, object, SELECTOR(z)) : 0;
int16 yStep = readSelectorValue(_segMan, object, SELECTOR(yStep));
GuiResourceId viewId = readSelectorValue(_segMan, object, SELECTOR(view));
int16 loopNo = readSelectorValue(_segMan, object, SELECTOR(loop));
int16 celNo = readSelectorValue(_segMan, object, SELECTOR(cel));
// HACK: Ignore invalid views for now (perhaps unimplemented text views?)
if (viewId == 0xFFFF) // invalid view
return;
uint16 scaleSignal = 0;
if (getSciVersion() >= SCI_VERSION_1_1) {
scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal));
}
Common::Rect celRect;
GfxView *tmpView = _cache->getView(viewId);
if (!tmpView->isScaleable())
scaleSignal = 0;
if (scaleSignal & kScaleSignalDoScaling) {
celRect = getNSRect(object);
} else {
if (tmpView->isSci2Hires())
tmpView->adjustToUpscaledCoordinates(y, x);
tmpView->getCelRect(loopNo, celNo, x, y, z, celRect);
if (tmpView->isSci2Hires()) {
tmpView->adjustBackUpscaledCoordinates(celRect.top, celRect.left);
tmpView->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right);
}
}
celRect.bottom = y + 1;
celRect.top = celRect.bottom - yStep;
writeSelectorValue(_segMan, object, SELECTOR(brLeft), celRect.left);
writeSelectorValue(_segMan, object, SELECTOR(brRight), celRect.right);
writeSelectorValue(_segMan, object, SELECTOR(brTop), celRect.top);
writeSelectorValue(_segMan, object, SELECTOR(brBottom), celRect.bottom);
}
}
示例3: addToPicDrawCels
void GfxAnimate::addToPicDrawCels() {
reg_t curObject;
GfxView *view = NULL;
AnimateList::iterator it;
const AnimateList::iterator end = _list.end();
for (it = _list.begin(); it != end; ++it) {
curObject = it->object;
// Get the corresponding view
view = _cache->getView(it->viewId);
// kAddToPic does not do loop/cel-number fixups
if (it->priority == -1)
it->priority = _ports->kernelCoordinateToPriority(it->y);
if (!view->isScaleable()) {
// Laura Bow 2 specific - ffs. fill()
it->scaleSignal = 0;
it->scaleY = it->scaleX = 128;
}
// Create rect according to coordinates and given cel
if (it->scaleSignal & kScaleSignalDoScaling) {
if (it->scaleSignal & kScaleSignalGlobalScaling) {
applyGlobalScaling(it, view);
}
view->getCelScaledRect(it->loopNo, it->celNo, it->x, it->y, it->z, it->scaleX, it->scaleY, it->celRect);
g_sci->_gfxCompare->setNSRect(curObject, it->celRect);
} else {
view->getCelRect(it->loopNo, it->celNo, it->x, it->y, it->z, it->celRect);
}
// draw corresponding cel
_paint16->drawCel(view, it->loopNo, it->celNo, it->celRect, it->priority, it->paletteNo, it->scaleX, it->scaleY);
if (!(it->signal & kSignalIgnoreActor)) {
it->celRect.top = CLIP<int16>(_ports->kernelPriorityToCoordinate(it->priority) - 1, it->celRect.top, it->celRect.bottom - 1);
_paint16->fillRect(it->celRect, GFX_SCREEN_MASK_CONTROL, 0, 0, 15);
}
}
}