Minor changes and fixes

master
Maksim 2022-08-06 23:03:24 +02:00
parent c658140b4b
commit bd4b420ccd
16 changed files with 44 additions and 21 deletions

View File

@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 32
compileSdkVersion 33
buildToolsVersion '33.0.0'
ndkVersion '23.2.8568313'
ndkVersion '25.0.8775105'
defaultConfig {
applicationId 'com.multicraft.game'
minSdkVersion 21
targetSdkVersion 32
targetSdkVersion 33
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode project.versionCode
}
@ -136,7 +136,7 @@ dependencies {
/* Third-party libraries */
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.appcompat:appcompat-resources:1.4.2'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'com.google.android.material:material:1.6.1'
}

View File

@ -28,6 +28,7 @@
<application
android:allowBackup="true"
android:enableOnBackInvokedCallback="false"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"

View File

@ -16,7 +16,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.2.2'
//noinspection GradleDependency
classpath 'de.undercouch:gradle-download-task:4.1.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10'

View File

@ -1,6 +1,6 @@
#Wed May 25 12:00:00 EET 2022
#Sat Aug 06 23:06:48 CEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
apply plugin: 'de.undercouch.download'
android {
compileSdkVersion 32
compileSdkVersion 33
buildToolsVersion '33.0.0'
ndkVersion '23.2.8568313'
ndkVersion '25.0.8775105'
defaultConfig {
minSdkVersion 21
targetSdkVersion 32
targetSdkVersion 33
externalNativeBuild {
ndkBuild {
arguments '-j' + Runtime.getRuntime().availableProcessors(),

View File

@ -2152,6 +2152,7 @@
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_UNROLL_LOOPS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
@ -2186,6 +2187,7 @@
GCC_OPTIMIZATION_LEVEL = 3;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_UNROLL_LOOPS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;

View File

@ -29,7 +29,7 @@
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 Maksym Hamarnyk. All rights reserved.</string>
<string>Copyright © 2022 MultiCraft Studio OÜ. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticTermination</key>

View File

@ -15,6 +15,7 @@ post_install do |installer|
config.build_settings['GCC_SYMBOL_PRIVATE_EXTERN'] = 'YES'
config.build_settings['GCC_UNROLL_LOOPS'] = 'YES'
config.build_settings['LLVM_LTO'] = 'YES'
config.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.11'
config.build_settings['OTHER_CFLAGS'] = ['$(inherited)', '-fvisibility-inlines-hidden', '-fdata-sections', '-ffunction-sections', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']

View File

@ -1,7 +1,7 @@
#!/bin/bash -e
. sdk.sh
OPENAL_VERSION=1.22.0
OPENAL_VERSION=1.22.2
if [ ! -d openal-src ]; then
wget https://github.com/kcat/openal-soft/archive/$OPENAL_VERSION.tar.gz

View File

@ -344,7 +344,6 @@ end
hud.register("hunger", {
hud_elem_type = "statbar",
position = {x = 0.5, y = 1},
alignment = {x = -1, y = -1},
offset = {x = 8, y = -94},
size = {x = 24, y = 24},
text = "hunger.png",

View File

@ -5,7 +5,6 @@ local disable_health = false
local health_bar_definition = {
hud_elem_type = "statbar",
position = {x = 0.5, y = 1},
alignment = {x = -1, y = -1},
offset = {x = -247, y = -94},
size = {x = 24, y = 24},
text = "heart.png",
@ -16,7 +15,6 @@ local health_bar_definition = {
local breath_bar_definition = {
hud_elem_type = "statbar",
position = {x = 0.5, y = 1},
alignment = {x = -1, y = -1},
offset = {x = 8, y = -120},
size = {x = 24, y = 24},
text = "bubble.png",

View File

@ -1415,7 +1415,11 @@ bool Game::createClient(const GameStartData &start_data)
/* Pre-calculated values
*/
#ifndef HAVE_TOUCHSCREENGUI
video::ITexture *t = texture_src->getTexture("crack_anylength.png");
#else
video::ITexture *t = texture_src->getTexture("crack_anylength_touch.png");
#endif
if (t) {
v2u32 size = t->getOriginalSize();
crack_animation_length = size.Y / size.X;
@ -4546,7 +4550,6 @@ extern "C" void external_statustext(const char *text)
{
if (!g_game)
return;
std::wstring s = utf8_to_wide(std::string(text));
g_game->customStatustext(s);
g_game->customStatustext(utf8_to_wide_c(text));
}
#endif

View File

@ -1038,10 +1038,15 @@ bool hasNPotSupport()
return supported;
}
#else
// gles3 has NPotSupport, but this is using too many resources
// gles3 has NPotSupport and used on iOS by default
bool hasNPotSupport()
{
#ifdef __IOS__
static const std::string &driverstring = g_settings->get("video_driver");
return (driverstring != "ogles1");
#else
return false;
#endif
}
#endif
@ -1247,7 +1252,7 @@ bool TextureSource::generateImagePart(std::string part_of_name,
It is an image with a number of cracking stages
horizontally tiled.
*/
#ifndef HAVE_TOUCHSCREENGUI
#ifndef HAVE_TOUCHSCREENGUI
video::IImage *img_crack = m_sourcecache.getOrLoad(
"crack_anylength.png");
#else

View File

@ -56,12 +56,16 @@ void sanity_check_fn(const char *assertion, const char *file,
errorstream << file << ":" << line << ": " << function
<< ": An engine assumption '" << assertion << "' failed." << std::endl;
#ifdef __ANDROID__
#if defined(__ANDROID__) || defined(__IOS__)
std::string capture = "An engine assumption failed: \"" + std::string(assertion) +
"\" in file: " + std::string(file) + ":" + std::to_string(line) +
" (" + std::string(function) + ")";
#ifdef __ANDROID__
porting::finishGame(capture);
#elif defined(__IOS__)
ioswrap_finish_game(capture.c_str());
#endif
#else
abort();
#endif
@ -79,12 +83,16 @@ void fatal_error_fn(const char *msg, const char *file,
errorstream << file << ":" << line << ": " << function
<< ": A fatal error occurred: " << msg << std::endl;
#ifdef __ANDROID__
#if defined(__ANDROID__) || defined(__IOS__)
std::string capture = "A fatal error occurred: \"" + std::string(msg) +
"\" in file: " + std::string(file) + ":" + std::to_string(line) +
" (" + std::string(function) + ")";
#ifdef __ANDROID__
porting::finishGame(capture);
#elif defined(__IOS__)
ioswrap_finish_game(capture.c_str());
#endif
#else
abort();
#endif

View File

@ -718,6 +718,12 @@ void set_default_settings()
// iPad
settings->setDefault("mouse_sensitivity", "0.3");
settings->setDefault("selectionbox_width", "6");
if SDVersion12and9Inch {
std::string font_big = std::to_string(TTF_DEFAULT_FONT_SIZE + 1);
settings->setDefault("font_size", font_big);
settings->setDefault("fallback_font_size", font_big);
}
}
// Settings for the Rounded Screen and Home Bar

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 352 B