📄 p_spec.h
字号:
//// P_CEILNG//typedef enum{ lowerToFloor, raiseToHighest, //SoM:3/4/2000: Extra boom stuffs that tricked me... lowerToLowest, lowerToMaxFloor, lowerAndCrush, crushAndRaise, fastCrushAndRaise, silentCrushAndRaise, //SoM:3/4/2000 //jff 02/04/98 add types for generalized ceiling mover genCeiling, genCeilingChg, genCeilingChg0, genCeilingChgT, //jff 02/05/98 add types for generalized ceiling mover genCrusher, genSilentCrusher,} ceiling_e;typedef struct{ thinker_t thinker; ceiling_e type; sector_t* sector; fixed_t bottomheight; fixed_t topheight; fixed_t speed; fixed_t oldspeed; //SoM: 3/6/2000 boolean crush; //SoM: 3/6/2000: Support ceiling changers int newspecial; int oldspecial; short texture; // 1 = up, 0 = waiting, -1 = down int direction; // ID int tag; int olddirection; struct ceilinglist *list; // SoM: 3/6/2000: by jff: copied from killough's plats} ceiling_t;//SoM: 3/6/2000: Boom's improved ceiling list.typedef struct ceilinglist { ceiling_t *ceiling; struct ceilinglist *next,**prev;} ceilinglist_t;void P_RemoveAllActiveCeilings(void); //SoM: 3/9/2000#define CEILSPEED (FRACUNIT/NEWTICRATERATIO)#define CEILWAIT 150#define MAXCEILINGS 30extern ceilinglist_t *activeceilings; //SoM: 3/6/2000: New improved boom code.intEV_DoCeiling( line_t* line, ceiling_e type );void T_MoveCeiling (ceiling_t* ceiling);void P_AddActiveCeiling(ceiling_t* ceiling);void P_RemoveActiveCeiling(ceiling_t* ceiling);int EV_CeilingCrushStop(line_t* line);int P_ActivateInStasisCeiling(line_t* line);//// P_FLOOR//typedef enum{ // lower floor to highest surrounding floor lowerFloor, // lower floor to lowest surrounding floor lowerFloorToLowest, // lower floor to highest surrounding floor VERY FAST turboLower, // raise floor to lowest surrounding CEILING raiseFloor, // raise floor to next highest surrounding floor raiseFloorToNearest, // lower floor to lowest surrounding floor lowerFloorToNearest, // lower floor 24 lowerFloor24, // lower floor 32 lowerFloor32Turbo, // raise floor to shortest height texture around it raiseToTexture, // lower floor to lowest surrounding floor // and change floorpic lowerAndChange, raiseFloor24, //raise floor 32 raiseFloor32Turbo, raiseFloor24AndChange, raiseFloorCrush, // raise to next highest floor, turbo-speed raiseFloorTurbo, donutRaise, raiseFloor512, //SoM: 3/4/2000 Boom copy YEAH YEAH genFloor, genFloorChg, genFloorChg0, genFloorChgT, //new types for stair builders buildStair, genBuildStair,} floor_e;//SoM:3/4/2000: Anothe boom code copy.typedef enum{ elevateUp, elevateDown, elevateCurrent,} elevator_e;typedef enum{ build8, // slowly build by 8 turbo16 // quickly build by 16} stair_e;typedef struct{ thinker_t thinker; floor_e type; boolean crush; sector_t* sector; int direction; int newspecial; int oldspecial; //SoM: 3/6/2000 short texture; fixed_t floordestheight; fixed_t speed;} floormove_t;typedef struct //SoM: 3/6/2000: Elevator struct.{ thinker_t thinker; elevator_e type; sector_t* sector; int direction; fixed_t floordestheight; fixed_t ceilingdestheight; fixed_t speed;} elevator_t;#define ELEVATORSPEED (FRACUNIT*4/NEWTICRATERATIO) //SoM: 3/6/2000#define FLOORSPEED (FRACUNIT/NEWTICRATERATIO)typedef enum{ ok, crushed, pastdest} result_e;result_eT_MovePlane( sector_t* sector, fixed_t speed, fixed_t dest, boolean crush, int floorOrCeiling, int direction );intEV_BuildStairs( line_t* line, stair_e type );intEV_DoFloor( line_t* line, floor_e floortype );int EV_DoChange( line_t* line, change_e changetype ); //SoM: 3/16/2000int EV_DoElevator( line_t* line, elevator_e elevtype ); //SoM: 3/16/2000void T_MoveFloor( floormove_t* floor);//SoM: New thinker functions.void T_MoveElevator(elevator_t* elevator);//// P_TELEPT//intEV_Teleport( line_t* line, int side, mobj_t* thing );//SoM: 3/15/2000: Boom silent teleport functionsint EV_SilentTeleport(line_t *line, int side, mobj_t *thing);int EV_SilentLineTeleport(line_t *line, int side, mobj_t *thing, boolean reverse);int EV_PortalTeleport(line_t* line, mobj_t* thing, int side);/* SoM: 3/4/2000: This is a large section of copied code. Sorry if this offends people, but I really don't want to read, understand and rewrite all the changes to the source and entire team made! Anyway, this is for the generalized linedef types. *///jff 3/14/98 add bits and shifts for generalized sector types#define DAMAGE_MASK 0x60#define DAMAGE_SHIFT 5#define SECRET_MASK 0x80#define SECRET_SHIFT 7#define FRICTION_MASK 0x100#define FRICTION_SHIFT 8#define PUSH_MASK 0x200#define PUSH_SHIFT 9//jff 02/04/98 Define masks, shifts, for fields in // generalized linedef types#define GenFloorBase 0x6000#define GenCeilingBase 0x4000#define GenDoorBase 0x3c00#define GenLockedBase 0x3800#define GenLiftBase 0x3400#define GenStairsBase 0x3000#define GenCrusherBase 0x2F80#define TriggerType 0x0007#define TriggerTypeShift 0// define masks and shifts for the floor type fields#define FloorCrush 0x1000#define FloorChange 0x0c00#define FloorTarget 0x0380#define FloorDirection 0x0040#define FloorModel 0x0020#define FloorSpeed 0x0018#define FloorCrushShift 12#define FloorChangeShift 10#define FloorTargetShift 7#define FloorDirectionShift 6#define FloorModelShift 5#define FloorSpeedShift 3 // define masks and shifts for the ceiling type fields#define CeilingCrush 0x1000#define CeilingChange 0x0c00#define CeilingTarget 0x0380#define CeilingDirection 0x0040#define CeilingModel 0x0020#define CeilingSpeed 0x0018#define CeilingCrushShift 12#define CeilingChangeShift 10#define CeilingTargetShift 7#define CeilingDirectionShift 6#define CeilingModelShift 5#define CeilingSpeedShift 3// define masks and shifts for the lift type fields#define LiftTarget 0x0300#define LiftDelay 0x00c0#define LiftMonster 0x0020#define LiftSpeed 0x0018#define LiftTargetShift 8#define LiftDelayShift 6#define LiftMonsterShift 5#define LiftSpeedShift 3// define masks and shifts for the stairs type fields#define StairIgnore 0x0200#define StairDirection 0x0100#define StairStep 0x00c0#define StairMonster 0x0020#define StairSpeed 0x0018#define StairIgnoreShift 9#define StairDirectionShift 8#define StairStepShift 6#define StairMonsterShift 5#define StairSpeedShift 3// define masks and shifts for the crusher type fields#define CrusherSilent 0x0040#define CrusherMonster 0x0020#define CrusherSpeed 0x0018#define CrusherSilentShift 6#define CrusherMonsterShift 5#define CrusherSpeedShift 3// define masks and shifts for the door type fields#define DoorDelay 0x0300#define DoorMonster 0x0080#define DoorKind 0x0060#define DoorSpeed 0x0018#define DoorDelayShift 8#define DoorMonsterShift 7#define DoorKindShift 5#define DoorSpeedShift 3// define masks and shifts for the locked door type fields#define LockedNKeys 0x0200#define LockedKey 0x01c0#define LockedKind 0x0020#define LockedSpeed 0x0018#define LockedNKeysShift 9#define LockedKeyShift 6#define LockedKindShift 5#define LockedSpeedShift 3//SoM: 3/9/2000: p_genlinint EV_DoGenFloor( line_t* line );int EV_DoGenCeiling( line_t* line );int EV_DoGenLift( line_t* line );int EV_DoGenStairs( line_t* line );int EV_DoGenCrusher( line_t* line );int EV_DoGenDoor( line_t* line );int EV_DoGenLockedDoor( line_t* line );// define names for the TriggerType field of the general linedefstypedef enum{ WalkOnce, WalkMany, SwitchOnce, SwitchMany, GunOnce, GunMany, PushOnce, PushMany,} triggertype_e;// define names for the Speed field of the general linedefstypedef enum{ SpeedSlow, SpeedNormal, SpeedFast, SpeedTurbo,} motionspeed_e;// define names for the Target field of the general floortypedef enum{ FtoHnF, FtoLnF, FtoNnF, FtoLnC, FtoC, FbyST, Fby24, Fby32,} floortarget_e;// define names for the Changer Type field of the general floortypedef enum{ FNoChg, FChgZero, FChgTxt, FChgTyp,} floorchange_e;// define names for the Change Model field of the general floortypedef enum{ FTriggerModel, FNumericModel,} floormodel_t;// define names for the Target field of the general ceilingtypedef enum{ CtoHnC, CtoLnC, CtoNnC, CtoHnF, CtoF, CbyST, Cby24, Cby32,} ceilingtarget_e;// define names for the Changer Type field of the general ceilingtypedef enum{ CNoChg, CChgZero, CChgTxt, CChgTyp,} ceilingchange_e;// define names for the Change Model field of the general ceilingtypedef enum{ CTriggerModel, CNumericModel,} ceilingmodel_t;// define names for the Target field of the general lifttypedef enum{ F2LnF, F2NnF, F2LnC, LnF2HnF,} lifttarget_e;// define names for the door Kind field of the general ceilingtypedef enum{ OdCDoor, ODoor, CdODoor, CDoor,} doorkind_e;// define names for the locked door Kind field of the general ceilingtypedef enum{ AnyKey_, RCard, BCard, YCard, RSkull, BSkull, YSkull, AllKeys,} keykind_e;/* SoM: End generalized linedef code *///SoM: 3/8/2000: Add generalized scroller codetypedef struct { thinker_t thinker; // Thinker structure for scrolling fixed_t dx, dy; // (dx,dy) scroll speeds int affectee; // Number of affected sidedef, sector, tag, or whatever int control; // Control sector (-1 if none) used to control scrolling fixed_t last_height; // Last known height of control sector fixed_t vdx, vdy; // Accumulated velocity if accelerative int accel; // Whether it's accelerative enum { sc_side, sc_floor, sc_ceiling, sc_carry, sc_carry_ceiling, } type;} scroll_t;void T_Scroll(scroll_t *s);//SoM: 3/8/2000: added new model of friction for ice/sludge effectstypedef struct { thinker_t thinker; // Thinker structure for friction int friction; // friction value (E800 = normal) int movefactor; // inertia factor when adding to momentum int affectee; // Number of affected sector} friction_t;//SoM: Friction defines.#define MORE_FRICTION_MOMENTUM 15000 // mud factor based on momentum#define ORIG_FRICTION 0xE800 // original value#define ORIG_FRICTION_FACTOR 2048 // original value//SoM: 3/9/2000: Otherwise, the compiler whines!void T_Friction(friction_t *f);//SoM: 3/8/2000: Model for Pushers for push/pull effectstypedef struct { thinker_t thinker; // Thinker structure for Pusher enum { p_push, p_pull, p_wind, p_current, } type; mobj_t* source; // Point source if point pusher int x_mag; // X Strength int y_mag; // Y Strength int magnitude; // Vector strength for point pusher int radius; // Effective radius for point pusher int x; // X of point source if point pusher int y; // Y of point source if point pusher int affectee; // Number of affected sector} pusher_t;//SoM: 3/9/2000: Prototype functions for pushersboolean PIT_PushThing(mobj_t* thing);void T_Pusher(pusher_t *p);mobj_t* P_GetPushThing(int s);//SoM: 3/16/2000void P_CalcHeight (player_t* player);// heretic stuffvoid P_InitLava(void);void P_AmbientSound(void);void P_AddAmbientSfx(int sequence);void P_InitAmbientSound(void);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -