Pre-release

master
Maksim Gamarnik 2016-02-01 18:11:26 +02:00
parent 20c49b87df
commit af41a0321c
8 changed files with 62 additions and 56 deletions

View File

@ -12,8 +12,8 @@ set(PROJECT_NAME_CAPITALIZED "Minetest")
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
set(VERSION_PATCH 3)
set(VERSION_MINOR 1)
set(VERSION_PATCH 0)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases

View File

@ -38,7 +38,7 @@ TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
TARGET_ARCH = armv7
CROSS_PREFIX = arm-linux-androideabi-
COMPILER_VERSION = 4.9
HAVE_LEVELDB = 1
HAVE_LEVELDB = 0
################################################################################
# toolchain config for x86
@ -81,7 +81,7 @@ IRRLICHT_TIMESTAMP = $(IRRLICHT_DIR)timestamp
IRRLICHT_TIMESTAMP_INT = $(ROOT)/deps/irrlicht_timestamp
IRRLICHT_URL_SVN = http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@$(IRRLICHT_REVISION)
OPENSSL_VERSION = 1.0.2e
OPENSSL_VERSION = 1.0.2f
OPENSSL_BASEDIR = openssl-$(OPENSSL_VERSION)
OPENSSL_DIR = $(ROOT)/deps/$(OPENSSL_BASEDIR)/
OPENSSL_LIB = $(OPENSSL_DIR)/libssl.so.1.0.0
@ -89,7 +89,7 @@ OPENSSL_TIMESTAMP = $(OPENSSL_DIR)timestamp
OPENSSL_TIMESTAMP_INT = $(ROOT)/deps/openssl_timestamp
OPENSSL_URL = http://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz
CURL_VERSION = 7.46.0
CURL_VERSION = 7.47.0
CURL_DIR = $(ROOT)/deps/curl-$(CURL_VERSION)
CURL_LIB = $(CURL_DIR)/lib/.libs/libcurl.a
CURL_TIMESTAMP = $(CURL_DIR)/timestamp
@ -116,8 +116,8 @@ ICONV_TIMESTAMP = $(ICONV_DIR)timestamp
ICONV_TIMESTAMP_INT = $(ROOT)/deps/iconv_timestamp
ICONV_URL_HTTP = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$(ICONV_VERSION).tar.gz
SQLITE3_FOLDER = sqlite-amalgamation-3090200
SQLITE3_URL = http://www.sqlite.org/2015/$(SQLITE3_FOLDER).zip
SQLITE3_FOLDER = sqlite-amalgamation-3100200
SQLITE3_URL = http://www.sqlite.org/2016/$(SQLITE3_FOLDER).zip
-include $(PATHCFGFILE)
@ -162,7 +162,7 @@ delconfig :
$(PATHCFGFILE) :
@echo "Please specify path of ANDROID NDK"; \
echo "e.g. /home/user/android-ndk-r9c/"; \
echo "e.g. /home/user/android-ndk-r10e/"; \
read ANDROID_NDK ; \
if [ ! -d $$ANDROID_NDK ] ; then \
echo "$$ANDROID_NDK is not a valid folder"; \
@ -193,7 +193,7 @@ openal_download :
echo "openal sources missing, downloading..."; \
mkdir -p ${ROOT}/deps; \
cd ${ROOT}/deps ; \
git clone ${OPENAL_URL_GIT} || exit 1; \
git clone ${OPENAL_URL_GIT} && git checkout 2d0320a || exit 1; \
fi
openal : $(OPENAL_LIB)

View File

@ -150,6 +150,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("selectionbox_width","2");
settings->setDefault("hud_hotbar_max_width","1.0");
settings->setDefault("enable_local_map_saving", "false");
settings->setDefault("screen_dpi", "72");
settings->setDefault("mip_map", "false");
settings->setDefault("anisotropic_filter", "false");
@ -181,7 +182,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_minimap", "true");
settings->setDefault("minimap_shape_round", "true");
settings->setDefault("minimap_double_scan_height", "true");
settings->setDefault("minimap_double_scan_height", "false");
settings->setDefault("curl_timeout", "5000");
settings->setDefault("curl_parallel_limit", "8");
@ -334,7 +335,6 @@ void set_default_settings(Settings *settings)
settings->setDefault("screenH", "0");
settings->setDefault("enable_shaders", "false");
settings->setDefault("fullscreen", "true");
settings->setDefault("enable_particles", "false");
settings->setDefault("video_driver", "ogles1");
settings->setDefault("touchtarget", "true");
settings->setDefault("TMPFolder","/sdcard/tmp/");
@ -348,25 +348,18 @@ void set_default_settings(Settings *settings)
settings->setDefault("viewing_range_nodes_min", "5");
settings->setDefault("enable_node_highlighting", "true");
settings->setDefault("inventory_image_hack", "true");
//settings->setDefault("minimap_double_scan_height", "false");
settings->setDefault("mouse_sensitivity", "0.05");
settings->setDefault("enable_3d_clouds", "false");
settings->setDefault("wanted_fps", "20");
settings->setDefault("fps_max", "30");
settings->setDefault("wanted_fps", "25");
settings->setDefault("fps_max", "35");
settings->setDefault("pause_fps_max", "10");
//check for device with small screen
float x_inches = ((double) porting::getDisplaySize().X /
(160 * porting::getDisplayDensity()));
if (x_inches < 3.5) {
settings->setDefault("hud_scaling", "0.6");
}
else if (x_inches < 4.5) {
if (x_inches < 4.5) {
settings->setDefault("hud_scaling", "0.7");
}
settings->setDefault("gui_scaling", "1.1");
settings->setDefault("curl_verify_cert","false");
#else
settings->setDefault("screen_dpi", "72");
#endif
}

