本文整理汇总了C++中StaticANIObject::setOXY方法的典型用法代码示例。如果您正苦于以下问题:C++ StaticANIObject::setOXY方法的具体用法?C++ StaticANIObject::setOXY怎么用?C++ StaticANIObject::setOXY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StaticANIObject
的用法示例。
在下文中一共展示了StaticANIObject::setOXY方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scene15_initScene
void scene15_initScene(Scene *sc) {
g_vars->scene15_chantingCountdown = 0;
StaticANIObject *grandma = sc->getStaticANIObject1ById(ANI_GRANDMA_ASS, -1);
Scene *oldsc = g_fp->_currentScene;
g_fp->_currentScene = sc;
int grandmaState = g_fp->getObjectState(sO_Grandma);
if (grandmaState == g_fp->getObjectEnumState(sO_Grandma, sO_In_15)) {
grandma->changeStatics2(ST_GMS_BOOT);
grandma->setOXY(97, 399);
g_fp->setObjectState(sO_LeftPipe_15, g_fp->getObjectEnumState(sO_LeftPipe_15, sO_IsClosed));
} else if (grandmaState == g_fp->getObjectEnumState(sO_Grandma, sO_In_15_1)) {
grandma->changeStatics2(ST_GMS_BOOT);
grandma->setOXY(86, 399);
g_fp->setObjectState(sO_LeftPipe_15, g_fp->getObjectEnumState(sO_LeftPipe_15, sO_IsClosed));
} else if (grandmaState == g_fp->getObjectEnumState(sO_Grandma, sO_In_15_2)) {
grandma->changeStatics2(ST_GMS_BOOT);
grandma->setOXY(71, 399);
g_fp->setObjectState(sO_LeftPipe_15, g_fp->getObjectEnumState(sO_LeftPipe_15, sO_IsClosed));
} else if (grandmaState == g_fp->getObjectEnumState(sO_Grandma, sO_In_15_3)) {
grandma->changeStatics2(ST_GMS_BOOT);
grandma->setOXY(49, 399);
g_fp->setObjectState(sO_LeftPipe_15, g_fp->getObjectEnumState(sO_LeftPipe_15, sO_IsClosed));
} else if (grandmaState == g_fp->getObjectEnumState(sO_Grandma, sO_WithoutBoot)) {
grandma->changeStatics2(ST_GMS_BOOT);
grandma->setOXY(97, 399);
grandma->changeStatics2(ST_GMS_BOOTLESS2);
g_fp->setObjectState(sO_LeftPipe_15, g_fp->getObjectEnumState(sO_LeftPipe_15, sO_IsClosed));
} else {
grandma->hide();
g_fp->setObjectState(sO_LeftPipe_15, g_fp->getObjectEnumState(sO_LeftPipe_15, sO_IsOpened));
}
g_vars->scene15_plusminus = sc->getStaticANIObject1ById(ANI_PLUSMINUS, -1);
if (g_fp->getObjectState(sO_Guard_2) == g_fp->getObjectEnumState(sO_Guard_2, sO_Off))
g_vars->scene15_plusminus->_statics = g_vars->scene15_plusminus->getStaticsById(ST_PMS_MINUS);
else
g_vars->scene15_plusminus->_statics = g_vars->scene15_plusminus->getStaticsById(ST_PMS_PLUS);
g_vars->scene15_ladder = sc->getPictureObjectById(PIC_SC15_LADDER, 0);
g_vars->scene15_boot = sc->getStaticANIObject1ById(ANI_BOOT_15, -1);
if (g_fp->getObjectState(sO_Boot_15) != g_fp->getObjectEnumState(sO_Boot_15, sO_IsPresent))
g_vars->scene15_boot->_flags &= 0xFFFB;
g_fp->_currentScene = oldsc;
g_fp->lift_setButton(sO_Level5, ST_LBN_5N);
g_fp->lift_init(sc, QU_SC15_ENTERLIFT, QU_SC15_EXITLIFT);
}
示例2: sceneHandler28_startWork1
void sceneHandler28_startWork1() {
debugC(2, kDebugSceneLogic, "scene28: startWork");
g_fp->_aniMan->hide();
StaticANIObject *man = g_fp->_currentScene->getStaticANIObject1ById(ANI_MAN_28, -1);
man->_statics = man->getStaticsById(ST_MAN28_RIGHT);
man->setOXY(g_fp->_aniMan->_ox, g_fp->_aniMan->_oy);
man->_priority = g_fp->_aniMan->_priority;
man->show1(-1, -1, -1, 0);
chainQueue(QU_SC28_LIFT1_WORK, 1);
}
示例3: getInventoryItemIndexById
void Inventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) {
int idx = getInventoryItemIndexById(itemId);
debugC(2, kDebugInventory, "removeItem2(*, %d, %d, %d, %d)", itemId, x, y, priority);
if (idx >= 0) {
if (_inventoryItems[idx]->count) {
removeItem(itemId, 1);
Scene *sc = g_fp->accessScene(_sceneId);
if (sc) {
StaticANIObject *ani = new StaticANIObject(sc->getStaticANIObject1ById(itemId, -1));
sceneObj->addStaticANIObject(ani, 1);
ani->_statics = (Statics *)ani->_staticsList[0];
ani->setOXY(x, y);
ani->_priority = priority;
}
}
}
}
示例4: 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++;
}
}