aboutsummaryrefslogtreecommitdiff
path: root/src/util/serialize.cpp
Commit message (Expand)AuthorAge
* Clean up util/serialization.{cpp,h} and add unit testskwolekr2015-08-01
* Increase limit of serialized long stringskwolekr2015-07-14
* Add more robust error checking to deSerialize*String routineskwolekr2015-07-13
* For usages of assert() that are meant to persist in Release builds (when NDEB...Craig Robbins2015-03-07
* serialize.h: use machine native byte swapping if available, fall-back to prev...Rafael Reilova2014-11-21
* Fix serializing of signed numbers in serializeStructToStringShadowNinja2014-03-21
* Make serializeStructToString use an ostringstreamShadowNinja2014-03-15
* Revert "Use fixed-width format specifiers in serializeStructToString"ShadowNinja2014-03-14
* Use fixed-width format specifiers in serializeStructToStringShadowNinja2014-03-13
* Replace usage of long long with u64/s64ShadowNinja2014-03-12
* Add minetest.set_noiseparam_defaults() Lua APIkwolekr2014-02-15
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Initially split utility.h to multiple files in util/Perttu Ahola2012-06-17
tform compatibility stuff should go in porting.h. Some things here are legacy. */ /* Connection */ #define PEER_ID_INEXISTENT 0 #define PEER_ID_SERVER 1 // 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 INTERNET_SIMULATOR_PACKET_LOSS 10 // 10 = easy, 4 = hard #define CONNECTION_TIMEOUT 30 #define RESEND_TIMEOUT_MIN 0.1 #define RESEND_TIMEOUT_MAX 3.0 // resend_timeout = avg_rtt * this #define RESEND_TIMEOUT_FACTOR 4 /* Server */ // This many blocks are sent when player is building #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 0 // Override for the previous one when distance of block is very low #define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1 /* Map-related things */ // The absolute working limit is (2^15 - viewing_range). // I really don't want to make every algorithm to check if it's going near // the limit or not, so this is lower. // This is the maximum value the setting map_generation_limit can be #define MAX_MAP_GENERATION_LIMIT (31000) // Size of node in floating-point units // The original idea behind this is to disallow plain casts between // floating-point and integer positions, which potentially give wrong // results. (negative coordinates, values between nodes, ...) // Use floatToInt(p, BS) and intToFloat(p, BS). #define BS 10.0f // Dimension of a MapBlock #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 // Player step height in nodes #define PLAYER_DEFAULT_STEPHEIGHT 0.6f /* Old stuff that shouldn't be hardcoded */ // Size of player's main inventory #define PLAYER_INVENTORY_SIZE (8 * 4) // Default maximum hit points of a player #define PLAYER_MAX_HP_DEFAULT 20 // Default maximal breath of a player #define PLAYER_MAX_BREATH_DEFAULT 10 // Number of different files to try to save a player to if the first fails // (because of a case-insensitive filesystem) // TODO: Use case-insensitive player names instead of this hack. #define PLAYER_FILE_ALTERNATE_TRIES 1000 // For screenshots a serial number is appended to the filename + datetimestamp // if filename + datetimestamp is not unique. // This is the maximum number of attempts to try and add a serial to the end of // the file attempting to ensure a unique filename #define SCREENSHOT_MAX_SERIAL_TRIES 1000 /* GUI related things */ #define TTF_DEFAULT_FONT_SIZE (16) #define DEFAULT_FONT_SIZE (10)