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