1 // Emacs style mode select -*- C++ -*- 2 //----------------------------------------------------------------------------- 3 // 4 // $Id: p_lnspec.h 4469 2014-01-03 23:38:29Z dr_sean $ 5 // 6 // Copyright (C) 1998-2006 by Randy Heit (ZDoom). 7 // Copyright (C) 2006-2014 by The Odamex Team. 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // DESCRIPTION: 20 // New line and sector specials 21 // 22 //----------------------------------------------------------------------------- 23 24 25 #ifndef __P_LNSPEC_H__ 26 #define __P_LNSPEC_H__ 27 28 #include "doomtype.h" 29 30 typedef enum { 31 // Removed 11/3/06 by ML - No more polyobjects! (1-9) 32 // [ML] 9/9/10 - They're back baby! 33 Polyobj_StartLine = 1, 34 Polyobj_RotateLeft = 2, 35 Polyobj_RotateRight = 3, 36 Polyobj_Move = 4, 37 Polyobj_ExplicitLine = 5, 38 Polyobj_MoveTimes8 = 6, 39 Polyobj_DoorSwing = 7, 40 Polyobj_DoorSlide = 8, 41 Line_Horizon = 9, 42 Door_Close = 10, 43 Door_Open = 11, 44 Door_Raise = 12, 45 Door_LockedRaise = 13, 46 47 Floor_LowerByValue = 20, 48 Floor_LowerToLowest = 21, 49 Floor_LowerToNearest = 22, 50 Floor_RaiseByValue = 23, 51 Floor_RaiseToHighest = 24, 52 Floor_RaiseToNearest = 25, 53 54 Stairs_BuildDown = 26, 55 Stairs_BuildUp = 27, 56 57 Floor_RaiseAndCrush = 28, 58 59 Pillar_Build = 29, 60 Pillar_Open = 30, 61 62 Stairs_BuildDownSync = 31, 63 Stairs_BuildUpSync = 32, 64 65 Floor_RaiseByValueTimes8 = 35, 66 Floor_LowerByValueTimes8 = 36, 67 68 Ceiling_LowerByValue = 40, 69 Ceiling_RaiseByValue = 41, 70 Ceiling_CrushAndRaise = 42, 71 Ceiling_LowerAndCrush = 43, 72 Ceiling_CrushStop = 44, 73 Ceiling_CrushRaiseAndStay = 45, 74 75 Floor_CrushStop = 46, 76 77 Plat_PerpetualRaise = 60, 78 Plat_Stop = 61, 79 Plat_DownWaitUpStay = 62, 80 Plat_DownByValue = 63, 81 Plat_UpWaitDownStay = 64, 82 Plat_UpByValue = 65, 83 84 Floor_LowerInstant = 66, 85 Floor_RaiseInstant = 67, 86 Floor_MoveToValueTimes8 = 68, 87 88 Ceiling_MoveToValueTimes8 = 69, 89 90 Teleport = 70, 91 Teleport_NoFog = 71, 92 93 ThrustThing = 72, 94 DamageThing = 73, 95 96 Teleport_NewMap = 74, 97 Teleport_EndGame = 75, 98 ACS_Execute = 80, 99 ACS_Suspend = 81, 100 ACS_Terminate = 82, 101 ACS_LockedExecute = 83, 102 103 Polyobj_OR_RotateLeft = 90, 104 Polyobj_OR_RotateRight = 91, 105 Polyobj_OR_Move = 92, 106 Polyobj_OR_MoveTimes8 = 93, 107 Pillar_BuildAndCrush = 94, 108 109 FloorAndCeiling_LowerByValue = 95, 110 FloorAndCeiling_RaiseByValue = 96, 111 112 Scroll_Texture_Left = 100, 113 Scroll_Texture_Right = 101, 114 Scroll_Texture_Up = 102, 115 Scroll_Texture_Down = 103, 116 117 Light_ForceLightning = 109, 118 Light_RaiseByValue = 110, 119 Light_LowerByValue = 111, 120 Light_ChangeToValue = 112, 121 Light_Fade = 113, 122 Light_Glow = 114, 123 Light_Flicker = 115, 124 Light_Strobe = 116, 125 126 Radius_Quake = 120, // Earthquake 127 128 Line_SetIdentification = 121, 129 130 ThrustThingZ = 128, 131 132 UsePuzzleItem = 129, 133 134 Thing_Activate = 130, 135 Thing_Deactivate = 131, 136 Thing_Remove = 132, 137 Thing_Destroy = 133, 138 Thing_Projectile = 134, 139 Thing_Spawn = 135, 140 Thing_ProjectileGravity = 136, 141 Thing_SpawnNoFog = 137, 142 143 Floor_Waggle = 138, 144 145 Sector_ChangeSound = 140, 146 147 // [RH] Begin new specials for ZDoom 148 Plane_Align = 181, 149 Line_AlignCeiling = 183, 150 Line_AlignFloor = 184, 151 152 Sector_SetRotation = 185, 153 Sector_SetCeilingOffset = 186, 154 Sector_SetFloorOffset = 187, 155 Sector_SetCeilingScale = 188, 156 Sector_SetFloorScale = 189, 157 158 Static_Init = 190, 159 160 SetPlayerProperty = 191, 161 162 Ceiling_LowerToHighestFloor = 192, 163 Ceiling_LowerInstant = 193, 164 Ceiling_RaiseInstant = 194, 165 Ceiling_CrushRaiseAndStayA = 195, 166 Ceiling_CrushAndRaiseA = 196, 167 Ceiling_CrushAndRaiseSilentA = 197, 168 Ceiling_RaiseByValueTimes8 = 198, 169 Ceiling_LowerByValueTimes8 = 199, 170 171 Generic_Floor = 200, 172 Generic_Ceiling = 201, 173 Generic_Door = 202, 174 Generic_Lift = 203, 175 Generic_Stairs = 204, 176 Generic_Crusher = 205, 177 178 Plat_DownWaitUpStayLip = 206, 179 Plat_PerpetualRaiseLip = 207, 180 181 TranslucentLine = 208, 182 Transfer_Heights = 209, 183 Transfer_FloorLight = 210, 184 Transfer_CeilingLight = 211, 185 186 Sector_SetColor = 212, 187 Sector_SetFade = 213, 188 Sector_SetDamage = 214, 189 190 Teleport_Line = 215, 191 192 Sector_SetGravity = 216, 193 194 Stairs_BuildUpDoom = 217, 195 196 Sector_SetWind = 218, 197 Sector_SetFriction = 219, 198 Sector_SetCurrent = 220, 199 200 Scroll_Texture_Both = 221, 201 Scroll_Texture_Model = 222, 202 Scroll_Floor = 223, 203 Scroll_Ceiling = 224, 204 Scroll_Texture_Offsets = 225, 205 ACS_ExecuteAlways = 226, 206 PointPush_SetForce = 227, 207 208 Plat_RaiseAndStayTx0 = 228, 209 210 Thing_SetGoal = 229, 211 212 Plat_UpByValueStayTx = 230, 213 Plat_ToggleCeiling = 231, 214 215 Light_StrobeDoom = 232, 216 Light_MinNeighbor = 233, 217 Light_MaxNeighbor = 234, 218 219 Floor_TransferTrigger = 235, 220 Floor_TransferNumeric = 236, 221 222 ChangeCamera = 237, 223 224 Floor_RaiseToLowestCeiling = 238, 225 Floor_RaiseByValueTxTy = 239, 226 Floor_RaiseByTexture = 240, 227 Floor_LowerToLowestTxTy = 241, 228 Floor_LowerToHighest = 242, 229 230 Exit_Normal = 243, 231 Exit_Secret = 244, 232 233 Elevator_RaiseToNearest = 245, 234 Elevator_MoveToFloor = 246, 235 Elevator_LowerToNearest = 247, 236 237 HealThing = 248, 238 Door_CloseWaitOpen = 249, 239 240 Floor_Donut = 250, 241 242 FloorAndCeiling_LowerRaise = 251, 243 244 Ceiling_RaiseToNearest = 252, 245 Ceiling_LowerToLowest = 253, 246 Ceiling_LowerToFloor = 254, 247 Ceiling_CrushRaiseAndStaySilA = 255 248 } linespecial_t; 249 250 typedef enum { 251 Init_Gravity = 0, 252 Init_Color = 1, 253 Init_Damage = 2, 254 NUM_STATIC_INITS, 255 Init_TransferSky = 255 256 } staticinit_t; 257 258 typedef enum { 259 Light_Phased = 1, 260 LightSequenceStart = 2, 261 LightSequenceSpecial1 = 3, 262 LightSequenceSpecial2 = 4, 263 264 Stairs_Special1 = 26, 265 Stairs_Special2 = 27, 266 267 // [RH] Equivalents for DOOM's sector specials 268 dLight_Flicker = 65, 269 dLight_StrobeFast = 66, 270 dLight_StrobeSlow = 67, 271 dLight_Strobe_Hurt = 68, 272 dDamage_Hellslime = 69, 273 dDamage_Nukage = 71, 274 dLight_Glow = 72, 275 dSector_DoorCloseIn30 = 74, 276 dDamage_End = 75, 277 dLight_StrobeSlowSync = 76, 278 dLight_StrobeFastSync = 77, 279 dSector_DoorRaiseIn5Mins = 78, 280 dDamage_SuperHellslime = 80, 281 dLight_FireFlicker = 81, 282 dDamage_LavaWimpy = 82, 283 dDamage_LavaHefty = 83, 284 dScroll_EastLavaDamage = 84, 285 hDamage_Sludge = 85, 286 287 sLight_Strobe_Hurt = 104, 288 sDamage_Hellslime = 105, 289 Damage_InstantDeath = 115, 290 sDamage_SuperHellslime = 116, 291 292 Light_IndoorLightning2 = 198, 293 Light_IndoorLightning1 = 199, 294 295 Sky2 = 200, 296 297 Scroll_North_Slow = 201, 298 Scroll_North_Medium = 202, 299 Scroll_North_Fast = 203, 300 Scroll_East_Slow = 204, 301 Scroll_East_Medium = 205, 302 Scroll_East_Fast = 206, 303 Scroll_South_Slow = 207, 304 Scroll_South_Medium = 208, 305 Scroll_South_Fast = 209, 306 Scroll_West_Slow = 210, 307 Scroll_West_Medium = 211, 308 Scroll_West_Fast = 212, 309 Scroll_NorthWest_Slow = 213, 310 Scroll_NorthWest_Medium = 214, 311 Scroll_NorthWest_Fast = 215, 312 Scroll_NorthEast_Slow = 216, 313 Scroll_NorthEast_Medium = 217, 314 Scroll_NorthEast_Fast = 218, 315 Scroll_SouthEast_Slow = 219, 316 Scroll_SouthEast_Medium = 220, 317 Scroll_SouthEast_Fast = 221, 318 Scroll_SouthWest_Slow = 222, 319 Scroll_SouthWest_Medium = 223, 320 Scroll_SouthWest_Fast = 224 321 } sectorspecial_t; 322 323 // [RH] Equivalents for BOOM's generalized sector types 324 325 #define DAMAGE_MASK 0x0300 326 #define SECRET_MASK 0x0400 327 #define FRICTION_MASK 0x0800 328 #define PUSH_MASK 0x1000 329 330 struct line_s; 331 class AActor; 332 333 typedef BOOL (*lnSpecFunc)(struct line_s *line, 334 class AActor *activator, 335 int arg1, 336 int arg2, 337 int arg3, 338 int arg4, 339 int arg5); 340 341 extern lnSpecFunc LineSpecials[256]; 342 343 BOOL EV_CeilingCrushStop (int tag); 344 int EV_DoDonut (int tag, fixed_t pillarspeed, fixed_t slimespeed); 345 void EV_StopPlat (int tag); 346 347 bool P_LineSpecialMovesSector(line_s *line); 348 bool P_CanActivateSpecials(line_s *line); 349 350 extern int TeleportSide; 351 352 #endif //__P_LNSPEC_H__ 353 354