View File

@ -1123,7 +1123,7 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec,
float ypos = singleplayermode ? 0.5 : 0.1;
std::ostringstream os;
os << FORMSPEC_VERSION_STRING << SIZE_TAG
os << FORMSPEC_VERSION_STRING << PAUSE_MENU_SIZE_TAG
<< "button_exit[4," << (ypos++) << ";3,0.5;btn_continue;"
<< strgettext("Continue") << "]";

View File

@ -217,8 +217,8 @@ void initializePathsAndroid()
cls_File, mt_getAbsPath, "getCacheDir");
path_storage = getAndroidPath(cls_Env, NULL, cls_File, mt_getAbsPath,
"getExternalStorageDirectory");
path_user = path_storage + DIR_DELIM + "Android/data/ua.MultiCraft/Files";
path_share = path_storage + DIR_DELIM + "Android/data/ua.MultiCraft/Files";
path_user = path_storage + DIR_DELIM + "Android/data/mobi.MultiCraft/Files";
path_share = path_storage + DIR_DELIM + "Android/data/mobi.MultiCraft/Files";
migrateCachePath();
}

View File

@ -180,7 +180,15 @@ static int getMaxControlPadSize(float density) {
return 235 * density * g_settings->getFloat("hud_scaling");
}
void TouchScreenGUI::init(ISimpleTextureSource* tsrc, float density)
int TouchScreenGUI::getGuiButtonSize()
{
u32 control_pad_size = MYMIN((2 * m_screensize.Y) / 3,
getMaxControlPadSize(porting::getDisplayDensity()));
return control_pad_size / 3;
}
void TouchScreenGUI::init(ISimpleTextureSource* tsrc)
{
assert(tsrc != 0);
@ -190,7 +198,7 @@ void TouchScreenGUI::init(ISimpleTextureSource* tsrc, float density)
MYMIN((2 * m_screensize.Y + spacing * 2) / 3,
getMaxControlPadSize(porting::getDisplayDensity()));
u32 button_size = (control_pad_size - spacing * 2 ) / 3;
u32 button_size = getGuiButtonSize();
m_visible = true;
m_texturesource = tsrc;
m_control_pad_rect = rect<s32>(
@ -416,7 +424,7 @@ bool TouchScreenGUI::isReleaseHUDButton(int eventID)
return false;
}
void TouchScreenGUI::ButtonEvent(touch_gui_button_id button,
void TouchScreenGUI::handleButtonEvent(touch_gui_button_id button,
int eventID, bool action)
{
button_info* btn = &m_buttons[button];
@ -465,7 +473,7 @@ void TouchScreenGUI::handleReleaseEvent(int evt_id)
/* handle button events */
if (button != after_last_element_id) {
ButtonEvent(button, evt_id, false);
handleButtonEvent(button, evt_id, false);
}
/* handle hud button events */
else if (isReleaseHUDButton(evt_id)) {
@ -556,7 +564,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
/* handle button events */
if (button != after_last_element_id) {
ButtonEvent(button,eventID,true);
handleButtonEvent(button, eventID, true);
}
else if (isHUDButton(event))
{
@ -641,8 +649,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
->getRayFromScreenCoordinates(
v2s32(event.TouchInput.X,event.TouchInput.Y));
}
}
else {
}else {
handleChangedButton(event);
}
}
@ -668,12 +675,12 @@ void TouchScreenGUI::handleChangedButton(const SEvent &event)
}
/* remove old button */
ButtonEvent((touch_gui_button_id) i,*iter,false);
handleButtonEvent((touch_gui_button_id) i,*iter,false);
if (current_button_id == after_last_element_id) {
return;
}
ButtonEvent((touch_gui_button_id) current_button_id,*iter,true);
handleButtonEvent((touch_gui_button_id) current_button_id,*iter,true);
return;
}
@ -687,8 +694,11 @@ void TouchScreenGUI::handleChangedButton(const SEvent &event)
}
button_info* btn = &m_buttons[current_button_id];
if (std::find(btn->ids.begin(),btn->ids.end(), event.TouchInput.ID) == btn->ids.end()) {
ButtonEvent((touch_gui_button_id) current_button_id,event.TouchInput.ID,true);
if (std::find(btn->ids.begin(),btn->ids.end(), event.TouchInput.ID)
== btn->ids.end())
{
handleButtonEvent((touch_gui_button_id) current_button_id,
event.TouchInput.ID, true);
}
}

View File

@ -71,7 +71,7 @@ public:
void translateEvent(const SEvent &event);
void init(ISimpleTextureSource* tsrc,float density);
void init(ISimpleTextureSource* tsrc);
double getYaw() { return m_camera_yaw; }
double getPitch() { return m_camera_pitch; }
@ -148,7 +148,7 @@ private:
std::vector<id_status> m_known_ids;
/* handle a button event */
void ButtonEvent(touch_gui_button_id bID, int eventID, bool action);
void handleButtonEvent(touch_gui_button_id bID, int eventID, bool action);
/* handle pressed hud buttons */
bool isHUDButton(const SEvent &event);
@ -156,6 +156,9 @@ private:
/* handle released hud buttons */
bool isReleaseHUDButton(int eventID);
/* get size of regular gui control button */
int getGuiButtonSize();
/* handle double taps */
bool doubleTapDetection();