本文整理汇总了C++中StaticANIObject类的典型用法代码示例。如果您正苦于以下问题:C++ StaticANIObject类的具体用法?C++ StaticANIObject怎么用?C++ StaticANIObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StaticANIObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: scene32_initScene
void scene32_initScene(Scene *sc) {
g_vars->scene32_flagIsWaving = false;
g_vars->scene32_flagNeedsStopping = false;
g_vars->scene32_dudeIsSitting = false;
g_vars->scene32_cactusCounter = -1;
g_vars->scene32_dudeOnLadder = false;
g_vars->scene32_cactusIsGrowing = false;
g_vars->scene32_flag = sc->getStaticANIObject1ById(ANI_FLAG, -1);
g_vars->scene32_cactus = sc->getStaticANIObject1ById(ANI_CACTUS, -1);
g_vars->scene32_massOrange = sc->getStaticANIObject1ById(ANI_TESTO_ORANGE, -1);
g_vars->scene32_massBlue = sc->getStaticANIObject1ById(ANI_TESTO_BLUE, -1);
g_vars->scene32_massGreen = sc->getStaticANIObject1ById(ANI_TESTO_GREEN, -1);
g_vars->scene32_button = sc->getStaticANIObject1ById(ANI_BUTTON_32, -1);
g_vars->scene32_massOrange->startAnim(MV_TSTO_FLOW, 0, -1);
g_vars->scene32_massOrange->_movement->setDynamicPhaseIndex(15);
g_vars->scene32_massGreen->startAnim(MV_TSTG_FLOW, 0, -1);
g_vars->scene32_massGreen->_movement->setDynamicPhaseIndex(26);
Scene *oldsc = g_fp->_currentScene;
StaticANIObject *ani;
if (g_fp->getObjectState(sO_ClockHandle) == g_fp->getObjectEnumState(sO_ClockHandle, sO_In_32_Lies)) {
ani = sc->getStaticANIObject1ById(ANI_INV_HANDLE, -1);
if (ani) {
g_fp->_currentScene = sc;
ani->changeStatics2(ST_HDL_LAID);
}
} else {
if (g_fp->getObjectState(sO_ClockHandle) == g_fp->getObjectEnumState(sO_ClockHandle, sO_In_32_Sticks)) {
ani = sc->getStaticANIObject1ById(ANI_INV_HANDLE, -1);
g_fp->_currentScene = sc;
if (ani)
ani->changeStatics2(ST_HDL_PLUGGED);
g_vars->scene32_button->changeStatics2(ST_BTN32_ON);
}
}
g_fp->_currentScene = oldsc;
if (g_fp->getObjectState(sO_Cube) == g_fp->getObjectEnumState(sO_Cube, sO_In_32)) {
MessageQueue *mq = new MessageQueue(sc->getMessageQueueById(QU_KBK32_START), 0, 0);
mq->sendNextCommand();
}
g_fp->lift_setButton(sO_Level9, ST_LBN_9N);
g_fp->lift_init(sc, QU_SC32_ENTERLIFT, QU_SC32_EXITLIFT);
g_fp->initArcadeKeys("SC_32");
}
示例3: sceneHandler17_moonshineFill
void sceneHandler17_moonshineFill() {
StaticANIObject *moonshiner = g_fp->_currentScene->getStaticANIObject1ById(ANI_SAMOGONSHCHIK, -1);
if (!(moonshiner->_flags & 0x80)) {
moonshiner->changeStatics2(ST_SMG_SIT);
chainObjQueue(moonshiner, QU_SMG_FILLBOTTLE, 1);
g_vars->scene17_sugarIsShown = false;
}
}
示例4: sceneHandler32_buttonPush
void sceneHandler32_buttonPush() {
if (g_fp->getObjectState(sO_ClockHandle) == g_fp->getObjectEnumState(sO_ClockHandle, sO_In_32_Sticks)) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_INV_HANDLE, -1);
if (ani)
ani->changeStatics2(ST_HDL_PLUGGED);
chainQueue(QU_SC32_FALLHANDLE, 1);
g_vars->scene32_button->changeStatics2(ST_BTN32_OFF);
}
}
示例5: sceneHandler17_drop
void sceneHandler17_drop() {
StaticANIObject *mug = g_fp->_currentScene->getStaticANIObject1ById(ANI_MUG_17, -1);
StaticANIObject *jet = g_fp->_currentScene->getStaticANIObject1ById(ANI_JET_17, -1);
if (mug && mug->_flags & 4) {
mug->changeStatics2(ST_MUG17_EMPTY);
chainQueue(QU_SC17_FILLMUG_DROP, 0);
} else if (jet) {
jet->queueMessageQueue(0);
chainQueue(QU_JET17_DROP, 0);
}
}
示例6: debugC
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;
}
}
}
}
示例7: 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);
}
示例8: sceneHandler16_startLaugh
void sceneHandler16_startLaugh() {
StaticANIObject *girl = g_fp->_currentScene->getStaticANIObject1ById(ANI_GIRL, -1);
girl->changeStatics2(ST_GRL_STAND);
MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_GIRLLAUGH), 0, 1);
mq->replaceKeyCode(-1, girl->_okeyCode);
mq->setFlags(mq->getFlags() | 1);
mq->chain(0);
g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->setSubVarAsInt(sO_DudeSwinged, 0);
g_vars->scene16_girlIsLaughing = true;
}
示例9: scene06_initScene
void scene06_initScene(Scene *sc) {
g_vars->scene06_mumsy = sc->getStaticANIObject1ById(ANI_MAMASHA, -1);
g_vars->scene06_someBall = 0;
g_vars->scene06_invHandle = sc->getStaticANIObject1ById(ANI_INV_HANDLE, -1);
g_vars->scene06_liftButton = sc->getStaticANIObject1ById(ANI_BUTTON_6, -1);
g_vars->scene06_ballDrop = sc->getStaticANIObject1ById(ANI_BALLDROP, -1);
g_vars->scene06_arcadeEnabled = false;
g_vars->scene06_aimingBall = false;
g_vars->scene06_currentBall = 0;
g_vars->scene06_ballInHands = 0;
g_vars->scene06_flyingBall = 0;
g_vars->scene06_balls.clear();
g_vars->scene06_numBallsGiven = 0;
g_vars->scene06_mumsyNumBalls = 0;
g_vars->scene06_eggieTimeout = 0;
g_vars->scene06_eggieDirection = true;
StaticANIObject *ball = sc->getStaticANIObject1ById(ANI_NEWBALL, -1);
ball->hide();
ball->_statics = ball->getStaticsById(ST_NBL_NORM);
g_vars->scene06_balls.push_back(ball);
for (int i = 0; i < 3; i++) {
StaticANIObject *ball2 = new StaticANIObject(ball);
ball2->hide();
ball2->_statics = ball2->getStaticsById(ST_NBL_NORM);
sc->addStaticANIObject(ball2, 1);
g_vars->scene06_balls.push_back(ball2);
}
if (g_fp->getObjectState(sO_BigMumsy) == g_fp->getObjectEnumState(sO_BigMumsy, sO_IsPlaying))
g_fp->setObjectState(sO_BigMumsy, g_fp->getObjectEnumState(sO_BigMumsy, sO_IsSleeping));
if (g_fp->getObjectState(sO_BigMumsy) != g_fp->getObjectEnumState(sO_BigMumsy, sO_IsSleeping))
g_vars->scene06_mumsy->hide();
g_fp->lift_setButton(sO_Level3, ST_LBN_3N);
g_fp->lift_init(sc, QU_SC6_ENTERLIFT, QU_SC6_EXITLIFT);
g_fp->initArcadeKeys("SC_6");
sceneHandler06_setExits(sc);
g_fp->setArcadeOverlay(PIC_CSR_ARCADE2);
}
示例10: sceneHandler25_startBearders
void sceneHandler25_startBearders() {
g_vars->scene25_bearders.clear();
g_vars->scene25_beardersCounter = 0;
StaticANIObject *bearded = g_fp->accessScene(SC_COMMON)->getStaticANIObject1ById(ANI_BEARDED_CMN, -1);
for (int i = 0; i < 3; i++) {
StaticANIObject *ani = new StaticANIObject(bearded);
g_vars->scene25_bearders.push_back(ani);
ani->_statics = ani->getStaticsById(ST_BRDCMN_EMPTY);
g_fp->_currentScene->addStaticANIObject(ani, 1);
}
g_vars->scene25_beardersAreThere = true;
}
示例11: 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);
}
示例12: 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;
}
}
}
}
示例13: warning
bool GameObject::setPicAniInfo(PicAniInfo *picAniInfo) {
if (!(picAniInfo->type & 3)) {
warning("StaticANIObject::setPicAniInfo(): Wrong type: %d", picAniInfo->type);
return false;
}
if (picAniInfo->type & 3) {
setOXY(picAniInfo->ox, picAniInfo->oy);
_priority = picAniInfo->priority;
_okeyCode = picAniInfo->field_8;
setFlags(picAniInfo->flags);
_field_8 = picAniInfo->field_24;
}
if (picAniInfo->type & 1) {
StaticANIObject *ani = (StaticANIObject *)this;
ani->_messageQueueId = (picAniInfo->type >> 16) & 0xffff;
if (picAniInfo->staticsId) {
ani->_statics = ani->getStaticsById(picAniInfo->staticsId);
} else {
ani->_statics = 0;
}
if (picAniInfo->movementId) {
ani->_movement = ani->getMovementById(picAniInfo->movementId);
if (ani->_movement)
ani->_movement->setDynamicPhaseIndex(picAniInfo->dynamicPhaseIndex);
} else {
ani->_movement = 0;
}
ani->setSomeDynamicPhaseIndex(picAniInfo->someDynamicPhaseIndex);
}
示例14: scene29_initScene
void scene29_initScene(Scene *sc) {
g_vars->scene29_var01 = 300;
g_vars->scene29_var02 = 200;
g_vars->scene29_var03 = 400;
g_vars->scene29_var04 = 300;
g_vars->scene29_porter = sc->getStaticANIObject1ById(ANI_PORTER, -1);
g_vars->scene29_shooter1 = sc->getStaticANIObject1ById(ANI_SHOOTER1, -1);
g_vars->scene29_shooter2 = sc->getStaticANIObject1ById(ANI_SHOOTER2, -1);
g_vars->scene29_ass = sc->getStaticANIObject1ById(ANI_ASS, -1);
g_vars->scene29_var05.numBalls = 0;
g_vars->scene29_var05.pTail = 0;
g_vars->scene29_var05.field_8 = 0;
g_vars->scene29_var05.pHead = 0;
free(g_vars->scene29_var05.cPlex);
g_vars->scene29_var05.cPlex = 0;
StaticANIObject *ani;
g_vars->scene29_var08.numBalls = 0;
g_vars->scene29_var08.pTail = 0;
g_vars->scene29_var08.field_8 = 0;
g_vars->scene29_var08.pHead = 0;
free(g_vars->scene29_var08.cPlex);
g_vars->scene29_var08.cPlex = 0;
ani = sc->getStaticANIObject1ById(ANI_SHELL_GREEN, -1);
Ball *b = g_vars->scene29_var05.sub04(g_vars->scene29_var05.field_8, 0);
b->ani = ani;
if (g_vars->scene29_var05.field_8)
g_vars->scene29_var05.field_8->p0 = b;
else
g_vars->scene29_var05.pHead = b;
g_vars->scene29_var05.field_8 = b;
for (int i = 0; i < 2; i++) {
StaticANIObject *newani = new StaticANIObject(ani);
sc->addStaticANIObject(newani, 1);
b = g_vars->scene29_var05.sub04(g_vars->scene29_var05.field_8, 0);
b->ani = ani;
if (g_vars->scene29_var05.field_8)
g_vars->scene29_var05.field_8->p0 = b;
else
g_vars->scene29_var05.pHead = b;
g_vars->scene29_var05.field_8 = b;
}
g_vars->scene29_var06.numBalls = 0;
g_vars->scene29_var06.pTail = 0;
g_vars->scene29_var06.field_8 = 0;
g_vars->scene29_var06.pHead = 0;
free(g_vars->scene29_var06.cPlex);
g_vars->scene29_var06.cPlex = 0;
g_vars->scene29_var07.numBalls = 0;
g_vars->scene29_var07.pTail = 0;
g_vars->scene29_var07.field_8 = 0;
g_vars->scene29_var07.pHead = 0;
free(g_vars->scene29_var07.cPlex);
g_vars->scene29_var07.cPlex = 0;
ani = sc->getStaticANIObject1ById(ANI_SHELL_RED, -1);
b = g_vars->scene29_var06.sub04(g_vars->scene29_var06.field_8, 0);
b->ani = ani;
if (g_vars->scene29_var06.field_8)
g_vars->scene29_var06.field_8->p0 = b;
else
g_vars->scene29_var06.pHead = b;
g_vars->scene29_var06.field_8 = b;
for (int i = 0; i < 2; i++) {
StaticANIObject *newani = new StaticANIObject(ani);
sc->addStaticANIObject(newani, 1);
b = g_vars->scene29_var06.sub04(g_vars->scene29_var06.field_8, 0);
b->ani = ani;
if (g_vars->scene29_var06.field_8)
g_vars->scene29_var06.field_8->p0 = b;
else
g_vars->scene29_var06.pHead = b;
g_vars->scene29_var06.field_8 = b;
}
g_vars->scene29_var19.clear();
//.........这里部分代码省略.........
示例15: scene37_initScene
void scene37_initScene(Scene *sc) {
Ring *ring;
StaticANIObject *ani;
g_vars->scene37_lastDudeX = -1;
ring = new Ring();
ani = sc->getStaticANIObject1ById(ANI_GUARD_37, 0);
ring->ani = ani;
ring->x = ani->_ox - 40;
ring->y = ani->_ox + 40;
ring->numSubRings = 3;
ring->subRings[0] = 1;
ring->subRings[1] = 4;
ring->subRings[2] = 8;
ring->state = false;
g_vars->scene37_rings.push_back(ring);
ring = new Ring();
ani = sc->getStaticANIObject1ById(ANI_GUARD_37, 1);
ring->ani = ani;
ring->x = ani->_ox - 40;
ring->y = ani->_ox + 40;
ring->numSubRings = 3;
ring->subRings[0] = 2;
ring->subRings[1] = 5;
ring->subRings[2] = 9;
ring->state = false;
g_vars->scene37_rings.push_back(ring);
ring = new Ring();
ani = sc->getStaticANIObject1ById(ANI_GUARD_37, 2);
ring->ani = ani;
ring->x = ani->_ox - 40;
ring->y = ani->_ox + 40;
ring->numSubRings = 3;
ring->subRings[0] = 3;
ring->subRings[1] = 7;
ring->subRings[2] = 11;
ring->state = false;
g_vars->scene37_rings.push_back(ring);
g_fp->setObjectState(sO_LeftPipe_37, g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsClosed));
Scene *oldsc = g_fp->_currentScene;
g_fp->_currentScene = sc;
g_vars->scene37_cursorIsLocked = false;
g_vars->scene37_plusMinus1 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 1);
for (int i = 0; i < g_vars->scene37_rings[0]->numSubRings; i++) {
ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[0]->subRings[i]);
if (g_fp->getObjectState(sO_Guard_1) == g_fp->getObjectEnumState(sO_Guard_1, sO_On)) {
g_vars->scene37_plusMinus1->_statics = g_vars->scene37_plusMinus1->getStaticsById(ST_PMS_PLUS);
ani->changeStatics2(ST_RNG_OPEN);
} else {
g_vars->scene37_plusMinus1->_statics = g_vars->scene37_plusMinus1->getStaticsById(ST_PMS_MINUS);
ani->changeStatics2(ST_RNG_CLOSED2);
}
}
g_vars->scene37_plusMinus2 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 2);
for (int i = 0; i < g_vars->scene37_rings[1]->numSubRings; i++) {
ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[1]->subRings[i]);
if (g_fp->getObjectState(sO_Guard_2) == g_fp->getObjectEnumState(sO_Guard_2, sO_On)) {
g_vars->scene37_plusMinus2->_statics = g_vars->scene37_plusMinus2->getStaticsById(ST_PMS_PLUS);
ani->changeStatics2(ST_RNG_OPEN);
} else {
g_vars->scene37_plusMinus2->_statics = g_vars->scene37_plusMinus2->getStaticsById(ST_PMS_MINUS);
ani->changeStatics2(ST_RNG_CLOSED2);
}
}
g_vars->scene37_plusMinus3 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 3);
for (int i = 0; i < g_vars->scene37_rings[2]->numSubRings; i++) {
ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[2]->subRings[i]);
if (g_fp->getObjectState(sO_Guard_3) == g_fp->getObjectEnumState(sO_Guard_3, sO_On)) {
g_vars->scene37_plusMinus3->_statics = g_vars->scene37_plusMinus3->getStaticsById(ST_PMS_PLUS);
ani->changeStatics2(ST_RNG_OPEN);
} else {
g_vars->scene37_plusMinus3->_statics = g_vars->scene37_plusMinus3->getStaticsById(ST_PMS_MINUS);
ani->changeStatics2(ST_RNG_CLOSED2);
}
}
g_fp->_currentScene = oldsc;
g_fp->initArcadeKeys("SC_37");
}