这篇教程C++ EV_DoDoor函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中EV_DoDoor函数的典型用法代码示例。如果您正苦于以下问题:C++ EV_DoDoor函数的具体用法?C++ EV_DoDoor怎么用?C++ EV_DoDoor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了EV_DoDoor函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: P_NoiseAlertvoid APowerCoupling::Die (AActor *source, AActor *inflictor, int dmgflags){ Super::Die (source, inflictor, dmgflags); int i; for (i = 0; i < MAXPLAYERS; ++i) if (playeringame[i] && players[i].health > 0) break; if (i == MAXPLAYERS) return; // [RH] In case the player broke it with the dagger, alert the guards now. if (LastHeard != source) { P_NoiseAlert (source, this); } EV_DoDoor (DDoor::doorClose, NULL, players[i].mo, 225, 2*FRACUNIT, 0, 0, 0); EV_DoFloor (DFloor::floorLowerToHighest, NULL, 44, FRACUNIT, 0, -1, 0, false); players[i].mo->GiveInventoryType (QuestItemClasses[5]); S_Sound (CHAN_VOICE, "svox/voc13", 1, ATTN_NORM); players[i].SetLogNumber (13); P_DropItem (this, PClass::FindClass("BrokenPowerCoupling"), -1, 256); Destroy ();}
开发者ID:Leonan8995,项目名称:Xenomia,代码行数:26,
示例2: EV_DoDoorbool APrisonPass::TryPickup (AActor *&toucher){ Super::TryPickup (toucher); EV_DoDoor (DDoor::doorOpen, NULL, toucher, 223, 2., 0, 0, 0); toucher->GiveInventoryType (QuestItemClasses[9]); return true;}
开发者ID:kevans91,项目名称:zdoom,代码行数:7,
示例3: P_ShootSpecialLinevoid P_ShootSpecialLine(mobj_t *thing, line_t *line){ if(!thing->player) { // Check if trigger allowed by non-player mobj switch(line->special) { case 46: // Impact_OpenDoor break; default: return; break; } } switch(line->special) { case 24: // Impact_RaiseFloor EV_DoFloor(line, raiseFloor); P_ChangeSwitchTexture(line, 0); break; case 46: // Impact_OpenDoor EV_DoDoor(line, open, VDOORSPEED); P_ChangeSwitchTexture(line, 1); break; case 47: // Impact_RaiseFloorNear&Change EV_DoPlat(line, raiseToNearestAndChange, 0); P_ChangeSwitchTexture(line, 0); break; }}
开发者ID:elhobbs,项目名称:heretic3ds,代码行数:29,
示例4: DEFINE_ACTION_FUNCTIONDEFINE_ACTION_FUNCTION(AActor, A_HideDecepticon){ EV_DoDoor (DDoor::doorClose, NULL, self, 999, 8*FRACUNIT, 0, 0, 0); if (self->target != NULL && self->target->player != NULL) { P_NoiseAlert (self->target, self); }}
开发者ID:DaZombieKiller,项目名称:lxDoom,代码行数:8,
示例5: switchintEV_DoLockedDoor( line_t* line, vldoor_e type, mobj_t* thing ){ player_t* p; p = thing->player; if (!p) return 0; switch(line->special) { case 99: // Blue Lock case 133: if ( !p ) return 0; if (!p->cards[it_bluecard] && !p->cards[it_blueskull]) { p->message = PD_BLUEO; S_StartSound(NULL,sfx_oof); return 0; } break; case 134: // Red Lock case 135: if ( !p ) return 0; if (!p->cards[it_redcard] && !p->cards[it_redskull]) { p->message = PD_REDO; S_StartSound(NULL,sfx_oof); return 0; } break; case 136: // Yellow Lock case 137: if ( !p ) return 0; if (!p->cards[it_yellowcard] && !p->cards[it_yellowskull]) { p->message = PD_YELLOWO; S_StartSound(NULL,sfx_oof); return 0; } break; } return EV_DoDoor(line,type);}
开发者ID:VenoMpie,项目名称:DoomSharp,代码行数:55,
示例6: EV_DoDoorbool ACloseDoor222::SpecialDropAction (AActor *dropper){ EV_DoDoor (DDoor::doorClose, NULL, dropper, 222, 2*FRACUNIT, 0, 0, 0); if (dropper->target->CheckLocalView (consoleplayer)) { Printf ("You're dead! You set off the alarm./n"); } P_NoiseAlert (dropper->target, dropper->target); Destroy (); return true;}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:11,
示例7: switch//// EV_DoLockedDoor//// Handle opening a tagged locked door//// Passed the line activating the door, the type of door,// and the thing that activated the line// Returns true if a thinker created//int EV_DoLockedDoor( line_t* line, vldoor_e type, mobj_t* thing ){ player_t* p; // only players can open locked doors p = thing->player; if (!p) return 0; // check type of linedef, and if key is possessed to open it switch(line->special) { case 99: // Blue Lock case 133: if (!p->cards[it_bluecard] && !p->cards[it_blueskull]) { p->message = s_PD_BLUEO; // Ty 03/27/98 - externalized S_StartSound(p->mo,sfx_oof); // killough 3/20/98 return 0; } break; case 134: // Red Lock case 135: if (!p->cards[it_redcard] && !p->cards[it_redskull]) { p->message = s_PD_REDO; // Ty 03/27/98 - externalized S_StartSound(p->mo,sfx_oof); // killough 3/20/98 return 0; } break; case 136: // Yellow Lock case 137: if (!p->cards[it_yellowcard] && !p->cards[it_yellowskull]) { p->message = s_PD_YELLOWO; // Ty 03/27/98 - externalized S_StartSound(p->mo,sfx_oof); // killough 3/20/98 return 0; } break; } // got the key, so open the door return EV_DoDoor(line,type);}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:58,
示例8: switch//// P_ShootSpecialLine - IMPACT SPECIALS// Called when a thing shoots a special line.//voidP_ShootSpecialLine( mobj_t* thing, line_t* line ){ int ok; // Impacts that other things can activate. if (!thing->player) { ok = 0; switch(line->special) { case 46: // OPEN DOOR IMPACT ok = 1; break; } if (!ok) return; } switch(line->special) { case 24: // RAISE FLOOR EV_DoFloor(line,raiseFloor); P_ChangeSwitchTexture(line,0); break; case 46: // OPEN DOOR EV_DoDoor(line,vld_open); P_ChangeSwitchTexture(line,1); break; case 47: // RAISE FLOOR NEAR AND CHANGE EV_DoPlat(line,raiseToNearestAndChange,0); P_ChangeSwitchTexture(line,0); break; }}
开发者ID:plumsinus,项目名称:crispy-doom,代码行数:47,
示例9: P_ShootSpecialLine/** * Called when a thing shoots a special line. */static void P_ShootSpecialLine(mobj_t *thing, Line *line){ xline_t *xline = P_ToXLine(line); // Impacts that other things can activate. if(!thing->player) { switch(xline->special) { default: return; case 46: ///< OPEN DOOR IMPACT break; } } switch(xline->special) { case 24: ///< RAISE FLOOR EV_DoFloor(line, FT_RAISEFLOOR); P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; break; case 46: ///< OPEN DOOR EV_DoDoor(line, DT_OPEN); P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, BUTTONTIME); break; case 47: ///< RAISE FLOOR NEAR AND CHANGE EV_DoPlat(line, PT_RAISETONEARESTANDCHANGE, 0); P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; break; case 191: ///< LOWER FLOOR WAIT RAISE (jd64) EV_DoPlat(line, PT_DOWNWAITUPSTAYBLAZE, 0); P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, BUTTONTIME); break; }}
开发者ID:skyjake,项目名称:Doomsday-Engine,代码行数:45,
示例10: A_KeenDie//// A_KeenDie// DOOM II special, map 32.// Uses special tag 666.//void A_KeenDie (AActor *self){ A_NoBlocking (self); // scan the remaining thinkers to see if all Keens are dead AActor *other; TThinkerIterator<AActor> iterator; const PClass *matchClass = self->GetClass (); while ( (other = iterator.Next ()) ) { if (other != self && other->health > 0 && other->IsA (matchClass)) { // other Keen not dead return; } } EV_DoDoor (DDoor::doorOpen, NULL, NULL, 666, 2*FRACUNIT, 0, 0, 0);}
开发者ID:ddraigcymraeg,项目名称:gzscoredoom,代码行数:25,
示例11: DEFINE_ACTION_FUNCTION_PARAMSDEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie){ PARAM_ACTION_PROLOGUE; PARAM_INT_OPT(doortag) { doortag = 666; } A_Unblock(self, false); // scan the remaining thinkers to see if all Keens are dead AActor *other; TThinkerIterator<AActor> iterator; const PClass *matchClass = self->GetClass (); while ( (other = iterator.Next ()) ) { if (other != self && other->health > 0 && other->IsA (matchClass)) { // other Keen not dead return 0; } } EV_DoDoor (DDoor::doorOpen, NULL, NULL, doortag, 2*FRACUNIT, 0, 0, 0); return 0;}
开发者ID:Edward850,项目名称:zdoom,代码行数:24,
示例12: P_ShootSpecialLinevoid P_ShootSpecialLine(mobj_t *thing,line_t *line){ /* Impacts that other things can activate */ if (!thing->player) { if (line->special!=46) { /* Open door impact */ return; } } switch(line->special) { case 24: /* RAISE FLOOR */ EV_DoFloor(line,raiseFloor); P_ChangeSwitchTexture(line,FALSE); break; case 46: /* OPEN DOOR */ EV_DoDoor(line,open); P_ChangeSwitchTexture(line,TRUE); break; case 47: /* RAISE FLOOR NEAR AND CHANGE */ EV_DoPlat(line,raiseToNearestAndChange,0); P_ChangeSwitchTexture(line,FALSE); }}
开发者ID:Almamu,项目名称:doom3do,代码行数:24,
示例13: P_GiveItemToPlayer//.........这里部分代码省略......... case SPR_CBOW: // Here's a crossbow. Just aim straight, and *SPLAT!* if(player->weaponowned[wp_elecbow]) return false; if(!P_GiveWeapon(player, wp_elecbow, false)) return false; sound = sfx_wpnup; // SHK-CHK! break; case SPR_TOKN: // Miscellaneous items - These are determined by thingtype. switch(type) { case MT_KEY_HAND: // Severed hand P_GiveCard(player, key_SeveredHand); break; case MT_MONY_300: // 300 Gold (this is the only way to get it, in fact) for(i = 0; i < 300; i++) P_GiveInventoryItem(player, SPR_COIN, MT_MONY_1); break; case MT_TOKEN_AMMO: // Ammo token - you get this from the Weapons Trainer if(player->ammo[am_bullets] >= 50) return false; player->ammo[am_bullets] = 50; break; case MT_TOKEN_HEALTH: // Health token - from the Front's doctor if(!P_GiveBody(player, healthamounts[gameskill])) return false; break; case MT_TOKEN_ALARM: // Alarm token - particularly from the Oracle. P_NoiseAlert(player->mo, player->mo); A_AlertSpectreC(dialogtalker); // BUG: assumes in a dialog o_O break; case MT_TOKEN_DOOR1: // Door special 1 junk.tag = 222; EV_DoDoor(&junk, vld_open); break; case MT_TOKEN_PRISON_PASS: // Door special 1 - Prison pass junk.tag = 223; EV_DoDoor(&junk, vld_open); if(gamemap == 2) // If on Tarnhill, give Prison pass object P_GiveInventoryItem(player, sprnum, type); break; case MT_TOKEN_SHOPCLOSE: // Door special 3 - "Shop close" - unused? junk.tag = 222; EV_DoDoor(&junk, vld_close); break; case MT_TOKEN_DOOR3: // Door special 4 (or 3? :P ) junk.tag = 224; EV_DoDoor(&junk, vld_close); break; case MT_TOKEN_STAMINA: // Stamina upgrade if(player->stamina >= 100) return false; player->stamina += 10; P_GiveBody(player, 200); // full healing break; case MT_TOKEN_NEW_ACCURACY: // Accuracy upgrade if(player->accuracy >= 100) return false; player->accuracy += 10; break; case MT_SLIDESHOW: // Slideshow (start a finale) gameaction = ga_victory; if(gamemap == 10) P_GiveItemToPlayer(player, SPR_TOKN, MT_TOKEN_QUEST17); break; default: // The default is to just give it as an inventory item. P_GiveInventoryItem(player, sprnum, type); break; } break; default: // The ultimate default: Give it as an inventory item. if(!P_GiveInventoryItem(player, sprnum, type)) return false; break; } // Play sound. if(player == &players[consoleplayer]) S_StartSound(NULL, sound); return true;}
开发者ID:derek57,项目名称:WIP,代码行数:101,
示例14: ST_cheat_spechits// [crispy] trigger all special lines available on the mapstatic int ST_cheat_spechits(){ int i, speciallines = 0; boolean origcards[NUMCARDS]; line_t dummy; // temporarily give all keys for (i = 0; i < NUMCARDS; i++) { origcards[i] = plyr->cards[i]; plyr->cards[i] = true; } for (i = 0; i < numlines; i++) { if (lines[i].special) { // do not trigger level exit switches/lines or teleporters if (lines[i].special == 11 || lines[i].special == 51 || lines[i].special == 52 || lines[i].special == 124 || lines[i].special == 39 || lines[i].special == 97) continue; P_CrossSpecialLine (i, 0, plyr->mo); P_ShootSpecialLine (plyr->mo, &lines[i]); P_UseSpecialLine (plyr->mo, &lines[i], 0); speciallines++; } } for (i = 0; i < NUMCARDS; i++) { plyr->cards[i] = origcards[i]; } // [crispy] trigger tag 666/667 events dummy.tag = 666; if (gamemode == commercial) { if (gamemap == 7) { // Mancubi speciallines += EV_DoFloor(&dummy, lowerFloorToLowest); // Arachnotrons dummy.tag = 667; speciallines += EV_DoFloor(&dummy, raiseToTexture); } } else { if (gameepisode == 1) // Barons of Hell speciallines += EV_DoFloor(&dummy, lowerFloorToLowest); else if (gameepisode == 4) { if (gamemap == 6) // Cyberdemons speciallines += EV_DoDoor(&dummy, vld_blazeOpen); else if (gamemap == 8) // Spider Masterminds speciallines += EV_DoFloor(&dummy, lowerFloorToLowest); } } // Keens (no matter which level they are on) // this call will be ignored if the tagged sector is already moving // so actions triggered in the condition above will have precedence speciallines += EV_DoDoor(&dummy, vld_open); return (speciallines);}
开发者ID:plumsinus,项目名称:crispy-doom,代码行数:75,
示例15: EV_DoLockedDoor//// EV_DoLockedDoor// Move a locked door up/down//int EV_DoLockedDoor(line_t *line, vldoor_e type, mobj_t *thing){ player_t *player = thing->player; if (!player) return 0; switch (line->special) { case SR_OpenFastDoorStayOpenBlueKeyRequired: case S1_OpenFastDoorStayOpenBlueKeyRequired: if (player->cards[it_bluecard] <= 0 && player->cards[it_blueskull] <= 0) { if (player->cards[it_bluecard] == CARDNOTFOUNDYET) { if (!player->neededcardtics || player->neededcard != it_bluecard) { player->neededcard = it_bluecard; player->neededcardtics = NEEDEDCARDTICS; } player->message = s_PD_BLUEO; } else { if (!player->neededcardtics || player->neededcard != it_blueskull) { player->neededcard = it_blueskull; player->neededcardtics = NEEDEDCARDTICS; } player->message = s_PD_BLUEO2; } S_StartSound(player->mo, sfx_noway); return 0; } break; case SR_OpenFastDoorStayOpenRedKeyRequired: case S1_OpenFastDoorStayOpenRedKeyRequired: if (player->cards[it_redcard] <= 0 && player->cards[it_redskull] <= 0) { if (player->cards[it_redcard] == CARDNOTFOUNDYET) { if (!player->neededcardtics || player->neededcard != it_redcard) { player->neededcard = it_redcard; player->neededcardtics = NEEDEDCARDTICS; } player->message = s_PD_REDO; } else { if (!player->neededcardtics || player->neededcard != it_redskull) { player->neededcard = it_redskull; player->neededcardtics = NEEDEDCARDTICS; } player->message = s_PD_REDO2; } S_StartSound(player->mo, sfx_noway); return 0; } break; case SR_OpenFastDoorStayOpenYellowKeyRequired: case S1_OpenFastDoorStayOpenYellowKeyRequired: if (player->cards[it_yellowcard] <= 0 && player->cards[it_yellowskull] <= 0) { if (player->cards[it_yellowcard] == CARDNOTFOUNDYET) { if (!player->neededcardtics || player->neededcard != it_yellowcard) { player->neededcard = it_yellowcard; player->neededcardtics = NEEDEDCARDTICS; } player->message = s_PD_YELLOWO; } else { if (!player->neededcardtics || player->neededcard != it_yellowskull) { player->neededcard = it_yellowskull; player->neededcardtics = NEEDEDCARDTICS; } player->message = s_PD_YELLOWO2; } S_StartSound(player->mo, sfx_noway); return 0; } break; } return EV_DoDoor(line, type);}
开发者ID:Billy2600,项目名称:doomretro,代码行数:97,
示例16: P_UseSpecialLine//.........这里部分代码省略......... case S1_RaiseFloorToNextFloor: if (EV_DoFloor(line, raiseFloorToNearest)) P_ChangeSwitchTexture(line, 0); break; case S1_RaiseFloorToNextFloorChangeFloorTextureAndType: if (EV_DoPlat(line, raiseToNearestAndChange, 0)) P_ChangeSwitchTexture(line, 0); break; case S1_LowerLiftWait3SecondsRise: if (EV_DoPlat(line, downWaitUpStay, 0)) P_ChangeSwitchTexture(line, 0); break; case S1_SetFloorToLowestNeighbouringFloor: if (EV_DoFloor(line, lowerFloorToLowest)) P_ChangeSwitchTexture(line, 0); if (nomonsters && (line->flags & ML_TRIGGER666)) { line_t junk; junk.tag = 666; EV_DoFloor(&junk, lowerFloorToLowest); junk.tag = 667; EV_DoFloor(&junk, raiseToTexture); line->flags &= ~ML_TRIGGER666; } break; case S1_OpenDoorWait4SecondsClose: if (EV_DoDoor(line, normal)) P_ChangeSwitchTexture(line, 0); break; case S1_LowerCeilingToFloor: if (EV_DoCeiling(line, lowerToFloor)) P_ChangeSwitchTexture(line, 0); break; case S1_SetFloorTo8UnitsAboveHighestNeighbouringFloor: if (EV_DoFloor(line, turboLower)) P_ChangeSwitchTexture(line, 0); break; case S1_StartSlowCrusher: if (EV_DoCeiling(line, crushAndRaise)) P_ChangeSwitchTexture(line, 0); break; case S1_CloseDoor: if (EV_DoDoor(line, close)) P_ChangeSwitchTexture(line, 0); break; case S1_ExitLevelAndGoToSecretLevel: if (thing->player && thing->player->health <= 0) { S_StartSound(thing, sfx_noway); return false; } P_ChangeSwitchTexture(line, 0); G_SecretExitLevel(); break;
开发者ID:Billy2600,项目名称:doomretro,代码行数:67,
示例17: P_UseSpecialLine2//.........这里部分代码省略......... xline->special = 0; } break; case 20: // Raise Plat next highest floor and change texture. if(EV_DoPlat(line, PT_RAISETONEARESTANDCHANGE, 0)) { P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; } break; case 21: // PlatDownWaitUpStay. if(EV_DoPlat(line, PT_DOWNWAITUPSTAY, 0)) { P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; } break; case 23: // Lower Floor to Lowest. if(EV_DoFloor(line, FT_LOWERTOLOWEST)) { P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; } break; case 29: // Raise Door. if(EV_DoDoor(line, DT_NORMAL)) { P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; } break; case 41: // Lower Ceiling to Floor. if(EV_DoCeiling(line, CT_LOWERTOFLOOR)) { P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; } break; case 71: // Turbo Lower Floor. if(EV_DoFloor(line, FT_LOWERTURBO)) { P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; } break; case 49: // Ceiling Crush And Raise. if(EV_DoCeiling(line, CT_CRUSHANDRAISE)) { P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0); xline->special = 0; } break;
开发者ID:skyjake,项目名称:Doomsday-Engine,代码行数:67,
示例18: P_UseSpecialLine//.........这里部分代码省略......... case S1_Floor_RaiseToNextHighestFloor: if (EV_DoFloor(line, raiseFloorToNearest)) P_ChangeSwitchTexture(line, 0); break; case S1_Floor_RaiseToNextHighestFloor_ChangesTexture: if (EV_DoPlat(line, raiseToNearestAndChange, 0)) P_ChangeSwitchTexture(line, 0); break; case S1_Lift_LowerWaitRaise: if (EV_DoPlat(line, downWaitUpStay, 0)) P_ChangeSwitchTexture(line, 0); break; case S1_Floor_LowerToLowestFloor: if (EV_DoFloor(line, lowerFloorToLowest)) P_ChangeSwitchTexture(line, 0); if (nomonsters && (line->flags & ML_TRIGGER666)) { line_t junk; junk.tag = 666; EV_DoFloor(&junk, lowerFloorToLowest); junk.tag = 667; EV_DoFloor(&junk, raiseToTexture); line->flags &= ~ML_TRIGGER666; } break; case S1_Door_OpenWaitClose: if (EV_DoDoor(line, doorNormal)) P_ChangeSwitchTexture(line, 0); break; case S1_Ceiling_LowerToFloor: if (EV_DoCeiling(line, lowerToFloor)) P_ChangeSwitchTexture(line, 0); break; case S1_Floor_LowerTo8AboveHighestFloor: if (EV_DoFloor(line, turboLower)) P_ChangeSwitchTexture(line, 0); break; case S1_Ceiling_LowerTo8AboveFloor_PerpetualSlowCrusherDamage: if (EV_DoCeiling(line, crushAndRaise)) P_ChangeSwitchTexture(line, 0); break; case S1_Door_CloseStay: if (EV_DoDoor(line, doorClose)) P_ChangeSwitchTexture(line, 0); break; case S1_ExitLevel_GoesToSecretLevel: if (thing->player && thing->player->health <= 0) { S_StartSound(thing, sfx_noway); return false; } P_ChangeSwitchTexture(line, 0); G_SecretExitLevel(); break;
开发者ID:Clever-Boy,项目名称:doomretro,代码行数:67,
示例19: P_ExecuteLineSpecialboolean P_ExecuteLineSpecial(int special, byte *args, line_t *line, int side, mobj_t *mo){ boolean buttonSuccess; buttonSuccess = false; switch (special) { case 1: // Poly Start Line break; case 2: // Poly Rotate Left buttonSuccess = EV_RotatePoly(line, args, 1, false); break; case 3: // Poly Rotate Right buttonSuccess = EV_RotatePoly(line, args, -1, false); break; case 4: // Poly Move buttonSuccess = EV_MovePoly(line, args, false, false); break; case 5: // Poly Explicit Line: Only used in initialization break; case 6: // Poly Move Times 8 buttonSuccess = EV_MovePoly(line, args, true, false); break; case 7: // Poly Door Swing buttonSuccess = EV_OpenPolyDoor(line, args, PODOOR_SWING); break; case 8: // Poly Door Slide buttonSuccess = EV_OpenPolyDoor(line, args, PODOOR_SLIDE); break; case 10: // Door Close buttonSuccess = EV_DoDoor(line, args, DREV_CLOSE); break; case 11: // Door Open if(!args[0]) { buttonSuccess = EV_VerticalDoor(line, mo); } else { buttonSuccess = EV_DoDoor(line, args, DREV_OPEN); } break; case 12: // Door Raise if(!args[0]) { buttonSuccess = EV_VerticalDoor(line, mo); } else { buttonSuccess = EV_DoDoor(line, args, DREV_NORMAL); } break; case 13: // Door Locked_Raise if(CheckedLockedDoor(mo, args[3])) { if(!args[0]) { buttonSuccess = EV_VerticalDoor(line, mo); } else { buttonSuccess = EV_DoDoor(line, args, DREV_NORMAL); } } break; case 20: // Floor Lower by Value buttonSuccess = EV_DoFloor(line, args, FLEV_LOWERFLOORBYVALUE); break; case 21: // Floor Lower to Lowest buttonSuccess = EV_DoFloor(line, args, FLEV_LOWERFLOORTOLOWEST); break; case 22: // Floor Lower to Nearest buttonSuccess = EV_DoFloor(line, args, FLEV_LOWERFLOOR); break; case 23: // Floor Raise by Value buttonSuccess = EV_DoFloor(line, args, FLEV_RAISEFLOORBYVALUE); break; case 24: // Floor Raise to Highest buttonSuccess = EV_DoFloor(line, args, FLEV_RAISEFLOOR); break; case 25: // Floor Raise to Nearest buttonSuccess = EV_DoFloor(line, args, FLEV_RAISEFLOORTONEAREST); break; case 26: // Stairs Build Down Normal buttonSuccess = EV_BuildStairs(line, args, -1, STAIRS_NORMAL); break; case 27: // Build Stairs Up Normal buttonSuccess = EV_BuildStairs(line, args, 1, STAIRS_NORMAL); break; case 28: // Floor Raise and Crush buttonSuccess = EV_DoFloor(line, args, FLEV_RAISEFLOORCRUSH); break; case 29: // Build Pillar (no crushing) buttonSuccess = EV_BuildPillar(line, args, false); break; case 30: // Open Pillar buttonSuccess = EV_OpenPillar(line, args); break; case 31: // Stairs Build Down Sync//.........这里部分代码省略.........
开发者ID:amitahire,项目名称:development,代码行数:101,
示例20: P_CrossSpecialLinevoid P_CrossSpecialLine(int linenum, int side, mobj_t *thing){ line_t *line; line = &lines[linenum]; if(!thing->player) { // Check if trigger allowed by non-player mobj switch(line->special) { case 39: // Trigger_TELEPORT case 97: // Retrigger_TELEPORT case 4: // Trigger_Raise_Door //case 10: // PLAT DOWN-WAIT-UP-STAY TRIGGER //case 88: // PLAT DOWN-WAIT-UP-STAY RETRIGGER break; default: return; break; } } switch(line->special) { //==================================================== // TRIGGERS //==================================================== case 2: // Open Door EV_DoDoor(line,open,VDOORSPEED); line->special = 0; break; case 3: // Close Door EV_DoDoor(line,close,VDOORSPEED); line->special = 0; break; case 4: // Raise Door EV_DoDoor(line,normal,VDOORSPEED); line->special = 0; break; case 5: // Raise Floor EV_DoFloor(line,raiseFloor); line->special = 0; break; case 6: // Fast Ceiling Crush & Raise EV_DoCeiling(line,fastCrushAndRaise); line->special = 0; break; case 8: // Trigger_Build_Stairs (8 pixel steps) EV_BuildStairs(line, 8*FRACUNIT); line->special = 0; break; case 106: // Trigger_Build_Stairs_16 (16 pixel steps) EV_BuildStairs(line, 16*FRACUNIT); line->special = 0; break; case 10: // PlatDownWaitUp EV_DoPlat(line,downWaitUpStay,0); line->special = 0; break; case 12: // Light Turn On - brightest near EV_LightTurnOn(line,0); line->special = 0; break; case 13: // Light Turn On 255 EV_LightTurnOn(line,255); line->special = 0; break; case 16: // Close Door 30 EV_DoDoor(line,close30ThenOpen,VDOORSPEED); line->special = 0; break; case 17: // Start Light Strobing EV_StartLightStrobing(line); line->special = 0; break; case 19: // Lower Floor EV_DoFloor(line,lowerFloor); line->special = 0; break; case 22: // Raise floor to nearest height and change texture EV_DoPlat(line,raiseToNearestAndChange,0); line->special = 0; break; case 25: // Ceiling Crush and Raise EV_DoCeiling(line,crushAndRaise); line->special = 0; break; case 30: // Raise floor to shortest texture height // on either side of lines EV_DoFloor(line,raiseToTexture); line->special = 0; break; case 35: // Lights Very Dark EV_LightTurnOn(line,35); line->special = 0; break; case 36: // Lower Floor (TURBO) EV_DoFloor(line,turboLower); line->special = 0; break; case 37: // LowerAndChange EV_DoFloor(line,lowerAndChange);//.........这里部分代码省略.........
开发者ID:elhobbs,项目名称:heretic3ds,代码行数:101,
示例21: P_CrossSpecialLinevoid P_CrossSpecialLine(line_t *line,mobj_t *thing){ /* Triggers that other things can activate */ if (!thing->player) { /* Not a player? */ switch(line->special) { default: /* None of the above? */ return; /* Exit */ case 39: /* TELEPORT TRIGGER */ case 97: /* TELEPORT RETRIGGER */ case 4: /* RAISE DOOR */ case 10: /* PLAT DOWN-WAIT-UP-STAY TRIGGER */ case 88: /* PLAT DOWN-WAIT-UP-STAY RETRIGGER */ ; /* Null event */ } }/********************************** The first group of triggers all clear line->special so that they can't be triggered again. The second groun leaves line->special alone so triggering can occur at will.**********************************/ switch (line->special) { case 2: /* Open Door */ EV_DoDoor(line,open); line->special = 0; break; case 3: /* Close Door */ EV_DoDoor(line,close); line->special = 0; break; case 4: /* Raise Door */ EV_DoDoor(line,normaldoor); line->special = 0; break; case 5: /* Raise Floor */ EV_DoFloor(line,raiseFloor); line->special = 0; break; case 6: /* Fast Ceiling Crush & Raise */ EV_DoCeiling(line,fastCrushAndRaise); line->special = 0; break; case 8: /* Build Stairs */ EV_BuildStairs(line); line->special = 0; break; case 10: /* PlatDownWaitUp */ EV_DoPlat(line,downWaitUpStay,0); line->special = 0; break; case 12: /* Light Turn On - brightest near */ EV_LightTurnOn(line,0); line->special = 0; break; case 13: /* Light Turn On 255 */ EV_LightTurnOn(line,255); line->special = 0; break; case 16: /* Close Door 30 */ EV_DoDoor(line,close30ThenOpen); line->special = 0; break; case 17: /* Start Light Strobing */ EV_StartLightStrobing(line); line->special = 0; break; case 19: /* Lower Floor */ EV_DoFloor(line,lowerFloor); line->special = 0; break; case 22: /* Raise floor to nearest height and change texture */ EV_DoPlat(line,raiseToNearestAndChange,0); line->special = 0; break; case 25: /* Ceiling Crush and Raise */ EV_DoCeiling(line,crushAndRaise); line->special = 0; break; case 30: /* Raise floor to shortest texture height */ /* on either side of lines */ EV_DoFloor(line,raiseToTexture); line->special = 0; break; case 35: /* Lights Very Dark */ EV_LightTurnOn(line,35); line->special = 0; break; case 36: /* Lower Floor (TURBO) */ EV_DoFloor(line,turboLower); line->special = 0; break; case 37: /* LowerAndChange */ EV_DoFloor(line,lowerAndChange); line->special = 0;//.........这里部分代码省略.........
开发者ID:Almamu,项目名称:doom3do,代码行数:101,
示例22: switch//.........这里部分代码省略......... case 15: // Raise Floor 24 and change texture if (EV_DoPlat(line,raiseAndChange,24)) P_ChangeSwitchTexture(line,0); break; case 18: // Raise Floor to next highest floor if (EV_DoFloor(line, raiseFloorToNearest)) P_ChangeSwitchTexture(line,0); break; case 20: // Raise Plat next highest floor and change texture if (EV_DoPlat(line,raiseToNearestAndChange,0)) P_ChangeSwitchTexture(line,0); break; case 21: // PlatDownWaitUpStay if (EV_DoPlat(line,downWaitUpStay,0)) P_ChangeSwitchTexture(line,0); break; case 23: // Lower Floor to Lowest if (EV_DoFloor(line,lowerFloorToLowest)) P_ChangeSwitchTexture(line,0); break; case 29: // Raise Door if (EV_DoDoor(line,normal)) P_ChangeSwitchTexture(line,0); break; case 41: // Lower Ceiling to Floor if (EV_DoCeiling(line,lowerToFloor)) P_ChangeSwitchTexture(line,0); break; case 71: // Turbo Lower Floor if (EV_DoFloor(line,turboLower)) P_ChangeSwitchTexture(line,0); break; case 49: // Ceiling Crush And Raise if (EV_DoCeiling(line,crushAndRaise)) P_ChangeSwitchTexture(line,0); break; case 50: // Close Door if (EV_DoDoor(line,closeDoor)) P_ChangeSwitchTexture(line,0); break; case 51: // Secret EXIT P_ChangeSwitchTexture(line,0); G_SecretExitLevel (); break;
开发者ID:OS2World,项目名称:GAMES-ACTION-os2doom,代码行数:67,
示例23: P_CrossSpecialLine/** * Called every time a thing origin is about to cross a line with a non 0 special. */static void P_CrossSpecialLine(Line *line, int side, mobj_t *thing){ // Extended functionality overrides old. if(XL_CrossLine(line, side, thing)) return; xline_t *xline = P_ToXLine(line); // Triggers that other things can activate if(!thing->player) { dd_bool ok = false; // Things that should NOT trigger specials... switch(thing->type) { case MT_ROCKET: case MT_PLASMA: case MT_BFG: case MT_TROOPSHOT: case MT_HEADSHOT: case MT_BRUISERSHOT: case MT_BRUISERSHOTRED: // jd64 case MT_NTROSHOT: // jd64 return; default: break; } switch(xline->special) { case 39: ///< TELEPORT TRIGGER case 97: ///< TELEPORT RETRIGGER case 993: // jd64 case 125: ///< TELEPORT MONSTERONLY TRIGGER case 126: ///< TELEPORT MONSTERONLY RETRIGGER case 4: ///< RAISE DOOR case 10: ///< PLAT DOWN-WAIT-UP-STAY TRIGGER case 88: ///< PLAT DOWN-WAIT-UP-STAY RETRIGGER case 415: // jd64 ok = true; break; } // Anything can trigger this line! if(xline->flags & ML_ALLTRIGGER) ok = true; if(!ok) return; } // Note: could use some const's here. switch(xline->special) { // TRIGGERS. // All from here to RETRIGGERS. case 2: // Open Door EV_DoDoor(line, DT_OPEN); xline->special = 0; break; case 3: // Close Door EV_DoDoor(line, DT_CLOSE); xline->special = 0; break; case 4: // Raise Door EV_DoDoor(line, DT_NORMAL); xline->special = 0; break; case 5: // Raise Floor EV_DoFloor(line, FT_RAISEFLOOR); xline->special = 0; break; case 6: // Fast Ceiling Crush & Raise EV_DoCeiling(line, CT_CRUSHANDRAISEFAST); xline->special = 0; break; case 8: // Build Stairs EV_BuildStairs(line, build8); xline->special = 0; break; case 10: // PlatDownWaitUp EV_DoPlat(line, PT_DOWNWAITUPSTAY, 0); xline->special = 0; break;//.........这里部分代码省略.........
开发者ID:skyjake,项目名称:Doomsday-Engine,代码行数:101,
示例24: P_UseSpecialLine//.........这里部分代码省略......... case 15: // Raise Floor 24 and change texture if (EV_DoPlat(line, raiseAndChange,24)) P_ChangeSwitchTexture(line,0); break; case 18: // Raise Floor to next highest floor - [STRIFE] Verified unmodified if (EV_DoFloor(line, raiseFloorToNearest)) P_ChangeSwitchTexture(line,0); break; case 20: // Raise Plat next highest floor and change texture - [STRIFE] Verified unmodified if(EV_DoPlat(line, raiseToNearestAndChange, 0)) P_ChangeSwitchTexture(line,0); break; case 21: // PlatDownWaitUpStay - [STRIFE] Verified unmodified if (EV_DoPlat(line, downWaitUpStay,0)) P_ChangeSwitchTexture(line,0); break; case 23: // Lower Floor to Lowest - [STRIFE] Verified unmodified if (EV_DoFloor(line,lowerFloorToLowest)) P_ChangeSwitchTexture(line,0); break; case 29: // Raise Door - [STRIFE] Verified unmodified if (EV_DoDoor(line,normal)) P_ChangeSwitchTexture(line,0); break; case 40: // villsa [STRIFE] Split Open Door if(EV_DoDoor(line, splitOpen)) P_ChangeSwitchTexture(line, 0); break; // haleyjd case 41: // Lower Ceiling to Floor - [STRIFE] Verified unmodified if (EV_DoCeiling(line,lowerToFloor)) P_ChangeSwitchTexture(line,0); break; case 42: // Close Door - [STRIFE] Verified unmodified if (EV_DoDoor(line,close)) P_ChangeSwitchTexture(line,1); break; case 43: // Lower Ceiling to Floor - [STRIFE] Verified unmodified if (EV_DoCeiling(line,lowerToFloor)) P_ChangeSwitchTexture(line,1); break; case 45: // Lower Floor to Surrounding floor height - [STRIFE] Verified unmodified if (EV_DoFloor(line,lowerFloor)) P_ChangeSwitchTexture(line,1); break;
开发者ID:M-Code,项目名称:chocolate-doom,代码行数:67,
注:本文中的EV_DoDoor函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ EX函数代码示例 C++ EVUTIL_ASSERT函数代码示例 |