]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/game/Target.h
hello world
[icculus/iodoom3.git] / neo / game / Target.h
1 /*
2 ===========================================================================
3
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. 
6
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).  
8
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 Doom 3 Source Code 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 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code.  If not, see <http://www.gnu.org/licenses/>.
21
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code.  If not, please request a copy in writing from id Software at the address below.
23
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25
26 ===========================================================================
27 */
28
29 #ifndef __GAME_TARGET_H__
30 #define __GAME_TARGET_H__
31
32
33 /*
34 ===============================================================================
35
36 idTarget
37
38 ===============================================================================
39 */
40
41 class idTarget : public idEntity {
42 public:
43         CLASS_PROTOTYPE( idTarget );
44 };
45
46
47 /*
48 ===============================================================================
49
50 idTarget_Remove
51
52 ===============================================================================
53 */
54
55 class idTarget_Remove : public idTarget {
56 public:
57         CLASS_PROTOTYPE( idTarget_Remove );
58
59 private:
60         void                            Event_Activate( idEntity *activator );
61 };
62
63
64 /*
65 ===============================================================================
66
67 idTarget_Show
68
69 ===============================================================================
70 */
71
72 class idTarget_Show : public idTarget {
73 public:
74         CLASS_PROTOTYPE( idTarget_Show );
75
76 private:
77         void                            Event_Activate( idEntity *activator );
78 };
79
80
81 /*
82 ===============================================================================
83
84 idTarget_Damage
85
86 ===============================================================================
87 */
88
89 class idTarget_Damage : public idTarget {
90 public:
91         CLASS_PROTOTYPE( idTarget_Damage );
92
93 private:
94         void                            Event_Activate( idEntity *activator );
95 };
96
97
98 /*
99 ===============================================================================
100
101 idTarget_SessionCommand
102
103 ===============================================================================
104 */
105
106 class idTarget_SessionCommand : public idTarget {
107 public:
108         CLASS_PROTOTYPE( idTarget_SessionCommand );
109
110 private:
111         void                            Event_Activate( idEntity *activator );
112 };
113
114
115 /*
116 ===============================================================================
117
118 idTarget_EndLevel
119
120 ===============================================================================
121 */
122
123 class idTarget_EndLevel : public idTarget {
124 public:
125         CLASS_PROTOTYPE( idTarget_EndLevel );
126
127 private:
128         void                            Event_Activate( idEntity *activator );
129
130 };
131
132
133 /*
134 ===============================================================================
135
136 idTarget_WaitForButton
137
138 ===============================================================================
139 */
140
141 class idTarget_WaitForButton : public idTarget {
142 public:
143         CLASS_PROTOTYPE( idTarget_WaitForButton );
144
145         void                            Think( void );
146
147 private:
148         void                            Event_Activate( idEntity *activator );
149 };
150
151 /*
152 ===============================================================================
153
154 idTarget_SetGlobalShaderTime
155
156 ===============================================================================
157 */
158
159 class idTarget_SetGlobalShaderTime : public idTarget {
160 public:
161         CLASS_PROTOTYPE( idTarget_SetGlobalShaderTime );
162
163 private:
164         void                            Event_Activate( idEntity *activator );
165 };
166
167
168 /*
169 ===============================================================================
170
171 idTarget_SetShaderParm
172
173 ===============================================================================
174 */
175
176 class idTarget_SetShaderParm : public idTarget {
177 public:
178         CLASS_PROTOTYPE( idTarget_SetShaderParm );
179
180 private:
181         void                            Event_Activate( idEntity *activator );
182 };
183
184
185 /*
186 ===============================================================================
187
188 idTarget_SetShaderTime
189
190 ===============================================================================
191 */
192
193 class idTarget_SetShaderTime : public idTarget {
194 public:
195         CLASS_PROTOTYPE( idTarget_SetShaderTime );
196
197 private:
198         void                            Event_Activate( idEntity *activator );
199 };
200
201 /*
202 ===============================================================================
203
204 idTarget_FadeEntity
205
206 ===============================================================================
207 */
208
209 class idTarget_FadeEntity : public idTarget {
210 public:
211         CLASS_PROTOTYPE( idTarget_FadeEntity );
212
213                                                 idTarget_FadeEntity( void );
214
215         void                            Save( idSaveGame *savefile ) const;
216         void                            Restore( idRestoreGame *savefile );
217
218         void                            Think( void );
219
220 private:
221         idVec4                          fadeFrom;
222         int                                     fadeStart;
223         int                                     fadeEnd;
224
225         void                            Event_Activate( idEntity *activator );
226 };
227
228 /*
229 ===============================================================================
230
231 idTarget_LightFadeIn
232
233 ===============================================================================
234 */
235
236 class idTarget_LightFadeIn : public idTarget {
237 public:
238         CLASS_PROTOTYPE( idTarget_LightFadeIn );
239
240 private:
241         void                            Event_Activate( idEntity *activator );
242 };
243
244 /*
245 ===============================================================================
246
247 idTarget_LightFadeOut
248
249 ===============================================================================
250 */
251
252 class idTarget_LightFadeOut : public idTarget {
253 public:
254         CLASS_PROTOTYPE( idTarget_LightFadeOut );
255
256 private:
257         void                            Event_Activate( idEntity *activator );
258 };
259
260 /*
261 ===============================================================================
262
263 idTarget_Give
264
265 ===============================================================================
266 */
267
268 class idTarget_Give : public idTarget {
269 public:
270         CLASS_PROTOTYPE( idTarget_Give );
271
272         void                            Spawn( void );
273
274 private:
275         void                            Event_Activate( idEntity *activator );
276 };
277
278
279 /*
280 ===============================================================================
281
282 idTarget_GiveEmail
283
284 ===============================================================================
285 */
286
287 class idTarget_GiveEmail : public idTarget {
288 public:
289         CLASS_PROTOTYPE( idTarget_GiveEmail );
290
291         void                            Spawn( void );
292
293 private:
294         void                            Event_Activate( idEntity *activator );
295 };
296
297 /*
298 ===============================================================================
299
300 idTarget_SetModel
301
302 ===============================================================================
303 */
304
305 class idTarget_SetModel : public idTarget {
306 public:
307         CLASS_PROTOTYPE( idTarget_SetModel );
308
309         void                            Spawn( void );
310
311 private:
312         void                            Event_Activate( idEntity *activator );
313 };
314
315
316 /*
317 ===============================================================================
318
319 idTarget_SetInfluence
320
321 ===============================================================================
322 */
323
324 class idTarget_SetInfluence : public idTarget {
325 public:
326         CLASS_PROTOTYPE( idTarget_SetInfluence );
327
328                                                 idTarget_SetInfluence( void );
329
330         void                            Save( idSaveGame *savefile ) const;
331         void                            Restore( idRestoreGame *savefile );
332
333         void                            Spawn( void );
334
335 private:
336         void                            Event_Activate( idEntity *activator );
337         void                            Event_RestoreInfluence();
338         void                            Event_GatherEntities();
339         void                            Event_Flash( float flash, int out );
340         void                            Event_ClearFlash( float flash );
341         void                            Think( void );
342
343         idList<int>                     lightList;
344         idList<int>                     guiList;
345         idList<int>                     soundList;
346         idList<int>                     genericList;
347         float                           flashIn;
348         float                           flashOut;
349         float                           delay;
350         idStr                           flashInSound;
351         idStr                           flashOutSound;
352         idEntity *                      switchToCamera;
353         idInterpolate<float>fovSetting;
354         bool                            soundFaded;
355         bool                            restoreOnTrigger;
356 };
357
358
359 /*
360 ===============================================================================
361
362 idTarget_SetKeyVal
363
364 ===============================================================================
365 */
366
367 class idTarget_SetKeyVal : public idTarget {
368 public:
369         CLASS_PROTOTYPE( idTarget_SetKeyVal );
370
371 private:
372         void                            Event_Activate( idEntity *activator );
373 };
374
375
376 /*
377 ===============================================================================
378
379 idTarget_SetFov
380
381 ===============================================================================
382 */
383
384 class idTarget_SetFov : public idTarget {
385 public:
386         CLASS_PROTOTYPE( idTarget_SetFov );
387
388         void                            Save( idSaveGame *savefile ) const;
389         void                            Restore( idRestoreGame *savefile );
390
391         void                            Think( void );
392
393 private:
394         idInterpolate<int>      fovSetting;
395
396         void                            Event_Activate( idEntity *activator );
397 };
398
399
400 /*
401 ===============================================================================
402
403 idTarget_SetPrimaryObjective
404
405 ===============================================================================
406 */
407
408 class idTarget_SetPrimaryObjective : public idTarget {
409 public:
410         CLASS_PROTOTYPE( idTarget_SetPrimaryObjective );
411
412 private:
413         void                            Event_Activate( idEntity *activator );
414 };
415
416 /*
417 ===============================================================================
418
419 idTarget_LockDoor
420
421 ===============================================================================
422 */
423
424 class idTarget_LockDoor: public idTarget {
425 public:
426         CLASS_PROTOTYPE( idTarget_LockDoor );
427
428 private:
429         void                            Event_Activate( idEntity *activator );
430 };
431
432 /*
433 ===============================================================================
434
435 idTarget_CallObjectFunction
436
437 ===============================================================================
438 */
439
440 class idTarget_CallObjectFunction : public idTarget {
441 public:
442         CLASS_PROTOTYPE( idTarget_CallObjectFunction );
443
444 private:
445         void                            Event_Activate( idEntity *activator );
446 };
447
448
449 /*
450 ===============================================================================
451
452 idTarget_LockDoor
453
454 ===============================================================================
455 */
456
457 class idTarget_EnableLevelWeapons : public idTarget {
458 public:
459         CLASS_PROTOTYPE( idTarget_EnableLevelWeapons );
460
461 private:
462         void                            Event_Activate( idEntity *activator );
463 };
464
465
466 /*
467 ===============================================================================
468
469 idTarget_Tip
470
471 ===============================================================================
472 */
473
474 class idTarget_Tip : public idTarget {
475 public:
476         CLASS_PROTOTYPE( idTarget_Tip );
477
478                                                 idTarget_Tip( void );
479
480         void                            Spawn( void );
481
482         void                            Save( idSaveGame *savefile ) const;
483         void                            Restore( idRestoreGame *savefile );
484
485 private:
486         idVec3                          playerPos;
487
488         void                            Event_Activate( idEntity *activator );
489         void                            Event_TipOff( void );
490         void                            Event_GetPlayerPos( void );
491 };
492
493 /*
494 ===============================================================================
495
496 idTarget_GiveSecurity
497
498 ===============================================================================
499 */
500 class idTarget_GiveSecurity : public idTarget {
501 public:
502         CLASS_PROTOTYPE( idTarget_GiveSecurity );
503 private:
504         void                            Event_Activate( idEntity *activator );
505 };
506
507
508 /*
509 ===============================================================================
510
511 idTarget_RemoveWeapons
512
513 ===============================================================================
514 */
515 class idTarget_RemoveWeapons : public idTarget {
516 public:
517         CLASS_PROTOTYPE( idTarget_RemoveWeapons );
518 private:
519         void                            Event_Activate( idEntity *activator );
520 };
521
522
523 /*
524 ===============================================================================
525
526 idTarget_LevelTrigger
527
528 ===============================================================================
529 */
530 class idTarget_LevelTrigger : public idTarget {
531 public:
532         CLASS_PROTOTYPE( idTarget_LevelTrigger );
533 private:
534         void                            Event_Activate( idEntity *activator );
535 };
536
537 /*
538 ===============================================================================
539
540 idTarget_EnableStamina
541
542 ===============================================================================
543 */
544 class idTarget_EnableStamina : public idTarget {
545 public:
546         CLASS_PROTOTYPE( idTarget_EnableStamina );
547 private:
548         void                            Event_Activate( idEntity *activator );
549 };
550
551 /*
552 ===============================================================================
553
554 idTarget_FadeSoundClass
555
556 ===============================================================================
557 */
558 class idTarget_FadeSoundClass : public idTarget {
559 public:
560         CLASS_PROTOTYPE( idTarget_FadeSoundClass );
561 private:
562         void                            Event_Activate( idEntity *activator );
563         void                            Event_RestoreVolume();
564 };
565
566
567 #endif /* !__GAME_TARGET_H__ */