Pre-release
parent
20c49b87df
commit
af41a0321c
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -372,4 +372,4 @@ include $(BUILD_SHARED_LIBRARY)
|
|||
ifdef GPROF
|
||||
$(call import-module,android-ndk-profiler)
|
||||
endif
|
||||
$(call import-module,android/native_app_glue)
|
||||
$(call import-module,android/native_app_glue)
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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") << "]";
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ TouchScreenGUI::TouchScreenGUI(IrrlichtDevice *device, IEventReceiver* receiver)
|
|||
m_move_id(-1),
|
||||
m_receiver(receiver)
|
||||
{
|
||||
for (unsigned int i=0; i < after_last_element_id; i++) {
|
||||
for (unsigned int i = 0; i < after_last_element_id; i++) {
|
||||
m_buttons[i].guibutton = 0;
|
||||
m_buttons[i].repeatcounter = -1;
|
||||
m_buttons[i].repeatdelay = BUTTON_REPEAT_DELAY;
|
||||
|
@ -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>(
|
||||
|
@ -344,7 +352,7 @@ touch_gui_button_id TouchScreenGUI::getButtonID(s32 x, s32 y)
|
|||
rootguielement->getElementFromPoint(core::position2d<s32>(x,y));
|
||||
|
||||
if (element) {
|
||||
for (unsigned int i=0; i < after_last_element_id; i++) {
|
||||
for (unsigned int i = 0; i < after_last_element_id; i++) {
|
||||
if (element == m_buttons[i].guibutton) {
|
||||
return (touch_gui_button_id) i;
|
||||
}
|
||||
|
@ -356,7 +364,7 @@ touch_gui_button_id TouchScreenGUI::getButtonID(s32 x, s32 y)
|
|||
|
||||
touch_gui_button_id TouchScreenGUI::getButtonID(int eventID)
|
||||
{
|
||||
for (unsigned int i=0; i < after_last_element_id; i++) {
|
||||
for (unsigned int i = 0; i < after_last_element_id; i++) {
|
||||
button_info* btn = &m_buttons[i];
|
||||
|
||||
std::vector<int>::iterator id =
|
||||
|
@ -380,7 +388,7 @@ bool TouchScreenGUI::isHUDButton(const SEvent &event)
|
|||
)) {
|
||||
if ( iter->first < 8) {
|
||||
SEvent* translated = new SEvent();
|
||||
memset(translated,0,sizeof(SEvent));
|
||||
memset(translated, 0, sizeof(SEvent));
|
||||
translated->EventType = irr::EET_KEY_INPUT_EVENT;
|
||||
translated->KeyInput.Key = (irr::EKEY_CODE) (KEY_KEY_1 + iter->first);
|
||||
translated->KeyInput.Control = false;
|
||||
|
@ -402,7 +410,7 @@ bool TouchScreenGUI::isReleaseHUDButton(int eventID)
|
|||
|
||||
if (iter != m_hud_ids.end()) {
|
||||
SEvent* translated = new SEvent();
|
||||
memset(translated,0,sizeof(SEvent));
|
||||
memset(translated, 0, sizeof(SEvent));
|
||||
translated->EventType = irr::EET_KEY_INPUT_EVENT;
|
||||
translated->KeyInput.Key = iter->second;
|
||||
translated->KeyInput.PressedDown = false;
|
||||
|
@ -416,12 +424,12 @@ 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];
|
||||
SEvent* translated = new SEvent();
|
||||
memset(translated,0,sizeof(SEvent));
|
||||
memset(translated, 0, sizeof(SEvent));
|
||||
translated->EventType = irr::EET_KEY_INPUT_EVENT;
|
||||
translated->KeyInput.Key = btn->keycode;
|
||||
translated->KeyInput.Control = false;
|
||||
|
@ -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)) {
|
||||
|
@ -478,7 +486,7 @@ void TouchScreenGUI::handleReleaseEvent(int evt_id)
|
|||
/* if this pointer issued a mouse event issue symmetric release here */
|
||||
if (m_move_sent_as_mouse_event) {
|
||||
SEvent* translated = new SEvent;
|
||||
memset(translated,0,sizeof(SEvent));
|
||||
memset(translated, 0, sizeof(SEvent));
|
||||
translated->EventType = EET_MOUSE_INPUT_EVENT;
|
||||
translated->MouseInput.X = m_move_downlocation.X;
|
||||
translated->MouseInput.Y = m_move_downlocation.Y;
|
||||
|
@ -492,7 +500,7 @@ void TouchScreenGUI::handleReleaseEvent(int evt_id)
|
|||
// ignore events inside the control pad not already handled
|
||||
} else if (!m_move_has_really_moved) {
|
||||
SEvent* translated = new SEvent;
|
||||
memset(translated,0,sizeof(SEvent));
|
||||
memset(translated, 0, sizeof(SEvent));
|
||||
translated->EventType = EET_MOUSE_INPUT_EVENT;
|
||||
translated->MouseInput.X = m_move_downlocation.X;
|
||||
translated->MouseInput.Y = m_move_downlocation.Y;
|
||||
|
@ -556,8 +564,8 @@ 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))
|
||||
{
|
||||
/* already handled in isHUDButton() */
|
||||
|
@ -641,8 +649,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
|
|||
->getRayFromScreenCoordinates(
|
||||
v2s32(event.TouchInput.X,event.TouchInput.Y));
|
||||
}
|
||||
}
|
||||
else {
|
||||
}else {
|
||||
handleChangedButton(event);
|
||||
}
|
||||
}
|
||||
|
@ -655,7 +662,7 @@ void TouchScreenGUI::handleChangedButton(const SEvent &event)
|
|||
if (m_buttons[i].ids.empty()) {
|
||||
continue;
|
||||
}
|
||||
for(std::vector<int>::iterator iter = m_buttons[i].ids.begin();
|
||||
for (std::vector<int>::iterator iter = m_buttons[i].ids.begin();
|
||||
iter != m_buttons[i].ids.end(); ++iter) {
|
||||
|
||||
if (event.TouchInput.ID == *iter) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -711,11 +721,11 @@ bool TouchScreenGUI::doubleTapDetection()
|
|||
(m_key_events[0].y - m_key_events[1].y) * (m_key_events[0].y - m_key_events[1].y));
|
||||
|
||||
|
||||
if (distance >(20 + g_settings->getU16("touchscreen_threshold")))
|
||||
if (distance > (20 + g_settings->getU16("touchscreen_threshold")))
|
||||
return false;
|
||||
|
||||
SEvent* translated = new SEvent();
|
||||
memset(translated,0,sizeof(SEvent));
|
||||
memset(translated, 0, sizeof(SEvent));
|
||||
translated->EventType = EET_MOUSE_INPUT_EVENT;
|
||||
translated->MouseInput.X = m_key_events[0].x;
|
||||
translated->MouseInput.Y = m_key_events[0].y;
|
||||
|
@ -744,7 +754,7 @@ bool TouchScreenGUI::doubleTapDetection()
|
|||
|
||||
TouchScreenGUI::~TouchScreenGUI()
|
||||
{
|
||||
for (unsigned int i=0; i < after_last_element_id; i++) {
|
||||
for (unsigned int i = 0; i < after_last_element_id; i++) {
|
||||
button_info* btn = &m_buttons[i];
|
||||
if (btn->guibutton != 0) {
|
||||
btn->guibutton->drop();
|
||||
|
@ -756,7 +766,7 @@ TouchScreenGUI::~TouchScreenGUI()
|
|||
void TouchScreenGUI::step(float dtime)
|
||||
{
|
||||
/* simulate keyboard repeats */
|
||||
for (unsigned int i=0; i < after_last_element_id; i++) {
|
||||
for (unsigned int i = 0; i < after_last_element_id; i++) {
|
||||
button_info* btn = &m_buttons[i];
|
||||
|
||||
if (btn->ids.size() > 0) {
|
||||
|
@ -770,7 +780,7 @@ void TouchScreenGUI::step(float dtime)
|
|||
|
||||
btn->repeatcounter = 0;
|
||||
SEvent translated;
|
||||
memset(&translated,0,sizeof(SEvent));
|
||||
memset(&translated, 0, sizeof(SEvent));
|
||||
translated.EventType = irr::EET_KEY_INPUT_EVENT;
|
||||
translated.KeyInput.Key = btn->keycode;
|
||||
translated.KeyInput.PressedDown = false;
|
||||
|
@ -786,7 +796,7 @@ void TouchScreenGUI::step(float dtime)
|
|||
(!m_move_has_really_moved) &&
|
||||
(!m_move_sent_as_mouse_event)) {
|
||||
|
||||
u32 delta = porting::getDeltaMs(m_move_downtime,getTimeMs());
|
||||
u32 delta = porting::getDeltaMs(m_move_downtime, getTimeMs());
|
||||
|
||||
if (delta > MIN_DIG_TIME_MS) {
|
||||
m_shootline = m_device
|
||||
|
@ -796,7 +806,7 @@ void TouchScreenGUI::step(float dtime)
|
|||
v2s32(m_move_downlocation.X,m_move_downlocation.Y));
|
||||
|
||||
SEvent translated;
|
||||
memset(&translated,0,sizeof(SEvent));
|
||||
memset(&translated, 0, sizeof(SEvent));
|
||||
translated.EventType = EET_MOUSE_INPUT_EVENT;
|
||||
translated.MouseInput.X = m_move_downlocation.X;
|
||||
translated.MouseInput.Y = m_move_downlocation.Y;
|
||||
|
@ -824,7 +834,7 @@ void TouchScreenGUI::registerHudItem(int index, const rect<s32> &rect)
|
|||
void TouchScreenGUI::Toggle(bool visible)
|
||||
{
|
||||
m_visible = visible;
|
||||
for (unsigned int i=0; i < after_last_element_id; i++) {
|
||||
for (unsigned int i = 0; i < after_last_element_id; i++) {
|
||||
button_info* btn = &m_buttons[i];
|
||||
if (btn->guibutton != 0) {
|
||||
btn->guibutton->setVisible(visible);
|
||||
|
|
|
@ -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,13 +148,16 @@ 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);
|
||||
|
||||
/* handle released hud buttons */
|
||||
bool isReleaseHUDButton(int eventID);
|
||||
|
||||
/* get size of regular gui control button */
|
||||
int getGuiButtonSize();
|
||||
|
||||
/* handle double taps */
|
||||
bool doubleTapDetection();
|
||||
|
|
Loading…
Reference in New Issue