本文整理汇总了C++中StaticANIObject::startAnim方法的典型用法代码示例。如果您正苦于以下问题:C++ StaticANIObject::startAnim方法的具体用法?C++ StaticANIObject::startAnim怎么用?C++ StaticANIObject::startAnim使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StaticANIObject
的用法示例。
在下文中一共展示了StaticANIObject::startAnim方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sceneHandler16_girlROTFL
void sceneHandler16_girlROTFL() {
StaticANIObject *girl = g_fp->_currentScene->getStaticANIObject1ById(ANI_GIRL, -1);
girl->changeStatics2(ST_GRL_LAUGH);
girl->startAnim(MV_GRL_FALL, 0, -1);
g_vars->scene16_girlIsLaughing = false;
}
示例2: sceneHandler37_updateRing
void sceneHandler37_updateRing(int ringNum) {
g_vars->scene37_rings[ringNum]->ani->changeStatics2(ST_GRD37_STAND);
g_vars->scene37_rings[ringNum]->ani->startAnim(MV_GRD37_PULL, 0, -1);
g_vars->scene37_rings[ringNum]->state = !g_vars->scene37_rings[ringNum]->state;
StaticANIObject *ani;
for (int i = 0; i < g_vars->scene37_rings[ringNum]->numSubRings; i++) {
ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[ringNum]->subRings[i]);
if ((ani->_movement && ani->_movement->_id != MV_RNG_CLOSE) || ani->_statics->_staticsId != ST_RNG_CLOSED2) {
ani->changeStatics2(ST_RNG_OPEN);
ani->startAnim(MV_RNG_CLOSE, 0, -1);
} else {
ani->changeStatics2(ST_RNG_CLOSED2);
ani->startAnim(MV_RNG_OPEN, 0, -1);
}
}
g_vars->scene37_cursorIsLocked = true;
for (uint j = 0; j < g_vars->scene37_rings.size(); j++) {
for (int i = 0; i < g_vars->scene37_rings[ringNum]->numSubRings; i++) {
ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[j]->subRings[i]);
if ((ani->_movement && ani->_movement->_id != MV_RNG_CLOSE) || ani->_statics->_staticsId != ST_RNG_CLOSED2)
g_vars->scene37_cursorIsLocked = false;
}
}
int state;
if (g_vars->scene37_cursorIsLocked)
state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsOpened);
else
state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsClosed);
g_fp->setObjectState(sO_LeftPipe_37, state);
}
示例3: preloadCallback
bool preloadCallback(PreloadItem &pre, int flag) {
if (flag) {
if (flag == 50)
g_fp->_aniMan->preloadMovements(g_fp->_movTable);
StaticANIObject *pbar = g_fp->_loaderScene->getStaticANIObject1ById(ANI_PBAR, -1);
if (pbar) {
int sz;
if (pbar->_movement->_currMovement)
sz = pbar->_movement->_currMovement->_dynamicPhases.size();
else
sz = pbar->_movement->_dynamicPhases.size();
pbar->_movement->setDynamicPhaseIndex(flag * (sz - 1) / 100);
}
g_fp->updateMap(&pre);
g_fp->_currentScene = g_fp->_loaderScene;
g_fp->_loaderScene->draw();
g_fp->_system->updateScreen();
} else {
if (g_fp->_scene2) {
g_fp->_aniMan = g_fp->_scene2->getAniMan();
g_fp->_scene2 = 0;
setInputDisabled(1);
}
g_fp->_floaters->stopAll();
if (g_fp->_soundEnabled) {
g_fp->_currSoundListCount = 1;
g_fp->_currSoundList1[0] = g_fp->accessScene(SC_COMMON)->_soundList;
}
g_vars->scene18_inScene18p1 = false;
if ((pre.preloadId1 != SC_18 || pre.sceneId != SC_19) && (pre.preloadId1 != SC_19 || (pre.sceneId != SC_18 && pre.sceneId != SC_19))) {
if (g_fp->_scene3) {
if (pre.preloadId1 != SC_18)
g_fp->_gameLoader->unloadScene(SC_18);
g_fp->_scene3 = 0;
}
} else {
scene19_setMovements(g_fp->accessScene(pre.preloadId1), pre.param);
g_vars->scene18_inScene18p1 = true;
if (pre.preloadId1 == SC_18) {
g_fp->_gameLoader->saveScenePicAniInfos(SC_18);
scene18_preload();
}
}
if (((pre.sceneId == SC_19 && pre.param == TrubaRight) || (pre.sceneId == SC_18 && pre.param == TrubaRight)) && !pre.preloadId2) {
pre.sceneId = SC_18;
pre.param = TrubaLeft;
}
if (!g_fp->_loaderScene) {
g_fp->_gameLoader->loadScene(SC_LDR);
g_fp->_loaderScene = g_fp->accessScene(SC_LDR);
}
StaticANIObject *pbar = g_fp->_loaderScene->getStaticANIObject1ById(ANI_PBAR, -1);
if (pbar) {
pbar->show1(ST_EGTR_SLIMSORROW, ST_MAN_GOU, MV_PBAR_RUN, 0);
pbar->startAnim(MV_PBAR_RUN, 0, -1);
}
g_fp->_inventoryScene = 0;
g_fp->_updateCursorCallback = 0;
g_fp->_sceneRect.translate(-g_fp->_sceneRect.left, -g_fp->_sceneRect.top);
g_fp->_system->delayMillis(10);
Scene *oldsc = g_fp->_currentScene;
g_fp->_currentScene = g_fp->_loaderScene;
g_fp->_loaderScene->draw();
g_fp->_system->updateScreen();
g_fp->_currentScene = oldsc;
}
return true;
}
示例4: global_messageHandler4
int global_messageHandler4(ExCommand *cmd) {
StaticANIObject *ani = 0;
switch (cmd->_messageKind) {
case 18: {
MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(cmd->_messageNum), cmd->_parId, 0);
if (cmd->_excFlags & 1)
mq->_flag1 = 1;
else
mq->_flag1 = 0;
mq->sendNextCommand();
break;
}
case 2:
if (!g_fp->_currentScene)
break;
ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
if (!ani)
break;
ani->trySetMessageQueue(cmd->_messageNum, cmd->_parId);
break;
case 1: {
if (!g_fp->_currentScene)
break;
ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
if (!ani)
break;
int flags = cmd->_field_14;
if (flags <= 0)
flags = -1;
if (cmd->_excFlags & 1)
ani->startAnim(cmd->_messageNum, 0, flags);
else
ani->startAnim(cmd->_messageNum, cmd->_parId, flags);
break;
}
case 8:
if (!g_fp->_currentScene)
break;
ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
if (!ani)
break;
ani->startAnimEx(cmd->_messageNum, cmd->_parId, -1, -1);
break;
case 20: {
if (!g_fp->_currentScene)
break;
ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
if (!ani)
break;
int flags = cmd->_field_14;
if (flags <= 0)
flags = -1;
ExCommand2 *cmd2 = (ExCommand2 *)cmd;
if (cmd->_excFlags & 1) {
ani->startAnimSteps(cmd->_messageNum, 0, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags);
} else {
ani->startAnimSteps(cmd->_messageNum, cmd->_parId, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags);
}
break;
}
case 21:
if (!g_fp->_currentScene)
break;
ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
if (!ani)
break;
ani->queueMessageQueue(0);
ani->playIdle();
break;
case 9:
// Nop in original
break;
case 3:
g_fp->_currentScene->_y = cmd->_messageNum - cmd->_messageNum % g_fp->_scrollSpeed;
break;
case 4:
g_fp->_currentScene->_x = cmd->_messageNum - cmd->_messageNum % g_fp->_scrollSpeed;
break;
case 19: {
//.........这里部分代码省略.........
示例5: sceneHandler29_animBearded
void sceneHandler29_animBearded() {
MessageQueue *mq;
for (uint i = 0; i < g_vars->scene29_bearders.size(); i++) {
StaticANIObject *ani = g_vars->scene29_bearders[i]->ani;
if (g_vars->scene29_bearders[i]->wbflag) {
int x = ani->_ox;
int y = ani->_oy;
if (!ani->_movement && ani->_statics->_staticsId == (ST_BRDCMN_RIGHT | 0x4000)) {
x -= 4;
if (x - g_vars->scene29_manX < 100 || !g_vars->scene29_arcadeIsOn) {
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT1), 0, 1);
mq->replaceKeyCode(-1, ani->_okeyCode);
mq->chain(0);
g_vars->scene29_bearders[i]->wbflag = 0;
g_vars->scene29_bearders[i]->wbcounter = 0;
}
}
if (!ani->_movement && ani->_statics->_staticsId == ST_BRDCMN_GOR)
ani->startAnim(MV_BRDCMN_GOR, 0, -1);
if (ani->_movement) {
if (ani->_movement->_id == MV_BRDCMN_GOR) {
x -= 4;
if (g_vars->scene29_manX - x < 60 || x - g_vars->scene29_manX < -260 || !g_vars->scene29_arcadeIsOn) {
ani->changeStatics2(ST_BRDCMN_RIGHT);
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT2), 0, 1);
mq->replaceKeyCode(-1, ani->_okeyCode);
mq->chain(0);
g_vars->scene29_bearders[i]->wbflag = 0;
g_vars->scene29_bearders[i]->wbcounter = 0;
}
}
}
ani->setOXY(x, y);
continue;
}
if (g_vars->scene29_arcadeIsOn && g_vars->scene29_bearders[i]->wbcounter > 30) {
int newx;
if (g_fp->_rnd->getRandomNumber(1))
goto dostuff;
if (g_vars->scene29_manX <= 700) {
g_vars->scene29_bearders[i]->wbcounter++;
continue;
}
if (g_vars->scene29_manX >= 1100) {
dostuff:
if (g_vars->scene29_manX <= 700 || g_vars->scene29_manX >= 1350) {
g_vars->scene29_bearders[i]->wbcounter++;
continue;
}
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD2), 0, 1);
newx = g_vars->scene29_manX - 200;
} else {
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD1), 0, 1);
newx = g_vars->scene29_manX + 350;
}
mq->getExCommandByIndex(0)->_x = newx;
mq->replaceKeyCode(-1, ani->_okeyCode);
mq->chain(0);
g_vars->scene29_bearders[i]->wbflag = 1;
g_vars->scene29_bearders[i]->wbcounter = 0;
}
g_vars->scene29_bearders[i]->wbcounter++;
}
}