11
11
import org .ancurio .button_mapping .VirtualButton ;
12
12
import org .libsdl .app .SDLActivity ;
13
13
14
+ import java .io .File ;
14
15
import java .io .FileOutputStream ;
15
16
import java .io .IOException ;
16
17
import java .io .InputStream ;
17
18
import java .io .OutputStream ;
19
+ import java .util .ArrayList ;
18
20
19
21
public class MKXPActivity extends SDLActivity
20
22
{
@@ -25,21 +27,31 @@ protected String getGameDirectory() {
25
27
26
28
/** Configure for RTP assets */
27
29
protected String [] getRTPPaths () {
28
- return new String [] {
29
- getObbDir () + "/obb_type_main.2000028.obb" ,
30
- getObbDir () + "/obb_type_patch.2000028.obb" ,
31
- };
30
+ ArrayList <String > rtps = new ArrayList ();
31
+
32
+ // Add all OBB files for this app
33
+ File obbDirFile = getObbDir ();
34
+ File [] obbFiles = obbDirFile .listFiles ();
35
+ if (obbFiles != null ) {
36
+ for (File obbFile : obbFiles ) {
37
+ if (obbFile .isFile () && obbFile .getName ().toLowerCase ().endsWith (".obb" )) {
38
+ rtps .add (obbFile .getAbsolutePath ());
39
+ }
40
+ }
41
+ }
42
+
43
+ return rtps .toArray (new String [0 ]);
32
44
}
33
45
34
46
/** Configure for Scripts.rxdata */
35
47
protected String getScriptsRelativePath () {
36
- return "ScriptsNew .rxdata" ;
48
+ return "GameScripts .rxdata" ;
37
49
}
38
50
39
51
/** Android assets to copy to the game folder */
40
52
protected String [] getAssetsToCopy () {
41
53
return new String [] {
42
- "ScriptsNew .rxdata" ,
54
+ "GameScripts .rxdata" ,
43
55
};
44
56
}
45
57
@@ -48,8 +60,8 @@ protected String[] getAssetsToCopy() {
48
60
@ Override
49
61
protected String [] getLibraries () {
50
62
return new String [] {
51
- "openal" ,
52
- "mkxp" ,
63
+ "openal" ,
64
+ "mkxp" ,
53
65
};
54
66
}
55
67
0 commit comments