diff --git a/.gitignore b/.gitignore index 933d484f0..e139ef1c8 100644 --- a/.gitignore +++ b/.gitignore @@ -29,8 +29,6 @@ gtags.files ## Non-static MultiCraft directories or symlinks to these /bin/ /cache -/textures/* -!/textures/base/ /screenshots ## Configuration/log files diff --git a/CMakeLists.txt b/CMakeLists.txt index cd8c385ee..1b8d6e6de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ set(PROJECT_NAME_CAPITALIZED "MultiCraft") # Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing set(VERSION_MAJOR 1) set(VERSION_MINOR 1) -set(VERSION_PATCH 0) +set(VERSION_PATCH 2) set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string") # Change to false for releases @@ -155,7 +155,7 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client" DESTINATION "${SHAREDIR}" install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games" DESTINATION "${SHAREDIR}" PATTERN ".git*" EXCLUDE) if(BUILD_CLIENT) - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base") + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures" DESTINATION "${SHAREDIR}") endif() install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}") @@ -226,4 +226,3 @@ if(DOXYGEN_FOUND) COMMENT "Generating API documentation with Doxygen" VERBATIM ) endif() - diff --git a/build/android/Makefile b/build/android/Makefile index 581d198dc..9635d90ac 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -74,7 +74,7 @@ OGG_LIB = $(OGG_DIR)/libs/$(TARGET_ABI)/libogg.so VORBIS_LIB = $(OGG_DIR)/libs/$(TARGET_ABI)/libogg.so OGG_TIMESTAMP = $(OGG_DIR)/timestamp OGG_TIMESTAMP_INT = $(ROOT)/deps/ogg_timestamp -OGG_URL_GIT = https://github.com/vincentjames501/libvorbis-libogg-android +OGG_URL_GIT = https://github.com/MoNTE48/libvorbis-libogg-android IRRLICHT_COMMIT = 58fa0cf3419c2733159fc3c6253634bedada3bfe #IRRLICHT_COMMIT = 54b8cba398c3b845d0d1158822916c2f78be194b @@ -91,7 +91,7 @@ OPENSSL_TIMESTAMP = $(OPENSSL_DIR)/timestamp OPENSSL_TIMESTAMP_INT = $(ROOT)/deps/openssl_timestamp OPENSSL_URL = ftp://ftp.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz -CURL_VERSION = 7.47.1 +CURL_VERSION = 7.48.0 CURL_DIR = $(ROOT)/deps/curl CURL_LIB = $(CURL_DIR)/lib/.libs/libcurl.a CURL_TIMESTAMP = $(CURL_DIR)/timestamp @@ -110,7 +110,7 @@ FREETYPE_DIR = $(ROOT)/deps/freetype FREETYPE_LIB = $(FREETYPE_DIR)/objs/.libs/libfreetype.a FREETYPE_TIMESTAMP = $(FREETYPE_DIR)/timestamp FREETYPE_TIMESTAMP_INT = $(ROOT)/deps/freetype_timestamp -FREETYPE_URL_HTTP = http://sourceforge.net/projects/freetype/files/freetype2/$(FREETYPE_VERSION)/freetype-$(FREETYPE_VERSION).tar.bz2 +FREETYPE_URL_HTTP = http://download.savannah.gnu.org/releases/freetype/freetype-$(FREETYPE_VERSION).tar.bz2 ICONV_VERSION = 1.14 ICONV_DIR = $(ROOT)/deps/libiconv @@ -157,7 +157,7 @@ VERSION_PATCH := $(shell cat $(ROOT)/../../CMakeLists.txt | \ $(ASSETS_TIMESTAMP) $(LUAJIT_TIMESTAMP) \ $(OPENAL_TIMESTAMP) $(OGG_TIMESTAMP) \ $(IRRLICHT_TIMESTAMP) $(CURL_TIMESTAMP) \ - $(OPENSSL_TIMESTAMP) \ + $(OPENSSL_TIMESTAMP) $(VORBIS_TIMESTAMP) \ $(ROOT)/jni/src/android_version.h \ $(ROOT)/jni/src/android_version_githash.h @@ -252,9 +252,6 @@ ogg_download : mkdir -p ${ROOT}/deps; \ cd ${ROOT}/deps ; \ git clone ${OGG_URL_GIT}|| exit 1; \ - cd libvorbis-libogg-android ; \ - patch -p1 < ../../libvorbis-libogg-fpu.patch || exit 1; \ - sed -i 's-:-?-' jni/Application.mk; \ fi ogg : $(OGG_LIB) @@ -319,7 +316,7 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) $(GMP_LIB) cd ${OPENSSL_DIR}; \ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-openssl; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ - --toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \ + --toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \ --install-dir=$${TOOLCHAIN} --platform=${APP_PLATFORM}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ CC=${CROSS_PREFIX}gcc ./Configure no-ssl2 no-ssl3 no-hw enable-gmp \ @@ -433,7 +430,7 @@ $(ICONV_LIB) : $(ICONV_TIMESTAMP) cd ${ICONV_DIR}; \ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-iconv; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ - --toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \ + --toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \ --platform=${APP_PLATFORM} --install-dir=$${TOOLCHAIN}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export CC=${CROSS_PREFIX}gcc; \ @@ -702,7 +699,7 @@ $(LUAJIT_LIB): $(LUAJIT_TIMESTAMP) export CROSS_PREFIX=${CROSS_PREFIX}; \ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-luajit; \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ - --toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \ + --toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \ --platform=${APP_PLATFORM} --install-dir=$${TOOLCHAIN}; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export TARGET_FLAGS="${TARGET_CFLAGS_ADDON}"; \ @@ -716,7 +713,7 @@ $(LUAJIT_LIB): $(LUAJIT_TIMESTAMP) fi clean_luajit: - $(RM) -r deps/luajit + $(RM) -R deps/luajit assets : $(ASSETS_TIMESTAMP) @REFRESH=0; \ @@ -772,9 +769,9 @@ apk: $(PATHCFGFILE) assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(GMP_LIB) \ TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \ TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \ TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" && \ -# ant $$BUILD_TYPE && \ - echo " Success! =)" \ -# echo "APK: bin/MultiCraft-$$BUILD_TYPE.apk" && \ + echo " Success! =)"; \ + ant $$BUILD_TYPE && \ + echo "APK: bin/MultiCraft-$$BUILD_TYPE.apk" \ prep_srcdir : @if [ ! -e ${ROOT}/jni/src ]; then \ diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 15482f6d5..2eb76b2b1 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -29,8 +29,8 @@ include $(PREBUILT_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := ogg -LOCAL_SRC_FILES := deps/libvorbis-libogg-android/libs/$(TARGET_LIBDIR)/libogg.so -include $(PREBUILT_SHARED_LIBRARY) +LOCAL_SRC_FILES := deps/libvorbis-libogg-android/obj/local/$(APP_ABI)/libogg.a +include $(PREBUILT_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := vorbis @@ -53,20 +53,19 @@ LOCAL_SRC_FILES := deps/openssl/libcrypto.a include $(PREBUILT_STATIC_LIBRARY) include $(CLEAR_VARS) -LOCAL_MODULE := luajit +LOCAL_MODULE := LuaJIT LOCAL_SRC_FILES := deps/luajit/src/libluajit.a include $(PREBUILT_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := multicraft -LOCAL_CPP_FEATURES += exceptions - ifdef GPROF GPROF_DEF=-DGPROF endif -LOCAL_CFLAGS := -DHAVE_TOUCHSCREENGUI \ +LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ \ + -DHAVE_TOUCHSCREENGUI \ -DUSE_CURL=1 \ -DUSE_SOUND=1 \ -DUSE_FREETYPE=1 \ @@ -323,8 +322,8 @@ LOCAL_SRC_FILES += \ # JSONCPP LOCAL_SRC_FILES += jni/src/json/jsoncpp.cpp -LOCAL_SHARED_LIBRARIES := ogg vorbis gmp -LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl ssl crypto iconv luajit openal android_native_app_glue $(PROFILER_LIBS) +LOCAL_SHARED_LIBRARIES := gmp vorbis +LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl ssl crypto iconv LuaJIT openal ogg android_native_app_glue $(PROFILER_LIBS) LOCAL_LDLIBS := -lEGL -llog -lGLESv1_CM -lGLESv2 -lz -landroid -lOpenSLES diff --git a/build/android/jni/Application.mk b/build/android/jni/Application.mk index beaf412fe..07333f993 100644 --- a/build/android/jni/Application.mk +++ b/build/android/jni/Application.mk @@ -1,3 +1,5 @@ APP_MODULES := multicraft APP_STL := gnustl_static -APP_CPPFLAGS += -fexceptions -frtti +#APP_STL := c++_shared +#LIBCXX_FORCE_REBUILD := true +APP_CPPFLAGS += -fexceptions -frtti \ No newline at end of file diff --git a/build/android/libvorbis-libogg-fpu.patch b/build/android/libvorbis-libogg-fpu.patch deleted file mode 100644 index 52ab397ac..000000000 --- a/build/android/libvorbis-libogg-fpu.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- libvorbis-libogg-android/jni/libvorbis-jni/Android.mk.orig 2014-06-17 19:22:50.621559073 +0200 -+++ libvorbis-libogg-android/jni/libvorbis-jni/Android.mk 2014-06-17 19:38:20.641581140 +0200 -@@ -4,9 +4,6 @@ - - LOCAL_MODULE := vorbis-jni - LOCAL_CFLAGS += -I$(LOCAL_PATH)/../include -fsigned-char --ifeq ($(TARGET_ARCH),arm) -- LOCAL_CFLAGS += -march=armv6 -marm -mfloat-abi=softfp -mfpu=vfp --endif - - LOCAL_SHARED_LIBRARIES := libogg libvorbis - ---- libvorbis-libogg-android/jni/libvorbis/Android.mk.orig 2014-06-17 19:22:39.077558797 +0200 -+++ libvorbis-libogg-android/jni/libvorbis/Android.mk 2014-06-17 19:38:52.121581887 +0200 -@@ -4,9 +4,6 @@ - - LOCAL_MODULE := libvorbis - LOCAL_CFLAGS += -I$(LOCAL_PATH)/../include -ffast-math -fsigned-char --ifeq ($(TARGET_ARCH),arm) -- LOCAL_CFLAGS += -march=armv6 -marm -mfloat-abi=softfp -mfpu=vfp --endif - LOCAL_SHARED_LIBRARIES := libogg - - LOCAL_SRC_FILES := \ ---- libvorbis-libogg-android/jni/libogg/Android.mk.orig 2014-06-17 19:22:33.965558675 +0200 -+++ libvorbis-libogg-android/jni/libogg/Android.mk 2014-06-17 19:38:25.337581252 +0200 -@@ -4,10 +4,6 @@ - - LOCAL_MODULE := libogg - LOCAL_CFLAGS += -I$(LOCAL_PATH)/../include -ffast-math -fsigned-char --ifeq ($(TARGET_ARCH),arm) -- LOCAL_CFLAGS += -march=armv6 -marm -mfloat-abi=softfp -mfpu=vfp --endif -- - - LOCAL_SRC_FILES := \ - bitwise.c \ diff --git a/builtin/game/init.lua b/builtin/game/init.lua index a6cfa3bf8..dd0eb8f88 100644 --- a/builtin/game/init.lua +++ b/builtin/game/init.lua @@ -25,4 +25,4 @@ dofile(gamepath.."falling.lua") dofile(gamepath.."features.lua") dofile(gamepath.."voxelarea.lua") dofile(gamepath.."forceloading.lua") -dofile(gamepath.."statbars.lua") +--dofile(gamepath.."statbars.lua") diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index ec01388bd..e7e90f30b 100644 --- a/builtin/mainmenu/common.lua +++ b/builtin/mainmenu/common.lua @@ -197,8 +197,7 @@ function menu_render_worldlist() retval = retval .."," end - retval = retval .. core.formspec_escape(v.name) .. - " \\[" .. core.formspec_escape(v.gameid) .. "\\]" + retval = retval .. core.formspec_escape(v.name) .. "" end return retval diff --git a/builtin/mainmenu/dlg_create_world.lua b/builtin/mainmenu/dlg_create_world.lua index d395228f3..5c3f6b9d9 100644 --- a/builtin/mainmenu/dlg_create_world.lua +++ b/builtin/mainmenu/dlg_create_world.lua @@ -17,13 +17,6 @@ local function create_world_formspec(dialogdata) - mm_texture.clear("header") - mm_texture.clear("footer") - minetest.set_clouds(false) - minetest.set_background("background",minetest.formspec_escape(mm_texture.basetexturedir)..'background.jpg') - --minetest.set_background("header",minetest.formspec_escape(mm_texture.basetexturedir)..'header.png') - - local mapgens = core.get_mapgen_names() local current_seed = core.setting_get("fixed_map_seed") or "" @@ -154,4 +147,4 @@ function create_create_world_dlg(update_worldlistfilter) retval.update_worldlist_filter = update_worldlistfilter return retval -end +end \ No newline at end of file diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index 4c3926d7d..7c251e18d 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -25,7 +25,7 @@ mt_color_dark_green = "#003300" local menupath = core.get_mainmenu_path() local basepath = core.get_builtin_path() defaulttexturedir = core.get_texturepath_share() .. DIR_DELIM .. "base" .. - DIR_DELIM .. "pack" .. DIR_DELIM + DIR_DELIM dofile(basepath .. DIR_DELIM .. "common" .. DIR_DELIM .. "async_event.lua") dofile(basepath .. DIR_DELIM .. "common" .. DIR_DELIM .. "filterlist.lua") @@ -35,23 +35,23 @@ dofile(basepath .. DIR_DELIM .. "fstk" .. DIR_DELIM .. "tabview.lua") dofile(basepath .. DIR_DELIM .. "fstk" .. DIR_DELIM .. "ui.lua") dofile(menupath .. DIR_DELIM .. "common.lua") dofile(menupath .. DIR_DELIM .. "gamemgr.lua") -dofile(menupath .. DIR_DELIM .. "modmgr.lua") dofile(menupath .. DIR_DELIM .. "store.lua") dofile(menupath .. DIR_DELIM .. "dlg_config_world.lua") dofile(menupath .. DIR_DELIM .. "tab_credits.lua") -dofile(menupath .. DIR_DELIM .. "tab_mods.lua") -dofile(menupath .. DIR_DELIM .. "tab_settings.lua") if not (PLATFORM == "Android") then +dofile(menupath .. DIR_DELIM .. "modmgr.lua") + dofile(menupath .. DIR_DELIM .. "tab_settings.lua") dofile(menupath .. DIR_DELIM .. "dlg_settings_advanced.lua") + dofile(menupath .. DIR_DELIM .. "tab_texturepacks.lua") + dofile(menupath .. DIR_DELIM .. "tab_mods.lua") + dofile(menupath .. DIR_DELIM .. "dlg_rename_modpack.lua") + dofile(menupath .. DIR_DELIM .. "dlg_delete_mod.lua") end dofile(menupath .. DIR_DELIM .. "dlg_create_world.lua") -dofile(menupath .. DIR_DELIM .. "dlg_delete_mod.lua") dofile(menupath .. DIR_DELIM .. "dlg_delete_world.lua") -dofile(menupath .. DIR_DELIM .. "dlg_rename_modpack.lua") dofile(menupath .. DIR_DELIM .. "tab_multiplayer.lua") dofile(menupath .. DIR_DELIM .. "tab_server.lua") dofile(menupath .. DIR_DELIM .. "tab_singleplayer.lua") -dofile(menupath .. DIR_DELIM .. "tab_texturepacks.lua") dofile(menupath .. DIR_DELIM .. "textures.lua") -------------------------------------------------------------------------------- @@ -126,11 +126,8 @@ local function init_globals() core.sound_play("main_menu", false) - mm_texture.clear("header") - mm_texture.clear("footer") minetest.set_clouds(false) - minetest.set_background("background",minetest.formspec_escape(mm_texture.basetexturedir)..'background.jpg') - --minetest.set_background("header",minetest.formspec_escape(mm_texture.basetexturedir)..'header.png') + core.set_background("background", defaulttexturedir .. "background.jpg"); end init_globals() \ No newline at end of file diff --git a/builtin/mainmenu/store.lua b/builtin/mainmenu/store.lua index 974cebe5a..fb2187dda 100644 --- a/builtin/mainmenu/store.lua +++ b/builtin/mainmenu/store.lua @@ -29,7 +29,7 @@ function modstore.init(size, unsortedmods, searchmods) modstore.modsperpage = modstore.mods_on_unsorted_page modstore.basetexturedir = core.get_texturepath() .. DIR_DELIM .. "base" .. - DIR_DELIM .. "pack" .. DIR_DELIM + DIR_DELIM modstore.lastmodtitle = "" modstore.last_search = "" diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_credits.lua index e373f6498..b7067e4b0 100644 --- a/builtin/mainmenu/tab_credits.lua +++ b/builtin/mainmenu/tab_credits.lua @@ -21,14 +21,13 @@ tab_credits = { name = "credits", caption = fgettext("Credits"), cbf_formspec = function (tabview, name, tabdata) - local logofile = defaulttexturedir .. "smoke_puff.png" return "label[0.5,3.2;MultiCraft " .. core.get_version() .. "]" .. "label[0.5,3.5;Open Source Project]" .. - "image[0.5,1;" .. core.formspec_escape(logofile) .. "]" .. "tablecolumns[color;text]" .. "tableoptions[background=#00000000;highlight=#00000000;border=false]" .. "table[3.5,-0.25;8.5,5.8;list_credits;" .. "#FFFF00," .. fgettext("Core Developers") .."," .. + ",Maksim Gamarnik (MoNTE48) ,".. ",Perttu Ahola (celeron55) ,".. ",Ryan Kwolek (kwolekr) ,".. ",PilzAdam ," .. diff --git a/builtin/mainmenu/tab_multiplayer.lua b/builtin/mainmenu/tab_multiplayer.lua index e2f3fee47..3301c5c5d 100644 --- a/builtin/mainmenu/tab_multiplayer.lua +++ b/builtin/mainmenu/tab_multiplayer.lua @@ -18,12 +18,6 @@ -------------------------------------------------------------------------------- local function get_formspec(tabview, name, tabdata) - mm_texture.clear("header") - mm_texture.clear("footer") - minetest.set_clouds(false) - minetest.set_background("background",minetest.formspec_escape(mm_texture.basetexturedir)..'background.jpg') - --minetest.set_background("header",minetest.formspec_escape(mm_texture.basetexturedir)..'header.png') - -- Update the cached supported proto info, -- it may have changed after a change by the settings menu. common_update_cached_supp_proto() diff --git a/builtin/mainmenu/tab_server.lua b/builtin/mainmenu/tab_server.lua index 55eea22a9..5b9783307 100644 --- a/builtin/mainmenu/tab_server.lua +++ b/builtin/mainmenu/tab_server.lua @@ -18,12 +18,6 @@ -------------------------------------------------------------------------------- local function get_formspec(tabview, name, tabdata) - mm_texture.clear("header") - mm_texture.clear("footer") - minetest.set_clouds(false) - minetest.set_background("background",minetest.formspec_escape(mm_texture.basetexturedir)..'background.jpg') - --minetest.set_background("header",minetest.formspec_escape(mm_texture.basetexturedir)..'header.png') - local index = menudata.worldlist:get_current_index( tonumber(core.setting_get("mainmenu_last_selected_world")) ) diff --git a/builtin/mainmenu/tab_singleplayer.lua b/builtin/mainmenu/tab_singleplayer.lua index 95c7c0c56..3af56b805 100644 --- a/builtin/mainmenu/tab_singleplayer.lua +++ b/builtin/mainmenu/tab_singleplayer.lua @@ -40,7 +40,7 @@ local function get_formspec(tabview, name, tabdata) dump(core.setting_getbool("enable_damage")) .. "]".. "textlist[0,0;11.75,3.7;sp_worlds;" .. menu_render_worldlist() .. - ";" .. index .. "]" + ";" .. index .. ";true]" return retval end diff --git a/builtin/mainmenu/textures.lua b/builtin/mainmenu/textures.lua index cffc5d0aa..84a901b83 100644 --- a/builtin/mainmenu/textures.lua +++ b/builtin/mainmenu/textures.lua @@ -21,7 +21,7 @@ mm_texture = {} -------------------------------------------------------------------------------- function mm_texture.init() mm_texture.defaulttexturedir = core.get_texturepath() .. DIR_DELIM .. "base" .. - DIR_DELIM .. "pack" .. DIR_DELIM + DIR_DELIM mm_texture.basetexturedir = mm_texture.defaulttexturedir mm_texture.texturepack = core.setting_get("texture_path") diff --git a/src/client/tile.cpp b/src/client/tile.cpp index 8c757d1dd..eb0abf1b3 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -148,7 +148,7 @@ std::string getTexturePath(const std::string &filename) if (fullpath == "") { std::string base_path = porting::path_share + DIR_DELIM + "textures" - + DIR_DELIM + "base" + DIR_DELIM + "pack"; + + DIR_DELIM + "base"; std::string testpath = base_path + DIR_DELIM + filename; // Check all filename extensions. Returns "" if not found. fullpath = getImagePath(testpath); diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 98c2d643f..2eb3e5297 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -102,7 +102,7 @@ void set_default_settings(Settings *settings) settings->setDefault("vsync", "false"); settings->setDefault("address", ""); settings->setDefault("random_input", "false"); - settings->setDefault("client_unload_unused_data_timeout", "600"); + settings->setDefault("client_unload_unused_data_timeout", "300"); settings->setDefault("client_mapblock_limit", "5000"); settings->setDefault("enable_fog", "true"); settings->setDefault("fov", "72"); @@ -357,11 +357,11 @@ void set_default_settings(Settings *settings) settings->setDefault("sqlite_synchronous", "1"); settings->setDefault("gui_scaling", "1.1"); settings->setDefault("curl_verify_cert","false"); - settings->setDefault("viewing_range", "30"); + settings->setDefault("viewing_range", "25"); settings->setDefault("inventory_image_hack", "false"); settings->setDefault("doubletap_jump", "true"); - settings->setDefault("server_map_save_interval", "30"); - settings->setDefault("client_unload_unused_data_timeout", "90"); + settings->setDefault("server_map_save_interval", "15"); + settings->setDefault("client_unload_unused_data_timeout", "30"); settings->setDefault("active_block_range", "1"); settings->setDefault("chunksize", "3"); diff --git a/src/environment.cpp b/src/environment.cpp index 736a89caf..a6e6e29c3 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -1406,9 +1406,6 @@ void ServerEnvironment::step(float dtime) float dtime = m_cache_nodetimer_interval; - // Initialize handling of ActiveBlockModifiers - ABMHandler abmhandler(m_abms, abm_interval, this, true); - for(std::set::iterator i = m_active_blocks.m_list.begin(); i != m_active_blocks.m_list.end(); ++i) @@ -1427,9 +1424,6 @@ void ServerEnvironment::step(float dtime) // Set current time as timestamp block->setTimestampNoChangedFlag(m_game_time); - - abmhandler.apply(block); - // If time has changed much from the one on disk, // set block to be saved when it is unloaded if(block->getTimestamp() > block->getDiskTimestamp() + 60) @@ -1453,8 +1447,6 @@ void ServerEnvironment::step(float dtime) } } -<<<<<<< HEAD -======= if (m_active_block_modifier_interval.step(dtime, m_cache_abm_interval)) do{ // breakable if(m_active_block_interval_overload_skip > 0){ @@ -1498,7 +1490,6 @@ void ServerEnvironment::step(float dtime) } }while(0); ->>>>>>> upstream1/master /* Step script environment (run global on_step()) */ @@ -2905,4 +2896,4 @@ ClientEnvEvent ClientEnvironment::getClientEvent() return event; } -#endif // #ifndef SERVER +#endif // #ifndef SERVER \ No newline at end of file diff --git a/src/game.cpp b/src/game.cpp index 6a9808ffd..cd6a78dc9 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -4209,10 +4209,9 @@ void Game::updateGui(float *statustext_time, const RunStats &stats, } else if (flags.show_hud || flags.show_chat) { std::ostringstream os(std::ios_base::binary); os << std::setprecision(1) << std::fixed - << "(X: " << (player_position.X / BS) + << "X: " << (player_position.X / BS) << ", Y: " << (player_position.Y / BS) - << ", Z: " << (player_position.Z / BS) - << ")"; + << ", Z: " << (player_position.Z / BS); guitext->setText(utf8_to_wide(os.str()).c_str()); guitext->setVisible(true); } else { diff --git a/src/porting_android.cpp b/src/porting_android.cpp index b87baa0a4..a83f7ce6e 100644 --- a/src/porting_android.cpp +++ b/src/porting_android.cpp @@ -69,10 +69,10 @@ void android_main(android_app *app) /* TODO this doesn't work as expected, no idea why but there's a workaround */ /* for it right now */ extern "C" { - JNIEXPORT void JNICALL Java_mobi_MultiCraft_MCNativeActivity_putMessageBoxResult( + JNIEXPORT void JNICALL Java_mobi_MultiCraft_GameActivity_putMessageBoxResult( JNIEnv * env, jclass thiz, jstring text) { - errorstream << "Java_mobi_MultiCraft_MCNativeActivity_putMessageBoxResult got: " + errorstream << "Java_mobi_MultiCraft_GameActivity_putMessageBoxResult got: " << std::string((const char*)env->GetStringChars(text,0)) << std::endl; } @@ -136,7 +136,7 @@ void initAndroid() exit(-1); } - nativeActivity = findClass("mobi/MultiCraft/MCNativeActivity"); + nativeActivity = findClass("mobi/MultiCraft/GameActivity"); if (nativeActivity == 0) { errorstream << "porting::initAndroid unable to find java native activity class" << diff --git a/src/touchscreengui.cpp b/src/touchscreengui.cpp index 21d1deee6..8788577c1 100644 --- a/src/touchscreengui.cpp +++ b/src/touchscreengui.cpp @@ -193,7 +193,7 @@ void TouchScreenGUI::initButton(touch_gui_button_id id, rect button_rect, } static int getMaxControlPadSize(float density) { - return 300 * density * g_settings->getFloat("hud_scaling"); + return 290 * density * g_settings->getFloat("hud_scaling"); } int TouchScreenGUI::getGuiButtonSize() diff --git a/textures/base/pack/background.jpg b/textures/base/background.jpg similarity index 100% rename from textures/base/pack/background.jpg rename to textures/base/background.jpg diff --git a/textures/base/pack/chat.png b/textures/base/chat.png similarity index 100% rename from textures/base/pack/chat.png rename to textures/base/chat.png diff --git a/textures/base/pack/dirt_bg.png b/textures/base/dirt_bg.png similarity index 100% rename from textures/base/pack/dirt_bg.png rename to textures/base/dirt_bg.png diff --git a/textures/base/pack/disable_img.png b/textures/base/disable_img.png similarity index 100% rename from textures/base/pack/disable_img.png rename to textures/base/disable_img.png diff --git a/textures/base/pack/down.png b/textures/base/down.png similarity index 100% rename from textures/base/pack/down.png rename to textures/base/down.png diff --git a/textures/base/pack/down_one.png b/textures/base/down_one.png similarity index 100% rename from textures/base/pack/down_one.png rename to textures/base/down_one.png diff --git a/textures/base/pack/down_three.png b/textures/base/down_three.png similarity index 100% rename from textures/base/pack/down_three.png rename to textures/base/down_three.png diff --git a/textures/base/pack/down_two.png b/textures/base/down_two.png similarity index 100% rename from textures/base/pack/down_two.png rename to textures/base/down_two.png diff --git a/textures/base/pack/drop.png b/textures/base/drop.png similarity index 100% rename from textures/base/pack/drop.png rename to textures/base/drop.png diff --git a/textures/base/pack/enable_img.png b/textures/base/enable_img.png similarity index 100% rename from textures/base/pack/enable_img.png rename to textures/base/enable_img.png diff --git a/textures/base/pack/halo.png b/textures/base/halo.png similarity index 100% rename from textures/base/pack/halo.png rename to textures/base/halo.png diff --git a/textures/base/pack/inventory.png b/textures/base/inventory.png similarity index 100% rename from textures/base/pack/inventory.png rename to textures/base/inventory.png diff --git a/textures/base/pack/jump.png b/textures/base/jump.png similarity index 100% rename from textures/base/pack/jump.png rename to textures/base/jump.png diff --git a/textures/base/pack/left.png b/textures/base/left.png similarity index 100% rename from textures/base/pack/left.png rename to textures/base/left.png diff --git a/textures/base/pack/minimap_mask_round.png b/textures/base/minimap_mask_round.png similarity index 100% rename from textures/base/pack/minimap_mask_round.png rename to textures/base/minimap_mask_round.png diff --git a/textures/base/pack/minimap_mask_square.png b/textures/base/minimap_mask_square.png similarity index 100% rename from textures/base/pack/minimap_mask_square.png rename to textures/base/minimap_mask_square.png diff --git a/textures/base/pack/minimap_overlay_round.png b/textures/base/minimap_overlay_round.png similarity index 100% rename from textures/base/pack/minimap_overlay_round.png rename to textures/base/minimap_overlay_round.png diff --git a/textures/base/pack/minimap_overlay_square.png b/textures/base/minimap_overlay_square.png similarity index 100% rename from textures/base/pack/minimap_overlay_square.png rename to textures/base/minimap_overlay_square.png diff --git a/textures/base/pack/object_marker_red.png b/textures/base/object_marker_red.png similarity index 100% rename from textures/base/pack/object_marker_red.png rename to textures/base/object_marker_red.png diff --git a/textures/base/pack/player_marker.png b/textures/base/player_marker.png similarity index 100% rename from textures/base/pack/player_marker.png rename to textures/base/player_marker.png diff --git a/textures/base/pack/rangeview.png b/textures/base/rangeview.png similarity index 100% rename from textures/base/pack/rangeview.png rename to textures/base/rangeview.png diff --git a/textures/base/pack/right.png b/textures/base/right.png similarity index 100% rename from textures/base/pack/right.png rename to textures/base/right.png diff --git a/textures/base/pack/server_flags_creative.png b/textures/base/server_flags_creative.png similarity index 100% rename from textures/base/pack/server_flags_creative.png rename to textures/base/server_flags_creative.png diff --git a/textures/base/pack/server_flags_damage.png b/textures/base/server_flags_damage.png similarity index 100% rename from textures/base/pack/server_flags_damage.png rename to textures/base/server_flags_damage.png diff --git a/textures/base/pack/server_flags_favourite.png b/textures/base/server_flags_favourite.png similarity index 100% rename from textures/base/pack/server_flags_favourite.png rename to textures/base/server_flags_favourite.png diff --git a/textures/base/pack/server_flags_favourite_off.png b/textures/base/server_flags_favourite_off.png similarity index 100% rename from textures/base/pack/server_flags_favourite_off.png rename to textures/base/server_flags_favourite_off.png diff --git a/textures/base/pack/server_flags_password.png b/textures/base/server_flags_password.png similarity index 100% rename from textures/base/pack/server_flags_password.png rename to textures/base/server_flags_password.png diff --git a/textures/base/pack/server_flags_pvp.png b/textures/base/server_flags_pvp.png similarity index 100% rename from textures/base/pack/server_flags_pvp.png rename to textures/base/server_flags_pvp.png diff --git a/textures/base/pack/smoke_puff.png b/textures/base/smoke_puff.png similarity index 100% rename from textures/base/pack/smoke_puff.png rename to textures/base/smoke_puff.png diff --git a/textures/base/pack/sunrisebg.png b/textures/base/sunrisebg.png similarity index 100% rename from textures/base/pack/sunrisebg.png rename to textures/base/sunrisebg.png diff --git a/textures/base/pack/unknown_item.png b/textures/base/unknown_item.png similarity index 100% rename from textures/base/pack/unknown_item.png rename to textures/base/unknown_item.png diff --git a/textures/base/pack/unknown_node.png b/textures/base/unknown_node.png similarity index 100% rename from textures/base/pack/unknown_node.png rename to textures/base/unknown_node.png diff --git a/textures/base/pack/unknown_object.png b/textures/base/unknown_object.png similarity index 100% rename from textures/base/pack/unknown_object.png rename to textures/base/unknown_object.png diff --git a/textures/base/pack/up_one.png b/textures/base/up_one.png similarity index 100% rename from textures/base/pack/up_one.png rename to textures/base/up_one.png diff --git a/textures/base/pack/up_three.png b/textures/base/up_three.png similarity index 100% rename from textures/base/pack/up_three.png rename to textures/base/up_three.png diff --git a/textures/base/pack/up_two.png b/textures/base/up_two.png similarity index 100% rename from textures/base/pack/up_two.png rename to textures/base/up_two.png