Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
3a99245f
Commit
3a99245f
authored
Nov 23, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加更多支持扩展名下载分拣
更新recyclerview的adapter库 DataManager::ScriptReaderZip
parent
c936d24a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
Classes/gframe/data_manager.cpp
Classes/gframe/data_manager.cpp
+5
-5
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+1
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/MycardFragment.java
...in/java/cn/garymb/ygomobile/ui/mycard/MycardFragment.java
+6
-2
No files found.
Classes/gframe/data_manager.cpp
View file @
3a99245f
...
@@ -422,16 +422,16 @@ byte* DataManager::ScriptReader(const char* script_name, int* slen) {
...
@@ -422,16 +422,16 @@ byte* DataManager::ScriptReader(const char* script_name, int* slen) {
}
}
byte
*
DataManager
::
ScriptReaderZip
(
const
char
*
script_name
,
int
*
slen
)
{
byte
*
DataManager
::
ScriptReaderZip
(
const
char
*
script_name
,
int
*
slen
)
{
IReadFile
*
reader
=
FileSystem
->
createAndOpenFile
(
script_name
);
IReadFile
*
reader
=
FileSystem
->
createAndOpenFile
(
script_name
);
if
(
reader
==
NULL
)
if
(
!
reader
)
return
0
;
return
nullptr
;
size_t
size
=
reader
->
getSize
();
size_t
size
=
reader
->
getSize
();
if
(
size
>
sizeof
(
scriptBuffer
)
)
{
if
(
size
>
sizeof
scriptBuffer
)
{
reader
->
drop
();
reader
->
drop
();
return
0
;
return
nullptr
;
}
}
reader
->
read
(
scriptBuffer
,
size
);
reader
->
read
(
scriptBuffer
,
size
);
reader
->
drop
();
reader
->
drop
();
*
slen
=
size
;
*
slen
=
(
int
)
size
;
return
scriptBuffer
;
return
scriptBuffer
;
}
}
...
...
mobile/build.gradle
View file @
3a99245f
...
@@ -107,7 +107,7 @@ dependencies {
...
@@ -107,7 +107,7 @@ dependencies {
//dialog库
//dialog库
implementation
'com.github.feihuaduo:DialogUtils:1.8.9.23'
implementation
'com.github.feihuaduo:DialogUtils:1.8.9.23'
//recyclerview的adapter库
//recyclerview的adapter库
implementation
'
com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0
.4'
implementation
'
io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1
.4'
implementation
'androidx.appcompat:appcompat:1.7.0'
implementation
'androidx.appcompat:appcompat:1.7.0'
implementation
'com.google.android.material:material:1.12.0'
implementation
'com.google.android.material:material:1.12.0'
//图片选择
//图片选择
...
...
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
3a99245f
...
@@ -102,6 +102,7 @@ public interface Constants {
...
@@ -102,6 +102,7 @@ public interface Constants {
String
YDK_FILE_EX
=
".ydk"
;
String
YDK_FILE_EX
=
".ydk"
;
String
YRP_FILE_EX
=
".yrp"
;
String
YRP_FILE_EX
=
".yrp"
;
String
YPK_FILE_EX
=
".ypk"
;
String
YPK_FILE_EX
=
".ypk"
;
String
LUA_FILE_EX
=
".lua"
;
int
[]
CORE_SKIN_BG_SIZE
=
new
int
[]{
1920
,
1080
};
int
[]
CORE_SKIN_BG_SIZE
=
new
int
[]{
1920
,
1080
};
int
[]
CORE_SKIN_CARD_MINI_SIZE
=
new
int
[]{
44
,
64
};
int
[]
CORE_SKIN_CARD_MINI_SIZE
=
new
int
[]{
44
,
64
};
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/MycardFragment.java
View file @
3a99245f
...
@@ -162,10 +162,14 @@ public class MycardFragment extends BaseFragemnt implements View.OnClickListener
...
@@ -162,10 +162,14 @@ public class MycardFragment extends BaseFragemnt implements View.OnClickListener
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
String
destFileDir
=
""
;
String
destFileDir
=
""
;
if
(
contentDisposition
.
endsWith
(
Constants
.
YDK_FILE_EX
))
{
if
(
fileName
.
endsWith
(
Constants
.
YDK_FILE_EX
))
{
destFileDir
=
AppsSettings
.
get
().
getDeckDir
();
destFileDir
=
AppsSettings
.
get
().
getDeckDir
();
}
else
if
(
contentDisposition
.
endsWith
(
Constants
.
YRP_FILE_EX
))
{
}
else
if
(
fileName
.
endsWith
(
Constants
.
YRP_FILE_EX
))
{
destFileDir
=
AppsSettings
.
get
().
getReplayDir
();
destFileDir
=
AppsSettings
.
get
().
getReplayDir
();
}
else
if
(
fileName
.
endsWith
(
Constants
.
CORE_LIMIT_PATH
))
{
destFileDir
=
AppsSettings
.
get
().
getExpansionsPath
().
getPath
();
}
else
if
(
fileName
.
endsWith
(
Constants
.
LUA_FILE_EX
))
{
destFileDir
=
AppsSettings
.
get
().
getSingleDir
();
}
else
{
//萌卡还有些什么文件格式后续可以添加
}
else
{
//萌卡还有些什么文件格式后续可以添加
destFileDir
=
AppsSettings
.
get
().
getResourcePath
();
destFileDir
=
AppsSettings
.
get
().
getResourcePath
();
}
}
...
...
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