Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
9531b13e
Commit
9531b13e
authored
Jul 21, 2021
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持残局文件打开方式使用ygomobile
parent
871e518e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
6 deletions
+63
-6
Classes/gframe/gframe.cpp
Classes/gframe/gframe.cpp
+1
-1
mobile/src/main/AndroidManifest.xml
mobile/src/main/AndroidManifest.xml
+9
-0
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
+50
-2
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+1
-1
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+1
-1
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+1
-1
No files found.
Classes/gframe/gframe.cpp
View file @
9531b13e
...
...
@@ -130,7 +130,7 @@ int main(int argc, char* argv[]) {
BufferIO
::
DecodeUTF8
(
name
,
fname
);
open_file
=
true
;
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lst
Rep
layList
,
fname
);
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lst
SingleP
layList
,
fname
);
}
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ClickButton
(
ygo
::
mainGame
->
btnSingleMode
);
...
...
mobile/src/main/AndroidManifest.xml
View file @
9531b13e
...
...
@@ -96,6 +96,15 @@
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\.lua"
/>
<data
android:pathPattern=
".*\..*\.lua"
/>
<data
android:pathPattern=
".*\..*\..*\.lua"
/>
<data
android:pathPattern=
".*\..*\..*\..*\.lua"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\.lua"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\.lua"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\.lua"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\.lua"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\..*\.lua"
/>
</intent-filter>
<intent-filter>
...
...
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
View file @
9531b13e
...
...
@@ -25,6 +25,7 @@ import ocgcore.DataManager;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_OPEN_DECK
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_OPEN_GAME
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_REPLAY_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_SINGLE_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
QUERY_NAME
;
...
...
@@ -166,7 +167,25 @@ public class GameUriManager {
if
(!
ComponentUtils
.
isActivityRunning
(
getActivity
(),
new
ComponentName
(
getActivity
(),
YGOMobileActivity
.
class
)))
{
fname
=
new
String
[]{
"-r"
,
yrp
.
getName
()};
YGOStarter
.
startGame
(
getActivity
(),
null
,
fname
);
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
yrp_installed
),
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
file_installed
),
Toast
.
LENGTH_LONG
).
show
();
}
}
}
else
if
(
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".lua"
))
{
File
single
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/"
+
CORE_SINGLE_PATH
+
"/"
+
file
.
getName
());
if
(
single
.
exists
())
{
fname
=
new
String
[]{
"-s"
,
single
.
getName
()};
YGOStarter
.
startGame
(
activity
,
null
,
fname
);
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
file_exist
),
Toast
.
LENGTH_LONG
).
show
();
}
else
{
try
{
FileUtils
.
copyFile
(
file
,
single
);
}
catch
(
Throwable
e
)
{
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
install_failed_bcos
)
+
e
,
Toast
.
LENGTH_LONG
).
show
();
}
if
(!
ComponentUtils
.
isActivityRunning
(
getActivity
(),
new
ComponentName
(
getActivity
(),
YGOMobileActivity
.
class
)))
{
fname
=
new
String
[]{
"-s"
,
single
.
getName
()};
YGOStarter
.
startGame
(
activity
,
null
,
fname
);
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
file_installed
),
Toast
.
LENGTH_LONG
).
show
();
}
}
}
...
...
@@ -250,7 +269,36 @@ public class GameUriManager {
if
(!
ComponentUtils
.
isActivityRunning
(
activity
,
new
ComponentName
(
activity
,
YGOMobileActivity
.
class
)))
{
fname
=
new
String
[]{
"-r"
,
yrp
.
getName
()};
YGOStarter
.
startGame
(
activity
,
null
,
fname
);
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
yrp_installed
),
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
file_installed
),
Toast
.
LENGTH_LONG
).
show
();
}
}
else
if
(
urifile
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".lua"
))
{
File
single
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/"
+
CORE_SINGLE_PATH
+
"/"
+
urifile
.
getName
());
try
{
ParcelFileDescriptor
pfd
=
getActivity
().
getContentResolver
().
openFileDescriptor
(
uri
,
"r"
);
if
(
single
.
exists
())
{
fname
=
new
String
[]{
"-s"
,
single
.
getName
()};
YGOStarter
.
startGame
(
getActivity
(),
null
,
fname
);
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
file_exist
),
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
if
(
pfd
==
null
)
{
return
;
}
else
{
try
{
FileUtils
.
copyFile
(
new
FileInputStream
(
pfd
.
getFileDescriptor
()),
single
);
}
catch
(
Throwable
e
)
{
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
install_failed_bcos
)
+
e
,
Toast
.
LENGTH_LONG
).
show
();
}
finally
{
pfd
.
close
();
}
}
}
}
catch
(
Throwable
e
)
{
e
.
printStackTrace
();
}
if
(!
ComponentUtils
.
isActivityRunning
(
activity
,
new
ComponentName
(
activity
,
YGOMobileActivity
.
class
)))
{
fname
=
new
String
[]{
"-s"
,
single
.
getName
()};
YGOStarter
.
startGame
(
activity
,
null
,
fname
);
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
file_installed
),
Toast
.
LENGTH_LONG
).
show
();
}
}
}
else
{
...
...
mobile/src/main/res/values-ko/strings.xml
View file @
9531b13e
...
...
@@ -305,6 +305,6 @@
<string
name=
"guide_search_result_count"
>
여기에 검색 결과를 표시합니다
</string>
<string
name=
"about_delete_ex"
>
만약 확장 카드를 사용하면서 문제가 발생했을 경우, 삭제하는 것도 좋은 선택이다
</string>
<string
name=
"title_delete_ex"
>
확장 삭제
</string>
<string
name=
"
yrp_installed"
>
리플레이가 나왔습니다. 리플레이를 보려면 \"리플레이 보기\"를 누르십시오
.
</string>
<string
name=
"
file_installed"
>
문건 나왔습니다
.
</string>
<string
name=
"ask_delete_ex"
>
지우려면 확인을 클릭하십시오.
</string>
</resources>
mobile/src/main/res/values-zh/strings.xml
View file @
9531b13e
...
...
@@ -306,5 +306,5 @@
<string
name=
"title_delete_ex"
>
清空扩展卡包
</string>
<string
name=
"ask_delete_ex"
>
点击确认以清空
</string>
<string
name=
"about_delete_ex"
>
如果遇到拓展卡包问题时删除是个不错的办法
</string>
<string
name=
"
yrp_installed"
>
录像已导入,请在观看录像中选择查看
</string>
<string
name=
"
file_installed"
>
文件已导入
</string>
</resources>
mobile/src/main/res/values/strings.xml
View file @
9531b13e
...
...
@@ -308,6 +308,6 @@
<string
name=
"guide_search_result_count"
>
here shows search result count
</string>
<string
name=
"title_delete_ex"
>
delete expansions
</string>
<string
name=
"about_delete_ex"
>
if you need to delte all expansion cards
</string>
<string
name=
"
yrp_installed"
>
replay loaded, select it in \"\\Watch Replay\"\\
</string>
<string
name=
"
file_installed"
>
file loaded
</string>
<string
name=
"ask_delete_ex"
>
Click OK to confirm the deletion
</string>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment