Correct logic of BSP back/front tests
[neverball] / share / base_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 BASE_CONFIG_H
16 #define BASE_CONFIG_H
17
18 /*
19  * This file contains some constants
20  * And the way to access to directories
21  */
22
23 #include <stdio.h>
24 #include <SDL_endian.h>
25
26 /*---------------------------------------------------------------------------*/
27
28 #ifndef VERSION
29 #define VERSION "unknown"
30 #endif
31
32 #ifndef CONFIG_DATA
33 #define CONFIG_DATA   "./data"        /* Game data directory */
34 #endif
35
36 #ifndef CONFIG_LOCALE
37 #define CONFIG_LOCALE "./locale"      /* Game localisation */
38 #endif
39
40 /* User config directory */
41 #ifndef CONFIG_USER
42 #ifdef _WIN32
43 #define CONFIG_USER   "Neverball-dev"
44 #else
45 #define CONFIG_USER   ".neverball-dev"
46 #endif
47 #endif
48
49 /*
50  * Global settings are stored in USER_CONFIG_FILE.  Replays are stored
51  * in  USER_REPLAY_FILE.  These files  are placed  in the  user's home
52  * directory as given by the HOME environment var.  If the config file
53  * is deleted, it will be recreated using the defaults.
54  */
55
56 #define USER_CONFIG_FILE    "neverballrc"
57 #define USER_REPLAY_FILE    "Last"
58 #define REPLAY_EXT          ".nbr"
59
60 /*---------------------------------------------------------------------------*/
61
62 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
63 #define RMASK 0xFF000000
64 #define GMASK 0x00FF0000
65 #define BMASK 0x0000FF00
66 #define AMASK 0x000000FF
67 #else
68 #define RMASK 0x000000FF
69 #define GMASK 0x0000FF00
70 #define BMASK 0x00FF0000
71 #define AMASK 0xFF000000
72 #endif
73
74 #ifdef _WIN32
75 #define FMODE_RB "rb"
76 #define FMODE_WB "wb"
77 #else
78 #define FMODE_RB "r"
79 #define FMODE_WB "w"
80 #endif
81
82 #define AUDIO_BUFF_HI 2048
83 #define AUDIO_BUFF_LO 1024
84
85 #define JOY_MAX 32767
86 #define JOY_MID 16383
87
88 #define MAXSTR 256
89 #define PATHMAX 64
90 #define MAXNAM 9
91
92 #define GUI_FACE                    _("ttf/DejaVuSans-Bold.ttf")
93 /*
94 #define DT 0.0166666f
95 */
96 #define DT 0.01111111f
97
98 /*---------------------------------------------------------------------------*/
99
100 const char *config_data(const char *);
101 const char *config_user(const char *);
102
103 int  config_data_path(const char *, const char *);
104 int  config_user_path(const char *);
105
106 /*---------------------------------------------------------------------------*/
107
108 #endif