Commit Graph

362 Commits (master)

Author SHA1 Message Date
Brandon b41251ac77 Merge remote-tracking branch 'minetest/master' 2017-07-01 12:11:57 -05:00
Brandon a2d83f3128 Merge remote-tracking branch 'minetest/master' 2017-07-01 11:54:00 -05:00
adrido d7343b6c93 Fix msvc annoyances (#5963)
* MSVC: Fix '/std:c++11' is not a valid compiler option

* MSVC/MINGW: Define 'WIN32_LEAN_AND_MEAN' for the whole project

In some obscure cases 'Windows.h" got includet before that definition, which leaded to compilation warnings+errors

* MSVC: '/arch:SSE' is only available for x86

* MSVC: Fix float conversation

* MSVC/MINGW: use winthreads on Windows

* MSVC: 'USE_CMAKE_CONFIG' might be already definied by CMake build system

* MSVC: Use all available cpu cores for compiling

* Add missing include ctime and use std::time_t
2017-06-27 11:54:40 +02:00
Loïc Blot b3a36f7378 Isolate irrlicht references and use a singleton (#6041)
* Add Device3D class which will contain IrrlichtDevice interface

move getSupportedVideoDrivers to Device3D

Add Device3D singleton & use it in various places

Rename Device3D to Rendering engine & add helper functions to various device pointers

More singleton work

RenderingEngine owns draw_load_screen

move draw functions to RenderingEngine

Reduce IrrlichtDevice exposure and guienvironment

RenderingEngine: Expose get_timer_time() to remove device from guiEngine

Make irrlichtdevice & scene manager less exposed

* Code style fixes

* Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine

Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly

* enum paralax => enum parallax
2017-06-26 20:11:17 +02:00
Loïc Blot 16938adfc0 Merge cguittfont lib in irrlicht change folder. (#6016)
* Merge cguittfont lib in irrlicht change folder.

This remove hack and static lib for FreeType
2017-06-20 17:18:34 +02:00
Loïc Blot ddcd026344 Remove legacy content_abm.{cpp,h} 2017-06-14 16:23:08 +02:00
red-001 26e2eb019a Improve the path select GUI (#5852)
- Allow lua to chose whatever directories or files can be selected
- Fix selecting directories
- Rename dialog to `guiPathSelectMenu` from `guiFileSelectMenu`
- Rename lua function for opening the menu from `show_file_open_dialog` to `show_path_select_dialog`
- Remove duplicate code and fix code style.

Related changes
- fix `clang-format` whitelist.
- Regenerate minetest.conf.example
2017-06-11 09:43:31 +02:00
Loïc Blot 8bdde45895 Revert "Remove deprecated code segments (#5891)"
This reverts commit 599e13e95e.
2017-06-06 16:19:04 +02:00
Thomas--S 599e13e95e Remove deprecated code segments (#5891) 2017-06-04 21:42:32 +02:00
Loic Blot bf6569b570 Minetest for C++11 (CMakeLists + Travis)
* Move GCC to GCC 6 & GCC 7
* Move Clang to Clang 3.6 & Clang 4.0
* LINT moves from Clang 3.9 to Clang 4.0
* Move XCode 7.3 to 8.0
* Use more travis tricks to install compilers instead of adding complexity to our build script
* Clang format fixes on checked files (compat Cpp11 instead of Cpp03)
* Mingw GCC update from 4.8.4 to 5.3 (Ubuntu Xenial)
* Drop mingw cmake generated files and add them to gitignore
2017-06-04 09:57:08 +02:00
Brandon 811c22d1d6 Merge remote-tracking branch 'minetest/master' 2017-05-29 20:02:46 -05:00
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
Vaughan Lapsley c874bfa5c3 Remove CMAKE -ffast-math flag from OSX/FreeBSD
Fixes issue: #4274

I have tested on MacOS 10.12.4

Requires testing on:
FreeBSD, Windows and Linux which I do not have access to.
2017-05-04 13:24:36 +02:00
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
Brandon 3ee16f7ffa Merge remote-tracking branch 'minetest/master' 2017-04-22 12:56:49 -05: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
adrido 676951d90d Windows: Skip cmd for release builds (#5416) 2017-04-07 07:14:39 +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
Brandon 8ce248b281 Merge remote-tracking branch 'minetest/master'
Conflicts:
	src/defaultsettings.cpp
	src/environment.cpp
	src/game.cpp
	src/itemdef.cpp
	src/map.cpp
	src/server.h
2017-02-11 21:10:04 -06:00
rubenwardy f2aa2c6a98 Add ItemStack key-value meta storage 2017-02-04 22:07:55 +00:00
rubenwardy bbdd869d72 Derive NodeMetadata from Metadata 2017-02-04 22:07:55 +00:00
red-001 0dada51a55 Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072) 2017-01-20 23:19:41 +01:00
Loic Blot 98e36d7d68 Move ServerEnvironment to dedicated cpp/header files
* also cleanup some unneeded inclusions
2017-01-08 12:16:06 +01:00
Loic Blot eb2c19bbed Move ClientEnvironment to dedicated cpp/header files 2017-01-08 12:16:06 +01:00
Dániel Juhász 3f8261830e Improve getPointedThing() (#4346)
* Improved getPointedThing()

The new algorithm checks every node exactly once.
Now the point and normal vector of the collision is also returned in the
PointedThing (currently they are not used outside of the function).
Now the CNodeDefManager keeps the union of all possible nodeboxes, so
the raycast won't miss any nodes. Also if there are only small
nodeboxes, getPointedThing() is exceptionally fast.
Also adds unit test for VoxelLineIterator.

* Cleanup, code move

This commit moves getPointedThing() and
Client::getSelectedActiveObject() to ClientEnvironment.
The map nodes now can decide which neighbors they are connecting to
(MapNode::getNeighbors()).
2017-01-04 19:18:40 +01:00
sfan5 523f0e8c5b Move TileAnimation code to seperate file 2017-01-02 15:28:06 +01:00
est31 ba52a34f94 Don't ship with broken languages (#4940) 2016-12-21 14:15:48 +01:00
Brandon a8dc572ecd Merge remote-tracking branch 'minetest/master' 2016-12-17 13:15:35 -06:00
MillersMan 9714cdcf4b Liquids: Update flow on block load
When loading a block add liquid-nodes that might flow away or spread to
neighbours to the transforming_liquid queue.
2016-12-07 04:06:00 +00:00
Brandon 694766f4a7 Merge remote-tracking branch 'minetest/master' 2016-11-22 20:22:07 -06:00
adrido 295232667e Windows: Add manifest file and set "High DPI Aware" true
This resolves washy font and incorrect mouse handling on Windows if
a screen with high DPI is used.
2016-11-07 21:55:01 +00:00
SmallJoker ad4bf2ccf9 MSVC: Generate debug information for release builds (#4674)
Replace parameters with the equivalent /Ox
2016-11-06 11:14:36 -05:00
Brandon 4cb44572a5 Merge remote-tracking branch 'minetest/master'
Conflicts:
	doc/lua_api.txt
	src/client.h
	src/content_sao.cpp
	src/environment.cpp
	src/environment.h
	src/keycode.cpp
	src/map.cpp
	src/network/clientpackethandler.cpp
	src/particles.cpp
	src/particles.h
	src/script/lua_api/l_particles.cpp
	src/server.cpp
	src/server.h
	src/serverobject.cpp
	src/serverobject.h
	src/threading/thread.h
2016-10-29 15:09:28 -05:00
Rogier a4a9ee94f3 Disable cmake message concerning WIN32 on non-windows systems 2016-10-11 07:29:04 +02:00
Loic Blot 569b89b36f Move RemotePlayer code to its own cpp/header 2016-10-08 22:27:44 +02:00
sfan5 45a9145a4b Only include keycode unittests in client build (fixes #4559) 2016-09-29 16:31:31 +02:00
Brandon af279af6a7 Merge remote-tracking branch 'minetest/master'
Conflicts:
	util/buildbot/buildwin32.sh
2016-09-23 10:40:39 -05:00
sfan5 af4c2107e0 Don't use ZLIB_WINAPI if the required DLL is not provided to CMake
This allows you to use an stdcall zlib (zlib1.dll instead of zlibwapi.dll)
when building Minetest for win32.
2016-09-21 20:16:31 +02:00
Eric Mountain 9dd22aebc7 Fix "unknown CMake command "check_library_exists" (#4517)
Adds CMakeLists.txt include to fix this issue:

$ cmake . -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE \
   -DCMAKE_BUILD_TYPE=Release -DENABLE_CURL=TRUE -DENABLE_CURSES=FALSE \
   -DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=FALSE \
   -DENABLE_POSTGRESQL=FALSE -DENABLE_SOUND=FALSE -DENABLE_LUAJIT=TRUE \
   -DIRRLICHT_SOURCE_DIR=$HOME/irrlicht-1.8.4 -LH
...
CMake Error at src/CMakeLists.txt:339 (check_library_exists):
  Unknown CMake command "check_library_exists".
...
2016-09-13 23:05:21 -04:00
Brandon 55925444eb Merge remote-tracking branch 'minetest/master'
Conflicts:
	src/environment.cpp
	src/game.cpp
	src/guiFormSpecMenu.h
	src/mapgen.h
2016-07-08 19:14:22 -05: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
David Carlier b6eef1c0c2 openbsd's port fix for non Linux systems w/o libRT
X11 headers are not always in expected locations, add them to include list.

Modifications by est31: indentation fixes, commit message improved
2016-07-03 13:01:49 +02:00
Brandon 3c64860b41 Merge remote-tracking branch 'minetest/master'
Conflicts:
	src/CMakeLists.txt
	src/game.cpp
	src/script/lua_api/l_util.h
2016-06-03 13:22:39 -05:00
Ekdohibs 14ef2b445a Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
Brandon f3ad82566e New default textures, changed some default settings 2016-05-27 21:06:55 -05:00
Brandon 40f170fc71 Merge remote-tracking branch 'minetest/master' 2016-05-27 18:42:42 -05:00
Loic Blot ce42ff9cf7 Implement a PostgreSQL backend 2016-05-22 11:34:47 +02:00
Brandon 2b8a3729c0 Merge remote-tracking branch 'minetest/master'
Conflicts:
	builtin/game/misc.lua
	builtin/settingtypes.txt
	doc/lua_api.txt
	minetest.conf.example
	src/client.cpp
	src/defaultsettings.cpp
	src/environment.cpp
	src/guiFormSpecMenu.cpp
	src/guiFormSpecMenu.h
	src/hud.cpp
	src/hud.h
	src/itemdef.cpp
	src/pathfinder.cpp
	src/script/lua_api/l_util.cpp
	src/server.h
	src/wieldmesh.cpp
	src/wieldmesh.h
2016-05-04 22:29:15 -05:00
ShadowNinja 0079887b64 Move AreaStore to util 2016-03-07 16:33:20 -05:00
Brandon eb67a7c0dd Merge remote-tracking branch 'minetest/master' 2016-02-03 10:49:22 -06:00