]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/constants.h
.
[dragonfireclient.git] / src / constants.h
index b6b09b50bb6c3c98b42e13848d8831116d58841f..3cb2850659571061f91bcfaf6ddc57d6f904843b 100644 (file)
@@ -17,17 +17,24 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
+#ifndef CONSTANTS_HEADER
+#define CONSTANTS_HEADER
+
 /*
-(c) 2010 Perttu Ahola <celeron55@gmail.com>
+       All kinds of constants.
+
+       Cross-platform compatibility crap should go in porting.h.
 */
 
-#ifndef CONSTANTS_HEADER
-#define CONSTANTS_HEADER
+//#define HAXMODE 0
+
+#define APPNAME "minetest"
 
 #define DEBUGFILE "debug.txt"
 
-// Define for simulating the quirks of sending through internet
-// WARNING: This disables unit testing of socket and connection
+// Define for simulating the quirks of sending through internet.
+// Causes the socket class to deliberately drop random packets.
+// This disables unit testing of socket and connection.
 #define INTERNET_SIMULATOR 0
 
 #define CONNECTION_TIMEOUT 30
@@ -45,6 +52,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 // The absolute working limit is (2^15 - viewing_range).
 #define MAP_GENERATION_LIMIT (31000)
 
+// Size of node in rendering units
+#define BS 10
+
+#define MAP_BLOCKSIZE 16
+/*
+       This makes mesh updates too slow, as many meshes are updated during
+       the main loop (related to TempMods and day/night)
+*/
+//#define MAP_BLOCKSIZE 32
+
+// Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
+#define SECTOR_HEIGHTMAP_SPLIT (MAP_BLOCKSIZE/8)
+
 // Time after building, during which the following limit
 // is in use
 //#define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
@@ -54,15 +74,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 // is very low
 #define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1
 
-// Viewing range stuff
-
+// The fps limiter will leave this much free time
 //#define FREETIME_RATIO 0.15
 //#define FREETIME_RATIO 0.0
 #define FREETIME_RATIO 0.05
 
-// Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
-#define SECTOR_HEIGHTMAP_SPLIT 2
-
 #define PLAYER_INVENTORY_SIZE (8*4)
 
 #define SIGN_TEXT_MAX_LENGTH 50
@@ -81,7 +97,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 #define MAX_OBJECTDATA_SIZE 450
 
-#define WATER_LEVEL (0)
+/*
+       This is good to be a bit different than 0 so that water level
+       is not between to MapBlocks
+*/
+#define WATER_LEVEL 3
 
 // Length of cracking animation in count of images
 #define CRACK_ANIMATION_LENGTH 5