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 function
23 * If you look for constants, you should also see base_config.h
27 #include "base_config.h"
29 /*---------------------------------------------------------------------------*/
51 CONFIG_JOYSTICK_DEVICE,
52 CONFIG_JOYSTICK_AXIS_X,
53 CONFIG_JOYSTICK_AXIS_Y,
54 CONFIG_JOYSTICK_BUTTON_A,
55 CONFIG_JOYSTICK_BUTTON_B,
56 CONFIG_JOYSTICK_BUTTON_R,
57 CONFIG_JOYSTICK_BUTTON_L,
58 CONFIG_JOYSTICK_BUTTON_EXIT,
59 CONFIG_JOYSTICK_CAMERA_1,
60 CONFIG_JOYSTICK_CAMERA_2,
61 CONFIG_JOYSTICK_CAMERA_3,
89 /*---------------------------------------------------------------------------*/
91 #define DEFAULT_FULLSCREEN 0
92 #define DEFAULT_WIDTH 800
93 #define DEFAULT_HEIGHT 600
94 #define DEFAULT_STEREO 0
95 #define DEFAULT_CAMERA 0
96 #define DEFAULT_TEXTURES 1
97 #define DEFAULT_GEOMETRY 1
98 #define DEFAULT_REFLECTION 1
99 #define DEFAULT_BACKGROUND 1
100 #define DEFAULT_SHADOW 1
101 #define DEFAULT_AUDIO_RATE 44100
102 #define DEFAULT_AUDIO_BUFF AUDIO_BUFF_HI
103 #define DEFAULT_MOUSE_SENSE 300
104 #define DEFAULT_MOUSE_INVERT 0
105 #define DEFAULT_NICE 1
106 #define DEFAULT_FPS 0
107 #define DEFAULT_SOUND_VOLUME 10
108 #define DEFAULT_MUSIC_VOLUME 6
109 #define DEFAULT_JOYSTICK 0
110 #define DEFAULT_JOYSTICK_DEVICE 0
111 #define DEFAULT_JOYSTICK_AXIS_X 0
112 #define DEFAULT_JOYSTICK_AXIS_Y 1
113 #define DEFAULT_JOYSTICK_BUTTON_A 0
114 #define DEFAULT_JOYSTICK_BUTTON_B 1
115 #define DEFAULT_JOYSTICK_BUTTON_R 2
116 #define DEFAULT_JOYSTICK_BUTTON_L 3
117 #define DEFAULT_JOYSTICK_BUTTON_EXIT 4
118 #define DEFAULT_JOYSTICK_CAMERA_1 5
119 #define DEFAULT_JOYSTICK_CAMERA_2 6
120 #define DEFAULT_JOYSTICK_CAMERA_3 7
121 #define DEFAULT_KEY_CAMERA_1 SDLK_F1
122 #define DEFAULT_KEY_CAMERA_2 SDLK_F2
123 #define DEFAULT_KEY_CAMERA_3 SDLK_F3
124 #define DEFAULT_KEY_CAMERA_R SDLK_RIGHT
125 #define DEFAULT_KEY_CAMERA_L SDLK_LEFT
126 #define DEFAULT_VIEW_FOV 50
127 #define DEFAULT_VIEW_DP 75
128 #define DEFAULT_VIEW_DC 25
129 #define DEFAULT_VIEW_DZ 200
130 #define DEFAULT_ROTATE_SLOW 100
131 #define DEFAULT_ROTATE_FAST 200
132 #define DEFAULT_LAST_SET 0
133 #define DEFAULT_MODE 1
134 #define DEFAULT_CHEAT 0
135 #define DEFAULT_PLAYER ""
136 #define DEFAULT_BALL "png/ball.png"
137 #define DEFAULT_COIN _("png/coin.png")
138 #define DEFAULT_LANG ""
140 /*---------------------------------------------------------------------------*/
142 void config_init(void);
143 void config_load(void);
144 void config_save(void);
145 int config_mode(int, int, int);
147 /*---------------------------------------------------------------------------*/
149 void config_set_d(int, int);
150 void config_tgl_d(int);
151 int config_tst_d(int, int);
152 int config_get_d(int);
154 void config_set_s(int, const char *);
155 void config_get_s(int, char *, int);
156 const char * config_simple_get_s(int i);
159 /*---------------------------------------------------------------------------*/
161 void config_set_grab(void);
162 void config_clr_grab(void);
163 int config_get_grab(void);
165 int config_get_pause(void);
166 void config_set_pause(void);
167 void config_clr_pause(void);
168 void config_tgl_pause(void);
170 /*---------------------------------------------------------------------------*/
172 void config_push_persp(float, float, float);
173 void config_push_ortho(void);
174 void config_pop_matrix(void);
175 void config_clear(void);
177 /*---------------------------------------------------------------------------*/