diff options
author | Dave Chapman <dave@dchapman.com> | 2006-03-28 15:44:01 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2006-03-28 15:44:01 +0000 |
commit | 47f4a458d636a889e955e68f896708f1276febc0 (patch) | |
tree | 99f770c02ef606f0abbdcd332ac39e69830d8007 /apps/plugins/doom/p_switch.c | |
parent | fff7d6157d56f233cad5c2003475e47a5ff809a7 (diff) | |
download | rockbox-47f4a458d636a889e955e68f896708f1276febc0.tar.gz rockbox-47f4a458d636a889e955e68f896708f1276febc0.zip |
Patch #2969 - Doom! Currently only working on the H300.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9312 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom/p_switch.c')
-rw-r--r-- | apps/plugins/doom/p_switch.c | 1138 |
1 files changed, 1138 insertions, 0 deletions
diff --git a/apps/plugins/doom/p_switch.c b/apps/plugins/doom/p_switch.c new file mode 100644 index 0000000000..698c4c8ee3 --- /dev/null +++ b/apps/plugins/doom/p_switch.c | |||
@@ -0,0 +1,1138 @@ | |||
1 | /* Emacs style mode select -*- C++ -*- | ||
2 | *----------------------------------------------------------------------------- | ||
3 | * | ||
4 | * | ||
5 | * PrBoom a Doom port merged with LxDoom and LSDLDoom | ||
6 | * based on BOOM, a modified and improved DOOM engine | ||
7 | * Copyright (C) 1999 by | ||
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman | ||
9 | * Copyright (C) 1999-2000 by | ||
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
25 | * 02111-1307, USA. | ||
26 | * | ||
27 | * DESCRIPTION: | ||
28 | * Switches, buttons. Two-state animation. Exits. | ||
29 | * | ||
30 | *-----------------------------------------------------------------------------*/ | ||
31 | |||
32 | #include "doomstat.h" | ||
33 | #include "w_wad.h" | ||
34 | #include "r_main.h" | ||
35 | #include "p_spec.h" | ||
36 | #include "g_game.h" | ||
37 | #include "s_sound.h" | ||
38 | #include "sounds.h" | ||
39 | #include "m_swap.h" | ||
40 | #include "i_system.h" | ||
41 | #include "rockmacros.h" | ||
42 | // killough 2/8/98: Remove switch limit | ||
43 | |||
44 | static int *switchlist; // killough | ||
45 | static int max_numswitches; // killough | ||
46 | static int numswitches; // killough | ||
47 | |||
48 | button_t buttonlist[MAXBUTTONS]; | ||
49 | |||
50 | // | ||
51 | // P_InitSwitchList() | ||
52 | // | ||
53 | // Only called at game initialization in order to list the set of switches | ||
54 | // and buttons known to the engine. This enables their texture to change | ||
55 | // when activated, and in the case of buttons, change back after a timeout. | ||
56 | // | ||
57 | // This routine modified to read its data from a predefined lump or | ||
58 | // PWAD lump called SWITCHES rather than a static table in this module to | ||
59 | // allow wad designers to insert or modify switches. | ||
60 | // | ||
61 | // Lump format is an array of byte packed switchlist_t structures, terminated | ||
62 | // by a structure with episode == -0. The lump can be generated from a | ||
63 | // text source file using SWANTBLS.EXE, distributed with the BOOM utils. | ||
64 | // The standard list of switches and animations is contained in the example | ||
65 | // source text file DEFSWANI.DAT also in the BOOM util distribution. | ||
66 | // | ||
67 | // Rewritten by Lee Killough to remove limit 2/8/98 | ||
68 | // | ||
69 | void P_InitSwitchList(void) | ||
70 | { | ||
71 | int i, index = 0; | ||
72 | int episode = (gamemode == registered || gamemode==retail) ? | ||
73 | 2 : gamemode == commercial ? 3 : 1; | ||
74 | const switchlist_t *alphSwitchList; //jff 3/23/98 pointer to switch table | ||
75 | int lump = W_GetNumForName("SWITCHES"); // cph - new wad lump handling | ||
76 | |||
77 | //jff 3/23/98 read the switch table from a predefined lump | ||
78 | alphSwitchList = (const switchlist_t *)W_CacheLumpNum(lump); | ||
79 | |||
80 | for (i=0;;i++) | ||
81 | { | ||
82 | if (index+1 >= max_numswitches) | ||
83 | switchlist = realloc(switchlist, sizeof *switchlist * | ||
84 | (max_numswitches = max_numswitches ? max_numswitches*2 : 8)); | ||
85 | if (SHORT(alphSwitchList[i].episode) <= episode) //jff 5/11/98 endianess | ||
86 | { | ||
87 | if (!SHORT(alphSwitchList[i].episode)) | ||
88 | break; | ||
89 | switchlist[index++] = R_TextureNumForName(alphSwitchList[i].name1); | ||
90 | switchlist[index++] = R_TextureNumForName(alphSwitchList[i].name2); | ||
91 | } | ||
92 | } | ||
93 | |||
94 | numswitches = index/2; | ||
95 | switchlist[index] = -1; | ||
96 | W_UnlockLumpNum(lump); | ||
97 | } | ||
98 | |||
99 | // | ||
100 | // P_StartButton() | ||
101 | // | ||
102 | // Start a button (retriggerable switch) counting down till it turns off. | ||
103 | // | ||
104 | // Passed the linedef the button is on, which texture on the sidedef contains | ||
105 | // the button, the texture number of the button, and the time the button is | ||
106 | // to remain active in gametics. | ||
107 | // No return. | ||
108 | // | ||
109 | void P_StartButton | ||
110 | ( line_t* line, | ||
111 | bwhere_e w, | ||
112 | int texture, | ||
113 | int time ) | ||
114 | { | ||
115 | int i; | ||
116 | |||
117 | // See if button is already pressed | ||
118 | for (i = 0;i < MAXBUTTONS;i++) | ||
119 | if (buttonlist[i].btimer && buttonlist[i].line == line) | ||
120 | return; | ||
121 | |||
122 | for (i = 0;i < MAXBUTTONS;i++) | ||
123 | if (!buttonlist[i].btimer) // use first unused element of list | ||
124 | { | ||
125 | buttonlist[i].line = line; | ||
126 | buttonlist[i].where = w; | ||
127 | buttonlist[i].btexture = texture; | ||
128 | buttonlist[i].btimer = time; | ||
129 | buttonlist[i].soundorg = (mobj_t *)&line->frontsector->soundorg; | ||
130 | return; | ||
131 | } | ||
132 | |||
133 | I_Error("P_StartButton: no button slots left!"); | ||
134 | } | ||
135 | |||
136 | // | ||
137 | // P_ChangeSwitchTexture() | ||
138 | // | ||
139 | // Function that changes switch wall texture on activation. | ||
140 | // | ||
141 | // Passed the line which the switch is on, and whether its retriggerable. | ||
142 | // If not retriggerable, this function clears the line special to insure that | ||
143 | // | ||
144 | // No return | ||
145 | // | ||
146 | void P_ChangeSwitchTexture | ||
147 | ( line_t* line, | ||
148 | int useAgain ) | ||
149 | { | ||
150 | int texTop; | ||
151 | int texMid; | ||
152 | int texBot; | ||
153 | int i; | ||
154 | int sound; | ||
155 | |||
156 | if (!useAgain) | ||
157 | line->special = 0; | ||
158 | |||
159 | texTop = sides[line->sidenum[0]].toptexture; | ||
160 | texMid = sides[line->sidenum[0]].midtexture; | ||
161 | texBot = sides[line->sidenum[0]].bottomtexture; | ||
162 | |||
163 | sound = sfx_swtchn; | ||
164 | |||
165 | // EXIT SWITCH? | ||
166 | if (line->special == 11) | ||
167 | sound = sfx_swtchx; | ||
168 | |||
169 | for (i = 0;i < numswitches*2;i++) | ||
170 | { | ||
171 | if (switchlist[i] == texTop) // if an upper texture | ||
172 | { | ||
173 | S_StartSound(buttonlist->soundorg,sound); // switch activation sound | ||
174 | sides[line->sidenum[0]].toptexture = switchlist[i^1]; //chg texture | ||
175 | |||
176 | if (useAgain) | ||
177 | P_StartButton(line,top,switchlist[i],BUTTONTIME); //start timer | ||
178 | |||
179 | return; | ||
180 | } | ||
181 | else | ||
182 | { | ||
183 | if (switchlist[i] == texMid) // if a normal texture | ||
184 | { | ||
185 | S_StartSound(buttonlist->soundorg,sound); // switch activation sound | ||
186 | sides[line->sidenum[0]].midtexture = switchlist[i^1]; //chg texture | ||
187 | |||
188 | if (useAgain) | ||
189 | P_StartButton(line, middle,switchlist[i],BUTTONTIME); //start timer | ||
190 | |||
191 | return; | ||
192 | } | ||
193 | else | ||
194 | { | ||
195 | if (switchlist[i] == texBot) // if a lower texture | ||
196 | { | ||
197 | S_StartSound(buttonlist->soundorg,sound); // switch activation sound | ||
198 | sides[line->sidenum[0]].bottomtexture = switchlist[i^1];//chg texture | ||
199 | |||
200 | if (useAgain) | ||
201 | P_StartButton(line, bottom,switchlist[i],BUTTONTIME); //start timer | ||
202 | |||
203 | return; | ||
204 | } | ||
205 | } | ||
206 | } | ||
207 | } | ||
208 | } | ||
209 | |||
210 | |||
211 | // | ||
212 | // P_UseSpecialLine | ||
213 | // | ||
214 | // | ||
215 | // Called when a thing uses (pushes) a special line. | ||
216 | // Only the front sides of lines are usable. | ||
217 | // Dispatches to the appropriate linedef function handler. | ||
218 | // | ||
219 | // Passed the thing using the line, the line being used, and the side used | ||
220 | // Returns true if a thinker was created | ||
221 | // | ||
222 | boolean | ||
223 | P_UseSpecialLine | ||
224 | ( mobj_t* thing, | ||
225 | line_t* line, | ||
226 | int side ) | ||
227 | { | ||
228 | |||
229 | if (side) //jff 6/1/98 fix inadvertent deletion of side test | ||
230 | return false; | ||
231 | |||
232 | //jff 02/04/98 add check here for generalized floor/ceil mover | ||
233 | if (!demo_compatibility) | ||
234 | { | ||
235 | // pointer to line function is NULL by default, set non-null if | ||
236 | // line special is push or switch generalized linedef type | ||
237 | int (*linefunc)(line_t *line)=NULL; | ||
238 | |||
239 | // check each range of generalized linedefs | ||
240 | if ((unsigned)line->special >= GenEnd) | ||
241 | { | ||
242 | // Out of range for GenFloors | ||
243 | } | ||
244 | else if ((unsigned)line->special >= GenFloorBase) | ||
245 | { | ||
246 | if (!thing->player) | ||
247 | if ((line->special & FloorChange) || !(line->special & FloorModel)) | ||
248 | return false; // FloorModel is "Allow Monsters" if FloorChange is 0 | ||
249 | if (!line->tag && ((line->special&6)!=6)) //jff 2/27/98 all non-manual | ||
250 | return false; // generalized types require tag | ||
251 | linefunc = EV_DoGenFloor; | ||
252 | } | ||
253 | else if ((unsigned)line->special >= GenCeilingBase) | ||
254 | { | ||
255 | if (!thing->player) | ||
256 | if ((line->special & CeilingChange) || !(line->special & CeilingModel)) | ||
257 | return false; // CeilingModel is "Allow Monsters" if CeilingChange is 0 | ||
258 | if (!line->tag && ((line->special&6)!=6)) //jff 2/27/98 all non-manual | ||
259 | return false; // generalized types require tag | ||
260 | linefunc = EV_DoGenCeiling; | ||
261 | } | ||
262 | else if ((unsigned)line->special >= GenDoorBase) | ||
263 | { | ||
264 | if (!thing->player) | ||
265 | { | ||
266 | if (!(line->special & DoorMonster)) | ||
267 | return false; // monsters disallowed from this door | ||
268 | if (line->flags & ML_SECRET) // they can't open secret doors either | ||
269 | return false; | ||
270 | } | ||
271 | if (!line->tag && ((line->special&6)!=6)) //jff 3/2/98 all non-manual | ||
272 | return false; // generalized types require tag | ||
273 | linefunc = EV_DoGenDoor; | ||
274 | } | ||
275 | else if ((unsigned)line->special >= GenLockedBase) | ||
276 | { | ||
277 | if (!thing->player) | ||
278 | return false; // monsters disallowed from unlocking doors | ||
279 | if (!P_CanUnlockGenDoor(line,thing->player)) | ||
280 | return false; | ||
281 | if (!line->tag && ((line->special&6)!=6)) //jff 2/27/98 all non-manual | ||
282 | return false; // generalized types require tag | ||
283 | |||
284 | linefunc = EV_DoGenLockedDoor; | ||
285 | } | ||
286 | else if ((unsigned)line->special >= GenLiftBase) | ||
287 | { | ||
288 | if (!thing->player) | ||
289 | if (!(line->special & LiftMonster)) | ||
290 | return false; // monsters disallowed | ||
291 | if (!line->tag && ((line->special&6)!=6)) //jff 2/27/98 all non-manual | ||
292 | return false; // generalized types require tag | ||
293 | linefunc = EV_DoGenLift; | ||
294 | } | ||
295 | else if ((unsigned)line->special >= GenStairsBase) | ||
296 | { | ||
297 | if (!thing->player) | ||
298 | if (!(line->special & StairMonster)) | ||
299 | return false; // monsters disallowed | ||
300 | if (!line->tag && ((line->special&6)!=6)) //jff 2/27/98 all non-manual | ||
301 | return false; // generalized types require tag | ||
302 | linefunc = EV_DoGenStairs; | ||
303 | } | ||
304 | else if ((unsigned)line->special >= GenCrusherBase) | ||
305 | { | ||
306 | if (!thing->player) | ||
307 | if (!(line->special & CrusherMonster)) | ||
308 | return false; // monsters disallowed | ||
309 | if (!line->tag && ((line->special&6)!=6)) //jff 2/27/98 all non-manual | ||
310 | return false; // generalized types require tag | ||
311 | linefunc = EV_DoGenCrusher; | ||
312 | } | ||
313 | |||
314 | if (linefunc) | ||
315 | switch((line->special & TriggerType) >> TriggerTypeShift) | ||
316 | { | ||
317 | case PushOnce: | ||
318 | if (!side) | ||
319 | if (linefunc(line)) | ||
320 | line->special = 0; | ||
321 | return true; | ||
322 | case PushMany: | ||
323 | if (!side) | ||
324 | linefunc(line); | ||
325 | return true; | ||
326 | case SwitchOnce: | ||
327 | if (linefunc(line)) | ||
328 | P_ChangeSwitchTexture(line,0); | ||
329 | return true; | ||
330 | case SwitchMany: | ||
331 | if (linefunc(line)) | ||
332 | P_ChangeSwitchTexture(line,1); | ||
333 | return true; | ||
334 | default: // if not a switch/push type, do nothing here | ||
335 | return false; | ||
336 | } | ||
337 | } | ||
338 | |||
339 | // Switches that other things can activate. | ||
340 | if (!thing->player) | ||
341 | { | ||
342 | // never open secret doors | ||
343 | if (line->flags & ML_SECRET) | ||
344 | return false; | ||
345 | |||
346 | switch(line->special) | ||
347 | { | ||
348 | case 1: // MANUAL DOOR RAISE | ||
349 | case 32: // MANUAL BLUE | ||
350 | case 33: // MANUAL RED | ||
351 | case 34: // MANUAL YELLOW | ||
352 | //jff 3/5/98 add ability to use teleporters for monsters | ||
353 | case 195: // switch teleporters | ||
354 | case 174: | ||
355 | case 210: // silent switch teleporters | ||
356 | case 209: | ||
357 | break; | ||
358 | |||
359 | default: | ||
360 | return false; | ||
361 | break; | ||
362 | } | ||
363 | } | ||
364 | |||
365 | if (!P_CheckTag(line)) //jff 2/27/98 disallow zero tag on some types | ||
366 | return false; | ||
367 | |||
368 | // Dispatch to handler according to linedef type | ||
369 | switch (line->special) | ||
370 | { | ||
371 | // Manual doors, push type with no tag | ||
372 | case 1: // Vertical Door | ||
373 | case 26: // Blue Door/Locked | ||
374 | case 27: // Yellow Door /Locked | ||
375 | case 28: // Red Door /Locked | ||
376 | |||
377 | case 31: // Manual door open | ||
378 | case 32: // Blue locked door open | ||
379 | case 33: // Red locked door open | ||
380 | case 34: // Yellow locked door open | ||
381 | |||
382 | case 117: // Blazing door raise | ||
383 | case 118: // Blazing door open | ||
384 | EV_VerticalDoor (line, thing); | ||
385 | break; | ||
386 | |||
387 | // Switches (non-retriggerable) | ||
388 | case 7: | ||
389 | // Build Stairs | ||
390 | if (EV_BuildStairs(line,build8)) | ||
391 | P_ChangeSwitchTexture(line,0); | ||
392 | break; | ||
393 | |||
394 | case 9: | ||
395 | // Change Donut | ||
396 | if (EV_DoDonut(line)) | ||
397 | P_ChangeSwitchTexture(line,0); | ||
398 | break; | ||
399 | |||
400 | case 11: | ||
401 | /* Exit level | ||
402 | * killough 10/98: prevent zombies from exiting levels | ||
403 | */ | ||
404 | if (thing->player && thing->player->health <= 0 && !comp[comp_zombie]) | ||
405 | { | ||
406 | S_StartSound(thing, sfx_noway); | ||
407 | return false; | ||
408 | } | ||
409 | |||
410 | P_ChangeSwitchTexture(line,0); | ||
411 | G_ExitLevel (); | ||
412 | break; | ||
413 | |||
414 | case 14: | ||
415 | // Raise Floor 32 and change texture | ||
416 | if (EV_DoPlat(line,raiseAndChange,32)) | ||
417 | P_ChangeSwitchTexture(line,0); | ||
418 | break; | ||
419 | |||
420 | case 15: | ||
421 | // Raise Floor 24 and change texture | ||
422 | if (EV_DoPlat(line,raiseAndChange,24)) | ||
423 | P_ChangeSwitchTexture(line,0); | ||
424 | break; | ||
425 | |||
426 | case 18: | ||
427 | // Raise Floor to next highest floor | ||
428 | if (EV_DoFloor(line, raiseFloorToNearest)) | ||
429 | P_ChangeSwitchTexture(line,0); | ||
430 | break; | ||
431 | |||
432 | case 20: | ||
433 | // Raise Plat next highest floor and change texture | ||
434 | if (EV_DoPlat(line,raiseToNearestAndChange,0)) | ||
435 | P_ChangeSwitchTexture(line,0); | ||
436 | break; | ||
437 | |||
438 | case 21: | ||
439 | // PlatDownWaitUpStay | ||
440 | if (EV_DoPlat(line,downWaitUpStay,0)) | ||
441 | P_ChangeSwitchTexture(line,0); | ||
442 | break; | ||
443 | |||
444 | case 23: | ||
445 | // Lower Floor to Lowest | ||
446 | if (EV_DoFloor(line,lowerFloorToLowest)) | ||
447 | P_ChangeSwitchTexture(line,0); | ||
448 | break; | ||
449 | |||
450 | case 29: | ||
451 | // Raise Door | ||
452 | if (EV_DoDoor(line,normal)) | ||
453 | P_ChangeSwitchTexture(line,0); | ||
454 | break; | ||
455 | |||
456 | case 41: | ||
457 | // Lower Ceiling to Floor | ||
458 | if (EV_DoCeiling(line,lowerToFloor)) | ||
459 | P_ChangeSwitchTexture(line,0); | ||
460 | break; | ||
461 | |||
462 | case 71: | ||
463 | // Turbo Lower Floor | ||
464 | if (EV_DoFloor(line,turboLower)) | ||
465 | P_ChangeSwitchTexture(line,0); | ||
466 | break; | ||
467 | |||
468 | case 49: | ||
469 | // Ceiling Crush And Raise | ||
470 | if (EV_DoCeiling(line,crushAndRaise)) | ||
471 | P_ChangeSwitchTexture(line,0); | ||
472 | break; | ||
473 | |||
474 | case 50: | ||
475 | // Close Door | ||
476 | if (EV_DoDoor(line,p_close)) | ||
477 | P_ChangeSwitchTexture(line,0); | ||
478 | break; | ||
479 | |||
480 | case 51: | ||
481 | /* Secret EXIT | ||
482 | * killough 10/98: prevent zombies from exiting levels | ||
483 | */ | ||
484 | if (thing->player && thing->player->health <= 0 && !comp[comp_zombie]) | ||
485 | { | ||
486 | S_StartSound(thing, sfx_noway); | ||
487 | return false; | ||
488 | } | ||
489 | |||
490 | P_ChangeSwitchTexture(line,0); | ||
491 | G_SecretExitLevel (); | ||
492 | break; | ||
493 | |||
494 | case 55: | ||
495 | // Raise Floor Crush | ||
496 | if (EV_DoFloor(line,raiseFloorCrush)) | ||
497 | P_ChangeSwitchTexture(line,0); | ||
498 | break; | ||
499 | |||
500 | case 101: | ||
501 | // Raise Floor | ||
502 | if (EV_DoFloor(line,raiseFloor)) | ||
503 | P_ChangeSwitchTexture(line,0); | ||
504 | break; | ||
505 | |||
506 | case 102: | ||
507 | // Lower Floor to Surrounding floor height | ||
508 | if (EV_DoFloor(line,lowerFloor)) | ||
509 | P_ChangeSwitchTexture(line,0); | ||
510 | break; | ||
511 | |||
512 | case 103: | ||
513 | // Open Door | ||
514 | if (EV_DoDoor(line,p_open)) | ||
515 | P_ChangeSwitchTexture(line,0); | ||
516 | break; | ||
517 | |||
518 | case 111: | ||
519 | // Blazing Door Raise (faster than TURBO!) | ||
520 | if (EV_DoDoor (line,blazeRaise)) | ||
521 | P_ChangeSwitchTexture(line,0); | ||
522 | break; | ||
523 | |||
524 | case 112: | ||
525 | // Blazing Door Open (faster than TURBO!) | ||
526 | if (EV_DoDoor (line,blazeOpen)) | ||
527 | P_ChangeSwitchTexture(line,0); | ||
528 | break; | ||
529 | |||
530 | case 113: | ||
531 | // Blazing Door Close (faster than TURBO!) | ||
532 | if (EV_DoDoor (line,blazeClose)) | ||
533 | P_ChangeSwitchTexture(line,0); | ||
534 | break; | ||
535 | |||
536 | case 122: | ||
537 | // Blazing PlatDownWaitUpStay | ||
538 | if (EV_DoPlat(line,blazeDWUS,0)) | ||
539 | P_ChangeSwitchTexture(line,0); | ||
540 | break; | ||
541 | |||
542 | case 127: | ||
543 | // Build Stairs Turbo 16 | ||
544 | if (EV_BuildStairs(line,turbo16)) | ||
545 | P_ChangeSwitchTexture(line,0); | ||
546 | break; | ||
547 | |||
548 | case 131: | ||
549 | // Raise Floor Turbo | ||
550 | if (EV_DoFloor(line,raiseFloorTurbo)) | ||
551 | P_ChangeSwitchTexture(line,0); | ||
552 | break; | ||
553 | |||
554 | case 133: | ||
555 | // BlzOpenDoor BLUE | ||
556 | case 135: | ||
557 | // BlzOpenDoor RED | ||
558 | case 137: | ||
559 | // BlzOpenDoor YELLOW | ||
560 | if (EV_DoLockedDoor (line,blazeOpen,thing)) | ||
561 | P_ChangeSwitchTexture(line,0); | ||
562 | break; | ||
563 | |||
564 | case 140: | ||
565 | // Raise Floor 512 | ||
566 | if (EV_DoFloor(line,raiseFloor512)) | ||
567 | P_ChangeSwitchTexture(line,0); | ||
568 | break; | ||
569 | |||
570 | // killough 1/31/98: factored out compatibility check; | ||
571 | // added inner switch, relaxed check to demo_compatibility | ||
572 | |||
573 | default: | ||
574 | if (!demo_compatibility) | ||
575 | switch (line->special) | ||
576 | { | ||
577 | //jff 1/29/98 added linedef types to fill all functions out so that | ||
578 | // all possess SR, S1, WR, W1 types | ||
579 | |||
580 | case 158: | ||
581 | // Raise Floor to shortest lower texture | ||
582 | // 158 S1 EV_DoFloor(raiseToTexture), CSW(0) | ||
583 | if (EV_DoFloor(line,raiseToTexture)) | ||
584 | P_ChangeSwitchTexture(line,0); | ||
585 | break; | ||
586 | |||
587 | case 159: | ||
588 | // Raise Floor to shortest lower texture | ||
589 | // 159 S1 EV_DoFloor(lowerAndChange) | ||
590 | if (EV_DoFloor(line,lowerAndChange)) | ||
591 | P_ChangeSwitchTexture(line,0); | ||
592 | break; | ||
593 | |||
594 | case 160: | ||
595 | // Raise Floor 24 and change | ||
596 | // 160 S1 EV_DoFloor(raiseFloor24AndChange) | ||
597 | if (EV_DoFloor(line,raiseFloor24AndChange)) | ||
598 | P_ChangeSwitchTexture(line,0); | ||
599 | break; | ||
600 | |||
601 | case 161: | ||
602 | // Raise Floor 24 | ||
603 | // 161 S1 EV_DoFloor(raiseFloor24) | ||
604 | if (EV_DoFloor(line,raiseFloor24)) | ||
605 | P_ChangeSwitchTexture(line,0); | ||
606 | break; | ||
607 | |||
608 | case 162: | ||
609 | // Moving floor min n to max n | ||
610 | // 162 S1 EV_DoPlat(perpetualRaise,0) | ||
611 | if (EV_DoPlat(line,perpetualRaise,0)) | ||
612 | P_ChangeSwitchTexture(line,0); | ||
613 | break; | ||
614 | |||
615 | case 163: | ||
616 | // Stop Moving floor | ||
617 | // 163 S1 EV_DoPlat(perpetualRaise,0) | ||
618 | EV_StopPlat(line); | ||
619 | P_ChangeSwitchTexture(line,0); | ||
620 | break; | ||
621 | |||
622 | case 164: | ||
623 | // Start fast crusher | ||
624 | // 164 S1 EV_DoCeiling(fastCrushAndRaise) | ||
625 | if (EV_DoCeiling(line,fastCrushAndRaise)) | ||
626 | P_ChangeSwitchTexture(line,0); | ||
627 | break; | ||
628 | |||
629 | case 165: | ||
630 | // Start slow silent crusher | ||
631 | // 165 S1 EV_DoCeiling(silentCrushAndRaise) | ||
632 | if (EV_DoCeiling(line,silentCrushAndRaise)) | ||
633 | P_ChangeSwitchTexture(line,0); | ||
634 | break; | ||
635 | |||
636 | case 166: | ||
637 | // Raise ceiling, Lower floor | ||
638 | // 166 S1 EV_DoCeiling(raiseToHighest), EV_DoFloor(lowerFloortoLowest) | ||
639 | if (EV_DoCeiling(line, raiseToHighest) || | ||
640 | EV_DoFloor(line, lowerFloorToLowest)) | ||
641 | P_ChangeSwitchTexture(line,0); | ||
642 | break; | ||
643 | |||
644 | case 167: | ||
645 | // Lower floor and Crush | ||
646 | // 167 S1 EV_DoCeiling(lowerAndCrush) | ||
647 | if (EV_DoCeiling(line, lowerAndCrush)) | ||
648 | P_ChangeSwitchTexture(line,0); | ||
649 | break; | ||
650 | |||
651 | case 168: | ||
652 | // Stop crusher | ||
653 | // 168 S1 EV_CeilingCrushStop() | ||
654 | if (EV_CeilingCrushStop(line)) | ||
655 | P_ChangeSwitchTexture(line,0); | ||
656 | break; | ||
657 | |||
658 | case 169: | ||
659 | // Lights to brightest neighbor sector | ||
660 | // 169 S1 EV_LightTurnOn(0) | ||
661 | EV_LightTurnOn(line,0); | ||
662 | P_ChangeSwitchTexture(line,0); | ||
663 | break; | ||
664 | |||
665 | case 170: | ||
666 | // Lights to near dark | ||
667 | // 170 S1 EV_LightTurnOn(35) | ||
668 | EV_LightTurnOn(line,35); | ||
669 | P_ChangeSwitchTexture(line,0); | ||
670 | break; | ||
671 | |||
672 | case 171: | ||
673 | // Lights on full | ||
674 | // 171 S1 EV_LightTurnOn(255) | ||
675 | EV_LightTurnOn(line,255); | ||
676 | P_ChangeSwitchTexture(line,0); | ||
677 | break; | ||
678 | |||
679 | case 172: | ||
680 | // Start Lights Strobing | ||
681 | // 172 S1 EV_StartLightStrobing() | ||
682 | EV_StartLightStrobing(line); | ||
683 | P_ChangeSwitchTexture(line,0); | ||
684 | break; | ||
685 | |||
686 | case 173: | ||
687 | // Lights to Dimmest Near | ||
688 | // 173 S1 EV_TurnTagLightsOff() | ||
689 | EV_TurnTagLightsOff(line); | ||
690 | P_ChangeSwitchTexture(line,0); | ||
691 | break; | ||
692 | |||
693 | case 174: | ||
694 | // Teleport | ||
695 | // 174 S1 EV_Teleport(side,thing) | ||
696 | if (EV_Teleport(line,side,thing)) | ||
697 | P_ChangeSwitchTexture(line,0); | ||
698 | break; | ||
699 | |||
700 | case 175: | ||
701 | // Close Door, Open in 30 secs | ||
702 | // 175 S1 EV_DoDoor(close30ThenOpen) | ||
703 | if (EV_DoDoor(line,close30ThenOpen)) | ||
704 | P_ChangeSwitchTexture(line,0); | ||
705 | break; | ||
706 | |||
707 | case 189: //jff 3/15/98 create texture change no motion type | ||
708 | // Texture Change Only (Trigger) | ||
709 | // 189 S1 Change Texture/Type Only | ||
710 | if (EV_DoChange(line,trigChangeOnly)) | ||
711 | P_ChangeSwitchTexture(line,0); | ||
712 | break; | ||
713 | |||
714 | case 203: | ||
715 | // Lower ceiling to lowest surrounding ceiling | ||
716 | // 203 S1 EV_DoCeiling(lowerToLowest) | ||
717 | if (EV_DoCeiling(line,lowerToLowest)) | ||
718 | P_ChangeSwitchTexture(line,0); | ||
719 | break; | ||
720 | |||
721 | case 204: | ||
722 | // Lower ceiling to highest surrounding floor | ||
723 | // 204 S1 EV_DoCeiling(lowerToMaxFloor) | ||
724 | if (EV_DoCeiling(line,lowerToMaxFloor)) | ||
725 | P_ChangeSwitchTexture(line,0); | ||
726 | break; | ||
727 | |||
728 | case 209: | ||
729 | // killough 1/31/98: silent teleporter | ||
730 | //jff 209 S1 SilentTeleport | ||
731 | if (EV_SilentTeleport(line, side, thing)) | ||
732 | P_ChangeSwitchTexture(line,0); | ||
733 | break; | ||
734 | |||
735 | case 241: //jff 3/15/98 create texture change no motion type | ||
736 | // Texture Change Only (Numeric) | ||
737 | // 241 S1 Change Texture/Type Only | ||
738 | if (EV_DoChange(line,numChangeOnly)) | ||
739 | P_ChangeSwitchTexture(line,0); | ||
740 | break; | ||
741 | |||
742 | case 221: | ||
743 | // Lower floor to next lowest floor | ||
744 | // 221 S1 Lower Floor To Nearest Floor | ||
745 | if (EV_DoFloor(line,lowerFloorToNearest)) | ||
746 | P_ChangeSwitchTexture(line,0); | ||
747 | break; | ||
748 | |||
749 | case 229: | ||
750 | // Raise elevator next floor | ||
751 | // 229 S1 Raise Elevator next floor | ||
752 | if (EV_DoElevator(line,elevateUp)) | ||
753 | P_ChangeSwitchTexture(line,0); | ||
754 | break; | ||
755 | |||
756 | case 233: | ||
757 | // Lower elevator next floor | ||
758 | // 233 S1 Lower Elevator next floor | ||
759 | if (EV_DoElevator(line,elevateDown)) | ||
760 | P_ChangeSwitchTexture(line,0); | ||
761 | break; | ||
762 | |||
763 | case 237: | ||
764 | // Elevator to current floor | ||
765 | // 237 S1 Elevator to current floor | ||
766 | if (EV_DoElevator(line,elevateCurrent)) | ||
767 | P_ChangeSwitchTexture(line,0); | ||
768 | break; | ||
769 | |||
770 | |||
771 | // jff 1/29/98 end of added S1 linedef types | ||
772 | |||
773 | //jff 1/29/98 added linedef types to fill all functions out so that | ||
774 | // all possess SR, S1, WR, W1 types | ||
775 | |||
776 | case 78: //jff 3/15/98 create texture change no motion type | ||
777 | // Texture Change Only (Numeric) | ||
778 | // 78 SR Change Texture/Type Only | ||
779 | if (EV_DoChange(line,numChangeOnly)) | ||
780 | P_ChangeSwitchTexture(line,1); | ||
781 | break; | ||
782 | |||
783 | case 176: | ||
784 | // Raise Floor to shortest lower texture | ||
785 | // 176 SR EV_DoFloor(raiseToTexture), CSW(1) | ||
786 | if (EV_DoFloor(line,raiseToTexture)) | ||
787 | P_ChangeSwitchTexture(line,1); | ||
788 | break; | ||
789 | |||
790 | case 177: | ||
791 | // Raise Floor to shortest lower texture | ||
792 | // 177 SR EV_DoFloor(lowerAndChange) | ||
793 | if (EV_DoFloor(line,lowerAndChange)) | ||
794 | P_ChangeSwitchTexture(line,1); | ||
795 | break; | ||
796 | |||
797 | case 178: | ||
798 | // Raise Floor 512 | ||
799 | // 178 SR EV_DoFloor(raiseFloor512) | ||
800 | if (EV_DoFloor(line,raiseFloor512)) | ||
801 | P_ChangeSwitchTexture(line,1); | ||
802 | break; | ||
803 | |||
804 | case 179: | ||
805 | // Raise Floor 24 and change | ||
806 | // 179 SR EV_DoFloor(raiseFloor24AndChange) | ||
807 | if (EV_DoFloor(line,raiseFloor24AndChange)) | ||
808 | P_ChangeSwitchTexture(line,1); | ||
809 | break; | ||
810 | |||
811 | case 180: | ||
812 | // Raise Floor 24 | ||
813 | // 180 SR EV_DoFloor(raiseFloor24) | ||
814 | if (EV_DoFloor(line,raiseFloor24)) | ||
815 | P_ChangeSwitchTexture(line,1); | ||
816 | break; | ||
817 | |||
818 | case 181: | ||
819 | // Moving floor min n to max n | ||
820 | // 181 SR EV_DoPlat(perpetualRaise,0) | ||
821 | |||
822 | EV_DoPlat(line,perpetualRaise,0); | ||
823 | P_ChangeSwitchTexture(line,1); | ||
824 | break; | ||
825 | |||
826 | case 182: | ||
827 | // Stop Moving floor | ||
828 | // 182 SR EV_DoPlat(perpetualRaise,0) | ||
829 | EV_StopPlat(line); | ||
830 | P_ChangeSwitchTexture(line,1); | ||
831 | break; | ||
832 | |||
833 | case 183: | ||
834 | // Start fast crusher | ||
835 | // 183 SR EV_DoCeiling(fastCrushAndRaise) | ||
836 | if (EV_DoCeiling(line,fastCrushAndRaise)) | ||
837 | P_ChangeSwitchTexture(line,1); | ||
838 | break; | ||
839 | |||
840 | case 184: | ||
841 | // Start slow crusher | ||
842 | // 184 SR EV_DoCeiling(crushAndRaise) | ||
843 | if (EV_DoCeiling(line,crushAndRaise)) | ||
844 | P_ChangeSwitchTexture(line,1); | ||
845 | break; | ||
846 | |||
847 | case 185: | ||
848 | // Start slow silent crusher | ||
849 | // 185 SR EV_DoCeiling(silentCrushAndRaise) | ||
850 | if (EV_DoCeiling(line,silentCrushAndRaise)) | ||
851 | P_ChangeSwitchTexture(line,1); | ||
852 | break; | ||
853 | |||
854 | case 186: | ||
855 | // Raise ceiling, Lower floor | ||
856 | // 186 SR EV_DoCeiling(raiseToHighest), EV_DoFloor(lowerFloortoLowest) | ||
857 | if (EV_DoCeiling(line, raiseToHighest) || | ||
858 | EV_DoFloor(line, lowerFloorToLowest)) | ||
859 | P_ChangeSwitchTexture(line,1); | ||
860 | break; | ||
861 | |||
862 | case 187: | ||
863 | // Lower floor and Crush | ||
864 | // 187 SR EV_DoCeiling(lowerAndCrush) | ||
865 | if (EV_DoCeiling(line, lowerAndCrush)) | ||
866 | P_ChangeSwitchTexture(line,1); | ||
867 | break; | ||
868 | |||
869 | case 188: | ||
870 | // Stop crusher | ||
871 | // 188 SR EV_CeilingCrushStop() | ||
872 | if (EV_CeilingCrushStop(line)) | ||
873 | P_ChangeSwitchTexture(line,1); | ||
874 | break; | ||
875 | |||
876 | case 190: //jff 3/15/98 create texture change no motion type | ||
877 | // Texture Change Only (Trigger) | ||
878 | // 190 SR Change Texture/Type Only | ||
879 | if (EV_DoChange(line,trigChangeOnly)) | ||
880 | P_ChangeSwitchTexture(line,1); | ||
881 | break; | ||
882 | |||
883 | case 191: | ||
884 | // Lower Pillar, Raise Donut | ||
885 | // 191 SR EV_DoDonut() | ||
886 | if (EV_DoDonut(line)) | ||
887 | P_ChangeSwitchTexture(line,1); | ||
888 | break; | ||
889 | |||
890 | case 192: | ||
891 | // Lights to brightest neighbor sector | ||
892 | // 192 SR EV_LightTurnOn(0) | ||
893 | EV_LightTurnOn(line,0); | ||
894 | P_ChangeSwitchTexture(line,1); | ||
895 | break; | ||
896 | |||
897 | case 193: | ||
898 | // Start Lights Strobing | ||
899 | // 193 SR EV_StartLightStrobing() | ||
900 | EV_StartLightStrobing(line); | ||
901 | P_ChangeSwitchTexture(line,1); | ||
902 | break; | ||
903 | |||
904 | case 194: | ||
905 | // Lights to Dimmest Near | ||
906 | // 194 SR EV_TurnTagLightsOff() | ||
907 | EV_TurnTagLightsOff(line); | ||
908 | P_ChangeSwitchTexture(line,1); | ||
909 | break; | ||
910 | |||
911 | case 195: | ||
912 | // Teleport | ||
913 | // 195 SR EV_Teleport(side,thing) | ||
914 | if (EV_Teleport(line,side,thing)) | ||
915 | P_ChangeSwitchTexture(line,1); | ||
916 | break; | ||
917 | |||
918 | case 196: | ||
919 | // Close Door, Open in 30 secs | ||
920 | // 196 SR EV_DoDoor(close30ThenOpen) | ||
921 | if (EV_DoDoor(line,close30ThenOpen)) | ||
922 | P_ChangeSwitchTexture(line,1); | ||
923 | break; | ||
924 | |||
925 | case 205: | ||
926 | // Lower ceiling to lowest surrounding ceiling | ||
927 | // 205 SR EV_DoCeiling(lowerToLowest) | ||
928 | if (EV_DoCeiling(line,lowerToLowest)) | ||
929 | P_ChangeSwitchTexture(line,1); | ||
930 | break; | ||
931 | |||
932 | case 206: | ||
933 | // Lower ceiling to highest surrounding floor | ||
934 | // 206 SR EV_DoCeiling(lowerToMaxFloor) | ||
935 | if (EV_DoCeiling(line,lowerToMaxFloor)) | ||
936 | P_ChangeSwitchTexture(line,1); | ||
937 | break; | ||
938 | |||
939 | case 210: | ||
940 | // killough 1/31/98: silent teleporter | ||
941 | //jff 210 SR SilentTeleport | ||
942 | if (EV_SilentTeleport(line, side, thing)) | ||
943 | P_ChangeSwitchTexture(line,1); | ||
944 | break; | ||
945 | |||
946 | case 211: //jff 3/14/98 create instant toggle floor type | ||
947 | // Toggle Floor Between C and F Instantly | ||
948 | // 211 SR Toggle Floor Instant | ||
949 | if (EV_DoPlat(line,toggleUpDn,0)) | ||
950 | P_ChangeSwitchTexture(line,1); | ||
951 | break; | ||
952 | |||
953 | case 222: | ||
954 | // Lower floor to next lowest floor | ||
955 | // 222 SR Lower Floor To Nearest Floor | ||
956 | if (EV_DoFloor(line,lowerFloorToNearest)) | ||
957 | P_ChangeSwitchTexture(line,1); | ||
958 | break; | ||
959 | |||
960 | case 230: | ||
961 | // Raise elevator next floor | ||
962 | // 230 SR Raise Elevator next floor | ||
963 | if (EV_DoElevator(line,elevateUp)) | ||
964 | P_ChangeSwitchTexture(line,1); | ||
965 | break; | ||
966 | |||
967 | case 234: | ||
968 | // Lower elevator next floor | ||
969 | // 234 SR Lower Elevator next floor | ||
970 | if (EV_DoElevator(line,elevateDown)) | ||
971 | P_ChangeSwitchTexture(line,1); | ||
972 | break; | ||
973 | |||
974 | case 238: | ||
975 | // Elevator to current floor | ||
976 | // 238 SR Elevator to current floor | ||
977 | if (EV_DoElevator(line,elevateCurrent)) | ||
978 | P_ChangeSwitchTexture(line,1); | ||
979 | break; | ||
980 | |||
981 | case 258: | ||
982 | // Build stairs, step 8 | ||
983 | // 258 SR EV_BuildStairs(build8) | ||
984 | if (EV_BuildStairs(line,build8)) | ||
985 | P_ChangeSwitchTexture(line,1); | ||
986 | break; | ||
987 | |||
988 | case 259: | ||
989 | // Build stairs, step 16 | ||
990 | // 259 SR EV_BuildStairs(turbo16) | ||
991 | if (EV_BuildStairs(line,turbo16)) | ||
992 | P_ChangeSwitchTexture(line,1); | ||
993 | break; | ||
994 | |||
995 | // 1/29/98 jff end of added SR linedef types | ||
996 | |||
997 | } | ||
998 | break; | ||
999 | |||
1000 | // Buttons (retriggerable switches) | ||
1001 | case 42: | ||
1002 | // Close Door | ||
1003 | if (EV_DoDoor(line,p_close)) | ||
1004 | P_ChangeSwitchTexture(line,1); | ||
1005 | break; | ||
1006 | |||
1007 | case 43: | ||
1008 | // Lower Ceiling to Floor | ||
1009 | if (EV_DoCeiling(line,lowerToFloor)) | ||
1010 | P_ChangeSwitchTexture(line,1); | ||
1011 | break; | ||
1012 | |||
1013 | case 45: | ||
1014 | // Lower Floor to Surrounding floor height | ||
1015 | if (EV_DoFloor(line,lowerFloor)) | ||
1016 | P_ChangeSwitchTexture(line,1); | ||
1017 | break; | ||
1018 | |||
1019 | case 60: | ||
1020 | // Lower Floor to Lowest | ||
1021 | if (EV_DoFloor(line,lowerFloorToLowest)) | ||
1022 | P_ChangeSwitchTexture(line,1); | ||
1023 | break; | ||
1024 | |||
1025 | case 61: | ||
1026 | // Open Door | ||
1027 | if (EV_DoDoor(line,p_open)) | ||
1028 | P_ChangeSwitchTexture(line,1); | ||
1029 | break; | ||
1030 | |||
1031 | case 62: | ||
1032 | // PlatDownWaitUpStay | ||
1033 | if (EV_DoPlat(line,downWaitUpStay,1)) | ||
1034 | P_ChangeSwitchTexture(line,1); | ||
1035 | break; | ||
1036 | |||
1037 | case 63: | ||
1038 | // Raise Door | ||
1039 | if (EV_DoDoor(line,normal)) | ||
1040 | P_ChangeSwitchTexture(line,1); | ||
1041 | break; | ||
1042 | |||
1043 | case 64: | ||
1044 | // Raise Floor to ceiling | ||
1045 | if (EV_DoFloor(line,raiseFloor)) | ||
1046 | P_ChangeSwitchTexture(line,1); | ||
1047 | break; | ||
1048 | |||
1049 | case 66: | ||
1050 | // Raise Floor 24 and change texture | ||
1051 | if (EV_DoPlat(line,raiseAndChange,24)) | ||
1052 | P_ChangeSwitchTexture(line,1); | ||
1053 | break; | ||
1054 | |||
1055 | case 67: | ||
1056 | // Raise Floor 32 and change texture | ||
1057 | if (EV_DoPlat(line,raiseAndChange,32)) | ||
1058 | P_ChangeSwitchTexture(line,1); | ||
1059 | break; | ||
1060 | |||
1061 | case 65: | ||
1062 | // Raise Floor Crush | ||
1063 | if (EV_DoFloor(line,raiseFloorCrush)) | ||
1064 | P_ChangeSwitchTexture(line,1); | ||
1065 | break; | ||
1066 | |||
1067 | case 68: | ||
1068 | // Raise Plat to next highest floor and change texture | ||
1069 | if (EV_DoPlat(line,raiseToNearestAndChange,0)) | ||
1070 | P_ChangeSwitchTexture(line,1); | ||
1071 | break; | ||
1072 | |||
1073 | case 69: | ||
1074 | // Raise Floor to next highest floor | ||
1075 | if (EV_DoFloor(line, raiseFloorToNearest)) | ||
1076 | P_ChangeSwitchTexture(line,1); | ||
1077 | break; | ||
1078 | |||
1079 | case 70: | ||
1080 | // Turbo Lower Floor | ||
1081 | if (EV_DoFloor(line,turboLower)) | ||
1082 | P_ChangeSwitchTexture(line,1); | ||
1083 | break; | ||
1084 | |||
1085 | case 114: | ||
1086 | // Blazing Door Raise (faster than TURBO!) | ||
1087 | if (EV_DoDoor (line,blazeRaise)) | ||
1088 | P_ChangeSwitchTexture(line,1); | ||
1089 | break; | ||
1090 | |||
1091 | case 115: | ||
1092 | // Blazing Door Open (faster than TURBO!) | ||
1093 | if (EV_DoDoor (line,blazeOpen)) | ||
1094 | P_ChangeSwitchTexture(line,1); | ||
1095 | break; | ||
1096 | |||
1097 | case 116: | ||
1098 | // Blazing Door Close (faster than TURBO!) | ||
1099 | if (EV_DoDoor (line,blazeClose)) | ||
1100 | P_ChangeSwitchTexture(line,1); | ||
1101 | break; | ||
1102 | |||
1103 | case 123: | ||
1104 | // Blazing PlatDownWaitUpStay | ||
1105 | if (EV_DoPlat(line,blazeDWUS,0)) | ||
1106 | P_ChangeSwitchTexture(line,1); | ||
1107 | break; | ||
1108 | |||
1109 | case 132: | ||
1110 | // Raise Floor Turbo | ||
1111 | if (EV_DoFloor(line,raiseFloorTurbo)) | ||
1112 | P_ChangeSwitchTexture(line,1); | ||
1113 | break; | ||
1114 | |||
1115 | case 99: | ||
1116 | // BlzOpenDoor BLUE | ||
1117 | case 134: | ||
1118 | // BlzOpenDoor RED | ||
1119 | case 136: | ||
1120 | // BlzOpenDoor YELLOW | ||
1121 | if (EV_DoLockedDoor (line,blazeOpen,thing)) | ||
1122 | P_ChangeSwitchTexture(line,1); | ||
1123 | break; | ||
1124 | |||
1125 | case 138: | ||
1126 | // Light Turn On | ||
1127 | EV_LightTurnOn(line,255); | ||
1128 | P_ChangeSwitchTexture(line,1); | ||
1129 | break; | ||
1130 | |||
1131 | case 139: | ||
1132 | // Light Turn Off | ||
1133 | EV_LightTurnOn(line,35); | ||
1134 | P_ChangeSwitchTexture(line,1); | ||
1135 | break; | ||
1136 | } | ||
1137 | return true; | ||
1138 | } | ||