Language selection in-game is no more. It might return some day, but
[neverball] / share / config.h
1 /*
2  * Copyright (C) 2003 Robert Kooima
3  *
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.
8  *
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.
13  */
14
15 #ifndef CONFIG_H
16 #define CONFIG_H
17
18 /*
19  * This file contains:
20  * 1- some global config methods (stored in a config file)
21  * 2- some SDL based functions
22  *
23  * If you're looking for constants, you should also see base_config.h
24  */
25
26 #include <SDL.h>
27 #include "base_config.h"
28
29 /*---------------------------------------------------------------------------*/
30
31 enum {
32     CONFIG_FULLSCREEN,
33     CONFIG_WIDTH,
34     CONFIG_HEIGHT,
35     CONFIG_STEREO,
36     CONFIG_CAMERA,
37     CONFIG_TEXTURES,
38     CONFIG_GEOMETRY,
39     CONFIG_REFLECTION,
40     CONFIG_MULTISAMPLE,
41     CONFIG_BACKGROUND,
42     CONFIG_SHADOW,
43     CONFIG_AUDIO_RATE,
44     CONFIG_AUDIO_BUFF,
45     CONFIG_MOUSE_SENSE,
46     CONFIG_MOUSE_INVERT,
47     CONFIG_NICE,
48     CONFIG_FPS,
49     CONFIG_SOUND_VOLUME,
50     CONFIG_MUSIC_VOLUME,
51     CONFIG_JOYSTICK,
52     CONFIG_JOYSTICK_DEVICE,
53     CONFIG_JOYSTICK_AXIS_X,
54     CONFIG_JOYSTICK_AXIS_Y,
55     CONFIG_JOYSTICK_BUTTON_A,
56     CONFIG_JOYSTICK_BUTTON_B,
57     CONFIG_JOYSTICK_BUTTON_R,
58     CONFIG_JOYSTICK_BUTTON_L,
59     CONFIG_JOYSTICK_BUTTON_EXIT,
60     CONFIG_JOYSTICK_CAMERA_1,
61     CONFIG_JOYSTICK_CAMERA_2,
62     CONFIG_JOYSTICK_CAMERA_3,
63     CONFIG_KEY_CAMERA_1,
64     CONFIG_KEY_CAMERA_2,
65     CONFIG_KEY_CAMERA_3,
66     CONFIG_KEY_CAMERA_R,
67     CONFIG_KEY_CAMERA_L,
68     CONFIG_VIEW_FOV,
69     CONFIG_VIEW_DP,
70     CONFIG_VIEW_DC,
71     CONFIG_VIEW_DZ,
72     CONFIG_ROTATE_FAST,
73     CONFIG_ROTATE_SLOW,
74     CONFIG_MODE,
75     CONFIG_CHEAT,
76     CONFIG_KEY_FORWARD,
77     CONFIG_KEY_BACKWARD,
78     CONFIG_KEY_LEFT,
79     CONFIG_KEY_RIGHT,
80     CONFIG_KEY_PAUSE,
81     CONFIG_KEY_RESTART,
82
83     CONFIG_OPTION_D_COUNT
84 };
85
86 enum {
87     CONFIG_PLAYER,
88     CONFIG_BALL,
89     CONFIG_BALL_BONUS,
90
91     CONFIG_OPTION_S_COUNT
92 };
93
94 /*---------------------------------------------------------------------------*/
95
96 #define DEFAULT_FULLSCREEN           0
97 #define DEFAULT_WIDTH                800
98 #define DEFAULT_HEIGHT               600
99 #define DEFAULT_STEREO               0
100 #define DEFAULT_CAMERA               0
101 #define DEFAULT_TEXTURES             1
102 #define DEFAULT_GEOMETRY             1
103 #define DEFAULT_REFLECTION           1
104 #define DEFAULT_MULTISAMPLE          0
105 #define DEFAULT_BACKGROUND           1
106 #define DEFAULT_SHADOW               1
107 #define DEFAULT_AUDIO_RATE           44100
108 #define DEFAULT_AUDIO_BUFF           AUDIO_BUFF_HI
109 #define DEFAULT_MOUSE_SENSE          300
110 #define DEFAULT_MOUSE_INVERT         0
111 #define DEFAULT_NICE                 1
112 #define DEFAULT_FPS                  0
113 #define DEFAULT_SOUND_VOLUME         10
114 #define DEFAULT_MUSIC_VOLUME         6
115 #define DEFAULT_JOYSTICK             0
116 #define DEFAULT_JOYSTICK_DEVICE      0
117 #define DEFAULT_JOYSTICK_AXIS_X      0
118 #define DEFAULT_JOYSTICK_AXIS_Y      1
119 #define DEFAULT_JOYSTICK_BUTTON_A    0
120 #define DEFAULT_JOYSTICK_BUTTON_B    1
121 #define DEFAULT_JOYSTICK_BUTTON_R    2
122 #define DEFAULT_JOYSTICK_BUTTON_L    3
123 #define DEFAULT_JOYSTICK_BUTTON_EXIT 4
124 #define DEFAULT_JOYSTICK_CAMERA_1    5
125 #define DEFAULT_JOYSTICK_CAMERA_2    6
126 #define DEFAULT_JOYSTICK_CAMERA_3    7
127 #define DEFAULT_KEY_CAMERA_1         SDLK_F1
128 #define DEFAULT_KEY_CAMERA_2         SDLK_F2
129 #define DEFAULT_KEY_CAMERA_3         SDLK_F3
130 #define DEFAULT_KEY_CAMERA_R         SDLK_d
131 #define DEFAULT_KEY_CAMERA_L         SDLK_s
132 #define DEFAULT_VIEW_FOV             50
133 #define DEFAULT_VIEW_DP              75
134 #define DEFAULT_VIEW_DC              25
135 #define DEFAULT_VIEW_DZ              200
136 #define DEFAULT_ROTATE_SLOW          100
137 #define DEFAULT_ROTATE_FAST          200
138 #define DEFAULT_MODE                 1
139 #define DEFAULT_CHEAT                0
140 #define DEFAULT_PLAYER               ""
141 #define DEFAULT_BALL                 "png/ball.png"
142 #define DEFAULT_BALL_BONUS           "png/ball-bonus.png"
143 #define DEFAULT_KEY_FORWARD          SDLK_UP
144 #define DEFAULT_KEY_BACKWARD         SDLK_DOWN
145 #define DEFAULT_KEY_LEFT             SDLK_LEFT
146 #define DEFAULT_KEY_RIGHT            SDLK_RIGHT
147 #define DEFAULT_KEY_PAUSE            SDLK_SPACE
148 #define DEFAULT_KEY_RESTART          SDLK_r
149
150 /*---------------------------------------------------------------------------*/
151
152 void config_init(void);
153 void config_load(void);
154 void config_save(void);
155 int  config_mode(int, int, int);
156
157 /*---------------------------------------------------------------------------*/
158
159 void config_set_d(int, int);
160 void config_tgl_d(int);
161 int  config_tst_d(int, int);
162 int  config_get_d(int);
163
164 void config_set_s(int, const char *);
165 void config_get_s(int, char *, int);
166 const char *config_simple_get_s(int i);
167
168
169 /*---------------------------------------------------------------------------*/
170
171 void config_set_grab(int w);
172 void config_clr_grab(void);
173 int  config_get_grab(void);
174
175 /*---------------------------------------------------------------------------*/
176
177 void config_push_persp(float, float, float);
178 void config_push_ortho(void);
179 void config_pop_matrix(void);
180 void config_clear(void);
181
182 /*---------------------------------------------------------------------------*/
183
184 #endif