2 * Copyright (C) 2003 Robert Kooima
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
20 * 1- some global config methods (stored in a config file)
21 * 2- some SDL based functions
23 * If you're looking for constants, you should also see base_config.h
28 #include "base_config.h"
31 /*---------------------------------------------------------------------------*/
51 CONFIG_MOUSE_CAMERA_1,
52 CONFIG_MOUSE_CAMERA_2,
53 CONFIG_MOUSE_CAMERA_3,
54 CONFIG_MOUSE_CAMERA_L,
55 CONFIG_MOUSE_CAMERA_R,
61 CONFIG_JOYSTICK_DEVICE,
62 CONFIG_JOYSTICK_AXIS_X,
63 CONFIG_JOYSTICK_AXIS_Y,
64 CONFIG_JOYSTICK_BUTTON_A,
65 CONFIG_JOYSTICK_BUTTON_B,
66 CONFIG_JOYSTICK_BUTTON_R,
67 CONFIG_JOYSTICK_BUTTON_L,
68 CONFIG_JOYSTICK_BUTTON_EXIT,
69 CONFIG_JOYSTICK_CAMERA_1,
70 CONFIG_JOYSTICK_CAMERA_2,
71 CONFIG_JOYSTICK_CAMERA_3,
72 CONFIG_JOYSTICK_DPAD_L,
73 CONFIG_JOYSTICK_DPAD_R,
74 CONFIG_JOYSTICK_DPAD_U,
75 CONFIG_JOYSTICK_DPAD_D,
93 CONFIG_KEY_SCORE_NEXT,
100 CONFIG_OPTION_D_COUNT
109 CONFIG_OPTION_S_COUNT
112 /*---------------------------------------------------------------------------*/
114 #define DEFAULT_FULLSCREEN 0
115 #define DEFAULT_WIDTH 800
116 #define DEFAULT_HEIGHT 600
117 #define DEFAULT_STEREO 0
118 #define DEFAULT_CAMERA 0
119 #define DEFAULT_TEXTURES 1
120 #define DEFAULT_GEOMETRY 1
121 #define DEFAULT_REFLECTION 1
122 #define DEFAULT_MULTISAMPLE 0
123 #define DEFAULT_MIPMAP 0
124 #define DEFAULT_ANISO 0
125 #define DEFAULT_BACKGROUND 1
126 #define DEFAULT_SHADOW 1
127 #define DEFAULT_AUDIO_BUFF AUDIO_BUFF_HI
128 #define DEFAULT_MOUSE_SENSE 300
129 #define DEFAULT_MOUSE_INVERT 0
130 #define DEFAULT_VSYNC 1
131 #define DEFAULT_MOUSE_CAMERA_1 0
132 #define DEFAULT_MOUSE_CAMERA_2 0
133 #define DEFAULT_MOUSE_CAMERA_3 0
134 #define DEFAULT_MOUSE_CAMERA_L SDL_BUTTON_LEFT
135 #define DEFAULT_MOUSE_CAMERA_R SDL_BUTTON_RIGHT
136 #define DEFAULT_NICE 0
137 #define DEFAULT_FPS 0
138 #define DEFAULT_SOUND_VOLUME 10
139 #define DEFAULT_MUSIC_VOLUME 6
140 #define DEFAULT_JOYSTICK 0
141 #define DEFAULT_JOYSTICK_DEVICE 0
142 #define DEFAULT_JOYSTICK_AXIS_X 0
143 #define DEFAULT_JOYSTICK_AXIS_Y 1
144 #define DEFAULT_JOYSTICK_BUTTON_A 0
145 #define DEFAULT_JOYSTICK_BUTTON_B 1
146 #define DEFAULT_JOYSTICK_BUTTON_R 2
147 #define DEFAULT_JOYSTICK_BUTTON_L 3
148 #define DEFAULT_JOYSTICK_BUTTON_EXIT 4
149 #define DEFAULT_JOYSTICK_CAMERA_1 5
150 #define DEFAULT_JOYSTICK_CAMERA_2 6
151 #define DEFAULT_JOYSTICK_CAMERA_3 7
152 #define DEFAULT_JOYSTICK_DPAD_L 8
153 #define DEFAULT_JOYSTICK_DPAD_R 9
154 #define DEFAULT_JOYSTICK_DPAD_U 10
155 #define DEFAULT_JOYSTICK_DPAD_D 11
156 #define DEFAULT_WIIMOTE_ADDR ""
157 #define DEFAULT_KEY_CAMERA_1 SDLK_F1
158 #define DEFAULT_KEY_CAMERA_2 SDLK_F2
159 #define DEFAULT_KEY_CAMERA_3 SDLK_F3
160 #define DEFAULT_KEY_CAMERA_R SDLK_d
161 #define DEFAULT_KEY_CAMERA_L SDLK_s
162 #define DEFAULT_VIEW_FOV 50
163 #define DEFAULT_VIEW_DP 75
164 #define DEFAULT_VIEW_DC 25
165 #define DEFAULT_VIEW_DZ 200
166 #define DEFAULT_ROTATE_SLOW 100
167 #define DEFAULT_ROTATE_FAST 200
168 #define DEFAULT_PLAYER ""
169 #define DEFAULT_BALL "ball/basic-ball/basic-ball"
170 #define DEFAULT_REPLAY_NAME "%s-%l"
171 #define DEFAULT_CHEAT 0
172 #define DEFAULT_KEY_FORWARD SDLK_UP
173 #define DEFAULT_KEY_BACKWARD SDLK_DOWN
174 #define DEFAULT_KEY_LEFT SDLK_LEFT
175 #define DEFAULT_KEY_RIGHT SDLK_RIGHT
176 #define DEFAULT_KEY_PAUSE SDLK_ESCAPE
177 #define DEFAULT_KEY_RESTART SDLK_r
178 #define DEFAULT_KEY_SCORE_NEXT SDLK_TAB
179 #define DEFAULT_STATS 0
180 #define DEFAULT_UNIFORM 0
181 #define DEFAULT_SCREENSHOT 0
182 #define DEFAULT_LOCK_GOALS 0
184 /*---------------------------------------------------------------------------*/
186 void config_init(void);
187 void config_load(void);
188 void config_save(void);
189 int config_mode(int, int, int);
191 int config_perf(void);
192 void config_sync(void);
193 void config_swap(void);
195 /*---------------------------------------------------------------------------*/
197 void config_set_d(int, int);
198 void config_tgl_d(int);
199 int config_tst_d(int, int);
200 int config_get_d(int);
202 void config_set_s(int, const char *);
203 void config_get_s(int, char *, int);
205 /*---------------------------------------------------------------------------*/
207 void config_set_grab(int w);
208 void config_clr_grab(void);
209 int config_get_grab(void);
211 /*---------------------------------------------------------------------------*/
213 int config_cheat(void);
214 void config_set_cheat(void);
215 void config_clr_cheat(void);
217 /*---------------------------------------------------------------------------*/
219 int config_screenshot(void);
221 /*---------------------------------------------------------------------------*/
223 void config_push_persp(float, float, float);
224 void config_push_ortho(void);
225 void config_pop_matrix(void);
226 void config_clear(void);
228 /*---------------------------------------------------------------------------*/