aboutsummaryrefslogtreecommitdiff
path: root/src/util/string.h
Commit message (Collapse)AuthorAge
* Fixes for Android build errors. Enable sensor landscape rotation.KodexKy2014-11-25
| | | | | | | | | | | Fix typo in Android Makefile ndk path. Fix touchscreen parts of game.cpp to work after Zeno's refactor. Fix isdigit and isspace overload conflict with Android Irrlicht in string.h Enable sensor landscape rotation in Android Manifiest. Add mapgen v5 to Android build. Fix Makefile not checking leveldb. Signed-off-by: Craig Robbins <kde.psych@gmail.com>
* Cleanup and (mostly) document util/string.h and (very) minor refactoringCraig Robbins2014-11-02
| | | | | Updated: Incorporated feedback from 'kahrl' Updated: Moved MinetestApp::boolToCStr() from game.cpp into string.h renaming it bool_to_cstr()
* Fix bug introduced by me (Zeno)Craig Robbins2014-10-29
|
* Added names colours and refactored parseColorString()Craig Robbins2014-10-29
|
* Add [colorize modifierBlockMen2014-10-05
|
* Standardize tooltip row detectionBlockMen2014-09-28
|
* Use const references for Settings methodsShadowNinja2014-09-21
| | | | Also check for (this == &other) before locking mutexes.
* Fix msvc2012 buildsapier2014-06-29
|
* Add formspec api versioningsapier2014-06-29
|
* Replace usage of long long with u64/s64ShadowNinja2014-03-12
|
* Add capability to read table flag fields from Lua APIkwolekr2014-02-09
|
* Make flag strings clear specified flag with 'no' prefixkwolekr2014-02-08
| | | | | Remove flagmask field from set_mapgen_params table Add small bits of needed documentation
* Revert "Fix settings to honor numeric conversion errors"kwolekr2014-02-05
| | | | This reverts commit 3f376a092e1c16429fb52f24736e9da98aff4cd5.
* Fix settings to honor numeric conversion errorssapier2014-02-04
| | | | Rename try* non exceptioning functions to *NoEx
* Implement urlencode and urldecodeKahrl2013-12-13
|
* Accept hexadecimal and string values for seedskwolekr2013-11-04
|
* Change mainmenu texture handling + small misc changesKahrl2013-09-11
| | | | | | | | | | | | | | Texture names must now be escaped in formspec elements image[], background[], image_button[], image_button_exit[]. Instead of special-case handling of texture loading (and unloading which was missing) in guiFormSpecMenu.cpp, use the newly created ISimpleTextureSource interface which is a minimal subset of ITextureSource. There is an implementation of this interface used by GUIEngine (MenuTextureSource). Fix an off-by-one bug in unescape_string; it caused requests for a texture called "\0".
* Add dummy and LevelDB database backendsIlya Zhuravlev2013-09-09
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Settings: everything != 0 equals true; remove .asm shadersPilzAdam2013-07-08
|
* Allow any character in formspec strings with escape charkwolekr2013-03-05
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Add flag string settings, flat map optionkwolekr2013-02-06
|
* Fix compile under MingWkwolekr2013-01-23
|
* Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev2012-12-16
|
* Enforce stricter world names using a blacklistMatthew I2012-09-05
| | | | Blacklisted characters are: / \
* Initially split utility.h to multiple files in util/Perttu Ahola2012-06-17
lass="hl kwb">int narg); static void Register(lua_State *L); }; /* LuaPcgRandom */ class LuaPcgRandom : public ModApiBase { private: PcgRandom m_rnd; static const char className[]; static const luaL_Reg methods[]; // Exported functions // garbage collector static int gc_object(lua_State *L); // next(self, min=-2147483648, max=2147483647) -> get next value static int l_next(lua_State *L); // rand_normal_dist(self, min=-2147483648, max=2147483647, num_trials=6) -> // get next normally distributed random value static int l_rand_normal_dist(lua_State *L); public: LuaPcgRandom(u64 seed) : m_rnd(seed) {} LuaPcgRandom(u64 seed, u64 seq) : m_rnd(seed, seq) {} // LuaPcgRandom(seed) // Creates an LuaPcgRandom and leaves it on top of stack static int create_object(lua_State *L); static LuaPcgRandom *checkobject(lua_State *L, int narg); static void Register(lua_State *L); }; /* LuaSecureRandom */ class LuaSecureRandom : public ModApiBase { private: static const size_t RAND_BUF_SIZE = 2048; static const char className[]; static const luaL_Reg methods[]; u32 m_rand_idx; char m_rand_buf[RAND_BUF_SIZE]; // Exported functions // garbage collector static int gc_object(lua_State *L); // next_bytes(self, count) -> get count many bytes static int l_next_bytes(lua_State *L); public: bool fillRandBuf(); // LuaSecureRandom() // Creates an LuaSecureRandom and leaves it on top of stack static int create_object(lua_State *L); static LuaSecureRandom *checkobject(lua_State *L, int narg); static void Register(lua_State *L); };