1 /* 2 3 Copyright (C) 1991-2001 and beyond by Bungie Studios, Inc. 4 and the "Aleph One" developers. 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 3 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 This license is contained in the file "COPYING", 17 which is included with this source code; it is available online at 18 http://www.gnu.org/licenses/gpl.html 19 February 21, 2000 (Loren Petrich) 20 21 Crosshairs-interface file. 22 23 Feb 25, 2000 (Loren Petrich): 24 Split the rendering routines up into routines that need different parameters. 25 26 Mar 2, 2000 (Loren Petrich): 27 Moved crosshair data and configuration here from interface.h 28 29 Jun 26, 2002 (Loren Petrich): 30 Added support for crosshairs being circular and/or partially transparent 31 */ 32 33 #ifndef _CROSSHAIRS 34 #define _CROSSHAIRS 35 36 #include "cseries.h" // need RGBColor 37 38 struct SDL_Surface; 39 40 enum { 41 CHShape_RealCrosshairs, 42 CHShape_Circle 43 }; 44 45 struct CrosshairData 46 { 47 RGBColor Color; 48 short Thickness; 49 short FromCenter; 50 short Length; 51 short Shape; 52 float Opacity; 53 float GLColorsPreCalc[4]; 54 bool PreCalced; 55 }; 56 57 // True for OK, false for cancel 58 // the structure will not be changed if this was canceled 59 // Implemented in PlayerDialogs.c 60 bool Configure_Crosshairs(CrosshairData &Data); 61 62 // Gotten from preferences 63 // Implemented in preferences.c 64 CrosshairData& GetCrosshairData(); 65 66 // All these functions return the crosshairs' state (true: active; false: inactive) 67 bool Crosshairs_IsActive(); 68 bool Crosshairs_SetActive(bool NewState); 69 70 bool Crosshairs_Render(SDL_Surface *s); 71 72 #endif 73