diff --git a/Readme.md b/Readme.md index 2311b76..6e241f2 100644 --- a/Readme.md +++ b/Readme.md @@ -203,3 +203,26 @@ CPack Error: Cannot initialize the generator NSIS То нужно установить nsis отсюда: https://nsis.sourceforge.io/Download + +# Steam windows + +``` +cmake -DSTEAMSDK=ON .. +cmake --build . --config Release +``` + + +# Steam Linux + +``` +docker run -it --rm -v "${PWD}:/work2" -w /work2 registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest bash + + +apt-get update +apt-get install libboost-dev libeigen3-dev liblua5.4-dev libzip-dev libglu1-mesa-dev + + +cmake -DSTEAMSDK=ON -DCMAKE_BUILD_TYPE=Release .. +cmake --build . -j 4 + +``` diff --git a/optimize_android_resources.py b/optimize_android_resources.py new file mode 100644 index 0000000..88afd0a --- /dev/null +++ b/optimize_android_resources.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python3 +""" +optimize_web_resources.py - Resize PNG images for the web build. + +Copies to /resources/, then downscales all PNG files: + - resources/w/ui/img/** -> 1/8 original size + - all other PNGs -> 1/4 original size + +Files listed in EXCEPTIONS are copied unchanged. + +Usage (manual): + python optimize_web_resources.py [--src resources] [--dst web_resources] + +Usage (CMake): + ${Python3_EXECUTABLE} optimize_web_resources.py --src --dst +""" + +import argparse +import os +import shutil + +try: + from PIL import Image +except ImportError: + raise SystemExit("Pillow is required: pip install Pillow") + +# Paths relative to the resources directory — these files are never resized. +EXCEPTIONS = { + "loading.png", + "loading_land003_en.png", + "loading_land003_ru.png", + "black.png", + "transparent.png", + "w/blue.png", + "w/red.png", + "w/spark.png", + "w/star.png", + "w/star_red.png", + "w/white.png", + "w/ui/img/main/aboutPage003android.png", + "w/ui_en/img/main/aboutPage003android.png" +} + +# Path prefixes (relative to resources root, forward-slash) that get 8x reduction. +HIGH_REDUCTION_PREFIXES = ( + "w/ui/img", +) + +LOW_REDUCTION_POSTFIXES = ( + "texAtlas002.png", + "Building_work014.png", + "Building_Floors_tex004.png", + "Building_Walls_tex006.png", + "asphalt003small.png", + "Ext_Building004.png", + "Plane3_tex002.png", + "darklands_building002.png", + "Staircase001.png", + "Staircase_Obj002.png" +) + +def _resize_factor(rel: str) -> int: + norm = rel.replace("\\", "/") + for prefix in HIGH_REDUCTION_PREFIXES: + if norm.startswith(prefix): + return 4 + for prefix in LOW_REDUCTION_POSTFIXES: + if norm.endswith(prefix): + return 1 + return 4 + + +def _next_pot(n: int) -> int: + if n < 1: + return 1 + p = 1 + while p < n: + p <<= 1 + return p + + +def optimize(src_dir: str, dst_parent: str) -> None: + src_dir = os.path.abspath(src_dir) + dst_resources = os.path.join(os.path.abspath(dst_parent), "resources") + + print(f"Copying {src_dir} -> {dst_resources}") + if os.path.exists(dst_resources): + shutil.rmtree(dst_resources) + shutil.copytree(src_dir, dst_resources) + + total = 0 + for root, _dirs, files in os.walk(dst_resources): + for filename in files: + if not filename.lower().endswith(".png"): + continue + + full_path = os.path.join(root, filename) + rel = os.path.relpath(full_path, dst_resources).replace("\\", "/") + + if rel in EXCEPTIONS: + print(f" skip (exception): {rel}") + continue + + factor = _resize_factor(rel) + + with Image.open(full_path) as img: + orig_w, orig_h = img.size + new_w = _next_pot(max(1, orig_w // factor)) + new_h = _next_pot(max(1, orig_h // factor)) + resized = img.resize((new_w, new_h), Image.LANCZOS) + resized.save(full_path) + + print(f" {rel}: {orig_w}x{orig_h} -> {new_w}x{new_h} (/{factor} + POT)") + total += 1 + + print(f"Done. Resized {total} PNG file(s).") + + +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", + help="Destination parent directory; will contain a 'resources' subdir " + "(default: web_resources)") + args = parser.parse_args() + optimize(args.src, args.dst) diff --git a/proj-android/.gitignore b/proj-android/.gitignore index afac031..5073fe3 100644 --- a/proj-android/.gitignore +++ b/proj-android/.gitignore @@ -61,6 +61,5 @@ app/jni/libpng app/jni/SDL app/jni/zlib -app/src/main/assets/resources -app/src/main/assets/audio +app/src/main/assets diff --git a/proj-android/app/build.gradle b/proj-android/app/build.gradle index 2550a71..6dd3d54 100644 --- a/proj-android/app/build.gradle +++ b/proj-android/app/build.gradle @@ -1,4 +1,4 @@ -def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY'); +def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY') def buildAsApplication = !buildAsLibrary if (buildAsApplication) { apply plugin: 'com.android.application' @@ -15,8 +15,8 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 37 - versionCode 1 - versionName "1.0" + versionCode 3 + versionName "1.0.6" externalNativeBuild { /*ndkBuild { arguments "APP_PLATFORM=android-19" @@ -31,7 +31,10 @@ android { } buildTypes { release { - minifyEnabled false + // Enables code optimizations. + minifyEnabled = true + // Enables resource shrinking. + shrinkResources = true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } diff --git a/proj-android/app/proguard-rules.pro b/proj-android/app/proguard-rules.pro index e4dda64..2743ac0 100644 --- a/proj-android/app/proguard-rules.pro +++ b/proj-android/app/proguard-rules.pro @@ -16,18 +16,21 @@ # public *; #} --keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLInputConnection { +# SDL2 specific rules +-keep class org.libsdl.app.** { *; } + +-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLInputConnection { void nativeCommitText(java.lang.String, int); void nativeGenerateScancodeForUnichar(char); } --keep,includedescriptorclasses class fishrungames.shadowoverbishkek.SDLActivity { +-keep,includedescriptorclasses class org.libsdl.app.SDLActivity { # for some reason these aren't compatible with allowoptimization modifier boolean supportsRelativeMouse(); void setWindowStyle(boolean); } --keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLActivity { +-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLActivity { java.lang.String nativeGetHint(java.lang.String); # Java-side doesn't use this, so it gets minified, but C-side still tries to register it boolean onNativeSoftReturnKey(); void onNativeKeyboardFocusLost(); @@ -62,7 +65,7 @@ boolean showTextInput(int, int, int, int); } --keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.HIDDeviceManager { +-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager { boolean initialize(boolean, boolean); boolean openDevice(int); int sendOutputReport(int, byte[]); @@ -71,7 +74,7 @@ void closeDevice(int); } --keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLAudioManager { +-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLAudioManager { int[] getAudioOutputDevices(); int[] getAudioInputDevices(); int[] audioOpen(int, int, int, int, int); @@ -90,9 +93,12 @@ native void addAudioDevice(boolean, int); } --keep,includedescriptorclasses,allowoptimization class fishrungames.shadowoverbishkek.SDLControllerManager { +-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager { void pollInputDevices(); void pollHapticDevices(); void hapticRun(int, float, int); void hapticStop(int); } + +# Keep our main activity +-keep class fishrungames.shadowoverbishkek.ShadowOverBishkekActivity { *; } diff --git a/proj-android/gradle.properties b/proj-android/gradle.properties index f9aa32d..ce16203 100644 --- a/proj-android/gradle.properties +++ b/proj-android/gradle.properties @@ -19,7 +19,7 @@ android.r8.strictFullModeForKeepRules=false android.sdk.defaultTargetSdkToCompileSdkIfUnset=false android.uniquePackageNames=false android.usesSdkInManifest.disallowed=false -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx4096m android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. diff --git a/proj-windows/CMakeLists.txt b/proj-windows/CMakeLists.txt index 6bbd50b..d3c9678 100644 --- a/proj-windows/CMakeLists.txt +++ b/proj-windows/CMakeLists.txt @@ -302,7 +302,7 @@ set(CPACK_PACKAGE_VENDOR "Fish Run Games") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Shadow Over Bishkek Demo Version") set(CPACK_PACKAGE_VERSION_MAJOR "1") set(CPACK_PACKAGE_VERSION_MINOR "0") -set(CPACK_PACKAGE_VERSION_PATCH "3") +set(CPACK_PACKAGE_VERSION_PATCH "5") set(CPACK_PACKAGE_INSTALL_DIRECTORY "Fish Run Games/Shadow Over Bishkek Demo") diff --git a/resources/e/car004.txt.bin b/resources/e/car004.txt.bin index e954de2..3301cac 100644 Binary files a/resources/e/car004.txt.bin and b/resources/e/car004.txt.bin differ diff --git a/resources/e/car_wheel001.txt.bin b/resources/e/car_wheel001.txt.bin index f5ebaba..77f6f8e 100644 Binary files a/resources/e/car_wheel001.txt.bin and b/resources/e/car_wheel001.txt.bin differ diff --git a/resources/w/Cube_001.txt.bin b/resources/w/Cube_001.txt.bin index bcec07a..d562e94 100644 Binary files a/resources/w/Cube_001.txt.bin and b/resources/w/Cube_001.txt.bin differ diff --git a/resources/w/dorm2/BedBlanket_001.txt.bin b/resources/w/dorm2/BedBlanket_001.txt.bin index cd069fb..cbcf03b 100644 Binary files a/resources/w/dorm2/BedBlanket_001.txt.bin and b/resources/w/dorm2/BedBlanket_001.txt.bin differ diff --git a/resources/w/dorm2/BedHeadboard_001.txt.bin b/resources/w/dorm2/BedHeadboard_001.txt.bin index 7c5588b..7b7d648 100644 Binary files a/resources/w/dorm2/BedHeadboard_001.txt.bin and b/resources/w/dorm2/BedHeadboard_001.txt.bin differ diff --git a/resources/w/dorm2/BedMattress_001.txt.bin b/resources/w/dorm2/BedMattress_001.txt.bin index 96fe06b..fd0a280 100644 Binary files a/resources/w/dorm2/BedMattress_001.txt.bin and b/resources/w/dorm2/BedMattress_001.txt.bin differ diff --git a/resources/w/dorm2/BedPillow_001.txt.bin b/resources/w/dorm2/BedPillow_001.txt.bin index c1caff2..561d89d 100644 Binary files a/resources/w/dorm2/BedPillow_001.txt.bin and b/resources/w/dorm2/BedPillow_001.txt.bin differ diff --git a/resources/w/dorm2/Building_Caps_001.txt.bin b/resources/w/dorm2/Building_Caps_001.txt.bin index d29b03a..d12fea0 100644 Binary files a/resources/w/dorm2/Building_Caps_001.txt.bin and b/resources/w/dorm2/Building_Caps_001.txt.bin differ diff --git a/resources/w/dorm2/Building_Floors_001.txt.bin b/resources/w/dorm2/Building_Floors_001.txt.bin index eca44b2..c849677 100644 Binary files a/resources/w/dorm2/Building_Floors_001.txt.bin and b/resources/w/dorm2/Building_Floors_001.txt.bin differ diff --git a/resources/w/dorm2/Building_Walls_001.txt.bin b/resources/w/dorm2/Building_Walls_001.txt.bin index 69032ca..39f2e61 100644 Binary files a/resources/w/dorm2/Building_Walls_001.txt.bin and b/resources/w/dorm2/Building_Walls_001.txt.bin differ diff --git a/resources/w/dorm2/Chair001_001.txt.bin b/resources/w/dorm2/Chair001_001.txt.bin index 525564d..4eb873e 100644 Binary files a/resources/w/dorm2/Chair001_001.txt.bin and b/resources/w/dorm2/Chair001_001.txt.bin differ diff --git a/resources/w/dorm2/D_All_004.txt.bin b/resources/w/dorm2/D_All_004.txt.bin index 92915b8..38a7a10 100644 Binary files a/resources/w/dorm2/D_All_004.txt.bin and b/resources/w/dorm2/D_All_004.txt.bin differ diff --git a/resources/w/dorm2/D_Music_004.txt.bin b/resources/w/dorm2/D_Music_004.txt.bin index e236ec4..3a8d035 100644 Binary files a/resources/w/dorm2/D_Music_004.txt.bin and b/resources/w/dorm2/D_Music_004.txt.bin differ diff --git a/resources/w/dorm2/Door_Bath_-1_-1_1_Leaf_002.txt.bin b/resources/w/dorm2/Door_Bath_-1_-1_1_Leaf_002.txt.bin index b8949e8..9161742 100644 Binary files a/resources/w/dorm2/Door_Bath_-1_-1_1_Leaf_002.txt.bin and b/resources/w/dorm2/Door_Bath_-1_-1_1_Leaf_002.txt.bin differ diff --git a/resources/w/dorm2/Door_Bath_-1_1_1_Leaf_002.txt.bin b/resources/w/dorm2/Door_Bath_-1_1_1_Leaf_002.txt.bin index b8949e8..9161742 100644 Binary files a/resources/w/dorm2/Door_Bath_-1_1_1_Leaf_002.txt.bin and b/resources/w/dorm2/Door_Bath_-1_1_1_Leaf_002.txt.bin differ diff --git a/resources/w/dorm2/Door_Frame_All_002.txt.bin b/resources/w/dorm2/Door_Frame_All_002.txt.bin index f03a81a..8aa7035 100644 Binary files a/resources/w/dorm2/Door_Frame_All_002.txt.bin and b/resources/w/dorm2/Door_Frame_All_002.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_-1_-1_0_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_-1_-1_0_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_-1_-1_0_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_-1_-1_0_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_-1_-1_1_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_-1_-1_1_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_-1_-1_1_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_-1_-1_1_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_-1_1_0_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_-1_1_0_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_-1_1_0_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_-1_1_0_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_-1_1_1_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_-1_1_1_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_-1_1_1_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_-1_1_1_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_1_-1_0_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_1_-1_0_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_1_-1_0_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_1_-1_0_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_1_-1_1_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_1_-1_1_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_1_-1_1_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_1_-1_1_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_1_1_0_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_1_1_0_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_1_1_0_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_1_1_0_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Room_1_1_1_Leaf_001.txt.bin b/resources/w/dorm2/Door_Room_1_1_1_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Room_1_1_1_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Room_1_1_1_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Utility_-1_-1_2_Leaf_001.txt.bin b/resources/w/dorm2/Door_Utility_-1_-1_2_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Utility_-1_-1_2_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Utility_-1_-1_2_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Utility_-1_1_2_Leaf_001.txt.bin b/resources/w/dorm2/Door_Utility_-1_1_2_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Utility_-1_1_2_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Utility_-1_1_2_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Utility_1_-1_2_Leaf_001.txt.bin b/resources/w/dorm2/Door_Utility_1_-1_2_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Utility_1_-1_2_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Utility_1_-1_2_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Door_Utility_1_1_2_Leaf_001.txt.bin b/resources/w/dorm2/Door_Utility_1_1_2_Leaf_001.txt.bin index 848c790..7826a3d 100644 Binary files a/resources/w/dorm2/Door_Utility_1_1_2_Leaf_001.txt.bin and b/resources/w/dorm2/Door_Utility_1_1_2_Leaf_001.txt.bin differ diff --git a/resources/w/dorm2/Dorm_Bench_001.txt.bin b/resources/w/dorm2/Dorm_Bench_001.txt.bin index 984f78b..ea062dd 100644 Binary files a/resources/w/dorm2/Dorm_Bench_001.txt.bin and b/resources/w/dorm2/Dorm_Bench_001.txt.bin differ diff --git a/resources/w/dorm2/Dorm_TableLegs_001.txt.bin b/resources/w/dorm2/Dorm_TableLegs_001.txt.bin index be97b00..026d851 100644 Binary files a/resources/w/dorm2/Dorm_TableLegs_001.txt.bin and b/resources/w/dorm2/Dorm_TableLegs_001.txt.bin differ diff --git a/resources/w/dorm2/Dorm_TableTop_001.txt.bin b/resources/w/dorm2/Dorm_TableTop_001.txt.bin index fbe8d39..1f044bb 100644 Binary files a/resources/w/dorm2/Dorm_TableTop_001.txt.bin and b/resources/w/dorm2/Dorm_TableTop_001.txt.bin differ diff --git a/resources/w/dorm2/Drawer_001.txt.bin b/resources/w/dorm2/Drawer_001.txt.bin index 4871588..c7d64aa 100644 Binary files a/resources/w/dorm2/Drawer_001.txt.bin and b/resources/w/dorm2/Drawer_001.txt.bin differ diff --git a/resources/w/dorm2/DryingRack_001.txt.bin b/resources/w/dorm2/DryingRack_001.txt.bin index e464515..40e7897 100644 Binary files a/resources/w/dorm2/DryingRack_001.txt.bin and b/resources/w/dorm2/DryingRack_001.txt.bin differ diff --git a/resources/w/dorm2/Entrance_Door_002.txt.bin b/resources/w/dorm2/Entrance_Door_002.txt.bin index d967439..d1073c6 100644 Binary files a/resources/w/dorm2/Entrance_Door_002.txt.bin and b/resources/w/dorm2/Entrance_Door_002.txt.bin differ diff --git a/resources/w/dorm2/Entrance_Step_003.txt.bin b/resources/w/dorm2/Entrance_Step_003.txt.bin index ed06123..b47fe80 100644 Binary files a/resources/w/dorm2/Entrance_Step_003.txt.bin and b/resources/w/dorm2/Entrance_Step_003.txt.bin differ diff --git a/resources/w/dorm2/Env_CurbOuter_Back_002.txt.bin b/resources/w/dorm2/Env_CurbOuter_Back_002.txt.bin index beea4f4..f3c35bd 100644 Binary files a/resources/w/dorm2/Env_CurbOuter_Back_002.txt.bin and b/resources/w/dorm2/Env_CurbOuter_Back_002.txt.bin differ diff --git a/resources/w/dorm2/Env_DummyBld_Right_001.txt.bin b/resources/w/dorm2/Env_DummyBld_Right_001.txt.bin index cffdf6b..ab26486 100644 Binary files a/resources/w/dorm2/Env_DummyBld_Right_001.txt.bin and b/resources/w/dorm2/Env_DummyBld_Right_001.txt.bin differ diff --git a/resources/w/dorm2/Env_Lamp_Back_1_001.txt.bin b/resources/w/dorm2/Env_Lamp_Back_1_001.txt.bin index e3c68d7..b3ba8ad 100644 Binary files a/resources/w/dorm2/Env_Lamp_Back_1_001.txt.bin and b/resources/w/dorm2/Env_Lamp_Back_1_001.txt.bin differ diff --git a/resources/w/dorm2/Env_Lawn_001.txt.bin b/resources/w/dorm2/Env_Lawn_001.txt.bin index 941d117..2b34319 100644 Binary files a/resources/w/dorm2/Env_Lawn_001.txt.bin and b/resources/w/dorm2/Env_Lawn_001.txt.bin differ diff --git a/resources/w/dorm2/Env_Pathway_002.txt.bin b/resources/w/dorm2/Env_Pathway_002.txt.bin index cb70ca9..01ad5e7 100644 Binary files a/resources/w/dorm2/Env_Pathway_002.txt.bin and b/resources/w/dorm2/Env_Pathway_002.txt.bin differ diff --git a/resources/w/dorm2/Env_Road_001.txt.bin b/resources/w/dorm2/Env_Road_001.txt.bin index e7f767c..e2f95c5 100644 Binary files a/resources/w/dorm2/Env_Road_001.txt.bin and b/resources/w/dorm2/Env_Road_001.txt.bin differ diff --git a/resources/w/dorm2/Env_Sidewalk_Front_001.txt.bin b/resources/w/dorm2/Env_Sidewalk_Front_001.txt.bin index fbfed7f..6271151 100644 Binary files a/resources/w/dorm2/Env_Sidewalk_Front_001.txt.bin and b/resources/w/dorm2/Env_Sidewalk_Front_001.txt.bin differ diff --git a/resources/w/ui/screen_main_menu.json b/resources/w/ui/screen_main_menu.json index 0f87ac2..190f6b2 100644 --- a/resources/w/ui/screen_main_menu.json +++ b/resources/w/ui/screen_main_menu.json @@ -125,7 +125,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.4", + "text": "v. 1.0.6", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui/screen_main_menu_android.json b/resources/w/ui/screen_main_menu_android.json index 7abc234..f95fab8 100644 --- a/resources/w/ui/screen_main_menu_android.json +++ b/resources/w/ui/screen_main_menu_android.json @@ -116,7 +116,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.4", + "text": "v. 1.0.6", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui_en/screen_main_menu.json b/resources/w/ui_en/screen_main_menu.json index 84021bd..c0a61e9 100644 --- a/resources/w/ui_en/screen_main_menu.json +++ b/resources/w/ui_en/screen_main_menu.json @@ -125,7 +125,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.4", + "text": "v. 1.0.6", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui_en/screen_main_menu_android.json b/resources/w/ui_en/screen_main_menu_android.json index 21a267f..e84793b 100644 --- a/resources/w/ui_en/screen_main_menu_android.json +++ b/resources/w/ui_en/screen_main_menu_android.json @@ -125,7 +125,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 1.0.4", + "text": "v. 1.0.6", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/src/Environment.cpp b/src/Environment.cpp index f9532b9..f714cfd 100644 --- a/src/Environment.cpp +++ b/src/Environment.cpp @@ -23,6 +23,7 @@ int Environment::height = CONST_DEFAULT_HEIGHT; float Environment::zoom = DEFAULT_ZOOM; bool Environment::enableLogging = false; +//bool Environment::enableLogging = true; SDL_Window* Environment::window = nullptr; diff --git a/src/Game.cpp b/src/Game.cpp index a4f8ade..249b77d 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -101,12 +101,16 @@ namespace FRG FRG::BindOpenGlFunctions(); FRG::CheckGlError(__FILE__, __LINE__); renderer.InitOpenGL(); + //logger() << "Android test step 1 " << std::endl; -#if defined(EMSCRIPTEN) +#if defined(EMSCRIPTEN) || defined(__ANDROID__) // These shaders and loading.png are preloaded separately (not from zip), // so they are available immediately without waiting for resources.zip. + //logger() << "Android test step 1 " << std::endl; renderer.shaderManager.AddShaderFromFiles("defaultColor", "resources/shaders/defaultColor.vertex", "resources/shaders/defaultColor_web.fragment", ""); + //logger() << "Android test step 2 " << std::endl; renderer.shaderManager.AddShaderFromFiles("default", "resources/shaders/default.vertex", "resources/shaders/default_web.fragment", ""); + //logger() << "Android test step 3 " << std::endl; #elif defined(__linux__) renderer.shaderManager.AddShaderFromFiles("defaultColor", "resources/shaders/defaultColor.vertex", "resources/shaders/defaultColor_desktop.fragment", CONST_ZIP_FILE); renderer.shaderManager.AddShaderFromFiles("default", "resources/shaders/default.vertex", "resources/shaders/default_desktop.fragment", CONST_ZIP_FILE); @@ -116,12 +120,13 @@ namespace FRG renderer.shaderManager.AddShaderFromFiles("default", "resources/shaders/default.vertex", "resources/shaders/default_desktop.fragment", CONST_ZIP_FILE); #endif loadingTexture = renderer.textureManager.LoadFromPng("resources/loading.png", ""); - + //logger() << "Android test step 4 " << std::endl; loadingProgressBarFrameTexture = renderer.textureManager.LoadFromPng( "resources/loadingProgressBarFrame.png", "", true); loadingProgressBarTexture = renderer.textureManager.LoadFromPng( "resources/loadingProgressBar.png", "", true); + //logger() << "Android test step 5 " << std::endl; float minDimension; float width = Environment::projectionWidth; float height = Environment::projectionHeight; @@ -1941,4 +1946,4 @@ namespace FRG } } -} // namespace FRG \ No newline at end of file +} // namespace \ No newline at end of file