Resize Android even more, fixing crash when changing languages on Android

This commit is contained in:
Vladislav Khorev 2026-08-01 20:18:18 +03:00
parent 5cbe7a345e
commit a11c4614ea
7 changed files with 13 additions and 12 deletions

2
.gitignore vendored
View File

@ -409,7 +409,7 @@ web_resources/
pc_resources/
resources_hd/
web_resources_x2/
android_resources/
.artifacts/

View File

@ -38,7 +38,8 @@ EXCEPTIONS = {
"w/star_red.png",
"w/white.png",
"w/ui/img/main/aboutPage003android.png",
"w/ui_en/img/main/aboutPage003android.png"
"w/ui_en/img/main/aboutPage003android.png",
"w/exterior/texAtlas002.png",
}
# Path prefixes (relative to resources root, forward-slash) that get 8x reduction.
@ -63,10 +64,10 @@ def _resize_factor(rel: str) -> int:
norm = rel.replace("\\", "/")
for prefix in HIGH_REDUCTION_PREFIXES:
if norm.startswith(prefix):
return 4
return 8
for prefix in LOW_REDUCTION_POSTFIXES:
if norm.endswith(prefix):
return 1
return 2
return 4
@ -120,8 +121,8 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Optimize PNG images for web build")
parser.add_argument("--src", default="resources",
help="Source resources directory (default: resources)")
parser.add_argument("--dst", default="web_resources",
parser.add_argument("--dst", default="android_resources",
help="Destination parent directory; will contain a 'resources' subdir "
"(default: web_resources)")
"(default: android_resources)")
args = parser.parse_args()
optimize(args.src, args.dst)

View File

@ -15,8 +15,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 37
versionCode 3
versionName "1.0.6"
versionCode 4
versionName "1.0.7"
externalNativeBuild {
/*ndkBuild {
arguments "APP_PLATFORM=android-19"

View File

@ -125,7 +125,7 @@
"y": 10,
"width": 160,
"height": 36,
"text": "v. 1.0.6",
"text": "v. 1.0.7",
"fontSize": 24,
"textCentered": false,
"topAligned": true,

View File

@ -116,7 +116,7 @@
"y": 10,
"width": 160,
"height": 36,
"text": "v. 1.0.6",
"text": "v. 1.0.7",
"fontSize": 24,
"textCentered": false,
"topAligned": true,

View File

@ -125,7 +125,7 @@
"y": 10,
"width": 160,
"height": 36,
"text": "v. 1.0.6",
"text": "v. 1.0.7",
"fontSize": 24,
"textCentered": false,
"topAligned": true,

View File

@ -125,7 +125,7 @@
"y": 10,
"width": 160,
"height": 36,
"text": "v. 1.0.6",
"text": "v. 1.0.7",
"fontSize": 24,
"textCentered": false,
"topAligned": true,