Mainly some texture tweaking
[oweals/minetest.git] / src / constants.h
1 /*
2 Minetest-c55
3 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef CONSTANTS_HEADER
21 #define CONSTANTS_HEADER
22
23 /*
24         All kinds of constants.
25
26         Cross-platform compatibility crap should go in porting.h.
27 */
28
29 //#define HAXMODE 0
30
31 #define APPNAME "minetest"
32
33 #define DEBUGFILE "debug.txt"
34
35 #define WATER_ALPHA 160
36
37 // Define for simulating the quirks of sending through internet.
38 // Causes the socket class to deliberately drop random packets.
39 // This disables unit testing of socket and connection.
40 #define INTERNET_SIMULATOR 0
41
42 #define CONNECTION_TIMEOUT 30
43
44 #define RESEND_TIMEOUT_MIN 0.333
45 #define RESEND_TIMEOUT_MAX 3.0
46 // resend_timeout = avg_rtt * this
47 #define RESEND_TIMEOUT_FACTOR 4
48
49 #define PI 3.14159
50
51 // This is the same as in minecraft and everything else
52 #define FOV_ANGLE (PI/2.5)
53
54 // The absolute working limit is (2^15 - viewing_range).
55 #define MAP_GENERATION_LIMIT (31000)
56
57 // Size of node in rendering units
58 #define BS 10
59
60 #define MAP_BLOCKSIZE 16
61 /*
62         This makes mesh updates too slow, as many meshes are updated during
63         the main loop (related to TempMods and day/night)
64 */
65 //#define MAP_BLOCKSIZE 32
66
67 // Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
68 #define SECTOR_HEIGHTMAP_SPLIT (MAP_BLOCKSIZE/8)
69
70 // Time after building, during which the following limit
71 // is in use
72 //#define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
73 // This many blocks are sent when player is building
74 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 0
75 // Override for the previous one when distance of block
76 // is very low
77 #define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1
78
79 // The fps limiter will leave this much free time
80 //#define FREETIME_RATIO 0.15
81 //#define FREETIME_RATIO 0.0
82 #define FREETIME_RATIO 0.05
83
84 #define PLAYER_INVENTORY_SIZE (8*4)
85
86 #define SIGN_TEXT_MAX_LENGTH 50
87
88 // Whether to catch all std::exceptions.
89 // Assert will be called on such an event.
90 #ifdef DEBUG
91         #define CATCH_UNHANDLED_EXCEPTIONS 0
92 #else
93         #define CATCH_UNHANDLED_EXCEPTIONS 1
94 #endif
95
96 /*
97         Collecting active blocks is stopped after object data
98         size reaches this
99 */
100 #define MAX_OBJECTDATA_SIZE 450
101
102 /*
103         This is good to be a bit different than 0 so that water level
104         is not between to MapBlocks
105 */
106 #define WATER_LEVEL 3
107
108 // Length of cracking animation in count of images
109 #define CRACK_ANIMATION_LENGTH 5
110
111 #endif
112