本文整理汇总了C++中P_RemoveThinker函数的典型用法代码示例。如果您正苦于以下问题:C++ P_RemoveThinker函数的具体用法?C++ P_RemoveThinker怎么用?C++ P_RemoveThinker使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了P_RemoveThinker函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: T_ForceField
//
// EV_ForceField : switch a force field off and on
//
void T_ForceField (forcefield_t *field)
{
switch(field->status)
{
// open it and let it close again after some time
case ff_open:
field->s0_texture = sides[field->line->sidenum[0]].midtexture;
field->s1_texture = sides[field->line->sidenum[1]].midtexture;
sides[field->line->sidenum[0]].midtexture = 0;
sides[field->line->sidenum[1]].midtexture = 0;
field->s0_lightlevel = field->frontsector->lightlevel;
field->s1_lightlevel = field->backsector->lightlevel;
field->backsector->lightlevel = P_FindMinSurroundingLight(
field->backsector, field->backsector->lightlevel);
field->frontsector->lightlevel = P_FindMinSurroundingLight(
field->frontsector, field->frontsector->lightlevel);
field->line->flags &= ~(ML_BLOCKING | ML_SHOOTBLOCK);
field->timer = FFWAITTICS;
field->status = ff_waiting;
S_StartSound((mobj_t *)&field->frontsector->soundorg, sfx_metal);
break;
// switch it off permanentely
case ff_damaged:
sides[field->line->sidenum[0]].midtexture = 0;
sides[field->line->sidenum[1]].midtexture = 0;
field->backsector->lightlevel = P_FindMinSurroundingLight(
field->backsector, field->backsector->lightlevel);
field->frontsector->lightlevel = P_FindMinSurroundingLight(
field->frontsector, field->frontsector->lightlevel);
field->line->flags &= ~(ML_BLOCKING | ML_SHOOTBLOCK);
field->line->special = 0;
S_StartSound((mobj_t *)&field->frontsector->soundorg, sfx_metal);
P_RemoveThinker(&field->thinker);
break;
// wait and after timer is used up close it
case ff_waiting:
if (!field->timer--)
{
// make sure no things get stuck in the force field
if ((field->frontsector->thinglist != NULL) ||
(field->backsector->thinglist != NULL))
{
field->timer = FFWAITTICS;
break;
}
sides[field->line->sidenum[0]].midtexture = field->s0_texture;
sides[field->line->sidenum[1]].midtexture = field->s1_texture;
field->frontsector->lightlevel = field->s0_lightlevel;
field->backsector->lightlevel = field->s1_lightlevel;
field->line->flags = field->oldflags;
S_StartSound((mobj_t *)&field->frontsector->soundorg, sfx_metal);
P_RemoveThinker(&field->thinker);
}
break;
}
}
开发者ID:aagallag,项目名称:psDooM,代码行数:61,代码来源:p_doors.c
示例2: T_LaserThinker
void T_LaserThinker(laserthinker_t* laserthinker)
{
laser_t* laser = laserthinker->laser;
laser->dist += 64;
// laser reached its destination?
if(laser->dist >= laser->distmax)
{
// reached the end?
if(!laser->next)
{
P_RemoveThinker(&laserthinker->thinker);
// fade out the laser puff
P_FadeMobj(laserthinker->dest, -24, 0, 0);
}
else
laserthinker->laser = laser->next; // advance to next laser point
// remove marker and free laser
P_RemoveMobj(laser->marker);
Z_Free(laser);
}
else
{
// update laser's location
laser->x1 += laser->slopex;
laser->y1 += laser->slopey;
laser->z1 += laser->slopez;
}
}
开发者ID:alexey-lysiuk,项目名称:doom64ex-osx,代码行数:32,代码来源:p_pspr.c
示例3: P_SpawnLightningFlash
/** Spawns a one-time lightning flash.
*
* \param sector Sector to light up.
* \sa T_LightningFlash
*/
void P_SpawnLightningFlash(sector_t *sector)
{
INT32 minlight;
lightflash_t *flash;
minlight = sector->lightlevel;
if (sector->lightingdata)
{
if (((lightflash_t *)sector->lightingdata)->thinker.function.acp1
== (actionf_p1)T_LightningFlash)
{
// lightning was already flashing in this sector
// save the original light level value
minlight = ((lightflash_t *)sector->lightingdata)->minlight;
}
P_RemoveThinker(&((elevator_t *)sector->lightingdata)->thinker);
}
sector->lightingdata = NULL;
flash = Z_Calloc(sizeof (*flash), PU_LEVSPEC, NULL);
P_AddThinker(&flash->thinker);
flash->thinker.function.acp1 = (actionf_p1)T_LightningFlash;
flash->sector = sector;
flash->maxlight = 255;
flash->minlight = minlight;
sector->lightlevel = (INT16)flash->maxlight;
sector->lightingdata = flash;
}
开发者ID:PrisimaTheFox,项目名称:SRB2,代码行数:39,代码来源:p_lights.c
示例4: EV_FloorCrushStop
int EV_FloorCrushStop(line_t *line, byte *args)
{
thinker_t *think;
floormove_t *floor;
boolean rtn;
rtn = 0;
for(think = thinkercap.next; think != &thinkercap; think = think->next)
{
if(think->function != T_MoveFloor)
{
continue;
}
floor = (floormove_t *)think;
if(floor->type != FLEV_RAISEFLOORCRUSH)
{
continue;
}
// Completely remove the crushing floor
SN_StopSequence((mobj_t *)&floor->sector->soundorg);
floor->sector->specialdata = NULL;
P_TagFinished(floor->sector->tag);
P_RemoveThinker(&floor->thinker);
rtn = 1;
}
return rtn;
}
开发者ID:shovelmachine,项目名称:hexentouch,代码行数:27,代码来源:p_floor.c
示例5: T_FadeInBrightness
void T_FadeInBrightness(fadebright_t* fb) {
fb->factor += 2;
if(fb->factor < (i_brightness.value + 100)) {
R_SetLightFactor(fb->factor);
}
else {
P_RemoveThinker(&fb->thinker);
}
}
开发者ID:directhex,项目名称:doom64,代码行数:9,代码来源:p_lights.c
示例6: P_RemoveActivePlat
//
// P_RemoveActivePlat()
//
// Remove a plat from the active plat list
//
// Passed a pointer to the plat to remove
// Returns nothing
//
void P_RemoveActivePlat(plat_t* plat)
{
platlist_t *list = plat->list;
plat->sector->floordata = NULL; //jff 2/23/98 multiple thinkers
P_RemoveThinker(&plat->thinker);
if ((*list->prev = list->next))
list->next->prev = list->prev;
free(list);
}
开发者ID:TopherLee513,项目名称:prboom4android,代码行数:17,代码来源:p_plats.c
示例7: P_RemoveActiveCeiling
//
// P_RemoveActiveCeiling()
//
// Removes a ceiling from the list of active ceilings
//
// Passed the ceiling motion structure
// Returns nothing
//
void P_RemoveActiveCeiling(ceiling_t* ceiling)
{
ceilinglist_t* list = ceiling->list;
ceiling->sector->ceilingdata = NULL; //jff 2/22/98
P_RemoveThinker(&ceiling->thinker);
if ((*list->prev = list->next))
list->next->prev = list->prev;
free(list);
}
开发者ID:AlexMax,项目名称:winmbf,代码行数:17,代码来源:p_ceilng.c
示例8: P_RemoveActivePlat
//
// P_RemoveActivePlat()
//
// Remove a plat from the active plat list
//
// Passed a pointer to the plat to remove
// Returns nothing
//
void P_RemoveActivePlat(plat_t *plat)
{
platlist_t *list = plat->list;
plat->sector->floordata = (void *)0;
P_RemoveThinker(&plat->thinker);
if ((*list->prev = list->next))
list->next->prev = list->prev;
Z_Free(list);
}
开发者ID:aagallag,项目名称:psDooM,代码行数:18,代码来源:p_plats.c
示例9: P_RemoveLighting
/** Removes any active lighting effects in a sector.
*
* \param sector The sector to remove effects from.
*/
static void P_RemoveLighting(sector_t *sector)
{
if (sector->lightingdata)
{
// The thinker is the first member in all the lighting action structs,
// so just let the thinker get freed, and that will free the whole
// structure.
P_RemoveThinker(&((elevator_t *)sector->lightingdata)->thinker);
sector->lightingdata = NULL;
}
}
开发者ID:PrisimaTheFox,项目名称:SRB2,代码行数:15,代码来源:p_lights.c
示例10: T_InterpretACS
void T_InterpretACS(acs_t * script)
{
int cmd;
int action;
if (ACSInfo[script->infoIndex].state == ASTE_TERMINATING)
{
ACSInfo[script->infoIndex].state = ASTE_INACTIVE;
ScriptFinished(ACScript->number);
P_RemoveThinker(&ACScript->thinker);
return;
}
if (ACSInfo[script->infoIndex].state != ASTE_RUNNING)
{
return;
}
if (script->delayCount)
{
script->delayCount--;
return;
}
ACScript = script;
PCodePtr = ACScript->ip;
do
{
cmd = LONG(*PCodePtr);
++PCodePtr;
action = PCodeCmds[cmd] ();
} while (action == SCRIPT_CONTINUE);
ACScript->ip = PCodePtr;
if (action == SCRIPT_TERMINATE)
{
ACSInfo[script->infoIndex].state = ASTE_INACTIVE;
ScriptFinished(ACScript->number);
P_RemoveThinker(&ACScript->thinker);
}
}
开发者ID:MP2E,项目名称:chocolate-doom,代码行数:41,代码来源:p_acs.c
示例11: P_RemoveActivePlat
void P_RemoveActivePlat(plat_t * plat)
{
int i;
for (i = 0; i < MAXPLATS; i++)
if (plat == activeplats[i])
{
(activeplats[i])->sector->specialdata = NULL;
P_RemoveThinker(&(activeplats[i])->thinker);
activeplats[i] = NULL;
return;
}
I_Error("P_RemoveActivePlat: can't find plat!");
}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:13,代码来源:p_plats.c
示例12: P_RemoveActiveCeiling
//==================================================================
//
// Remove a ceiling's thinker
//
//==================================================================
void P_RemoveActiveCeiling(ceiling_t * c)
{
int i;
for(i = 0; i < MAXCEILINGS; i++)
if(activeceilings[i] == c)
{
activeceilings[i]->sector->specialdata = NULL;
P_RemoveThinker(&activeceilings[i]->thinker);
activeceilings[i] = NULL;
break;
}
}
开发者ID:amitahire,项目名称:development,代码行数:18,代码来源:P_ceilng.c
示例13: T_Combine
void T_Combine(combine_t *combine) {
sector_t *sector;
sector = combine->sector;
if(combine->special != sector->special ||
combine->func != combine->combiner->function.acp1) {
sector->lightlevel = 0;
P_RemoveThinker(&combine->thinker);
return;
}
sector->lightlevel = ((combine_t*)combine->combiner)->sector->lightlevel;
}
开发者ID:directhex,项目名称:doom64,代码行数:14,代码来源:p_lights.c
示例14: T_Glow
void T_Glow(glow_t* g) {
sector_t *sector;
if(--g->count) {
return;
}
sector = g->sector;
if(g->special != sector->special) {
sector->lightlevel = 0;
P_RemoveThinker(&g->thinker);
return;
}
g->count = 2;
if(g->direction == -1) {
sector->lightlevel -= 2;
if(!(sector->lightlevel < g->minlight)) {
return;
}
sector->lightlevel = g->minlight;
if(g->type == PULSERANDOM) {
g->maxlight = (P_Random(pr_lights) & 31) + 17;
}
g->direction = 1;
return;
}
else if(g->direction == 1) {
sector->lightlevel += 2;
if(!(g->maxlight < sector->lightlevel)) {
return;
}
if(g->type == PULSERANDOM) {
g->minlight = (P_Random(pr_lights) & 15);
}
g->direction = -1;
}
else {
return;
}
}
开发者ID:directhex,项目名称:doom64,代码行数:49,代码来源:p_lights.c
示例15: T_LightMorph
void T_LightMorph(lightmorph_t *lt) {
lt->inc += 4;
if(lt->inc > 256) {
lt->dest->base_r = lt->dest->active_r;
lt->dest->base_g = lt->dest->active_g;
lt->dest->base_b = lt->dest->active_b;
P_RemoveThinker(<->thinker);
return;
}
lt->dest->active_r = (lt->r + ((lt->inc * (lt->src->base_r - lt->r)) >> 8));
lt->dest->active_g = (lt->g + ((lt->inc * (lt->src->base_g - lt->g)) >> 8));
lt->dest->active_b = (lt->b + ((lt->inc * (lt->src->base_b - lt->b)) >> 8));
}
开发者ID:directhex,项目名称:doom64,代码行数:16,代码来源:p_lights.c
示例16: T_FireFlicker
void T_FireFlicker(fireflicker_t* flick) {
int amount;
if(--flick->count) {
return;
}
if(flick->special != flick->sector->special) {
flick->sector->lightlevel = 0;
P_RemoveThinker(&flick->thinker);
return;
}
amount = (P_Random(pr_lights) & 31);
flick->sector->lightlevel = amount;
flick->count = 3;
}
开发者ID:directhex,项目名称:doom64,代码行数:17,代码来源:p_lights.c
示例17: T_MoveFloor
//
// MOVE A FLOOR TO IT'S DESTINATION (UP OR DOWN)
//
void T_MoveFloor(floormove_t* floor)
{
result_e res;
res = T_MovePlane(floor->sector,
floor->speed,
floor->floordestheight,
floor->crush,0,floor->direction);
if (!(leveltime&7))
S_StartSound((mobj_t *)&floor->sector->soundorg,
sfx_stnmov);
if (res == pastdest)
{
floor->sector->specialdata = NULL;
if (floor->direction == 1)
{
switch(floor->type)
{
case donutRaise:
floor->sector->special = floor->newspecial;
floor->sector->floorpic = floor->texture;
default:
break;
}
}
else if (floor->direction == -1)
{
switch(floor->type)
{
case lowerAndChange:
floor->sector->special = floor->newspecial;
floor->sector->floorpic = floor->texture;
default:
break;
}
}
P_RemoveThinker(&floor->thinker);
S_StartSound((mobj_t *)&floor->sector->soundorg,
sfx_pstop);
}
}
开发者ID:kevans91,项目名称:DOOM,代码行数:49,代码来源:p_floor.cpp
示例18: T_BuildPillar
void T_BuildPillar(pillar_t *pillar)
{
result_e res1;
result_e res2;
// First, raise the floor
res1 = T_MovePlane(pillar->sector, pillar->floorSpeed, pillar->floordest,
pillar->crush, 0, pillar->direction); // floorOrCeiling, direction
// Then, lower the ceiling
res2 = T_MovePlane(pillar->sector, pillar->ceilingSpeed,
pillar->ceilingdest, pillar->crush, 1, -pillar->direction);
if (res1 == RES_PASTDEST && res2 == RES_PASTDEST)
{
pillar->sector->specialdata = NULL;
SN_StopSequence((mobj_t *)&pillar->sector->soundorg);
P_TagFinished(pillar->sector->tag);
P_RemoveThinker(&pillar->thinker);
}
}
开发者ID:shovelmachine,项目名称:hexentouch,代码行数:19,代码来源:p_floor.c
示例19: P_RemoveActivePlat
//
// P_RemoveActivePlat
//
void P_RemoveActivePlat(plat_t* plat)
{
int i;
// haleyjd 20140816: [SVE] remove activeplats limit
for(i = 0; i < numactiveplats; i++)
{
if(plat == activeplats[i])
{
activeplats[i]->sector->specialdata = NULL;
P_RemoveThinker(&(activeplats[i]->thinker));
activeplats[i] = NULL;
return;
}
}
// haleyjd 20140816: [SVE] stability
//I_Error("P_RemoveActivePlat: can't find plat!");
}
开发者ID:Lord-Ptolemy,项目名称:strife-ve,代码行数:22,代码来源:p_plats.c
示例20: P_SuspendMacro
int P_SuspendMacro(int tag) {
int id = MACROMASK(tag);
if(id < 0) {
return 0;
}
if(!macro) {
return 0;
}
if(!macrothinker) {
return 0;
}
P_RemoveThinker(macrothinker);
P_InitMacroVars();
return 1;
}
开发者ID:ProfessorKaos64,项目名称:Doom64EX,代码行数:20,代码来源:p_macros.c
注:本文中的P_RemoveThinker函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论