Optimization, scaling and game control improve
This commit is contained in:
parent
4ee5e23518
commit
6a235702a3
@ -127,7 +127,7 @@ ICONV_TIMESTAMP = $(ICONV_DIR)timestamp
|
|||||||
ICONV_TIMESTAMP_INT = $(ROOT)/deps/iconv_timestamp
|
ICONV_TIMESTAMP_INT = $(ROOT)/deps/iconv_timestamp
|
||||||
ICONV_URL_HTTP = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$(ICONV_VERSION).tar.gz
|
ICONV_URL_HTTP = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$(ICONV_VERSION).tar.gz
|
||||||
|
|
||||||
SQLITE3_FOLDER = sqlite-amalgamation-3100200
|
SQLITE3_FOLDER = sqlite-amalgamation-3110000
|
||||||
SQLITE3_URL = http://www.sqlite.org/2016/$(SQLITE3_FOLDER).zip
|
SQLITE3_URL = http://www.sqlite.org/2016/$(SQLITE3_FOLDER).zip
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -538,6 +538,7 @@ irrlicht_download :
|
|||||||
patch -p1 < ../../irrlicht-touchcount.patch || exit 1; \
|
patch -p1 < ../../irrlicht-touchcount.patch || exit 1; \
|
||||||
patch -p1 < ../../irrlicht-back_button.patch || exit 1; \
|
patch -p1 < ../../irrlicht-back_button.patch || exit 1; \
|
||||||
patch -p1 < ../../irrlicht-texturehack.patch || exit 1; \
|
patch -p1 < ../../irrlicht-texturehack.patch || exit 1; \
|
||||||
|
patch -p1 < ../../irrlicht-optimization.patch || exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(IRRLICHT_TIMESTAMP) : irrlicht_download
|
$(IRRLICHT_TIMESTAMP) : irrlicht_download
|
||||||
|
11
build/android/irrlicht-optimization.patch
Normal file
11
build/android/irrlicht-optimization.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- irrlicht/source/Irrlicht/Android/jni/Android.mk.orig 2016-02-15 05:33:03.000000000 +0200
|
||||||
|
+++ irrlicht/source/Irrlicht/Android/jni/Android.mk 2016-02-15 05:34:34.913711815 +0200
|
||||||
|
@@ -11,7 +11,7 @@
|
||||||
|
ifndef NDEBUG
|
||||||
|
LOCAL_CFLAGS += -g -D_DEBUG
|
||||||
|
else
|
||||||
|
-LOCAL_CFLAGS += -fexpensive-optimizations -O3
|
||||||
|
+LOCAL_CFLAGS += -D_NDK_MATH_NO_SOFTFP=1 -mfloat-abi=hard -Ofast -march=armv7-a
|
||||||
|
endif
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES := ../../../include
|
@ -357,14 +357,18 @@ void set_default_settings(Settings *settings)
|
|||||||
settings->setDefault("screen_dpi", "72");
|
settings->setDefault("screen_dpi", "72");
|
||||||
settings->setDefault("gui_scaling", "1.1");
|
settings->setDefault("gui_scaling", "1.1");
|
||||||
settings->setDefault("curl_verify_cert","false");
|
settings->setDefault("curl_verify_cert","false");
|
||||||
|
settings->setDefault("mouse_sensitivity", "0.15");
|
||||||
|
settings->setDefault("hud_scaling", "0.9");
|
||||||
//check for device with small screen
|
//check for device with small screen
|
||||||
float x_inches = ((double) porting::getDisplaySize().X /
|
float x_inches = ((double) porting::getDisplaySize().X /
|
||||||
(160 * porting::getDisplayDensity()));
|
(160 * porting::getDisplayDensity()));
|
||||||
if (x_inches < 3.5) {
|
if (x_inches < 3.5) {
|
||||||
settings->setDefault("hud_scaling", "0.6");
|
settings->setDefault("hud_scaling", "0.55");
|
||||||
|
settings->setDefault("mouse_sensitivity", "0.1");
|
||||||
}
|
}
|
||||||
else if (x_inches < 5) {
|
else if (x_inches < 5.5) {
|
||||||
settings->setDefault("hud_scaling", "0.7");
|
settings->setDefault("hud_scaling", "0.65");
|
||||||
|
settings->setDefault("mouse_sensitivity", "0.1");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ void TouchScreenGUI::initButton(touch_gui_button_id id, rect<s32> button_rect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int getMaxControlPadSize(float density) {
|
static int getMaxControlPadSize(float density) {
|
||||||
return 230 * density * g_settings->getFloat("hud_scaling");
|
return 280 * density * g_settings->getFloat("hud_scaling");
|
||||||
}
|
}
|
||||||
|
|
||||||
int TouchScreenGUI::getGuiButtonSize()
|
int TouchScreenGUI::getGuiButtonSize()
|
||||||
@ -291,17 +291,17 @@ void TouchScreenGUI::init(ISimpleTextureSource* tsrc)
|
|||||||
|
|
||||||
/* init drop button */
|
/* init drop button */
|
||||||
initButton(drop_id,
|
initButton(drop_id,
|
||||||
rect<s32>(m_screensize.X-(0.75*button_size),
|
rect<s32>(m_screensize.X-(1*button_size),
|
||||||
m_screensize.Y/2-(1.75*button_size),
|
m_screensize.Y/2-(2*button_size),
|
||||||
m_screensize.X,
|
m_screensize.X,
|
||||||
m_screensize.Y/2-(1*button_size)),
|
m_screensize.Y/2-(1*button_size)),
|
||||||
L"drop", false, SLOW_BUTTON_REPEAT);
|
L"drop", false, SLOW_BUTTON_REPEAT);
|
||||||
|
|
||||||
/* init crunch button */
|
/* init crunch button */
|
||||||
initButton(crunch_id,
|
initButton(crunch_id,
|
||||||
rect<s32>(m_screensize.X-(2.2*button_size),
|
rect<s32>(m_screensize.X-(2*button_size),
|
||||||
m_screensize.Y-(0.5*button_size),
|
m_screensize.Y-(0.5*button_size),
|
||||||
m_screensize.X-(1.2*button_size),
|
m_screensize.X-(button_size),
|
||||||
m_screensize.Y),
|
m_screensize.Y),
|
||||||
L"H", false, SLOW_BUTTON_REPEAT);
|
L"H", false, SLOW_BUTTON_REPEAT);
|
||||||
|
|
||||||
@ -346,24 +346,21 @@ void TouchScreenGUI::init(ISimpleTextureSource* tsrc)
|
|||||||
|
|
||||||
/* init chat button */
|
/* init chat button */
|
||||||
initButton(chat_id,
|
initButton(chat_id,
|
||||||
rect<s32>(m_screensize.X - (0.75*button_size), 0,
|
rect<s32>(m_screensize.X - (button_size), 0,
|
||||||
m_screensize.X, 0.75*button_size),
|
m_screensize.X, button_size),
|
||||||
L"Chat", false, SLOW_BUTTON_REPEAT);
|
L"Chat", false, SLOW_BUTTON_REPEAT);
|
||||||
|
|
||||||
/* init camera button
|
/* init rangeselect button */
|
||||||
|
initButton(range_id,
|
||||||
|
rect<s32>(m_screensize.X - (2*button_size), 0,
|
||||||
|
m_screensize.X - (button_size), button_size),
|
||||||
|
L"far", false, SLOW_BUTTON_REPEAT);
|
||||||
|
|
||||||
|
/* init camera button
|
||||||
initButton(camera_id,
|
initButton(camera_id,
|
||||||
rect<s32>(0, 0,
|
rect<s32>(0, 0,
|
||||||
0.75*button_size, 0.75*button_size),
|
0.75*button_size, 0.75*button_size),
|
||||||
L"cam", false, SLOW_BUTTON_REPEAT);*/
|
L"cam", false, SLOW_BUTTON_REPEAT);*/
|
||||||
|
|
||||||
/* init rangeselect button */
|
|
||||||
initButton(range_id,
|
|
||||||
/*rect<s32>(m_screensize.X - (0.75*button_size), 0,
|
|
||||||
m_screensize.X, 0.75*button_size),*/
|
|
||||||
|
|
||||||
rect<s32>(m_screensize.X - (1.5*button_size), 0,
|
|
||||||
m_screensize.X - (0.75*button_size), 0.75*button_size),
|
|
||||||
L"far", false, SLOW_BUTTON_REPEAT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
touch_gui_button_id TouchScreenGUI::getButtonID(s32 x, s32 y)
|
touch_gui_button_id TouchScreenGUI::getButtonID(s32 x, s32 y)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user