oops! fixed
[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
28 #include "base_config.h"
29 #include "lang.h"
30
31 /*---------------------------------------------------------------------------*/
32
33 /* Integer options. */
34
35 extern int CONFIG_FULLSCREEN;
36 extern int CONFIG_WIDTH;
37 extern int CONFIG_HEIGHT;
38 extern int CONFIG_STEREO;
39 extern int CONFIG_CAMERA;
40 extern int CONFIG_TEXTURES;
41 extern int CONFIG_GEOMETRY;
42 extern int CONFIG_REFLECTION;
43 extern int CONFIG_MULTISAMPLE;
44 extern int CONFIG_MIPMAP;
45 extern int CONFIG_ANISO;
46 extern int CONFIG_BACKGROUND;
47 extern int CONFIG_SHADOW;
48 extern int CONFIG_AUDIO_BUFF;
49 extern int CONFIG_MOUSE_SENSE;
50 extern int CONFIG_MOUSE_INVERT;
51 extern int CONFIG_VSYNC;
52 extern int CONFIG_MOUSE_CAMERA_1;
53 extern int CONFIG_MOUSE_CAMERA_2;
54 extern int CONFIG_MOUSE_CAMERA_3;
55 extern int CONFIG_MOUSE_CAMERA_TOGGLE;
56 extern int CONFIG_MOUSE_CAMERA_L;
57 extern int CONFIG_MOUSE_CAMERA_R;
58 extern int CONFIG_NICE;
59 extern int CONFIG_FPS;
60 extern int CONFIG_SOUND_VOLUME;
61 extern int CONFIG_MUSIC_VOLUME;
62 extern int CONFIG_JOYSTICK;
63 extern int CONFIG_JOYSTICK_DEVICE;
64 extern int CONFIG_JOYSTICK_AXIS_X;
65 extern int CONFIG_JOYSTICK_AXIS_Y;
66 extern int CONFIG_JOYSTICK_AXIS_U;
67 extern int CONFIG_JOYSTICK_BUTTON_A;
68 extern int CONFIG_JOYSTICK_BUTTON_B;
69 extern int CONFIG_JOYSTICK_BUTTON_R;
70 extern int CONFIG_JOYSTICK_BUTTON_L;
71 extern int CONFIG_JOYSTICK_BUTTON_EXIT;
72 extern int CONFIG_JOYSTICK_CAMERA_1;
73 extern int CONFIG_JOYSTICK_CAMERA_2;
74 extern int CONFIG_JOYSTICK_CAMERA_3;
75 extern int CONFIG_JOYSTICK_DPAD_L;
76 extern int CONFIG_JOYSTICK_DPAD_R;
77 extern int CONFIG_JOYSTICK_DPAD_U;
78 extern int CONFIG_JOYSTICK_DPAD_D;
79 extern int CONFIG_JOYSTICK_CAMERA_TOGGLE;
80 extern int CONFIG_JOYSTICK_ROTATE_FAST;
81 extern int CONFIG_KEY_CAMERA_1;
82 extern int CONFIG_KEY_CAMERA_2;
83 extern int CONFIG_KEY_CAMERA_3;
84 extern int CONFIG_KEY_CAMERA_TOGGLE;
85 extern int CONFIG_KEY_CAMERA_R;
86 extern int CONFIG_KEY_CAMERA_L;
87 extern int CONFIG_VIEW_FOV;
88 extern int CONFIG_VIEW_DP;
89 extern int CONFIG_VIEW_DC;
90 extern int CONFIG_VIEW_DZ;
91 extern int CONFIG_ROTATE_FAST;
92 extern int CONFIG_ROTATE_SLOW;
93 extern int CONFIG_KEY_FORWARD;
94 extern int CONFIG_KEY_BACKWARD;
95 extern int CONFIG_KEY_LEFT;
96 extern int CONFIG_KEY_RIGHT;
97 extern int CONFIG_KEY_PAUSE;
98 extern int CONFIG_KEY_RESTART;
99 extern int CONFIG_KEY_SCORE_NEXT;
100 extern int CONFIG_KEY_ROTATE_FAST;
101 extern int CONFIG_CHEAT;
102 extern int CONFIG_STATS;
103 extern int CONFIG_UNIFORM;
104 extern int CONFIG_SCREENSHOT;
105 extern int CONFIG_LOCK_GOALS;
106
107 /* String options. */
108
109 extern int CONFIG_PLAYER;
110 extern int CONFIG_BALL_FILE;
111 extern int CONFIG_WIIMOTE_ADDR;
112 extern int CONFIG_REPLAY_NAME;
113
114 /*---------------------------------------------------------------------------*/
115
116 void config_init(void);
117 void config_load(void);
118 void config_save(void);
119
120 /*---------------------------------------------------------------------------*/
121
122 void config_set_d(int, int);
123 void config_tgl_d(int);
124 int  config_tst_d(int, int);
125 int  config_get_d(int);
126
127 void        config_set_s(int, const char *);
128 const char *config_get_s(int);
129
130 /*---------------------------------------------------------------------------*/
131
132 int  config_cheat(void);
133 void config_set_cheat(void);
134 void config_clr_cheat(void);
135
136 /*---------------------------------------------------------------------------*/
137
138 int config_screenshot(void);
139
140 /*---------------------------------------------------------------------------*/
141
142 #endif