本文整理汇总了C++中SegManager::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ SegManager::getString方法的具体用法?C++ SegManager::getString怎么用?C++ SegManager::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SegManager
的用法示例。
在下文中一共展示了SegManager::getString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: kCreateTextBitmap
reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) {
SegManager *segMan = s->_segMan;
int16 subop = argv[0].toUint16();
int16 width = 0;
int16 height = 0;
reg_t object;
if (subop == 0) {
width = argv[1].toUint16();
height = argv[2].toUint16();
object = argv[3];
} else if (subop == 1) {
object = argv[1];
} else {
warning("Invalid kCreateTextBitmap subop %d", subop);
return NULL_REG;
}
Common::String text = segMan->getString(readSelector(segMan, object, SELECTOR(text)));
int16 foreColor = readSelectorValue(segMan, object, SELECTOR(fore));
int16 backColor = readSelectorValue(segMan, object, SELECTOR(back));
int16 skipColor = readSelectorValue(segMan, object, SELECTOR(skip));
GuiResourceId fontId = (GuiResourceId)readSelectorValue(segMan, object, SELECTOR(font));
int16 borderColor = readSelectorValue(segMan, object, SELECTOR(borderColor));
int16 dimmed = readSelectorValue(segMan, object, SELECTOR(dimmed));
Common::Rect rect(
readSelectorValue(segMan, object, SELECTOR(textLeft)),
readSelectorValue(segMan, object, SELECTOR(textTop)),
readSelectorValue(segMan, object, SELECTOR(textRight)) + 1,
readSelectorValue(segMan, object, SELECTOR(textBottom)) + 1
);
if (subop == 0) {
TextAlign alignment = (TextAlign)readSelectorValue(segMan, object, SELECTOR(mode));
return g_sci->_gfxText32->createFontBitmap(width, height, rect, text, foreColor, backColor, skipColor, fontId, alignment, borderColor, dimmed, true, true);
} else {
CelInfo32 celInfo;
celInfo.type = kCelTypeView;
celInfo.resourceId = readSelectorValue(segMan, object, SELECTOR(view));
celInfo.loopNo = readSelectorValue(segMan, object, SELECTOR(loop));
celInfo.celNo = readSelectorValue(segMan, object, SELECTOR(cel));
return g_sci->_gfxText32->createFontBitmap(celInfo, rect, text, foreColor, backColor, fontId, skipColor, borderColor, dimmed, true);
}
}