Commit Graph

62 Commits

Author SHA1 Message Date
Loïc Blot
29ab20c272 Player data to Database (#5475)
* Player data to Database

Add player data into databases (SQLite3 & PG only)

PostgreSQL & SQLite: better POO Design for databases

Add --migrate-players argument to server + deprecation warning

* Remove players directory if empty
2017-04-23 14:35:08 +02:00
Perttu Ahola
04cc9de8f2 MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock copying done in the main thread
Cache size is configurable by the meshgen_block_cache_size (default 20 MB).

New profiler stats:
- MeshUpdateQueue MapBlock cache hit %
- MeshUpdateQueue MapBlock cache size kB

Removes one type of stutter that was seen on the client when received MapBlocks
were being handled. (the "MeshMakeData::fill" stutter)

Kind of related to at least #5239

Originally preceded by these commits, now includes them:
- Move the mesh generator thread into src/mesh_generator_thread.{cpp,h}
- mesh_generator_thread.cpp: Update code style
- MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits.
- MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
2017-04-17 14:58:29 +03:00
Loic Blot
98286a24bc
Fix android build 2017-04-14 09:26:11 +02:00
Loïc Blot
86b1542181 Update embedded jsoncpp from unk version to 0.10.6 + move libs to lib/ instead of src/ (#5473)
* Update embedded jsoncpp from unk version to 0.10.6

0.10.6 is last release without c++11

* Make jsoncpp more compliant with its amalgamate

Jsoncpp cpp file should be upper, make the library like it does in amalgamate

* Reorganization: move minetest embedded libs outside of source tree to /lib

* Fix a dead grep in LINT
2017-04-02 10:51:50 +02:00
Uwe Koloska
ef56586ed3 Add missing source to android build (#5496) 2017-04-01 16:47:58 +02:00
Wayward One
39fa249f91 Fix undefined references (#5400) 2017-03-15 15:42:47 +01:00
Loic Blot
607dab2b0d Fix android build
This fixes #5190
2017-02-08 07:47:56 +01:00
rubenwardy
f2aa2c6a98 Add ItemStack key-value meta storage 2017-02-04 22:07:55 +00:00
rubenwardy
c2e7b1f579 Derive NodeMetaRef from MetaDataRef 2017-02-04 22:07:55 +00:00
rubenwardy
bbdd869d72 Derive NodeMetadata from Metadata 2017-02-04 22:07:55 +00:00
Ner'zhul
8e7449e092 Environment & IGameDef code refactoring (#4985)
* Environment code refactoring
* Cleanup includes & class declarations in client & server environment to improve build speed
* ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts.
* Cleanup IGameDef
  * Move ITextureSource* IGameDef::getTextureSource() to Client only.
  * Also move ITextureSource *IGameDef::tsrc() helper
  * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call
  * drop unused emerge() call
  * cleanup server unused functions (mentionned before)
* Drop one unused parameter from ContentFeatures::updateTextures
* move checkLocalPrivilege to Client
* Remove some unnecessary casts
* create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it
* Fix some comments
* Change required IGameDef to Server/Client pointers
* Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects
* Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu
* drop ClientMap::sectorWasDrawn which is unused
2017-01-09 20:39:22 +01:00
Wayward1
8f22272df5 Add raycast.cpp and tileanimation.cpp to Android.mk 2017-01-05 08:19:54 +01:00
est31
24719c6908 Android: fix build and update deps 2016-12-07 21:27:07 +01:00
Ner'zhul
7252c803e0 Add missing remoteplayer.cpp to Android build
this should fix #4683
2016-10-28 15:37:19 +02:00
Rogier-5
a4962240bd Fix for failure to find jsoncpp in android build (#4456)
Commit 4503b5 did not update the android build script.
2016-08-19 20:23:30 +02:00
kwolekr
3c63c3044d Add MapSettingsManager and new mapgen setting script API functions
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
  instead of the EmergeManager.
- New Script API functions added:
    core.get_mapgen_setting
    core.get_mapgen_setting_noiseparams,
    core.set_mapgen_setting, and
    core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
  rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
2016-07-03 15:38:36 -04:00
est31
817fea6330 Fix android build
Thanks to @Wayward1 for reporting the bug.

Fixes #4212.
2016-06-11 05:44:55 +02:00
ShadowNinja
e41673820f Upgrade Android build to Gradle build system
The old Ant build system has been deprecated for a while and new development is focused on Gradle.
I also removed a hardcoded string that lint caught and moved the patch files to a subdirectory.
I left the JNI files in the root directory.
2016-04-28 12:28:42 -04:00
ShadowNinja
0079887b64 Move AreaStore to util 2016-03-07 16:33:20 -05:00
Maksim Gamarnik
096a01ffef Update Android dependencies, -O3 optimization, remove old ARMv5 config
* Update OpenSSL (thanks @sapier, i use his patch!), Curl and SQLite3.
* Remove old arm config. Almost all phones that use ARMv5 have 1 core and 256-512 RAM, it's about 2-5 FPS.
* Do -O3 optimization for libs and remove -fexpensive-optimizations for Minetest (-O3 includes this! Read gcc docs).
* OpenSSL fix - thanks @sapier, again.
2016-03-05 05:52:45 +01:00
est31
f3f4af3fb9 Fix android build
Android had a linker error since commit:

31e0667a4a53a238d0321194b57b083bd74c0a5b "Add Lua interface to HTTPFetchRequest"

Fixes #3766. Thanks to @MoNTE48 for reporting the bug.
2016-02-23 01:48:52 +01:00
Duane Robertson
3c6b2ffb10 Add Valleys mapgen. 2016-01-14 05:04:29 +00:00
est31
6133b2bc45 Fix android build
Fix android build since commit

696148e29889b2923f926b27f76979454676506d "Fix Event implementation"

by @ShadowNinja.

Fixes #3444. Thanks @kwolekr for pointing out the fix.
2015-12-11 11:24:26 +01:00
paramat
76c9abe4c8 Mapgen: Add flat mapgen in hidden form 2015-11-11 09:37:54 +00:00
paramat
d152b55971 Android/Mapgen: Add fractal mapgen file to android makefiles 2015-10-06 22:32:13 +01:00
ShadowNinja
32e4f4b32d Fix Android build of threading sources 2015-08-24 11:20:53 -04:00
ShadowNinja
e4bff8be94 Clean up threading
* Rename everything.
    * Strip J prefix.
    * Change UpperCamelCase functions to lowerCamelCase.
  * Remove global (!) semaphore count mutex on OSX.
  * Remove semaphore count getter (unused, unsafe, depended on internal
    API functions on Windows, and used a hack on OSX).
  * Add `Atomic<type>`.
  * Make `Thread` handle thread names.
  * Add support for C++11 multi-threading.
  * Combine pthread and win32 sources.
  * Remove `ThreadStarted` (unused, unneeded).
  * Move some includes from the headers to the sources.
  * Move all of `Event` into its header (allows inlining with no new includes).
  * Make `Event` use `Semaphore` (except on Windows).
  * Move some porting functions into `Thread`.
  * Integrate logging with `Thread`.
  * Add threading test.
2015-08-23 22:04:06 -04: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
c30a2d6854 Add AreaStore data structure 2015-07-27 06:42:56 +02:00
RealBadAngel
ffd16e3fec Add minimap feature 2015-06-27 03:42:01 +02:00
est31
572990dcd3 Add utf-8 conversion utilities and re-add intlGUIEditBox 2015-06-13 19:49:55 +02:00
kwolekr
6c5a6967ec Split ObjDef/ObjDefManager out to objdef.cpp 2015-05-18 22:30:25 -04:00
ShadowNinja
3a8c788880 Add mod security
Due to compatibility concerns, this is temporarily disabled.
2015-05-16 18:32:31 -04: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
181f7baa45 Add LibGMP
Uses system provided libgmp if found, if not it falls back to mini-gmp.
2015-05-11 17:48:33 +02:00
kwolekr
2dba29ebf2 Tests: Add schematic unittests
Improve schematic file-saving interface
Add ability to create temporary test files
2015-05-08 00:55:42 -04:00
kwolekr
b45df9d6a7 Tests: Add NodeResolver unittests
Minor misc. NodeResolver cleanups
Prefix faux content type constants for testing with t_ to avoid
confusion or name collisions
2015-05-05 12:00:36 -04:00
kwolekr
8f38f8255c Tests: Add ObjDef unittests 2015-05-03 22:19:35 -04:00
kwolekr
37ca3212ee Fix MSVC compatibility
Make sure to include random unittests in android builds, too
Use SWAP() macro
Ensure that negative ranges are tested as well in random unittests
2015-04-29 13:20:01 -04:00
kwolekr
7220ca906d Tests: Modularize unit testing
Split unit tests into separate files under src/unittest/
Give better unittest diagnostics
Clean up some code
2015-04-26 15:08:54 -04:00
Craig Robbins
9527984dbc Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h

Move GUI-related globals to clientlauncher

Move g_settings and g_settings_path to settings.cpp|h

Move g_menuclouds to clouds.cpp|h

Move g_profiler to profiler.cpp|h
2015-04-01 23:04:25 +10:00
Aaron Suen
6d61375cc7 Clean scaling pre-filter for formspec/HUD. 2015-04-01 00:01:05 -04:00
Loic Blot
b560294050 Rename packethandler/{client,server}.cpp to {client,server}packethandler.cpp
* Requested by @Zeno-
* Approved by @nerzhul
2015-03-16 10:19:19 +01:00
Loic Blot
0d1eedcccc Replace std::list to std::vector into tile.cpp (m_texture_trash) and move tile.hpp to src/client/ 2015-03-05 11:59:40 +01:00
Loic Blot
a0affa496d Fix android build 2015-02-21 17:37:48 +01:00
Loic Blot
49f84b76bc Update missing files for Android.mk 2015-02-18 09:53:43 +01:00
Loic Blot
b019221c30 Android build fix 2015-02-18 09:23:24 +01:00
Loic Blot
146f77fdb7 main.cpp rework * Move ClientLauncher class to a dedicated file * ClientLauncher now owns print_video_modes and speed_tests functions (they are only called by him) * Move GameParams to shared/gameparams.h because it's shared between server and client and launcher need to know it * Move InputHandlers class to client/inputhandler.h * Cleanup includes 2015-02-12 15:00:03 +01:00
Loic Blot
10b208f5c1 Fix Android build since a704c04f00bfea4b77550169fa08105c2ee0dfd0Oxh. ok @zeno- 2015-02-11 09:15:25 +01:00
sapier
9f52149a11 Android, build: Update curl to 7.40.00 2015-01-15 21:51:54 +01:00