diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0cc54f27..f815dba47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,8 +14,8 @@ set(CMAKE_CXX_STANDARD 11)
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
set(VERSION_MAJOR 1)
-set(VERSION_MINOR 2)
-set(VERSION_PATCH 1)
+set(VERSION_MINOR 3)
+set(VERSION_PATCH 0)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases
diff --git a/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj b/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj
index fafae177e..fecd2ca95 100755
--- a/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj
+++ b/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj
@@ -1895,6 +1895,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO;
+ ENABLE_INCREMENTAL_DISTILL = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
@@ -1916,6 +1917,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
ENABLE_BITCODE = NO;
+ ENABLE_INCREMENTAL_DISTILL = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
diff --git a/build/iOS/MultiCraft/MultiCraft/Info.plist b/build/iOS/MultiCraft/MultiCraft/Info.plist
index 0b32cddbf..a5d3f56e3 100755
--- a/build/iOS/MultiCraft/MultiCraft/Info.plist
+++ b/build/iOS/MultiCraft/MultiCraft/Info.plist
@@ -19,9 +19,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.2.1
+ 1.3.0
CFBundleVersion
- 51
+ 56
LSRequiresIPhoneOS
NSAppTransportSecurity
diff --git a/build/iOS/Podfile b/build/iOS/Podfile
index 13640c539..f50787d87 100755
--- a/build/iOS/Podfile
+++ b/build/iOS/Podfile
@@ -11,8 +11,24 @@ target 'MultiCraft' do
pod 'libCurlPod', :git => 'https://github.com/MoNTE48/libCurlPod'
pod 'libOggVorbisPod', :git => 'https://github.com/MoNTE48/libOggVorbisPod'
- pod 'Appodeal/Interstitial', '2.5.4-Beta'
- pod 'PersonalizedAdConsent', :git => 'https://github.com/MultiCraftProject/googleads-consent-sdk-ios'
+# pod 'Appodeal/Interstitial', '2.5.7'
+
+ pod "Appodeal/AdColonyAdapter"
+ pod "Appodeal/AdExchangeAdapter"
+ pod "Appodeal/AppLovinAdapter"
+ pod "Appodeal/ChartboostAdapter"
+ pod "Appodeal/InMobiAdapter"
+ pod "Appodeal/IronSource"
+ pod "Appodeal/MintegralAdapter"
+ pod "Appodeal/MyTargetAdapter"
+ pod "Appodeal/SmaatoAdapter"
+ pod "Appodeal/StartAppAdapter"
+ pod "Appodeal/TapjoyAdapter"
+ pod "Appodeal/UnityAdapter"
+ pod "Appodeal/VungleAdapter"
+ pod "Appodeal/YandexAdapter"
+
+ pod 'PersonalizedAdConsent', :git => 'https://github.com/MoNTE48/consent-sdk-ios'
end
post_install do |installer|
@@ -23,7 +39,7 @@ post_install do |installer|
config.build_settings['GCC_SYMBOL_PRIVATE_EXTERN'] = 'YES'
config.build_settings['GCC_UNROLL_LOOPS'] = 'YES'
config.build_settings['ENABLE_BITCODE'] = 'NO'
- config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
config.build_settings['OTHER_CFLAGS'] ||= ['-fvisibility=hidden', '-fdata-sections', '-ffunction-sections']
config.build_settings['OTHER_CPLUSPLUSFLAGS'] ||= ['$(OTHER_CFLAGS)']
config.build_settings['OTHER_LDFLAGS'] = ['-Wl,-dead_strip']
diff --git a/build/iOS/deps/freetype.sh b/build/iOS/deps/freetype.sh
index 20bd845b4..3a86c5e6a 100755
--- a/build/iOS/deps/freetype.sh
+++ b/build/iOS/deps/freetype.sh
@@ -1,7 +1,7 @@
#!/bin/bash -e
. sdk.sh
-FREETYPE_VERSION=2.10.0
+FREETYPE_VERSION=2.10.1
if [ ! -d freetype-src ]; then
wget http://download.savannah.gnu.org/releases/freetype/freetype-$FREETYPE_VERSION.tar.gz
diff --git a/games/default/files/creative/inventory.lua b/games/default/files/creative/inventory.lua
index 171fa8283..2c2041ee9 100644
--- a/games/default/files/creative/inventory.lua
+++ b/games/default/files/creative/inventory.lua
@@ -259,12 +259,10 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
if page == "all" then
local inv = player_inventory[player_name] or {}
local filter = inv.filter or ""
- if minetest.is_singleplayer() then
- formspec = formspec .. "field_close_on_enter[search;false]"..
- "field[5.31,1.27;4.0,0.75;!search;;"..filter.."]"
- else
- formspec = formspec .. "field_close_on_enter[search;false]"..
- "field[5.31,1.27;4.0,0.75;search;;"..filter.."]"..
+ formspec = formspec .. "field_close_on_enter[Dsearch;false]"..
+ "field[5.31,1.27;4.0,0.75;Dsearch;;"..filter.."]"
+ if PLATFORM == "Android" or PLATFORM == "iOS" or not minetest.is_singleplayer() then
+ formspec = formspec ..
"image_button[9.14,0.93;0.81,0.82;creative_search.png;creative_search;;;false]"
end
end
@@ -349,7 +347,7 @@ local function register_tab(name, title, group)
end
end
end
- inv.filter = fields.search and fields.search:lower() or ""
+ inv.filter = fields.Dsearch and fields.Dsearch:lower() or ""
if fields.build then
sfinv.set_page(player, "creative:blocks")
elseif fields.stairs then
@@ -374,11 +372,11 @@ local function register_tab(name, title, group)
sfinv.set_page(player, "creative:inv")
elseif fields.brew then
sfinv.set_page(player, "creative:brew")
- elseif fields.search and
+ elseif fields.Dsearch and
(fields.creative_search or
- fields.key_enter_field == "search") then
+ fields.key_enter_field == "Dsearch") then
inv.start_i = 0
- --inv.filter = fields.search:lower()
+ --inv.filter = fields.Dsearch:lower()
update_creative_inventory(player_name, name)
sfinv.set_player_inventory_formspec(player, context)
elseif not fields.quit then
diff --git a/games/default/files/signs/init.lua b/games/default/files/signs/init.lua
index 5c3ee0649..f89faa5ad 100644
--- a/games/default/files/signs/init.lua
+++ b/games/default/files/signs/init.lua
@@ -104,21 +104,21 @@ local function check_text(pos, wall)
end
minetest.register_lbm({
- label = "Check for sign text",
- name = "signs:sign_text",
- nodenames = {"signs:sign"},
- run_at_every_load = true,
- action = function(pos, node)
- check_text(pos, false)
- end,
+ label = "Check for sign text",
+ name = "signs:sign_text",
+ nodenames = {"signs:sign"},
+ run_at_every_load = true,
+ action = function(pos, node)
+ check_text(pos, false)
+ end,
})
minetest.register_lbm({
- label = "Check for sign text (Wall)",
- name = "signs:wall_sign_text",
- nodenames = {"signs:wall_sign"},
- run_at_every_load = true,
- action = function(pos, node)
+ label = "Check for sign text (Wall)",
+ name = "signs:wall_sign_text",
+ nodenames = {"signs:wall_sign"},
+ run_at_every_load = true,
+ action = function(pos, node)
check_text(pos, true)
end,
})
@@ -156,11 +156,7 @@ minetest.register_node("signs:sign", {
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
- if minetest.is_singleplayer() then
- meta:set_string("formspec", "field[!text;Enter your text:;${sign_text}]")
- else
- meta:set_string("formspec", "field[text;Enter your text:;${sign_text}]")
- end
+ meta:set_string("formspec", "field[Dtext;Enter your text:;${sign_text}]")
end,
on_destruct = function(pos)
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 0.5)) do
@@ -175,7 +171,7 @@ minetest.register_node("signs:sign", {
check_text(pos, false)
end,
on_receive_fields = function(pos, formname, fields, sender)
- if not fields.text then
+ if not fields.Dtext then
return
end
local p2 = minetest.get_node(pos).param2
@@ -187,7 +183,7 @@ minetest.register_node("signs:sign", {
local ent = obj:get_luaentity()
if ent and ent.name == "signs:sign_text" then
obj:set_properties(
- {textures = {signs.generate_sign_texture(fields.text), "blank.png"}
+ {textures = {signs.generate_sign_texture(fields.Dtext), "blank.png"}
})
obj:set_pos(vector.add(pos, signs.sign_positions[p2][1]))
obj:set_yaw(signs.sign_positions[p2][2])
@@ -198,12 +194,12 @@ minetest.register_node("signs:sign", {
local obj = minetest.add_entity(vector.add(pos,
signs.sign_positions[p2][1]), "signs:sign_text")
obj:set_properties({
- textures = {signs.generate_sign_texture(fields.text), "blank.png"}
+ textures = {signs.generate_sign_texture(fields.Dtext), "blank.png"}
})
obj:set_yaw(signs.sign_positions[p2][2])
end
local meta = minetest.get_meta(pos)
- meta:set_string("sign_text", fields.text)
+ meta:set_string("sign_text", fields.Dtext)
end,
groups = {oddly_breakable_by_hand = 1, choppy = 3, attached_node = 1},
})
@@ -223,11 +219,7 @@ minetest.register_node("signs:wall_sign", {
drop = "signs:sign",
on_construct = function(pos)
local meta = minetest.get_meta(pos)
- if minetest.is_singleplayer() then
- meta:set_string("formspec", "field[!text;Enter your text:;${sign_text}]")
- else
- meta:set_string("formspec", "field[text;Enter your text:;${sign_text}]")
- end
+ meta:set_string("formspec", "field[Dtext;Enter your text:;${sign_text}]")
end,
on_destruct = function(pos)
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 0.5)) do
@@ -242,7 +234,7 @@ minetest.register_node("signs:wall_sign", {
check_text(pos, true)
end,
on_receive_fields = function(pos, formname, fields, sender)
- if not fields.text then
+ if not fields.Dtext then
return
end
local p2 = minetest.get_node(pos).param2 - 2
@@ -254,7 +246,7 @@ minetest.register_node("signs:wall_sign", {
local ent = obj:get_luaentity()
if ent and ent.name == "signs:sign_text" then
obj:set_properties({
- textures = {signs.generate_sign_texture(fields.text), "blank.png"}
+ textures = {signs.generate_sign_texture(fields.Dtext), "blank.png"}
})
obj:set_pos(vector.add(pos, signs.wall_sign_positions[p2][1]))
obj:set_yaw(signs.wall_sign_positions[p2][2])
@@ -265,12 +257,12 @@ minetest.register_node("signs:wall_sign", {
local obj = minetest.add_entity(vector.add(pos,
signs.wall_sign_positions[p2][1]), "signs:sign_text")
obj:set_properties({
- textures = {signs.generate_sign_texture(fields.text), "blank.png"}
+ textures = {signs.generate_sign_texture(fields.Dtext), "blank.png"}
})
obj:set_yaw(signs.wall_sign_positions[p2][2])
end
local meta = minetest.get_meta(pos)
- meta:set_string("sign_text", fields.text)
+ meta:set_string("sign_text", fields.Dtext)
end,
groups = {oddly_breakable_by_hand = 1, choppy = 3,
not_in_creative_inventory = 1, attached_node = 1},
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 262e79f9c..8b9e3cd04 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -772,7 +772,7 @@ else()
if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os")
else()
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -fdata-sections -ffunction-sections -fvisibility=hidden -flto")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -fdata-sections -ffunction-sections -fvisibility=hidden")
endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
@@ -816,8 +816,8 @@ if(WIN32)
if(FREETYPE_DLL)
install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR})
endif()
- if(SQLITE3_DLL)
- install(FILES ${SQLITE3_DLL} DESTINATION ${BINDIR})
+ if(SQLITE3_DLL)
+ install(FILES ${SQLITE3_DLL} DESTINATION ${BINDIR})
endif()
if(LEVELDB_DLL)
install(FILES ${LEVELDB_DLL} DESTINATION ${BINDIR})
diff --git a/src/config.h b/src/config.h
index 7c2c7383a..12af9632e 100644
--- a/src/config.h
+++ b/src/config.h
@@ -17,8 +17,8 @@
#define PROJECT_NAME_C "MultiCraft"
#define STATIC_SHAREDIR ""
#define VERSION_MAJOR 1
- #define VERSION_MINOR 2
- #define VERSION_PATCH 2
+ #define VERSION_MINOR 3
+ #define VERSION_PATCH 0
#define VERSION_STRING STR(VERSION_MAJOR) "." STR(VERSION_MINOR) "." STR(VERSION_PATCH)
#endif
diff --git a/src/constants.h b/src/constants.h
index d9ebb88cd..9fc0de854 100644
--- a/src/constants.h
+++ b/src/constants.h
@@ -110,11 +110,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// TODO: implement dpi-based scaling for windows and remove this hack
#if defined(_WIN32)
-#define TTF_DEFAULT_FONT_SIZE (20)
+#define TTF_DEFAULT_FONT_SIZE (22)
#elif defined(__ANDROID__) || defined(__IOS__)
-#define TTF_DEFAULT_FONT_SIZE (16)
+#define TTF_DEFAULT_FONT_SIZE (15)
#else
-#define TTF_DEFAULT_FONT_SIZE (18)
+#define TTF_DEFAULT_FONT_SIZE (20)
#endif
#define DEFAULT_FONT_SIZE (10)
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index e5b62dc15..499059ee3 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -450,6 +450,8 @@ void set_default_settings(Settings *settings)
// iOS Settings
#ifdef __IOS__
settings->setDefault("debug_log_level", "none");
+ settings->setDefault("autosave_screensize", "false");
+
// set font_path
settings->setDefault("mono_font_path", g_settings->get("font_path"));
settings->setDefault("fallback_font_path", g_settings->get("font_path"));
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index d01dc729f..ff4f635cc 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -1006,9 +1006,7 @@ void GUIFormSpecMenu::parseSimpleField(parserData* data,
std::string label = parts[1];
std::string default_val = parts[2];
- bool is_dynamic = (name.length() > 0 && name[0] == '!');
- if (is_dynamic)
- name = name.substr(1);
+ bool is_dynamic = (name.length() > 0 && name[0] == 'D');
core::rect rect;
@@ -1100,9 +1098,7 @@ void GUIFormSpecMenu::parseTextArea(parserData* data, std::vector&
std::string label = parts[3];
std::string default_val = parts[4];
- bool is_dynamic = (name.length() > 0 && name[0] == '!');
- if (is_dynamic)
- name = name.substr(1);
+ bool is_dynamic = (name.length() > 0 && name[0] == 'D');
MY_CHECKPOS(type,0);
MY_CHECKGEOM(type,1);
@@ -3830,21 +3826,6 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
}
}
- if (event.GUIEvent.EventType == gui::EGET_EDITBOX_CHANGED) {
- if (event.GUIEvent.Caller->getID() > 257) {
- for (u32 i = 0; i < m_fields.size(); i++) {
- FieldSpec &s = m_fields[i];
- if (s.ftype == f_Unknown && s.is_dynamic &&
- s.fid == event.GUIEvent.Caller->getID()) {
- s.send = true;
- acceptInput();
- s.send = false;
- }
- }
- return true;
- }
- }
-
if (event.GUIEvent.EventType == gui::EGET_EDITBOX_ENTER) {
if (event.GUIEvent.Caller->getID() > 257) {
bool close_on_enter = true;
@@ -3875,18 +3856,19 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
}
}
- if (event.GUIEvent.EventType == gui::EGET_TABLE_CHANGED) {
+ if (event.GUIEvent.EventType == gui::EGET_TABLE_CHANGED || event.GUIEvent.EventType == gui::EGET_EDITBOX_CHANGED) {
int current_id = event.GUIEvent.Caller->getID();
if (current_id > 257) {
- // find the element that was clicked
+ // find the element that was clicked or changed
for (u32 i = 0; i < m_fields.size(); i++) {
FieldSpec &s = m_fields[i];
// if it's a table, set the send field
// so lua knows which table was changed
- if ((s.ftype == f_Table) && (s.fid == current_id)) {
+ if ((s.ftype == f_Table && s.fid == current_id) ||
+ (s.ftype == f_Unknown && s.is_dynamic && s.fid == current_id)) {
s.send = true;
acceptInput();
- s.send=false;
+ s.send = false;
}
}
return true;
diff --git a/src/main.cpp b/src/main.cpp
index 7d4fa6cb8..6f24fbb9e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -112,7 +112,11 @@ FileLogOutput file_log_output;
static OptionList allowed_options;
+#ifdef __IOS__
+int real_main(int argc, char *argv[])
+#else
int main(int argc, char *argv[])
+#endif
{
int retval;
debug_set_exception_handler();
diff --git a/src/porting_android.cpp b/src/porting_android.cpp
index 2ab24b414..9dee0e5f2 100644
--- a/src/porting_android.cpp
+++ b/src/porting_android.cpp
@@ -314,7 +314,6 @@ void notifyExitGame()
jnienv->CallVoidMethod(app_global->activity->clazz, notifyExit);
}
-#ifndef SERVER
float getDisplayDensity()
{
static bool firstrun = true;
@@ -364,5 +363,4 @@ v2u32 getDisplaySize()
}
return retval;
}
-#endif // ndef SERVER
}
diff --git a/src/porting_ios.cpp b/src/porting_ios.cpp
index 60f09af2e..8e048851f 100644
--- a/src/porting_ios.cpp
+++ b/src/porting_ios.cpp
@@ -28,40 +28,40 @@ with this program; if not, write to the Free Software Foundation, Inc.,
static void *uiviewcontroller;
namespace porting {
- void initializePathsiOS() {
- char buf[128];
+ void initializePathsiOS() {
+ char buf[128];
- ioswrap_paths(PATH_DOCUMENTS, buf, sizeof(buf));
- path_user = std::string(buf);
+ ioswrap_paths(PATH_DOCUMENTS, buf, sizeof(buf));
+ path_user = std::string(buf);
ioswrap_paths(PATH_LIBRARY_SUPPORT, buf, sizeof(buf));
path_share = std::string(buf);
path_locale = std::string(buf) + "/locale";
- ioswrap_paths(PATH_LIBRARY_CACHE, buf, sizeof(buf));
- path_cache = std::string(buf);
- }
+ ioswrap_paths(PATH_LIBRARY_CACHE, buf, sizeof(buf));
+ path_cache = std::string(buf);
+ }
- void copyAssets() {
+ void copyAssets() {
ioswrap_assets();
+ }
+
+ float getDisplayDensity() {
+ return 1;
+ }
+
+ v2u32 getDisplaySize() {
+ static bool firstrun = true;
+ static v2u32 retval;
+
+ if(firstrun) {
+ unsigned int values[2];
+ ioswrap_size(values);
+ retval.X = values[0];
+ retval.Y = values[1];
+ firstrun = false;
}
- float getDisplayDensity() {
- return 1.0;
- }
-
- v2u32 getDisplaySize() {
- static bool firstrun = true;
- static v2u32 retval;
-
- if(firstrun) {
- unsigned int values[2];
- ioswrap_size(values);
- retval.X = values[0];
- retval.Y = values[1];
- firstrun = false;
- }
-
- return retval;
- }
+ return retval;
+ }
void setViewController(void *v) {
uiviewcontroller = v;
@@ -96,11 +96,11 @@ namespace porting {
}
}
-extern int main(int argc, char *argv[]);
+extern int real_main(int argc, char *argv[]);
void irrlicht_main() {
static const char *args[] = {
PROJECT_NAME,
};
- main(1, (char**) args);
+ real_main(1, (char**) args);
}
diff --git a/src/porting_ios.h b/src/porting_ios.h
index 3a1363bcb..085b38753 100644
--- a/src/porting_ios.h
+++ b/src/porting_ios.h
@@ -37,7 +37,7 @@ namespace porting {
void setViewController(void *v);
void showInputDialog(const std::string &acceptButton, const std::string &hint,
- const std::string ¤t, int editType);
+ const std::string ¤t, int editType);
int getInputDialogState();
std::string getInputDialogValue();