2 ===========================================================================
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
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.
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.
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/>.
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.
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.
26 ===========================================================================
29 #ifndef __GAME_PLAYERVIEW_H__
30 #define __GAME_PLAYERVIEW_H__
33 ===============================================================================
37 ===============================================================================
40 // screenBlob_t are for the on-screen damage claw marks, etc
42 const idMaterial * material;
50 #define MAX_SCREEN_BLOBS 8
56 void Save( idSaveGame *savefile ) const;
57 void Restore( idRestoreGame *savefile );
59 void SetPlayerEntity( class idPlayer *playerEnt );
61 void ClearEffects( void );
63 void DamageImpulse( idVec3 localKickDir, const idDict *damageDef );
65 void WeaponFireFeedback( const idDict *weaponDef );
67 idAngles AngleOffset( void ) const; // returns the current kick angle
69 idMat3 ShakeAxis( void ) const; // returns the current shake angle
71 void CalculateShake( void );
73 // this may involve rendering to a texture and displaying
74 // that with a warp model or in double vision mode
75 void RenderPlayerView( idUserInterface *hud );
77 void Fade( idVec4 color, int time );
79 void Flash( idVec4 color, int time );
81 void AddBloodSpray( float duration );
83 // temp for view testing
84 void EnableBFGVision( bool b ) { bfgVision = b; };
87 void SingleView( idUserInterface *hud, const renderView_t *view );
88 void DoubleVision( idUserInterface *hud, const renderView_t *view, int offset );
89 void BerserkVision( idUserInterface *hud, const renderView_t *view );
90 void InfluenceVision( idUserInterface *hud, const renderView_t *view );
93 screenBlob_t * GetScreenBlob();
95 screenBlob_t screenBlobs[MAX_SCREEN_BLOBS];
97 int dvFinishTime; // double vision will be stopped at this time
98 const idMaterial * dvMaterial; // material to take the double vision screen shot
100 int kickFinishTime; // view kick will be stopped at this time
105 const idMaterial * tunnelMaterial; // health tunnel vision
106 const idMaterial * armorMaterial; // armor damage view effect
107 const idMaterial * berserkMaterial; // berserk effect
108 const idMaterial * irGogglesMaterial; // ir effect
109 const idMaterial * bloodSprayMaterial; // blood spray
110 const idMaterial * bfgMaterial; // when targeted with BFG
111 const idMaterial * lagoMaterial; // lagometer drawing
112 float lastDamageTime; // accentuate the tunnel effect for a while
114 idVec4 fadeColor; // fade color
115 idVec4 fadeToColor; // color to fade to
116 idVec4 fadeFromColor; // color to fade from
117 float fadeRate; // fade rate
118 int fadeTime; // fade time
120 idAngles shakeAng; // from the sound sources
126 #endif /* !__GAME_PLAYERVIEW_H__ */