Commit Graph

45 Commits

Author SHA1 Message Date
ShadowNinja
77597c4ff3 Clean up numeric.h and split FacePositionCache from it
I also optiized FacePositionCache a bit: I removed a map
lookup and vector copy from both branches of getFacePosition.
2017-05-06 16:09:45 -04:00
sapier
d03b4fb627 Add color names from web page referenced in luaapi doc 2017-01-15 02:03:51 +00:00
kwolekr
27aff22a9b Random misc. warning fixes and cleanups
- Fix unused c_sand member warning in Valleys Mapgen
 - Fix some code style
 - Make some std::string params const ref
2016-06-11 03:23:53 -04:00
Ekdohibs
48939df9a5 Escape more strings: formspecs, item descriptions, infotexts...
Also, change the escape character to the more standard \x1b
Thus, it can be used in the future for translation or colored text,
for example.
2016-04-24 03:54:11 +10:00
Ekdohibs
095f623fa7 Remove chat escape sequences from chat messages, for future colored chat. 2016-03-15 17:33:15 +01:00
Rui
3a2bfd4548 Fix indianred and indigo of color-string 2015-08-19 19:49:45 +02:00
est31
457d42c599 Android: bypass broken wide_to_utf8 with wide_to_narrow (again)
This bypass had to be re-enabled as some users reported issues,
even after the iconv build fix.

While utf8_to_wide works well, wide_to_utf8 is quite broken
on android, for some reason, and some devices (unrelated from build
configuration).
2015-08-19 18:38:00 +02:00
est31
eb3aac20c8 Android: fix horrible libiconv build
Before, our libiconv build was a joke. We first called configure for our own build host system,
then called make, before we executed a Android.mk script we provided as patch. The first "native make"
always failed, and the LIBICONV_LIB file setting in our Makefile didn't match the built one,
resulting in an always-rebuild of iconv.

This commit cleans up this total mess, removes the double-build, and the Android.mk, and properly calls
./configure with the according target platform, and uses a built toolchain.

As we have to deal with the android bug "NDK: Support for prebuild libs with full sonames"
https://code.google.com/p/android/issues/detail?id=55868
as the 2013 patch
https://lists.gnu.org/archive/html/libtool-patches/2013-06/msg00002.html
by Google's David Turner wasn't inside the 2011 libtool, we pass -avoid-version to
libtool.

Thanks to the proper build, wide_to_utf8 works for android now, removing us of the need to disable it.
2015-07-29 15:59:06 +02:00
est31
b0784ba871 Use UTF-8 instead of narrow
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places.
Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
2015-07-08 10:12:44 +02:00
kwolekr
4e28c8d3c8 Fix *BSD build with GNU iconv 2015-06-29 12:32:01 +02:00
est31
6f8bdda90e Fix string conversion error message 2015-06-23 15:04:14 +02:00
est31
6dcf549ba9 Fail iconv call gracefully
No freezing when inbuf_size doesn't decrease over time.
2015-06-17 19:03:58 +02:00
est31
60f31ad523 Android: bypass broken wide_to_utf8 with wide_to_narrow
While utf8_to_wide works well, wide_to_utf8 is quite broken
on android, for some reason.
2015-06-14 08:25:21 +02:00
est31
572990dcd3 Add utf-8 conversion utilities and re-add intlGUIEditBox 2015-06-13 19:49:55 +02:00
est31
82e35edff5 Make early protocol auth mechanism generic, and add SRP
Adds everything needed for SRP (and everything works too),
but still deactivated, as protocol v25 init packets aren't final yet.
Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25
inside networkprotocol.h.
2015-05-11 18:40:27 +02:00
est31
f0a1379e5a Refactor around translatePassword
Change types for passed password from wstring to string, which removes converting
back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary,
closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for
translatePassword passed as const reference.
2015-04-17 06:10:30 +02: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
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
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
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
ShadowNinja
3c3887bb19 Deduplicate code and use stdlib in string functions 2015-01-03 14:50:16 -05:00
Craig Robbins
813c088c1c Added names colours and refactored parseColorString() 2014-10-29 03:10:59 -04: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
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
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
Kahrl
0a903e69fb Implement urlencode and urldecode 2013-12-13 18:05:35 +01:00
sapier
22a59b3912 Fix win32/msvc i18n (quite UGLY version, blame Microsoft) 2013-11-11 19:56:49 +01:00
kwolekr
e46c527733 Accept hexadecimal and string values for seeds 2013-11-04 23:59:26 -05:00
Kahrl
4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
Sfan5
6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
kwolekr
97260d09a8 Add flag string settings, flat map option 2013-02-06 16:52:48 -05:00
kwolekr
9d69b38583 Slightly improved version of mystrtok_r 2013-01-23 17:37:53 -05:00
kwolekr
69ba485415 Fix compile under MingW 2013-01-23 16:28:15 -05:00
Ilya Zhuravlev
3578e1d4a7 Added ability to fetch media from remote server (using cURL library) 2012-12-16 15:20:18 +04:00
Perttu Ahola
c9a2058361 Hopefully fix includes on mingw 2012-06-17 18:05:13 +03:00
Perttu Ahola
1bc37d576c Initially split utility.h to multiple files in util/ 2012-06-17 01:29:13 +03:00