diff --git a/.gitignore b/.gitignore index e69de29bb..35513d58c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,35 @@ +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/Assets/AssetStoreTools* + +# Autogenerated VS/MD solution and project files +ExportedObj/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd + + +# Unity3D generated meta files +*.pidb.meta + +# Unity3D Generated File On Crash Reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage +Temp/ +ygo2/ +/ygoandroid +obj +/AI_core_vs2017solution/libs diff --git a/AI_core_vs2017solution/Android.mk b/AI_core_vs2017solution/Android.mk new file mode 100644 index 000000000..69e6e8b30 --- /dev/null +++ b/AI_core_vs2017solution/Android.mk @@ -0,0 +1,73 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) +LOCAL_MODULE := ocgcore + +NDK_PROJECT_PATH := $(LOCAL_PATH) +ifndef NDEBUG +LOCAL_CFLAGS += -g -D_DEBUG +else +LOCAL_CFLAGS += -fexpensive-optimizations -O3 +endif + +ifeq ($(TARGET_ARCH_ABI),x86) +LOCAL_CFLAGS += -fno-stack-protector +endif + +#ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) +#LOCAL_CFLAGS += -mno-unaligned-access +#endif +LOCAL_C_INCLUDES := $(LOCAL_PATH)/ocgcore + +LOCAL_SRC_FILES := ocgcore/lapi.c \ + ocgcore/lauxlib.c \ + ocgcore/lbaselib.c \ + ocgcore/lbitlib.c \ + ocgcore/lcode.c \ + ocgcore/lcorolib.c \ + ocgcore/lctype.c \ + ocgcore/ldblib.c \ + ocgcore/ldebug.c \ + ocgcore/ldo.c \ + ocgcore/ldump.c \ + ocgcore/lfunc.c \ + ocgcore/lgc.c \ + ocgcore/linit.c \ + ocgcore/liolib.c \ + ocgcore/llex.c \ + ocgcore/lmathlib.c \ + ocgcore/lmem.c \ + ocgcore/loadlib.c \ + ocgcore/lobject.c \ + ocgcore/lopcodes.c \ + ocgcore/loslib.c \ + ocgcore/lparser.c \ + ocgcore/lstate.c \ + ocgcore/lstring.c \ + ocgcore/lstrlib.c \ + ocgcore/ltable.c \ + ocgcore/ltablib.c \ + ocgcore/ltm.c \ + ocgcore/lundump.c \ + ocgcore/lvm.c \ + ocgcore/lzio.c \ + ocgcore/card.cpp \ + ocgcore/duel.cpp \ + ocgcore/effect.cpp \ + ocgcore/field.cpp \ + ocgcore/group.cpp \ + ocgcore/interpreter.cpp \ + ocgcore/libcard.cpp \ + ocgcore/libdebug.cpp \ + ocgcore/libduel.cpp \ + ocgcore/libeffect.cpp \ + ocgcore/libgroup.cpp \ + ocgcore/mem.cpp \ + ocgcore/ocgapi.cpp \ + ocgcore/operations.cpp \ + ocgcore/playerop.cpp \ + ocgcore/processor.cpp \ + ocgcore/scriptlib.cpp \ + +LOCAL_LDLIBS := -llog +include $(BUILD_SHARED_LIBRARY) + diff --git a/AI_core_vs2017solution/Application.mk b/AI_core_vs2017solution/Application.mk new file mode 100644 index 000000000..305c93ae2 --- /dev/null +++ b/AI_core_vs2017solution/Application.mk @@ -0,0 +1,6 @@ +APP_BUILD_SCRIPT := Android.mk +APP_PLATFORM :=android-14 +APP_ABI := armeabi-v7a x86 +APP_STL := gnustl_static +APP_CPPFLAGS := -Wno-error=format-security -std=gnu++11 -fpermissive -fexceptions +APP_OPTIM := release diff --git a/AI_core_vs2017solution/how-build-android.txt b/AI_core_vs2017solution/how-build-android.txt new file mode 100644 index 000000000..245cbb453 --- /dev/null +++ b/AI_core_vs2017solution/how-build-android.txt @@ -0,0 +1 @@ +ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=Application.mk \ No newline at end of file diff --git a/AI_core_vs2017solution/ocgcore/llex.c b/AI_core_vs2017solution/ocgcore/llex.c index c4d8c65b6..08266a352 100644 --- a/AI_core_vs2017solution/ocgcore/llex.c +++ b/AI_core_vs2017solution/ocgcore/llex.c @@ -196,7 +196,9 @@ static void buffreplace (LexState *ls, char from, char to) { while (n--) if (p[n] == from) p[n] = to; } - +#if __ANDROID__ +#define getlocaledecpoint() ('.') +#endif #if !defined(getlocaledecpoint) #define getlocaledecpoint() (localeconv()->decimal_point[0]) diff --git a/AI_core_vs2017solution/ocgcore/ocgapi.h b/AI_core_vs2017solution/ocgcore/ocgapi.h index 82bf5db20..2ca7e2c36 100644 --- a/AI_core_vs2017solution/ocgcore/ocgapi.h +++ b/AI_core_vs2017solution/ocgcore/ocgapi.h @@ -7,7 +7,7 @@ #ifndef OCGAPI_H_ #define OCGAPI_H_ -#define WIN32 +//#define WIN32 #include "common.h" #ifdef WIN32 #include diff --git a/Assets/ArtSystem/gameInfo/barPngLoader.cs b/Assets/ArtSystem/gameInfo/barPngLoader.cs index 0cf7c638d..0d5ffb7de 100644 --- a/Assets/ArtSystem/gameInfo/barPngLoader.cs +++ b/Assets/ArtSystem/gameInfo/barPngLoader.cs @@ -20,7 +20,7 @@ void Start () { api_timeBar.mainTexture = GameTextureManager.time; try { - string[] allLines = (File.ReadAllText("texture\\duel\\healthBar\\config.txt").Replace("\r", "").Replace(" ", "").Split("\n")); + string[] allLines = (File.ReadAllText("texture/duel/healthBar/config.txt").Replace("\r", "").Replace(" ", "").Split("\n")); foreach (var item in allLines) { string[] mats = item.Split("="); diff --git a/Assets/ArtSystem/glacxy.meta b/Assets/ArtSystem/glacxy.meta deleted file mode 100644 index ef4c8e9f7..000000000 --- a/Assets/ArtSystem/glacxy.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 868c8ef03b5990d4db7b7e891c456cee -folderAsset: yes -timeCreated: 1495457253 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/ArtSystem/proico.meta b/Assets/ArtSystem/proico.meta deleted file mode 100644 index 184576ff5..000000000 --- a/Assets/ArtSystem/proico.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: abb23a9422c4bcc4a9613864e7832e63 -folderAsset: yes -timeCreated: 1475343881 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/NGUI/Scripts/Internal/NGUITools.cs b/Assets/NGUI/Scripts/Internal/NGUITools.cs index 95799951f..207814403 100644 --- a/Assets/NGUI/Scripts/Internal/NGUITools.cs +++ b/Assets/NGUI/Scripts/Internal/NGUITools.cs @@ -191,7 +191,7 @@ static public string GetHierarchy (GameObject obj) while (obj.transform.parent != null) { obj = obj.transform.parent.gameObject; - path = obj.name + "\\" + path; + path = obj.name + "/" + path; } return path; } diff --git a/Assets/Plugins/7zip/Compress/LzmaAlone/LzmaAlone.csproj.meta b/Assets/Plugins/7zip/Compress/LzmaAlone/LzmaAlone.csproj.meta deleted file mode 100644 index 185372a47..000000000 --- a/Assets/Plugins/7zip/Compress/LzmaAlone/LzmaAlone.csproj.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f63900dbd81cf4746a1db7823eda8d17 -timeCreated: 1480605644 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/7zip/Compress/LzmaAlone/LzmaAlone.sln.meta b/Assets/Plugins/7zip/Compress/LzmaAlone/LzmaAlone.sln.meta deleted file mode 100644 index 9d4b4a720..000000000 --- a/Assets/Plugins/7zip/Compress/LzmaAlone/LzmaAlone.sln.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1f59eb5233b50624290e6bda547b6b61 -timeCreated: 1474370703 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android.meta b/Assets/Plugins/Android.meta new file mode 100644 index 000000000..1544c833d --- /dev/null +++ b/Assets/Plugins/Android.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f5be9393275f54bd39dea76e0ea468fe +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/Android/libocgcore.so b/Assets/Plugins/Android/libocgcore.so new file mode 100644 index 000000000..9b5e7bd85 Binary files /dev/null and b/Assets/Plugins/Android/libocgcore.so differ diff --git a/Assets/Plugins/Android/libocgcore.so.meta b/Assets/Plugins/Android/libocgcore.so.meta new file mode 100644 index 000000000..4ccc09600 --- /dev/null +++ b/Assets/Plugins/Android/libocgcore.so.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: fb10b5f9743676343bc13a6fdeb11a2b +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Android/libsqlite3.so b/Assets/Plugins/Android/libsqlite3.so new file mode 100644 index 000000000..d69ba56f8 Binary files /dev/null and b/Assets/Plugins/Android/libsqlite3.so differ diff --git a/Assets/Plugins/Android/libsqlite3.so.meta b/Assets/Plugins/Android/libsqlite3.so.meta new file mode 100644 index 000000000..56a6e6a02 --- /dev/null +++ b/Assets/Plugins/Android/libsqlite3.so.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 4c54e1ad15020354eab25b444a7bb32b +DefaultImporter: + userData: diff --git a/Assets/Plugins/high_light.meta b/Assets/Plugins/high_light.meta deleted file mode 100644 index 43bcec563..000000000 --- a/Assets/Plugins/high_light.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b59e4f5f725a4484d84015652d7df76a -folderAsset: yes -timeCreated: 1470042630 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/SibylSystem/Config.cs b/Assets/SibylSystem/Config.cs index 483ea1959..4b5db4516 100644 --- a/Assets/SibylSystem/Config.cs +++ b/Assets/SibylSystem/Config.cs @@ -51,7 +51,7 @@ public static string Getui(string original) if (loaded == false) { loaded = true; - string[] lines = File.ReadAllText("texture\\ui\\config.txt").Replace("\r", "").Replace(" ", "").Split("\n"); + string[] lines = File.ReadAllText("texture/ui/config.txt").Replace("\r", "").Replace(" ", "").Split("\n"); for (int i = 0; i < lines.Length; i++) { string[] mats = lines[i].Split("="); diff --git a/Assets/SibylSystem/MonoHelpers/UIHelper.cs b/Assets/SibylSystem/MonoHelpers/UIHelper.cs index 351f26a05..04760247f 100644 --- a/Assets/SibylSystem/MonoHelpers/UIHelper.cs +++ b/Assets/SibylSystem/MonoHelpers/UIHelper.cs @@ -6,19 +6,19 @@ using UnityEngine; public static class UIHelper { - [DllImport("user32.dll")] + [DllImport("user32l")] static extern bool FlashWindow(IntPtr handle, bool invert); public delegate bool WNDENUMPROC(IntPtr hwnd, uint lParam); - [DllImport("user32.dll", SetLastError = true)] + [DllImport("user32", SetLastError = true)] static extern bool EnumWindows(WNDENUMPROC lpEnumFunc, uint lParam); - [DllImport("user32.dll", SetLastError = true)] + [DllImport("user32", SetLastError = true)] static extern IntPtr GetParent(IntPtr hWnd); - [DllImport("user32.dll")] + [DllImport("user32")] static extern uint GetWindowThreadProcessId(IntPtr hWnd, ref uint lpdwProcessId); - [DllImport("kernel32.dll")] + [DllImport("kernel32")] static extern void SetLastError(uint dwErrCode); static IntPtr GetProcessWnd() diff --git a/Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs b/Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs index 261c02803..1537846d1 100644 --- a/Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs +++ b/Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs @@ -2263,7 +2263,7 @@ public void animation_show_off(bool summon, bool disabled = false) } else if (show_off_shokewave) { - if (Program.I().setting.setting.showoff.value == false || File.Exists("picture\\closeup\\" + data.Id.ToString() + ".png") == false || (data.Attack < Program.I().setting.atk && data.Level < Program.I().setting.star)) + if (Program.I().setting.setting.showoff.value == false || File.Exists("picture/closeup/" + data.Id.ToString() + ".png") == false || (data.Attack < Program.I().setting.atk && data.Level < Program.I().setting.star)) { refreshFunctions.Add(SOH_nSum); Program.I().ocgcore.Sleep(30); @@ -2276,7 +2276,7 @@ public void animation_show_off(bool summon, bool disabled = false) } else { - if (Program.I().setting.setting.showoffWhenActived.value == false || File.Exists("picture\\closeup\\" + data.Id.ToString() + ".png") == false) + if (Program.I().setting.setting.showoffWhenActived.value == false || File.Exists("picture/closeup/" + data.Id.ToString() + ".png") == false) { refreshFunctions.Add(SOH_nAct); Program.I().ocgcore.Sleep(42); diff --git a/Assets/SibylSystem/Program.cs b/Assets/SibylSystem/Program.cs index 50b7b15b1..f0ea29feb 100644 --- a/Assets/SibylSystem/Program.cs +++ b/Assets/SibylSystem/Program.cs @@ -273,7 +273,13 @@ public static float getVerticalTransparency() void initialize() { - + #if (UNITY_ANDROID || UNITY_IPHONE) + Environment.CurrentDirectory = Application.persistentDataPath; + System.IO.Directory.SetCurrentDirectory (Application.persistentDataPath); + #else + Environment.CurrentDirectory = System.Windows.Forms.Application.StartupPath; + System.IO.Directory.SetCurrentDirectory (System.Windows.Forms.Application.StartupPath); + #endif go(1, () => { UIHelper.iniFaces(); @@ -285,19 +291,19 @@ void initialize() }); go(300, () => { - InterString.initialize("config\\translation.conf"); + InterString.initialize("config/translation.conf"); GameTextureManager.initialize(); - Config.initialize("config\\config.conf"); - GameStringManager.initialize("config\\strings.conf"); - if (File.Exists("cdb\\strings.conf")) + Config.initialize("config/config.conf"); + GameStringManager.initialize("config/strings.conf"); + if (File.Exists("cdb/strings.conf")) { - GameStringManager.initialize("cdb\\strings.conf"); + GameStringManager.initialize("cdb/strings.conf"); } - if (File.Exists("diy\\strings.conf")) + if (File.Exists("diy/strings.conf")) { - GameStringManager.initialize("diy\\strings.conf"); + GameStringManager.initialize("diy/strings.conf"); } - YGOSharp.BanlistManager.initialize("config\\lflist.conf"); + YGOSharp.BanlistManager.initialize("config/lflist.conf"); var fileInfos = (new DirectoryInfo("cdb")).GetFiles(); for (int i = 0; i < fileInfos.Length; i++) @@ -306,7 +312,7 @@ void initialize() { if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 4, 4) == ".cdb") { - YGOSharp.CardsManager.initialize("cdb\\" + fileInfos[i].Name); + YGOSharp.CardsManager.initialize("cdb/" + fileInfos[i].Name); } } } @@ -320,7 +326,7 @@ void initialize() { if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 4, 4) == ".cdb") { - YGOSharp.CardsManager.initialize("diy\\" + fileInfos[i].Name); + YGOSharp.CardsManager.initialize("diy/" + fileInfos[i].Name); } } } @@ -334,7 +340,7 @@ void initialize() { if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 3, 3) == ".db") { - YGOSharp.PacksManager.initialize("pack\\" + fileInfos[i].Name); + YGOSharp.PacksManager.initialize("pack/" + fileInfos[i].Name); } } } @@ -825,12 +831,18 @@ public void shiftToServant(Servant to) void Start() { - if (Screen.width < 100 || Screen.height < 100) - { - Screen.SetResolution(1300, 700, false); - } - Application.targetFrameRate = 120; - mouseParticle = Instantiate(new_mouse); + #if (UNITY_ANDROID || UNITY_IPHONE) + Screen.SetResolution(1366, 768, true); + Application.targetFrameRate = -1; + #else + if (Screen.width < 100 || Screen.height < 100) + { + Screen.SetResolution(1300, 700, false); + } + Application.targetFrameRate = 120; + #endif + + mouseParticle = Instantiate(new_mouse); instance = this; initialize(); go(500, () => { gameStart(); }); diff --git a/Assets/SibylSystem/ResourceManagers/GameTextureManager.cs b/Assets/SibylSystem/ResourceManagers/GameTextureManager.cs index 851d16e99..549ef58ae 100644 --- a/Assets/SibylSystem/ResourceManagers/GameTextureManager.cs +++ b/Assets/SibylSystem/ResourceManagers/GameTextureManager.cs @@ -268,9 +268,9 @@ static void thread_run() private static void ProcessingCardFeature(PictureResource pic) { - if (File.Exists("picture\\closeup\\" + pic.code.ToString() + ".png")) + if (File.Exists("picture/closeup/" + pic.code.ToString() + ".png")) { - string path = "picture\\closeup\\" + pic.code.ToString() + ".png"; + string path = "picture/closeup/" + pic.code.ToString() + ".png"; BitmapHelper bitmap = new BitmapHelper(path); int left; int right; @@ -308,16 +308,16 @@ private static void ProcessingCardFeature(PictureResource pic) } else { - string path = "picture\\card\\" + pic.code.ToString() + ".png"; + string path = "picture/card/" + pic.code.ToString() + ".png"; if (!File.Exists(path)) { - path = "picture\\card\\" + pic.code.ToString() + ".jpg"; + path = "picture/card/" + pic.code.ToString() + ".jpg"; } bool Iam8 = false; if (!File.Exists(path)) { Iam8 = true; - path = "picture\\cardIn8thEdition\\" + pic.code.ToString() + ".jpg"; + path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg"; } if (!File.Exists(path)) { @@ -566,19 +566,19 @@ private static void CutTop(BitmapHelper bitmap, out int left, out int right, out private static void ProcessingVerticleDrawing(PictureResource pic) { - string path = "picture\\closeup\\" + pic.code.ToString() + ".png"; + string path = "picture/closeup/" + pic.code.ToString() + ".png"; if (!File.Exists(path)) { - path = "picture\\card\\" + pic.code.ToString() + ".png"; + path = "picture/card/" + pic.code.ToString() + ".png"; if (!File.Exists(path)) { - path = "picture\\card\\" + pic.code.ToString() + ".jpg"; + path = "picture/card/" + pic.code.ToString() + ".jpg"; } bool Iam8 = false; if (!File.Exists(path)) { Iam8 = true; - path = "picture\\cardIn8thEdition\\" + pic.code.ToString() + ".jpg"; + path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg"; } if (!File.Exists(path)) { @@ -706,14 +706,14 @@ private static void softVtype(PictureResource pic, float si) private static void ProcessingCardPicture(PictureResource pic) { - string path = "picture\\card\\" + pic.code.ToString() + ".png"; + string path = "picture/card/" + pic.code.ToString() + ".png"; if (!File.Exists(path)) { - path = "picture\\card\\" + pic.code.ToString() + ".jpg"; + path = "picture/card/" + pic.code.ToString() + ".jpg"; } if (!File.Exists(path)) { - path = "picture\\cardIn8thEdition\\" + pic.code.ToString() + ".jpg"; + path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg"; } if (!File.Exists(path)) { @@ -873,30 +873,30 @@ internal static void initialize() opBack = UIHelper.getTexture2D("texture/duel/opponent.jpg"); unknown = UIHelper.getTexture2D("texture/duel/unknown.jpg"); negated = UIHelper.getTexture2D("texture/duel/negated.png"); - bar = UIHelper.getTexture2D("texture\\duel\\healthBar\\bg.png"); - exBar = UIHelper.getTexture2D("texture\\duel\\healthBar\\excited.png"); - time = UIHelper.getTexture2D("texture\\duel\\healthBar\\t.png"); - lp = UIHelper.getTexture2D("texture\\duel\\healthBar\\lp.png"); - L = UIHelper.getTexture2D("texture\\duel\\L.png"); - R = UIHelper.getTexture2D("texture\\duel\\R.png"); - LINK = UIHelper.getTexture2D("texture\\duel\\link.png"); - LINKm = UIHelper.getTexture2D("texture\\duel\\linkMask.png"); - Chain = UIHelper.getTexture2D("texture\\duel\\chain.png"); - Mask = UIHelper.getTexture2D("texture\\duel\\mask.png"); - - - nt = UIHelper.getTexture2D("texture\\duel\\phase\\nt.png"); - bp = UIHelper.getTexture2D("texture\\duel\\phase\\bp.png"); - ep = UIHelper.getTexture2D("texture\\duel\\phase\\ep.png"); - mp1 = UIHelper.getTexture2D("texture\\duel\\phase\\mp1.png"); - mp2 = UIHelper.getTexture2D("texture\\duel\\phase\\mp2.png"); - dp = UIHelper.getTexture2D("texture\\duel\\phase\\dp.png"); - sp = UIHelper.getTexture2D("texture\\duel\\phase\\sp.png"); - - phase = UIHelper.getTexture2D("texture\\duel\\phase\\phase.png"); - - rs = UIHelper.getTexture2D("texture\\duel\\phase\\rs.png"); - ts = UIHelper.getTexture2D("texture\\duel\\phase\\ts.png"); + bar = UIHelper.getTexture2D("texture/duel/healthBar/bg.png"); + exBar = UIHelper.getTexture2D("texture/duel/healthBar/excited.png"); + time = UIHelper.getTexture2D("texture/duel/healthBar/t.png"); + lp = UIHelper.getTexture2D("texture/duel/healthBar/lp.png"); + L = UIHelper.getTexture2D("texture/duel/L.png"); + R = UIHelper.getTexture2D("texture/duel/R.png"); + LINK = UIHelper.getTexture2D("texture/duel/link.png"); + LINKm = UIHelper.getTexture2D("texture/duel/linkMask.png"); + Chain = UIHelper.getTexture2D("texture/duel/chain.png"); + Mask = UIHelper.getTexture2D("texture/duel/mask.png"); + + + nt = UIHelper.getTexture2D("texture/duel/phase/nt.png"); + bp = UIHelper.getTexture2D("texture/duel/phase/bp.png"); + ep = UIHelper.getTexture2D("texture/duel/phase/ep.png"); + mp1 = UIHelper.getTexture2D("texture/duel/phase/mp1.png"); + mp2 = UIHelper.getTexture2D("texture/duel/phase/mp2.png"); + dp = UIHelper.getTexture2D("texture/duel/phase/dp.png"); + sp = UIHelper.getTexture2D("texture/duel/phase/sp.png"); + + phase = UIHelper.getTexture2D("texture/duel/phase/phase.png"); + + rs = UIHelper.getTexture2D("texture/duel/phase/rs.png"); + ts = UIHelper.getTexture2D("texture/duel/phase/ts.png"); N = new Texture2D(10,10); for (int i = 0; i < 10; i++) @@ -909,7 +909,7 @@ internal static void initialize() N.Apply(); try { - UnityEngine.Color.TryParseHexString(File.ReadAllText("texture\\duel\\chainColor.txt"), out chainColor); + UnityEngine.Color.TryParseHexString(File.ReadAllText("texture/duel/chainColor.txt"), out chainColor); } catch (Exception) { diff --git a/Assets/SibylSystem/selectServer/SelectServer.cs b/Assets/SibylSystem/selectServer/SelectServer.cs index 11fa710d4..73f5ef805 100644 --- a/Assets/SibylSystem/selectServer/SelectServer.cs +++ b/Assets/SibylSystem/selectServer/SelectServer.cs @@ -95,11 +95,11 @@ public override void preFrameFunction() void printFile(bool first) { list.Clear(); - if (File.Exists("config\\hosts.conf") == false) + if (File.Exists("config/hosts.conf") == false) { - File.Create("config\\hosts.conf").Close(); + File.Create("config/hosts.conf").Close(); } - string txtString = File.ReadAllText("config\\hosts.conf"); + string txtString = File.ReadAllText("config/hosts.conf"); string[] lines = txtString.Replace("\r", "").Split("\n"); for (int i = 0; i < lines.Length; i++) { @@ -175,7 +175,7 @@ public void KF_onlineGame(string Name,string ipString, string portString, string { all += list.items[i] + "\r\n"; } - File.WriteAllText("config\\hosts.conf", all); + File.WriteAllText("config/hosts.conf", all); printFile(false); (new Thread(() => { TcpHelper.join(ipString, name, portString, pswString,versionString); })).Start(); } diff --git a/Assets/old/UiverseAssests/TextMesh Pro/Examples/Sprites.meta b/Assets/old/UiverseAssests/TextMesh Pro/Examples/Sprites.meta deleted file mode 100644 index 3ebc057b3..000000000 --- a/Assets/old/UiverseAssests/TextMesh Pro/Examples/Sprites.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 91fec1b28f9a91b42abd9257cd4d129b -folderAsset: yes -timeCreated: 1458307470 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/old/UiverseAssests/TextMesh Pro/User Guide.meta b/Assets/old/UiverseAssests/TextMesh Pro/User Guide.meta deleted file mode 100644 index d278b9aea..000000000 --- a/Assets/old/UiverseAssests/TextMesh Pro/User Guide.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 863f62626963a6445b92586f336ae65d -folderAsset: yes -timeCreated: 1458307470 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/AnimationUV.js b/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/AnimationUV.js index 70c423b3e..4dfff1eb2 100644 --- a/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/AnimationUV.js +++ b/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/AnimationUV.js @@ -4,13 +4,14 @@ public var framesPerSecond = 10.0; public var loop:boolean; public var play:boolean = true; private var index:int; -private var offsettime; +private var offsettime : float; public var Hidewhenstopplaying:boolean; function Start(){ offsettime = Time.time; } function Update () { - index = (Time.time - offsettime) * framesPerSecond; + var i = (Time.time - offsettime) * framesPerSecond; + index = i; if(play){ index = index % (uvAnimationTileX * uvAnimationTileY); var size = Vector2 (1.0 / uvAnimationTileX, 1.0 / uvAnimationTileY); @@ -25,7 +26,7 @@ function Update () { if(index >= (uvAnimationTileX * uvAnimationTileY)-1){ play = false; if(Hidewhenstopplaying){ - GetComponent.().active = false; + (GetComponent.() as Renderer).enabled = false; } } } diff --git a/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/ParticleSetting.js b/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/ParticleSetting.js index 6d268568d..e021e406f 100644 --- a/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/ParticleSetting.js +++ b/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/ParticleSetting.js @@ -3,7 +3,7 @@ var LifeTime:float = 1; var RandomRotation:boolean = false; var PositionOffset:Vector3; var SpawnEnd:GameObject; -private var timetemp; +private var timetemp:float; function Start(){ timetemp = Time.time; if(RandomRotation){ @@ -14,7 +14,7 @@ function Start(){ } function Update () { - if(Time.time > timetemp + LifeTime){ + if(Time.time > (timetemp + LifeTime)){ if(SpawnEnd){ var obj = GameObject.Instantiate(SpawnEnd,this.transform.position,this.transform.rotation); } diff --git a/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/Spawner.js b/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/Spawner.js index d6999218d..8b3294f06 100644 --- a/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/Spawner.js +++ b/Assets/old/UiverseAssests/art_plugin/ExtremeFXvol1/Source/Scripts/Spawner.js @@ -2,7 +2,7 @@ var ObjectSpawn:GameObject; var SpawnRate:float; var LifeTimeObject:float = 1; var LimitObject:int = 3; -private var timetemp; +private var timetemp:float; private var objcount:int; var PositionRandomSize:Vector3; var PositionOffset:Vector3; diff --git a/Assets/old/UiverseAssests/art_plugin/MagicEffectsLightningVol01/FX_Prefabs/fx_magic_lightning_summon.meta b/Assets/old/UiverseAssests/art_plugin/MagicEffectsLightningVol01/FX_Prefabs/fx_magic_lightning_summon.meta deleted file mode 100644 index 7320347ec..000000000 --- a/Assets/old/UiverseAssests/art_plugin/MagicEffectsLightningVol01/FX_Prefabs/fx_magic_lightning_summon.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: bbaaaa822d3ceb2478f1431c4afd6867 -folderAsset: yes -timeCreated: 1470080051 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/ExtrudedMeshTrail.js b/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/ExtrudedMeshTrail.js index cc6941ce6..3c115fd79 100644 --- a/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/ExtrudedMeshTrail.js +++ b/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/ExtrudedMeshTrail.js @@ -25,14 +25,15 @@ private var sections = new Array(); function LateUpdate () { var position = transform.position; var now = Time.time; - + var tmp : ExtrudedTrailSection = sections[sections.length - 1]; // Remove old sections - while (sections.length > 0 && now > sections[sections.length - 1].time + time) { + while (sections.length > 0 && now > (tmp.time + time)) { sections.Pop(); + tmp = sections[sections.length - 1]; } - + tmp = sections[0]; // Add a new trail section to beginning of array - if (sections.length == 0 || (sections[0].point - position).sqrMagnitude > minDistance * minDistance) + if (sections.length == 0 || (tmp.point - position).sqrMagnitude > minDistance * minDistance) { var section = ExtrudedTrailSection (); section.point = position; @@ -48,14 +49,16 @@ function LateUpdate () { var worldToLocal = transform.worldToLocalMatrix; var finalSections = new Matrix4x4[sections.length]; var previousRotation : Quaternion; - + + var fsection : ExtrudedTrailSection = sections[0]; + var ssection : ExtrudedTrailSection = sections[1]; for (var i=0;i 0 && now > sections[sections.length - 1].time + time) { + while (sections.length > 0 && now > (cur_section.time + time)) { sections.Pop(); + cur_section = sections[sections.length - 1]; } - + var section0 : TronTrailSection = sections[0]; // Add a new trail section - if (sections.length == 0 || (sections[0].point - position).sqrMagnitude > minDistance * minDistance) + if (sections.length == 0 || (section0.point - position).sqrMagnitude > minDistance * minDistance) { var section = TronTrailSection (); section.point = position; diff --git a/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/Twist.js b/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/Twist.js index 1af9144a3..b92d1704d 100644 --- a/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/Twist.js +++ b/Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/Twist.js @@ -39,7 +39,7 @@ function DoTwist( pos : Vector3, t : float ) { var st = Mathf.Sin(t); var ct = Mathf.Cos(t); - new_pos = Vector3.zero; + var new_pos = Vector3.zero; new_pos.x = pos.x*ct - pos.z*st; new_pos.z = pos.x*st + pos.z*ct; diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 99f74cd23..a39fc701a 100644 Binary files a/ProjectSettings/EditorBuildSettings.asset and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 6afc76168..e0cce0809 100644 Binary files a/ProjectSettings/ProjectSettings.asset and b/ProjectSettings/ProjectSettings.asset differ diff --git a/README.md b/README.md index fa8abc7f1..cc3d72658 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,15 @@ The feedbacks is checked every day. 2. build the c++ solution in x64 and release mode and you get the **ocgcore.dll** -3. copy it into **YGOProUnity_V2\Assets\Plugins** \ No newline at end of file +3. copy it into **YGOProUnity_V2\Assets\Plugins** + + +# How to compile the libocgcore.so? + +*In most case you do not need to care about the ocgcore.dll.* + +1. cd /d **YGOProUnity_V2/AI_core_vs2017solution** + +2. ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=Application.mk + +3. copy **YGOProUnity_V2\AI_core_vs2017solution\libs\armeabi-v7a\libocgcore.so to **YGOProUnity_V2\Assets\Plugins\Android\ \ No newline at end of file