Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
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
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
nanahira
ygopro2
Commits
068d74e7
Commit
068d74e7
authored
Mar 16, 2019
by
無名の凝泪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update library-release.aar(libgdiplus.so)、add x86 | (完整立绘功能只支持Android M以上)
parent
af0f2863
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
226 additions
and
162 deletions
+226
-162
.gitignore
.gitignore
+0
-1
Assets/Plugins/Android/library-release.aar
Assets/Plugins/Android/library-release.aar
+0
-0
Assets/Plugins/Android/libs/x86.meta
Assets/Plugins/Android/libs/x86.meta
+9
-0
Assets/Plugins/Android/libs/x86/libocgcore.so
Assets/Plugins/Android/libs/x86/libocgcore.so
+0
-0
Assets/Plugins/Android/libs/x86/libocgcore.so.meta
Assets/Plugins/Android/libs/x86/libocgcore.so.meta
+34
-0
Assets/Plugins/Android/libs/x86/libsqlite3.so
Assets/Plugins/Android/libs/x86/libsqlite3.so
+0
-0
Assets/Plugins/Android/libs/x86/libsqlite3.so.meta
Assets/Plugins/Android/libs/x86/libsqlite3.so.meta
+34
-0
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+17
-0
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+130
-159
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+2
-2
No files found.
.gitignore
View file @
068d74e7
...
...
@@ -40,7 +40,6 @@ AI_core_vs2017solution/bin/
AI_core_vs2017solution/obj/
AI_core_vs2017solution/build/android/libs/
AI_core_vs2017solution/build/android/obj/
Assets/Plugins/Android/libs/x86*
# ygopro
cdb/
...
...
Assets/Plugins/Android/library-release.aar
View file @
068d74e7
No preview for this file type
Assets/Plugins/Android/libs/x86.meta
0 → 100644
View file @
068d74e7
fileFormatVersion: 2
guid: 450e0a9c89bf4a040b26f1fef13f5655
folderAsset: yes
timeCreated: 1445131378
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/Android/libs/x86/libocgcore.so
0 → 100644
View file @
068d74e7
File added
Assets/Plugins/Android/libs/x86/libocgcore.so.meta
0 → 100644
View file @
068d74e7
fileFormatVersion: 2
guid: 53795d48a20b9524180c4bf4481385f1
timeCreated: 1526547438
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
Assets/Plugins/Android/libs/x86/libsqlite3.so
0 → 100644
View file @
068d74e7
File added
Assets/Plugins/Android/libs/x86/libsqlite3.so.meta
0 → 100644
View file @
068d74e7
fileFormatVersion: 2
guid: fa9cbdc3a67e5fd4baeb5d0dd3f4cf71
timeCreated: 1445131383
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
Assets/SibylSystem/Program.cs
View file @
068d74e7
...
...
@@ -277,6 +277,12 @@ public class Program : MonoBehaviour
//YGOMobile Paths (https://github.com/Unicorn369/YGOPro2_Droid)
public
static
string
ANDROID_GAME_PATH
=
"/storage/emulated/0/ygopro2/"
;
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
public
static
bool
ANDROID_SDK_M
=
true
;
#elif UNITY_ANDROID || UNITY_IPHONE //Mobile Platform
public
static
bool
ANDROID_SDK_M
=
false
;
#endif
void
initialize
()
{
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
...
...
@@ -395,6 +401,17 @@ public class Program : MonoBehaviour
jo
.
Call
(
"showToast"
,
"没有发现卡图包,是否未安装YGOMobile"
);
}
}
/*
* 使用Termux编译生成的:libgdiplus.so (https://github.com/Unicorn369/libgdiplus-Android)
* 经测试,只有Android M以上才能正常使用。为了让Android M以下的也能使用,只好多做一下判断
*/
bool
SDK
=
jo
.
Call
<
bool
>(
"SdkInt"
);
if
(
SDK
==
true
)
{
//Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
ANDROID_SDK_M
=
true
;
}
else
{
ANDROID_SDK_M
=
false
;
}
#endif
});
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
068d74e7
...
...
@@ -254,11 +254,7 @@ public class GameTextureManager
if
(
File
.
Exists
(
"picture/closeup/"
+
pic
.
code
.
ToString
()
+
".png"
))
{
string
path
=
"picture/closeup/"
+
pic
.
code
.
ToString
()
+
".png"
;
/*
* Nonsupport Android x86、Only Support Android 5.0+
* https://github.com/Unicorn369/libgdiplus-Android
*/
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
if
(
Program
.
ANDROID_SDK_M
)
{
BitmapHelper
bitmap
=
new
BitmapHelper
(
path
);
int
left
;
int
right
;
...
...
@@ -288,12 +284,7 @@ public class GameTextureManager
}
}
caculateK
(
pic
);
/*
* 以上处理移动平台无法正常使用
* 暂时只能直接贴图,以后再处理
*/
#elif UNITY_IPHONE //|| UNITY_ANDROID //Mobile Platform
}
else
{
byte
[]
data
;
using
(
FileStream
file
=
new
FileStream
(
path
,
FileMode
.
Open
,
FileAccess
.
Read
))
{
...
...
@@ -302,7 +293,7 @@ public class GameTextureManager
file
.
Read
(
data
,
0
,
(
int
)
file
.
Length
);
}
pic
.
data
=
data
;
#endif
}
if
(!
loadedList
.
ContainsKey
(
hashPic
(
pic
.
code
,
pic
.
type
)))
{
...
...
@@ -589,11 +580,7 @@ public class GameTextureManager
string
path
=
"picture/closeup/"
+
pic
.
code
.
ToString
()
+
".png"
;
if
(!
File
.
Exists
(
path
))
{
/*
* Nonsupport Android x86、Only Support Android 5.0+
* https://github.com/Unicorn369/libgdiplus-Android
*/
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
if
(
Program
.
ANDROID_SDK_M
)
{
path
=
"picture/card/"
+
pic
.
code
.
ToString
()
+
".png"
;
if
(!
File
.
Exists
(
path
))
{
...
...
@@ -626,15 +613,8 @@ public class GameTextureManager
pic
.
hashed_data
=
getCuttedPic
(
path
,
pic
.
pCard
,
Iam8
);
softVtype
(
pic
,
0.5f
);
pic
.
k
=
1
;
//pic.autoMade = true;
/*
* 以上处理移动平台无法正常使用
* 暂时只能直接贴图,以后再处理
*/
#elif UNITY_IPHONE //|| UNITY_ANDROID //Mobile Platform
}
else
{
path
=
"picture/null.png"
;
byte
[]
data
;
using
(
FileStream
file
=
new
FileStream
(
path
,
FileMode
.
Open
,
FileAccess
.
Read
))
{
...
...
@@ -643,15 +623,11 @@ public class GameTextureManager
file
.
Read
(
data
,
0
,
(
int
)
file
.
Length
);
}
pic
.
data
=
data
;
#endif
}
}
else
{
/*
* Nonsupport Android x86、Only Support Android 5.0+
* https://github.com/Unicorn369/libgdiplus-Android
*/
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_ANDROID //编译器、Windows、Android
if
(
Program
.
ANDROID_SDK_M
)
{
BitmapHelper
bitmap
=
new
BitmapHelper
(
path
);
int
left
;
int
right
;
...
...
@@ -703,12 +679,7 @@ public class GameTextureManager
softVtype
(
pic
,
0.7f
);
}
caculateK
(
pic
);
/*
* 以上处理移动平台无法正常使用
* 暂时只能直接贴图,以后再处理
*/
#elif UNITY_IPHONE //|| UNITY_ANDROID //Mobile Platform
}
else
{
byte
[]
data
;
using
(
FileStream
file
=
new
FileStream
(
path
,
FileMode
.
Open
,
FileAccess
.
Read
))
{
...
...
@@ -717,7 +688,7 @@ public class GameTextureManager
file
.
Read
(
data
,
0
,
(
int
)
file
.
Length
);
}
pic
.
data
=
data
;
#endif
}
}
if
(!
loadedList
.
ContainsKey
(
hashPic
(
pic
.
code
,
pic
.
type
)))
...
...
ProjectSettings/ProjectSettings.asset
View file @
068d74e7
...
...
@@ -149,7 +149,7 @@ PlayerSettings:
buildNumber
:
iOS
:
AndroidBundleVersionCode
:
2
AndroidMinSdkVersion
:
21
AndroidMinSdkVersion
:
16
AndroidTargetSdkVersion
:
0
AndroidPreferredInstallLocation
:
0
aotOptions
:
...
...
@@ -225,7 +225,7 @@ PlayerSettings:
iOSManualSigningProvisioningProfileID
:
tvOSManualSigningProvisioningProfileID
:
appleEnableAutomaticSigning
:
0
AndroidTargetDevice
:
3
AndroidTargetDevice
:
0
AndroidSplashScreenScale
:
0
androidSplashScreen
:
{
fileID
:
0
}
AndroidKeystoreName
:
ygopro.jks
...
...
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