1 /* options.h
2 **
3 **    global defines for options
4 **    Copyright (C) 2001  Florian Berger
5 **    Email: harpin_floh@yahoo.de, florian.berger@jk.uni-linz.ac.at
6 **
7 **    This program is free software; you can redistribute it and/or modify
8 **    it under the terms of the GNU General Public License Version 2 as
9 **    published by the Free Software Foundation;
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 **    You should have received a copy of the GNU General Public License
17 **    along with this program; if not, write to the Free Software
18 **    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 **
20 */
21 
22 #include<GL/gl.h>
23 
24 
25 //#undef DEBUG
26 
27 #ifdef DEBUG
28 #define DPRINTF(format, args...)	fprintf(stderr, format, ## args)
29 #else
30 #define DPRINTF(format, args...)
31 #endif
32 
33 
34 //#undef  options_use_freetype
35 #define options_use_freetype
36 
37 #define options_tex_min_filter GL_LINEAR_MIPMAP_LINEAR
38 #define options_tex_mag_filter GL_LINEAR
39 //#define options_tex_min_filter GL_NEAREST
40 //#define options_tex_mag_filter GL_NEAREST
41 
42 #define options_dither 1
43 
44 #define options_ball_reflect 1
45 #define options_queue_reflect 1
46 #define options_diamond_reflect 1
47 #define options_ball_tex 1
48 #define options_queue_tex 1
49 #define options_frame_tex options_frame_tex_var
50 #define options_place_cue_ball_tex 1
51 #define options_ball_shadows 1
52 #define options_queue_shadows 1
53 #define options_table_tex 1
54 #define options_simple_ball_shadows 0
55 #define options_simple_queue_shadows 0
56 #define options_calc_ball_reflections 0
57 #define options_ball_stencil_reflections 1
58 
59 #define options_jump_shots 0
60 
61 
62 #define options_diamond_color_gold    0xFFD566
63 #define options_diamond_color_chrome  0xFFFFFF
64 #define options_diamond_color_copper  0xFF66D5
65 #define options_diamond_color_black   0x888888
66 #define options_table_color_red       0x802020
67 #define options_table_color_green     0x0D6621
68 #define options_table_color_blue      0x346070
69 #define options_table_color_black     0x383838
70 #define options_table_color_beige     0x807060
71 #define options_frame_color_white     0xCCCCCC
72 
73 
74 /* ball detail settings - very slow machines */
75 #define options_max_ball_detail_LOW 3
76 #define options_ball_detail_nearmax_LOW 0.7
77 #define options_ball_detail_farmin_LOW 5.0
78 
79 /* ball detail settings - slow machines */
80 #define options_max_ball_detail_MED 4
81 #define options_ball_detail_nearmax_MED 0.7
82 #define options_ball_detail_farmin_MED 5.5
83 
84 /* ball detail settings - fast machines */
85 #define options_max_ball_detail_HIGH 5
86 #define options_ball_detail_nearmax_HIGH 0.6
87 #define options_ball_detail_farmin_HIGH 7.0
88 
89 /* ball detail settings - very fast machines */
90 #define options_max_ball_detail_VERYHIGH 7
91 #define options_ball_detail_nearmax_VERYHIGH 0.4
92 #define options_ball_detail_farmin_VERYHIGH  7.0
93 
94 #define options_autocreate_balltex 1
95 
96 //#define options_player_fontname  "/usr/X11/lib/X11/fonts/win-ttf/tahomabd.ttf"
97 #define options_shared_data_path   "/usr/local/shared/foobillard"
98 
99 #define options_player_fontname    "iomanoid.ttf"
100 #define options_help_fontname      "bluebold.ttf"
101 #define options_menu_fontname      "bluebold.ttf"
102 #define options_winner_fontname    "bluebold.ttf"
103 #define options_ball_fontname      "bluebold.ttf"
104 #define options_score_fontname     "bluebold.ttf"
105 #define options_roster_fontname    "bluebold.ttf"
106 
107 #define options_snd_volume 1.0
108 
109 #define options_3D_winnertext 1
110 
111 #define options_gamemode_match      0
112 #define options_gamemode_training   1
113 #define options_gamemode_tournament 2
114 
115 
116 /* gold */
117 //#define options_diamond_color 0xFFD566
118 /* chrome */
119 //#define options_diamond_color 0xBBBBFF
120 /* copper */
121 //#define options_diamond_color 0xFF8866
122 
123 /* green */
124 //#define options_table_color   0x0D6621
125 /* blue */
126 //#define options_table_color   0x346070
127 /* red */
128 //#define options_table_color   0x802020
129 /* ocker */
130 //#define options_table_color   0x706034
131 
132 extern int     options_positional_light;
133 
134 extern int     options_diamond_color;
135 extern int     options_table_color;
136 extern int     options_frame_color;
137 
138 extern double  options_table_size;
139 
140 extern int     options_ball_reflections_blended;
141 
142 extern int     options_lensflare;
143 
144 extern int     options_max_ball_detail;
145 extern double  options_ball_detail_nearmax;
146 extern double  options_ball_detail_farmin;
147 
148 extern int     options_rgstereo_on;
149 
150 extern int *   options_col_ball;
151 extern int     options_col_ball_pool[];
152 extern int     options_col_ball_carambol[];
153 extern int     options_col_ball_snooker[];
154 
155 extern char    options_net_hostname[];
156 extern int     options_net_portnum;
157 
158 extern int     options_free_view_on;
159 
160 extern int     options_frame_tex_var;
161 
162 extern int     options_cuberef;
163 extern int     options_cuberef_res;
164 
165 extern int     options_rgaim;
166 
167 extern int     options_bumpref;  /* bump reflection of chrome edges */
168 extern int     options_bumpwood; /* bumpmaps on wood frame */
169 
170 extern int     options_balltrace;
171 
172 extern int     options_use_sound;   /* for taking care of non-sound systems */
173 
174 extern int     options_gamemode;
175 
176 extern int     options_ball_fresnel_refl;
177 
178 extern int     options_avatar_on;
179 
180 extern double  options_tourfast;
181 
182 extern int     options_cloth_tex;
183 
184 
185 /* queries for OpenGL extensions */
186 extern int extension_cubemap;
187 extern int extension_multitexture;
188 extern int extension_rc_NV;   /* NVIDIA register combiners */
189 extern int extension_ts_NV;   /* NVIDIA texture shader */
190 extern int extension_vp_NV;   /* NVIDIA vertex program */
191 
192 
193 /* compatibility defines */
194 
195 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
196 #ifdef GL_TEXTURE_CUBE_MAP_POSITIVE_X
197 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_X
198 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_Y
199 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_Z
200 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_X
201 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
202 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
203 #define GL_TEXTURE_CUBE_MAP_ARB GL_TEXTURE_CUBE_MAP
204 #define GL_REFLECTION_MAP_ARB GL_REFLECTION_MAP
205 #endif
206 #endif
207 
208 #ifndef GL_TEXTURE0_ARB
209 #ifdef GL_TEXTURE0
210 #define GL_TEXTURE0_ARB GL_TEXTURE0
211 #define GL_TEXTURE1_ARB GL_TEXTURE1
212 #define GL_TEXTURE2_ARB GL_TEXTURE2
213 #define GL_TEXTURE3_ARB GL_TEXTURE3
214 #endif
215 #endif
216