Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Commit 5a1e1a1

Browse files
authored
Merge pull request #23 from l3ger0j/unstable
Update to 3.21.0
2 parents 77be86e + a8d309c commit 5a1e1a1

File tree

122 files changed

+82215
-24466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+82215
-24466
lines changed

app/build.gradle

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
22
id 'com.android.application'
3-
id 'com.google.dagger.hilt.android'
43
}
54

65
def viewBind = true
@@ -48,6 +47,7 @@ android {
4847
buildFeatures {
4948
viewBinding viewBind
5049
dataBinding dataBind
50+
buildConfig true
5151
aidl true
5252
}
5353

@@ -67,29 +67,24 @@ dependencies {
6767
implementation 'androidx.documentfile:documentfile:1.0.1'
6868
implementation 'androidx.preference:preference:1.2.1'
6969
implementation 'androidx.fragment:fragment:1.6.2'
70-
implementation 'androidx.webkit:webkit:1.8.0'
71-
implementation 'androidx.navigation:navigation-fragment:2.7.5'
72-
implementation 'androidx.navigation:navigation-ui:2.7.5'
73-
implementation 'androidx.work:work-runtime:2.8.1'
74-
implementation 'com.google.android.material:material:1.10.0'
70+
implementation 'androidx.webkit:webkit:1.9.0'
71+
implementation 'androidx.navigation:navigation-fragment:2.7.6'
72+
implementation 'androidx.navigation:navigation-ui:2.7.6'
73+
implementation 'androidx.work:work-runtime:2.9.0'
74+
implementation 'com.google.android.material:material:1.11.0'
7575
implementation 'androidx.core:core-splashscreen:1.0.1'
7676

77-
// Room
78-
implementation "androidx.room:room-runtime:2.6.0"
79-
annotationProcessor "androidx.room:room-compiler:2.6.0"
80-
81-
// DI
82-
implementation "com.google.dagger:hilt-android:$rootProject.hilt_version"
83-
annotationProcessor "com.google.dagger:hilt-android-compiler:$rootProject.hilt_version"
84-
8577
implementation 'com.github.AppDevNext:ChangeLog:3.5'
8678
implementation 'com.jaredrummler:colorpicker:1.1.0'
87-
implementation 'org.jsoup:jsoup:1.16.1'
79+
implementation 'org.jsoup:jsoup:1.17.1'
8880
implementation 'com.github.javiersantos:AppUpdater:2.7'
8981
implementation 'com.anggrayudi:storage:1.5.5'
90-
implementation 'org.simpleframework:simple-xml:2.7.1'
9182
implementation 'com.squareup.picasso:picasso:2.71828'
9283

84+
implementation 'com.fasterxml.jackson.core:jackson-core:2.16.1'
85+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.16.1'
86+
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.16.1'
87+
9388
testImplementation 'junit:junit:4.13.2'
9489
androidTestImplementation 'androidx.test:core:1.5.0'
9590
androidTestImplementation 'androidx.test:runner:1.5.2'

app/proguard-rules.pro

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,31 @@
1212
public *;
1313
}
1414

15+
# NDK
1516
-keep class org.qp.android.dto.libQP.** { *; }
1617
-keep class org.qp.android.model.libQP.** { *; }
1718

18-
-keep class net.sf.sevenzipjbinding.** { *; }
19-
20-
-dontwarn org.simpleframework.xml.stream.**
21-
-keep class org.simpleframework.xml.**{ *; }
22-
-keepclassmembers, allowobfuscation class * {
23-
@org.simpleframework.xml.* <fields>;
24-
@org.simpleframework.xml.* <init>(...);
25-
}
26-
19+
# AppDevNext
2720
-keep class info.hannes.** { *; }
2821
-keep class com.google.gson.reflect.TypeToken
2922
-keep class * extends com.google.gson.reflect.TypeToken
3023
-keep public class * implements java.lang.reflect.Type
3124

25+
# Proguard configuration for Jackson 2.x
26+
-keep class * implements com.fasterxml.jackson.core.type.TypeReference
27+
-keep class com.fasterxml.jackson.databind.ObjectMapper {
28+
public <methods>;
29+
protected <methods>;
30+
}
31+
-keepclassmembers class * {
32+
@com.fasterxml.jackson.annotation.* *;
33+
}
34+
-keep class com.fasterxml.jackson.databind.ObjectWriter {
35+
public ** writeValueAsString(**);
36+
}
37+
-keepnames class com.fasterxml.jackson.** { *; }
38+
-dontwarn com.fasterxml.jackson.databind.**
39+
3240
# JSR 305 annotations are for embedding nullability information.
3341
-dontwarn javax.annotation.**
3442
# A resource is loaded with a relative path so the package of this class must be preserved.

app/src/androidTest/java/org/qp/android/game/service/HtmlProcessorAndroidTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;
9-
import org.qp.android.model.service.GameContentResolver;
109
import org.qp.android.model.service.HtmlProcessor;
1110
import org.qp.android.model.service.ImageProvider;
1211

1312
@RunWith(AndroidJUnit4.class)
1413
public class HtmlProcessorAndroidTest {
15-
private final GameContentResolver gameContentResolver = new GameContentResolver();
14+
1615
private final ImageProvider imageProvider = new ImageProvider();
17-
private final HtmlProcessor sut = new HtmlProcessor(gameContentResolver, imageProvider);
16+
private final HtmlProcessor sut = new HtmlProcessor(imageProvider);
1817

1918
@Test
2019
public void convertQspHtmlToWebViewHtml_execBlocks() {

app/src/main/assets/about-en.html

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<html lang="en">
2+
<head>
3+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
4+
<style>
5+
body {
6+
margin: 0;
7+
padding: 0;
8+
color: QSPTEXTCOLOR;
9+
background-color: QSPBACKCOLOR;
10+
max-width: 100%;
11+
font-size: QSPFONTSIZE;
12+
font-family: QSPFONTSTYLE;
13+
}
14+
a {
15+
color: QSPLINKCOLOR;
16+
}
17+
a:link {
18+
color: QSPLINKCOLOR;
19+
}
20+
table {
21+
font-size: QSPFONTSIZE;
22+
font-family: QSPFONTSTYLE;
23+
}
24+
</style>
25+
</head>
26+
<body>
27+
<h2>
28+
<div style="text-align: center;">About Questopia</div>
29+
<img src="https://appassets.androidplatform.net/res/drawable/landscape.webp" width="100%" alt="knight with a shield">
30+
</h2>
31+
<h4 style="margin-left:5px;">
32+
Questopia is a fork of the Android port of the Quest Player Android from <a href="https://github.com/seedhartha/QuestPlayer">seedharta</a> with the open source code of the original <b>Quest Soft Player</b> (<a href="http://qsp.su/?option=com_content&view=article&id=64">russian-language site</a>).<br>
33+
You can download the current version of the application from the project page on <a href="https://github.com/l3ger0j/Questopia">GitHub</a> or from the <a href="https://t.me/QuestPlayer">Telegram channel</a>.<br>
34+
</h4>
35+
<hr>
36+
<h3><div style="text-align: center;">Current project staff</div></h3>
37+
<ul>
38+
<li><b>Coding:</b>
39+
<ul style="list-style-type:none">
40+
<li><a href="https://github.com/l3ger0j/">l3ger0j</a></li>
41+
</ul>
42+
<li><b>Translations:</b></li>
43+
<ul style="list-style-type:none">
44+
<li><a href="https://github.com/l3ger0j/">l3ger0j</a></li>
45+
</ul>
46+
</ul>
47+
<hr>
48+
<h3><div style="text-align: center;">Participated in the project</div></h3>
49+
<ul>
50+
<li><b>Coding:</b>
51+
<ul style="list-style-type:none">
52+
<li>Nex (~v1.0.201)</li>
53+
<li>BOOMik (v.1.3)</li>
54+
<li><a href="https://github.com/MrBoboFace/">MrBoboFace (v.1.4+)</a></li>
55+
<li><a href="https://github.com/seedhartha/">seedhartha (v.2.1+)</a></li>
56+
<li><a href="https://github.com/shirrumon/">shirrumon (v.3.18.0)</a></li>
57+
</ul>
58+
<li><b>Translations:</b></li>
59+
<ul style="list-style-type:none">
60+
<li>Illume (English~v1.3/Simplified Chinese/Traditional Chinese)</li>
61+
<li>Unregistred (Russian)</li>
62+
<li><b>Special Thanks:</b> Kevin Smarts and all those in <a href="https://tfgamessite.com/">TFGamesSite Community</a></li>
63+
<li><i>The Fifth World</i> painting by Noah Bradley (Creative Commons License; image scaled and cropped)</li>
64+
</ul>
65+
</ul>
66+
</body>
67+
</html>

app/src/main/assets/about-ru.html

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<html lang="ru">
2+
<head>
3+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
4+
<style>
5+
body {
6+
margin: 0;
7+
padding: 0;
8+
color: QSPTEXTCOLOR;
9+
background-color: QSPBACKCOLOR;
10+
max-width: 100%;
11+
font-size: QSPFONTSIZE;
12+
font-family: QSPFONTSTYLE;
13+
}
14+
a {
15+
color: QSPLINKCOLOR;
16+
}
17+
a:link {
18+
color: QSPLINKCOLOR;
19+
}
20+
table {
21+
font-size: QSPFONTSIZE;
22+
font-family: QSPFONTSTYLE;
23+
}
24+
</style>
25+
</head>
26+
<body>
27+
<h2>
28+
<div style="text-align: center;">О Questopia</div>
29+
<img src="https://appassets.androidplatform.net/res/drawable/landscape.webp" width="100%" alt="рыцарь с щитом">
30+
</h2>
31+
<h4 style="margin-left:5px;">
32+
Questopia это форк Android-порта Quest Player Android от <a href="https://github.com/seedhartha/QuestPlayer">seedharta</a> с открытым исходным кодом оригинального <b>Quest Soft Player</b> (<a href="http://qsp.su/?option=com_content&view=article&id=64">русскоязычный сайт</a>).<br>
33+
Вы можете скачать актуальную версию приложения со страницы проекта на <a href="https://github.com/l3ger0j/Questopia">GitHub</a> или из <a href="https://t.me/QuestPlayer">Telegram-канала</a>.<br>
34+
</h4>
35+
<hr>
36+
<h3><div style="text-align: center;">Принимают участие в проекте</div></h3>
37+
<ul>
38+
<li><b>Разработка:</b></li>
39+
<ul style="list-style-type:none">
40+
<li><a href="https://github.com/l3ger0j/">l3ger0j</a></li>
41+
</ul>
42+
<li><b>Перевод:</b></li>
43+
<ul style="list-style-type:none">
44+
<li><a href="https://github.com/l3ger0j/">l3ger0j</a></li>
45+
</ul>
46+
</ul>
47+
<hr>
48+
<h3><div style="text-align: center;">Принимали участие в проекте</div></h3>
49+
<ul>
50+
<li><b>Разработка:</b></li>
51+
<ul style="list-style-type:none">
52+
<li>Nex (~v1.0.201)</li>
53+
<li>BOOMik (v.1.3)</li>
54+
<li><a href="https://github.com/MrBoboFace/">MrBoboFace (v.1.4+)</a></li>
55+
<li><a href="https://github.com/seedhartha/">seedhartha (v.2.1+)</a></li>
56+
<li><a href="https://github.com/shirrumon/">shirrumon (v.3.18.0)</a></li>
57+
</ul>
58+
<li><b>Перевод:</b></li>
59+
<ul style="list-style-type:none">
60+
<li>Illume (Китайский упрощенный / Китайский традиционный/Английский~v1.3)</li>
61+
<li>Unregistred (Русский)</li>
62+
<li><b>Особое спасибо:</b> Kevin Smarts и всему <a href="https://tfgamessite.com/">TFGamesSite сообществу</a></li>
63+
<li><i>Изображения Пятого Мира</i> созданы Noah Bradley (Творческие Сообщества; изображения уменьшены и обрезаны)</li>
64+
</ul>
65+
</ul>
66+
</body>
67+
</html>

app/src/main/java/org/qp/android/QuestPlayerApplication.java

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,26 @@
55
import android.app.NotificationManager;
66
import android.content.Context;
77
import android.os.Build;
8-
import android.util.Log;
98

10-
import androidx.annotation.NonNull;
119
import androidx.documentfile.provider.DocumentFile;
1210

1311
import org.qp.android.model.libQP.LibQpProxy;
1412
import org.qp.android.model.libQP.LibQpProxyImpl;
1513
import org.qp.android.model.service.AudioPlayer;
16-
import org.qp.android.model.service.GameContentResolver;
1714
import org.qp.android.model.service.HtmlProcessor;
1815
import org.qp.android.model.service.ImageProvider;
1916

2017
public class QuestPlayerApplication extends Application {
2118

2219
public static final int INSTALL_GAME_NOTIFICATION_ID = 1800;
2320

24-
public static final int POST_INSTALL_GAME_NOTIFICATION_ID = 1801;
25-
2621
public static final String CHANNEL_INSTALL_GAME = "org.qp.android.channel.install_game";
2722

28-
private final GameContentResolver gameContentResolver = new GameContentResolver();
2923
private final ImageProvider imageProvider = new ImageProvider();
30-
private final HtmlProcessor htmlProcessor = new HtmlProcessor(gameContentResolver, imageProvider);
24+
private final HtmlProcessor htmlProcessor = new HtmlProcessor(imageProvider);
3125
private final AudioPlayer audioPlayer = new AudioPlayer();
32-
private final LibQpProxyImpl libQspProxy = new LibQpProxyImpl(this, gameContentResolver, htmlProcessor, audioPlayer);
26+
private final LibQpProxyImpl libQspProxy = new LibQpProxyImpl(this , htmlProcessor , audioPlayer);
3327

34-
private DocumentFile customRootDir;
3528
private DocumentFile currentGameDir;
3629

3730
@Override
@@ -44,14 +37,6 @@ public void setCurrentGameDir(DocumentFile currentGameDir) {
4437
this.currentGameDir = currentGameDir;
4538
}
4639

47-
public void setCustomRootFolder(DocumentFile customRootDir) {
48-
this.customRootDir = customRootDir;
49-
}
50-
51-
public GameContentResolver getGameContentResolver() {
52-
return gameContentResolver;
53-
}
54-
5540
public HtmlProcessor getHtmlProcessor() {
5641
htmlProcessor.setContext(this);
5742
return htmlProcessor;
@@ -65,10 +50,6 @@ public LibQpProxy getLibQspProxy() {
6550
return libQspProxy;
6651
}
6752

68-
public DocumentFile getCustomRootDir() {
69-
return customRootDir;
70-
}
71-
7253
public DocumentFile getCurrentGameDir() {
7354
return currentGameDir;
7455
}
@@ -78,51 +59,11 @@ public void createNotificationChannels() {
7859
var importance = NotificationManager.IMPORTANCE_LOW;
7960

8061
var name = getString(R.string.channelInstallGame);
81-
var channel = new NotificationChannel(CHANNEL_INSTALL_GAME, name, importance);
62+
var channel = new NotificationChannel(CHANNEL_INSTALL_GAME , name , importance);
8263
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
8364
channel.setAllowBubbles(true);
8465
}
8566
notificationManager.createNotificationChannel(channel);
86-
8767
}
8868

89-
public DocumentFile fromFullPath(@NonNull String fullPath) {
90-
var findDir = getCustomRootDir();
91-
var nameGameDir = currentGameDir.getName();
92-
93-
var index = fullPath.lastIndexOf(nameGameDir);
94-
var simplePath = fullPath.substring(index);
95-
var pathToSoundSegments = simplePath.split("/");
96-
97-
for (var segment : pathToSoundSegments) {
98-
if (segment.isEmpty()) {
99-
continue;
100-
}
101-
findDir = findDir.findFile(segment);
102-
if (findDir == null) {
103-
break;
104-
}
105-
}
106-
107-
return findDir;
108-
}
109-
110-
public DocumentFile fromRelativePath(@NonNull String relPath) {
111-
var pathToFileSegments = relPath.split("/");
112-
var relFile = currentGameDir;
113-
114-
for (var segment : pathToFileSegments) {
115-
if (segment.isEmpty()) {
116-
continue;
117-
}
118-
relFile = relFile.findFile(segment);
119-
if (relFile == null) {
120-
break;
121-
}
122-
}
123-
124-
Log.d(this.getClass().getSimpleName() , relPath);
125-
126-
return relFile;
127-
}
12869
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
package org.qp.android.dto.libQP;
22

3-
public class ActionData {
4-
public String name;
5-
public String image;
6-
}
3+
public record ActionData(String name , String image) {}
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
package org.qp.android.dto.libQP;
22

3-
public class ErrorData {
4-
public String locName;
5-
public int errorNum;
6-
public int index;
7-
public int line;
8-
}
3+
public record ErrorData(String locName , int errorNum , int index , int line) {}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
package org.qp.android.dto.libQP;
22

3-
public class GetVarValuesResponse {
4-
public boolean isSuccess;
5-
public String stringValue;
6-
public int intValue;
7-
}
3+
public record GetVarValuesResponse(boolean isSuccess , String stringValue , int intValue) {}

0 commit comments

Comments
 (0)