Initial commit of mapgen v.2. Lacks configuration and saving to disk.
[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 for simulating the quirks of sending through internet.
36 // Causes the socket class to deliberately drop random packets.
37 // This disables unit testing of socket and connection.
38 #define INTERNET_SIMULATOR 0
39
40 #define CONNECTION_TIMEOUT 30
41
42 #define RESEND_TIMEOUT_MIN 0.333
43 #define RESEND_TIMEOUT_MAX 3.0
44 // resend_timeout = avg_rtt * this
45 #define RESEND_TIMEOUT_FACTOR 4
46
47 #define PI 3.14159
48
49 // This is the same as in minecraft and everything else
50 #define FOV_ANGLE (PI/2.5)
51
52 // The absolute working limit is (2^15 - viewing_range).
53 #define MAP_GENERATION_LIMIT (31000)
54
55 // Time after building, during which the following limit
56 // is in use
57 //#define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
58 // This many blocks are sent when player is building
59 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 0
60 // Override for the previous one when distance of block
61 // is very low
62 #define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1
63
64 // Viewing range stuff
65
66 //#define FREETIME_RATIO 0.15
67 //#define FREETIME_RATIO 0.0
68 #define FREETIME_RATIO 0.05
69
70 // Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
71 #define SECTOR_HEIGHTMAP_SPLIT 2
72
73 #define PLAYER_INVENTORY_SIZE (8*4)
74
75 #define SIGN_TEXT_MAX_LENGTH 50
76
77 // Whether to catch all std::exceptions.
78 // Assert will be called on such an event.
79 #ifdef DEBUG
80         #define CATCH_UNHANDLED_EXCEPTIONS 0
81 #else
82         #define CATCH_UNHANDLED_EXCEPTIONS 1
83 #endif
84
85 /*
86         Collecting active blocks is stopped after object data
87         size reaches this
88 */
89 #define MAX_OBJECTDATA_SIZE 450
90
91 #define WATER_LEVEL (0)
92
93 // Length of cracking animation in count of images
94 #define CRACK_ANIMATION_LENGTH 5
95
96 #endif
97