Browse Source

Merge branch 'master' into access

access
Anders Jenbo 2 months ago committed by GitHub
parent
commit
29b98b5220
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      .github/workflows/macOS_arm64.yml
  2. 4
      .github/workflows/macOS_x86_64.yml
  3. 34
      README.md
  4. 1
      Source/engine/render/text_render.cpp
  5. 14
      Translations/fi.po
  6. 2330
      Translations/ja.po
  7. 43
      android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java

4
.github/workflows/macOS_arm64.yml

@ -38,8 +38,8 @@ jobs:
uses: actions/cache@v5
with:
path: build
key: ${{ github.workflow }}-v1-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v1-
key: ${{ github.workflow }}-v2-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v2-
- name: Clean previous DMG
working-directory: ${{github.workspace}}

4
.github/workflows/macOS_x86_64.yml

@ -38,8 +38,8 @@ jobs:
uses: actions/cache@v5
with:
path: build
key: ${{ github.workflow }}-v3-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v3-
key: ${{ github.workflow }}-v4-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v4-
- name: Clean previous DMG
working-directory: ${{github.workspace}}

34
README.md

@ -71,23 +71,23 @@ If you want to help test the latest development version (make sure to back up yo
*Note: You must be logged into GitHub to download the attachments!*
[![Linux x86_64](https://github.com/mojsior/diablo-access/actions/workflows/Linux_x86_64.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Linux_x86_64.yml?query=branch%3Amaster)
[![Linux AArch64](https://github.com/mojsior/diablo-access/actions/workflows/Linux_aarch64.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Linux_aarch64.yml?query=branch%3Amaster)
[![Linux x86](https://github.com/mojsior/diablo-access/actions/workflows/Linux_x86.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Linux_x86.yml?query=branch%3Amaster)
[![Linux x86_64 SDL1](https://github.com/mojsior/diablo-access/actions/workflows/Linux_x86_64_SDL1.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Linux_x86_64_SDL1.yml?query=branch%3Amaster)
[![macOS x86_64](https://github.com/mojsior/diablo-access/actions/workflows/macOS_x86_64.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/macOS_x86_64.yml?query=branch%3Amaster)
[![Windows MSVC x64](https://github.com/mojsior/diablo-access/actions/workflows/Windows_MSVC_x64.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Windows_MSVC_x64.yml?query=branch%3Amaster)
[![Windows MinGW x64](https://github.com/mojsior/diablo-access/actions/workflows/Windows_MinGW_x64.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Windows_MinGW_x64.yml?query=branch%3Amaster)
[![Windows MinGW x86](https://github.com/mojsior/diablo-access/actions/workflows/Windows_MinGW_x86.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Windows_MinGW_x86.yml?query=branch%3Amaster)
[![Android](https://github.com/mojsior/diablo-access/actions/workflows/Android.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/Android.yml?query=branch%3Amaster)
[![iOS](https://github.com/mojsior/diablo-access/actions/workflows/iOS.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/iOS.yml?query=branch%3Amaster)
[![PS4](https://github.com/mojsior/diablo-access/actions/workflows/PS4.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/PS4.yml?query=branch%3Amaster)
[![Original Xbox](https://github.com/mojsior/diablo-access/actions/workflows/xbox_nxdk.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/xbox_nxdk.yml?query=branch%3Amaster)
[![Xbox One/Series](https://github.com/mojsior/diablo-access/actions/workflows/xbox_one.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/xbox_one.yml?query=branch%3Amaster)
[![Nintendo Switch](https://github.com/mojsior/diablo-access/actions/workflows/switch.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/switch.yml)
[![Sony PlayStation Vita](https://github.com/mojsior/diablo-access/actions/workflows/vita.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/vita.yml)
[![Nintendo 3DS](https://github.com/mojsior/diablo-access/actions/workflows/3ds.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/3ds.yml)
[![Amiga M68K](https://github.com/mojsior/diablo-access/actions/workflows/amiga-m68k.yml/badge.svg)](https://github.com/mojsior/diablo-access/actions/workflows/amiga-m68k.yml)
[![Linux x86_64](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86_64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86_64.yml?query=branch%3Amaster)
[![Linux AArch64](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_aarch64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_aarch64.yml?query=branch%3Amaster)
[![Linux x86](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86.yml?query=branch%3Amaster)
[![Linux x86_64 SDL1](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86_64_SDL1.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86_64_SDL1.yml?query=branch%3Amaster)
[![macOS x86_64](https://github.com/diasurgical/devilutionX/actions/workflows/macOS_x86_64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/macOS_x86_64.yml?query=branch%3Amaster)
[![Windows MinGW x64](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x64.yml?query=branch%3Amaster)
[![Windows MinGW x86](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x86.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x86.yml?query=branch%3Amaster)
[![Windows MSVC x64](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MSVC_x64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MSVC_x64.yml?query=branch%3Amaster)
[![Android](https://github.com/diasurgical/devilutionX/actions/workflows/Android.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Android.yml?query=branch%3Amaster)
[![iOS](https://github.com/diasurgical/devilutionX/actions/workflows/iOS.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/iOS.yml?query=branch%3Amaster)
[![PS4](https://github.com/diasurgical/devilutionX/actions/workflows/PS4.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/PS4.yml?query=branch%3Amaster)
[![Original Xbox](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_nxdk.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_nxdk.yml?query=branch%3Amaster)
[![Xbox One/Series](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_one.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_one.yml?query=branch%3Amaster)
[![Nintendo Switch](https://github.com/diasurgical/devilutionX/actions/workflows/switch.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/switch.yml)
[![Sony PlayStation Vita](https://github.com/diasurgical/devilutionX/actions/workflows/vita.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/vita.yml)
[![Nintendo 3DS](https://github.com/diasurgical/devilutionX/actions/workflows/3ds.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/3ds.yml)
[![Amiga M68K](https://github.com/diasurgical/devilutionX/actions/workflows/amiga-m68k.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/amiga-m68k.yml)
# Building from Source

1
Source/engine/render/text_render.cpp

@ -482,6 +482,7 @@ void DrawLine(
char32_t c = DecodeFirstUtf8CodePoint(lineCopy, &cpLen);
if (c == Utf8DecodeError) break;
if (c == ZWSP) {
currentPos += cpLen;
lineCopy.remove_prefix(cpLen);
continue;
}

14
Translations/fi.po

@ -3260,7 +3260,7 @@ msgstr "rappeutuminen {:+d}% vahinko"
#: Source/items.cpp:4056
msgid "2x dmg to monst, 1x to you"
msgstr "2x vahinko monsterille, 1x sinulle"
msgstr "2x vahinko hirviölle, 1x sinulle"
#: Source/items.cpp:4058
#, no-c-format
@ -3370,7 +3370,7 @@ msgstr "Elämänkaaren areena"
#: Source/levels/trigs.cpp:355
msgid "Down to dungeon"
msgstr "Linnakellariin"
msgstr "Tyrmään"
#: Source/levels/trigs.cpp:364
msgid "Down to catacombs"
@ -3483,7 +3483,7 @@ msgid ""
"Could not add a monster, since the maximum monster type number of {} has "
"already been reached."
msgstr ""
"Monsteria ei voitu lisätä, koska monsterityyppien enimmäismäärä {} on jo "
"Hirviötä ei voitu lisätä, koska hirviötyyppien enimmäismäärä {} on jo "
"saavutettu."
#: Source/monstdat.cpp:344
@ -4497,14 +4497,14 @@ msgstr "Valitse satunnaisesti käytettävissä olevat tehtävät uusille peleill
#: Source/options.cpp:811
msgid "Show Monster Type"
msgstr "Näytä monsterityyppi"
msgstr "Näytä hirviötyyppi"
#: Source/options.cpp:811
msgid ""
"Hovering over a monster will display the type of monster in the description "
"box in the UI."
msgstr ""
"Kun viet hiiren monsterin päälle, sen tyyppi näkyy käyttöliittymän "
"Kun viet hiiren hirviön päälle, sen tyyppi näkyy käyttöliittymän "
"kuvauskentässä."
#: Source/options.cpp:812
@ -6456,7 +6456,7 @@ msgstr "Kyläportaalin käärö"
#: Source/translation_dummy.cpp:244
msgid "Arkaine's Valor"
msgstr "Valor haarniska"
msgstr "Arkaineen Valor haarniska"
#: Source/translation_dummy.cpp:245
msgid "Potion of Full Healing"
@ -9167,7 +9167,7 @@ msgstr ""
"Olen kuullut kultaisesta eliksiiristä, joka voisi poistaa kirouksen ja antaa "
"sielulleni rauhan, mutta en ole onnistunut löytämään sitä. Voimani ovat nyt "
"hiipumassa, ja niiden mukana myös viimeisetkin ihmisyyteni rippeet. Auta "
"minua ja etsi eliksiiri. Korvaan ponnistuksesi – vannon kunniasanallani."
"minua ja etsi eliksiiri. Korvaan ponnistuksesi – vannon sen kunniasanallani."
#: Source/translation_dummy.cpp:762
msgid ""

2330
Translations/ja.po

File diff suppressed because it is too large Load Diff

43
android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java

@ -1,12 +1,15 @@
package org.diasurgical.devilutionx;
import android.content.Intent;
import android.graphics.Insets;
import android.graphics.Rect;
import android.os.Build;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.ViewTreeObserver;
import android.view.WindowInsets;
import android.view.WindowManager;
import org.libsdl.app.SDLActivity;
@ -65,15 +68,47 @@ public class DevilutionXSDLActivity extends SDLActivity {
this.getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
SurfaceView surface = mSurface;
SurfaceHolder holder = surface.getHolder();
if (!isIMEVisible()) {
holder.setSizeFromLayout();
return;
}
// Software keyboard may encroach on the app's visible space so
// force the drawing surface to fit in the visible display frame
Rect visibleSpace = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(visibleSpace);
SurfaceView surface = mSurface;
SurfaceHolder holder = surface.getHolder();
getVisibleSpaceAroundIME(visibleSpace);
holder.setFixedSize(visibleSpace.width(), visibleSpace.height());
}
private boolean isIMEVisible() {
// Window insets are not available before Android 11 so
// we must always assume the software keyboard is visible
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R)
return true;
WindowInsets rootInsets = getWindow().getDecorView().getRootWindowInsets();
return rootInsets.isVisible(WindowInsets.Type.ime());
}
private void getVisibleSpaceAroundIME(Rect visibleSpace) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
getWindow().getDecorView().getWindowVisibleDisplayFrame(visibleSpace);
return;
}
WindowInsets rootInsets = getWindow().getDecorView().getRootWindowInsets();
Insets imeInsets = rootInsets.getInsets(WindowInsets.Type.ime());
DisplayMetrics realMetrics = new DisplayMetrics();
getDisplay().getRealMetrics(realMetrics);
visibleSpace.top = imeInsets.top;
visibleSpace.left = imeInsets.left;
visibleSpace.right = realMetrics.widthPixels - imeInsets.right;
visibleSpace.bottom = realMetrics.heightPixels - imeInsets.bottom;
}
});
}

Loading…
Cancel
Save