Commit Graph

90 Commits

Author SHA1 Message Date
ShadowNinja 93fcab952b Clean up and tweak build system
* Combine client and server man pages.
  * Update unit test options and available databases in man page.
  * Add `--worldname` to man page.
  * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`.
  * Disable server build by default on all operating systems.
  * Make `ENABLE_FREETYPE` not fail if FreeType isn't found.
  * Enable LevelDB, Redis, and FreeType detection by default.
  * Remove the `VERSION_PATCH_ORIG` hack.
  * Add option to search for and use system JSONCPP.
  * Remove broken LuaJIT version detection.
  * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`.
  * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`.
  * Clean up style of CMake files.
2015-03-27 15:00:48 -04:00
kwolekr 3993093f51 Add support for the PCG32 PRNG algo (and associated script APIs) 2015-03-22 00:48:08 -04:00
Loic Blot 2f0107f4a7 MutexedQueue inherits must use std::deque instead of std::list 2015-03-17 17:12:20 +01:00
Craig Robbins ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Craig Robbins 5698e2baf8 Fix Android text bug (no text displaying) 2015-03-07 20:51:07 +10:00
Loic Blot b214cde5b4 Remove Queue class which uses std::list and use native std::queue 2015-03-05 16:49:51 +10:00
Loic Blot cd684497c2 Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues() 2015-03-04 17:22:37 +01:00
Craig Robbins aefe80769b Fix narrow_to_wide_c (ANDROID)
* Ensure converted string is NUL terminated
* Restore logic to that used prior to 9e2a9b5
2015-03-02 13:16:01 +10:00
Craig Robbins 338e66af5f Fix minor memory leak (Android) 2015-02-27 13:40:27 +10:00
Craig Robbins 3b6480c5b0 Fix wrapDegrees family of functions
wrapDegrees() (renamed to modulo360f)
wrapDegrees_0_360
wrapDegrees_180

Minor errors were present in previous versions; see issue #2328
2015-02-23 22:50:32 +10:00
Loic Blot 5a5854ea9d Move hex.h to util/ 2015-02-21 14:32:35 +01:00
Loic Blot 3998a1f8f9 Move sha1.hpp and base64.hpp to util/ 2015-02-21 14:03:27 +01:00
Loic Blot 7c8793cbea Performance Improvement: Use a cache which caches result for getFacePositions.
This greatly reduce the number of std::list generated by caching the result, which is always constant for each radius selected.
In the callgrind map, you will see original:
  * 3.3M calls to std::list for 9700 calls to getFacePositions
In the modified version, you will see:
  * 3.3K calls to std::list for 6900 call to getFacePositions
Callgrind map is here: #2321

it's a huge performance improvement to l_find_node_near
2015-02-16 11:27:44 +01:00
BlockMen d302629392 Fix gettext on MSVC 2015-02-12 16:03:55 +01:00
ShadowNinja 98b37e3e0d Fix Android build of narrow_to_wide 2015-02-11 02:28:22 -05:00
ShadowNinja 9e2a9b55e1 Reduce gettext wide/narrow and string/char* conversions 2015-02-05 03:24:22 -05:00
gregorycu db3466dbe8 Water fixes
Change must_reflow to a deque
Add overload for MapBlock::raiseModified that takes a const char*. This is a speed improvement.
Comment out unused variable
Optimisations to block offset calculations
2015-01-18 20:30:33 +10:00
Craig Robbins 5481e38d0b Make minor style change(unescape_string()) 2015-01-16 21:05:44 +10:00
ShadowNinja 77e20a0c21 Fix unescape_string removing all backslashes 2015-01-15 16:16:41 -05:00
unknown bd0d786590 Change UniqueQueue to use a queue and a set. 2015-01-15 21:08:35 +10:00
ShadowNinja 3c3887bb19 Deduplicate code and use stdlib in string functions 2015-01-03 14:50:16 -05:00
KodexKy 5413ed1195 Fixes for Android build errors. Enable sensor landscape rotation.
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>
2014-11-25 13:28:51 +10:00
Rafael Reilova f7d65091f8 serialize.h: use machine native byte swapping if available, fall-back to previous generic method if not (supported for GCC using endian.h, detection done in cmake) write/readARGB8() - just write 32-bit color in one op, instead of 4 1-byte ops cleanup: removed unneeded buffer init for some serialize-out functions use a #define for the fixed point factor in read/writeF1000()
nodemetadata.cpp, nodetimer.cpp
	optimzation: simpler deserialize node position method

staticobject.cpp:
	cleanup: use util/serialize.h inlines instead of its own de/serialization

serialize.cpp:
	minor optimization/cleanup: avoid generation of unneeded string temporary

CMakeLists.txt, cmake_config.h.in: detection of endian.h

config.h: added HAVE_ENDIAN_H

Commits due to feedback squashed

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-21 22:33:48 +10:00
Kahrl 55e4c35eaf Remove unused rangelim function (the macro still exists) 2014-11-19 10:19:52 +01:00
Kahrl 9b551d5cbc Implement WieldMeshSceneNode which improves wield mesh rendering
- Don't create and cache an extruded mesh for every (non-node) item.
  Instead use a single one per image resolution.

- For cubic nodes reuse a single wield mesh too

- Improve lighting of the wielded item

- Increase far value of wield mesh scene camera, fixes #1770

- Also includes some minor refactorings of Camera and GenericCAO.
2014-11-08 23:11:57 +01:00
Craig Robbins 43bf4324d5 Cleanup and (mostly) document util/string.h and (very) minor refactoring
Updated: Incorporated feedback from 'kahrl'
Updated: Moved MinetestApp::boolToCStr() from game.cpp into string.h renaming it bool_to_cstr()
2014-11-02 18:07:20 +01:00
Craig Robbins 6c9bbb0360 Fix bug introduced by me (Zeno) 2014-10-29 08:54:16 +01:00
Craig Robbins 813c088c1c Added names colours and refactored parseColorString() 2014-10-29 03:10:59 -04:00
kwolekr 1cb6ea6346 Refactor decoration-related code
Split up ModApiMapgen::l_register_decoration()
Define and make use of CONTAINS() and ARRLEN() macros
2014-10-29 01:56:37 -04:00
Kahrl 26495da94a Fix unit reported by TimeTaker (was always ms) 2014-10-09 11:15:03 +02:00
BlockMen 28438bba27 Add [colorize modifier 2014-10-05 16:49:52 +02:00
kwolekr 37d3c3d328 Fix misc. style issues 2014-10-03 03:49:06 -04:00
BlockMen 61ed56f916 Standardize tooltip row detection 2014-09-28 10:10:43 +02:00
ShadowNinja cd64a92a8c Use const references for Settings methods
Also check for (this == &other) before locking mutexes.
2014-09-21 14:39:35 -04:00
sapier 1cc40c0a7c Add support for Android 2.3+
There have been plenty of ppl involved in creating this version.
I don't wanna mention names as I'm sure I'd forget someone so I
just tell where help has been done:
- The partial android versions done by various ppl
- Testing on different android devices
- reviewing code (especially the in core changes)
- testing controls
- reviewing texts

A big thank you to everyone helping this to be completed!
2014-06-29 18:17:56 +02:00
sapier ee7af21e41 Fix msvc2012 build 2014-06-29 16:57:50 +02:00
sapier ebf7ea5019 Add formspec api versioning 2014-06-29 12:13:55 +02:00
sapier eda9214f81 Bunch of small fixes (coding style, very unlikely errors, warning messages) 2014-04-19 11:56:19 +02:00
BlockMen e149d1ad9a Fix write and read S32 vectors 2014-04-12 17:39:51 +02:00
ShadowNinja 5fefc4bbf6 Fix serializing of signed numbers in serializeStructToString 2014-03-21 05:22:21 -04:00
ShadowNinja 23be6450a1 Make serializeStructToString use an ostringstream 2014-03-15 15:13:02 -04:00
ShadowNinja d753d352f1 Revert "Use fixed-width format specifiers in serializeStructToString"
This reverts commit 875f1327a4.
Fixed width format specifiers are only officially availale in C99 and C++11.
2014-03-14 12:13:30 -04:00
ShadowNinja 875f1327a4 Use fixed-width format specifiers in serializeStructToString 2014-03-13 17:30:15 -04:00
ShadowNinja 18577f2527 Replace usage of long long with u64/s64 2014-03-12 19:37:19 -04:00
kwolekr 3570f3e396 Add minetest.set_noiseparam_defaults() Lua API 2014-02-15 19:13:14 -05:00
kwolekr 2a01050a0c Add capability to read table flag fields from Lua API 2014-02-09 12:44:31 -05:00
kwolekr 83bafbe08b Make flag strings clear specified flag with 'no' prefix
Remove flagmask field from set_mapgen_params table
Add small bits of needed documentation
2014-02-08 17:50:59 -05:00
kwolekr c6c5edd73a Revert "Fix settings to honor numeric conversion errors"
This reverts commit 3f376a092e.
2014-02-05 00:05:58 -05:00
sapier 3f376a092e Fix settings to honor numeric conversion errors
Rename try* non exceptioning functions to *NoEx
2014-02-04 22:14:13 -05:00
sapier 8b0b857eaa Make MutexQueue use jsemaphore for signaling 2014-01-10 10:10:45 +01:00