本文整理汇总了C++中StaticANIObject::setPicAniInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ StaticANIObject::setPicAniInfo方法的具体用法?C++ StaticANIObject::setPicAniInfo怎么用?C++ StaticANIObject::setPicAniInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StaticANIObject
的用法示例。
在下文中一共展示了StaticANIObject::setPicAniInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyPicAniInfos
void GameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) {
if (picAniInfoCount <= 0)
return;
debugC(0, kDebugAnimation, "GameLoader::applyPicAniInfos(sc, ptr, %d)", picAniInfoCount);
PictureObject *pict;
StaticANIObject *ani;
for (int i = 0; i < picAniInfoCount; i++) {
debugC(7, kDebugAnimation, "PicAniInfo: id: %d type: %d", picAniInfo[i]->objectId, picAniInfo[i]->type);
if (picAniInfo[i]->type & 2) {
pict = sc->getPictureObjectById(picAniInfo[i]->objectId, picAniInfo[i]->field_8);
if (pict) {
pict->setPicAniInfo(picAniInfo[i]);
continue;
}
pict = sc->getPictureObjectById(picAniInfo[i]->objectId, 0);
if (pict) {
PictureObject *pictNew = new PictureObject(pict);
sc->_picObjList.push_back(pictNew);
pictNew->setPicAniInfo(picAniInfo[i]);
continue;
}
} else {
if (!(picAniInfo[i]->type & 1))
continue;
Scene *scNew = g_fp->accessScene(picAniInfo[i]->sceneId);
if (!scNew)
continue;
ani = sc->getStaticANIObject1ById(picAniInfo[i]->objectId, picAniInfo[i]->field_8);
if (ani) {
ani->setPicAniInfo(picAniInfo[i]);
continue;
}
ani = scNew->getStaticANIObject1ById(picAniInfo[i]->objectId, 0);
if (ani) {
StaticANIObject *aniNew = new StaticANIObject(ani);
sc->addStaticANIObject(aniNew, 1);
aniNew->setPicAniInfo(picAniInfo[i]);
continue;
}
}
}
}