Fix redundant glTexEnv calls
[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"
44 #else
45 #define CONFIG_USER   ".neverball"
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
59 /*---------------------------------------------------------------------------*/
60
61 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
62 #define RMASK 0xFF000000
63 #define GMASK 0x00FF0000
64 #define BMASK 0x0000FF00
65 #define AMASK 0x000000FF
66 #else
67 #define RMASK 0x000000FF
68 #define GMASK 0x0000FF00
69 #define BMASK 0x00FF0000
70 #define AMASK 0xFF000000
71 #endif
72
73 #ifdef _WIN32
74 #define FMODE_RB "rb"
75 #define FMODE_WB "wb"
76 #else
77 #define FMODE_RB "r"
78 #define FMODE_WB "w"
79 #endif
80
81 #define AUDIO_BUFF_HI 2048
82 #define AUDIO_BUFF_LO 1024
83
84 #define JOY_VALUE(k) ((float) (k) / ((k) < 0 ? 32768 : 32767))
85
86 #define MAXSTR 256
87 #define PATHMAX 64
88 #define MAXNAM 9
89
90 /*---------------------------------------------------------------------------*/
91
92 void config_paths(const char *);
93
94 /*---------------------------------------------------------------------------*/
95
96 #endif