From 424e139692353c23e40141fb6b9a0645176cdaeb Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 15 Apr 2025 15:36:21 +0800 Subject: [PATCH 1/6] =?UTF-8?q?Nes=20DrawCanvas=E4=BF=AE=E6=94=B9=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E7=B3=BB=E6=95=B0=20y=3D-1=20=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AFx=E8=BD=B4=E7=BF=BB=E8=BD=AC180,=E4=BB=A5=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0Y=E8=BD=B4=E5=81=8F=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Resources/NES/NesEmulator.prefab | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab b/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab index d539bc20..ed720f00 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/NES/NesEmulator.prefab @@ -551,13 +551,13 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4232056521759880276} - m_LocalRotation: {x: 1, y: 0, z: 0, w: 0} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1, y: -1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4232056520494431727} - m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} From 8e24f556af5dba2d422b99874223ea7f04b90a9a Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 15 Apr 2025 15:40:27 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=AD=98=E6=A1=A3=E5=9B=BE=E7=89=87UI?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E7=9A=84localscale=E6=94=B9=E5=9B=9E1,1,1=20?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=9C=A8UI=E4=B8=8A=E5=8E=BB=E9=80=82?= =?UTF-8?q?=E5=BA=94=E5=AD=98=E6=A1=A3=E5=9B=BE=E7=89=87=E7=9A=84Y?= =?UTF-8?q?=E8=BD=B4=E7=BF=BB=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Resources/UIPrefabs/OptionUI.prefab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab index 120a9d77..94f5a72d 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab @@ -1688,7 +1688,7 @@ RectTransform: m_GameObject: {fileID: 5162569472849600096} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: -1, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 5970282275929291192} From 959956706f3901ccbccd720e67c62c9e5c31c262 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 15 Apr 2025 15:41:50 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=8E=B7=E5=8F=96EmuCore=E7=9A=84OutputTex?= =?UTF-8?q?=E6=97=B6,=E8=BF=98=E4=BC=9A=E6=A0=B9=E6=8D=AEDrawCanvas?= =?UTF-8?q?=E7=9A=84localscale,=E6=9D=A5=E7=BA=A0=E6=AD=A3=E5=AD=98?= =?UTF-8?q?=E6=A1=A3=E5=9B=BE=E7=89=87Y=E8=BD=B4=E7=BF=BB=E8=BD=AC?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/InGameUI/InGameUI_SaveStateMenu.cs | 2 +- .../Assets/Script/AppMain/Utility.cs | 25 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs index b20d5c56..994d5f64 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs @@ -67,7 +67,7 @@ namespace AxibugEmuOnline.Client { var stateData = m_ingameUI.Core.GetStateBytes(); var tex = m_ingameUI.Core.OutputPixel; - var screenData = tex.ToJPG(); + var screenData = tex.ToJPG(m_ingameUI.Core.DrawCanvas.transform.localScale); m_savFile.Save(m_savFile.Sequecen, stateData, screenData); } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs index 1a233978..c7c630cd 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs @@ -55,29 +55,26 @@ namespace AxibugEmuOnline.Client } - public static byte[] ToJPG(this Texture texture) + public static byte[] ToJPG(this Texture texture, Vector2 scale) { - Texture2D outputTex = null; - if (texture is RenderTexture rt) - { - outputTex = ConvertFromRenderTexture(rt); - } - else if (texture is Texture2D) - { - outputTex = texture as Texture2D; - } + Texture2D outputTex = ConvertFromRenderTexture(texture, scale); return outputTex.EncodeToJPG(); } - private static Texture2D ConvertFromRenderTexture(RenderTexture rt) + private static Texture2D ConvertFromRenderTexture(Texture src, Vector2 scale) { + float offsetX = (scale.x < 0) ? 1 : 0; + float offsetY = (scale.y < 0) ? 1 : 0; + + var offset = new Vector2(offsetX, offsetY); + // 创建临时RenderTexture并拷贝内容 - RenderTexture tempRT = RenderTexture.GetTemporary(rt.width, rt.height, 0, RenderTextureFormat.ARGB32); - Graphics.Blit(rt, tempRT); + RenderTexture tempRT = RenderTexture.GetTemporary(src.width, src.height, 0, RenderTextureFormat.ARGB32); + Graphics.Blit(src, tempRT, scale, offset); // 读取到Texture2D - Texture2D tex = new Texture2D(rt.width, rt.height, TextureFormat.RGBA32, false); + Texture2D tex = new Texture2D(src.width, src.height, TextureFormat.RGBA32, false); RenderTexture.active = tempRT; tex.ReadPixels(new Rect(0, 0, tempRT.width, tempRT.height), 0, 0); tex.Apply(); From 16a7acee6180d082c034ca55c31f219594764e01 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Wed, 16 Apr 2025 13:09:25 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=AD=98=E6=A1=A3=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=AF=8F=E4=B8=AA=E7=8B=AC=E7=AB=8B=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=84=E8=87=AA=E6=8B=A5=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs | 6 ++++++ .../Script/AppMain/Manager/SaveSlotManager/SaveFile.cs | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs index 92ea219c..fba7703f 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs @@ -63,6 +63,12 @@ namespace AxibugEmuOnline.Client.ClientCore { return s_persistentRoot + "/" + emuPlatform.ToString(); } + + public static string UserPersistenDataPath(RomPlatformType emuPlatform) + { + return string.Format("{0}/{1}", PersistentDataPath(emuPlatform), user.userdata.UID); + } + public static string PersistentDataRoot() => s_persistentRoot; public static RomLib GetRomLib(RomPlatformType platform) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs index d0077d9d..ea95067c 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs @@ -7,7 +7,7 @@ using System.Runtime.InteropServices; namespace AxibugEmuOnline.Client { - /// 存档文件管理类 + /// 存档文件抽象类 public class SaveFile { public SavCloudApi CloudAPI => App.SavMgr.CloudApi; @@ -28,8 +28,8 @@ namespace AxibugEmuOnline.Client { get { - var path = App.PersistentDataPath(EmuPlatform); - path = $"{path}/Slot/{EmuPlatform}/{RomID}"; + var path = App.UserPersistenDataPath(EmuPlatform); + path = $"{path}/Slot/{RomID}"; Directory.CreateDirectory(path); From 13cddd8a3bde5c089df04b68c8670ac7075a2516 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Fri, 18 Apr 2025 13:38:21 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E5=AD=98=E6=A1=A3=E7=8A=B6=E6=80=81=E7=9A=84=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Resources/Icons/conflict.png | Bin 0 -> 3153 bytes .../Assets/Resources/Icons/conflict.png.meta | 130 ++++++++++++++++++ .../Assets/Resources/Icons/disconnect.png | Bin 0 -> 3506 bytes .../Resources/Icons/disconnect.png.meta | 130 ++++++++++++++++++ .../Assets/Resources/Icons/sync.png | Bin 0 -> 3693 bytes .../Assets/Resources/Icons/sync.png.meta | 130 ++++++++++++++++++ .../Assets/Resources/Icons/synced.png | Bin 0 -> 3211 bytes .../Assets/Resources/Icons/synced.png.meta | 130 ++++++++++++++++++ 8 files changed, 520 insertions(+) create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/conflict.png create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/conflict.png.meta create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/disconnect.png create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/disconnect.png.meta create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/sync.png create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/sync.png.meta create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/synced.png create mode 100644 AxibugEmuOnline.Client/Assets/Resources/Icons/synced.png.meta diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/conflict.png b/AxibugEmuOnline.Client/Assets/Resources/Icons/conflict.png new file mode 100644 index 0000000000000000000000000000000000000000..ddac9c541fe2d5a6517cffc101bed22c17030ad5 GIT binary patch literal 3153 zcmdT{`#aPB`+x3)L^hUA!^ukZixy{^v>_w&A=_kG>h^>{w7>%Q;Dea-2JjiUT!c>sW- zErsMF)ouTZoQ(9W@Z=Rq6)eKV#tQJdank@OthFT_bc^FqUzL-9jyblf+oFAL)^l@vf1r3`ErFD2u^@1~lklVyo=^<1 z8{LW%O`U+e!VW-0t2zC184i#mFcgsU1M)psqRj2-WN$kxfb4LJdxGQvI-h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AxDrTOK~D>yc5K;&d)cSvpjU8C0` zx@kdapXwt4bkldhK}w(&qtg3s8@>5D8K+msCeOlx{$oDdu+a29_>aU%HSB^P%*f79jfRwztN&`JwP1)fmJ2D0VWBn z;?V92m~G2?`YF;+zNWh^KeH5oj7e8dtTPNKJ0CXIc7y@^o6<^ME*xlaa|7*);DA)* z=<7^E0Sd`bm_JR83q5b-J3 eO8y@J{8Yj_y}*+0PNhnB1Yk=(LgHDSy!>DFN_iXr literal 0 HcmV?d00001 diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/conflict.png.meta b/AxibugEmuOnline.Client/Assets/Resources/Icons/conflict.png.meta new file mode 100644 index 00000000..7bf58ce5 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Resources/Icons/conflict.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 994c93ed03dadee49974aebf3cb5365d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/disconnect.png b/AxibugEmuOnline.Client/Assets/Resources/Icons/disconnect.png new file mode 100644 index 0000000000000000000000000000000000000000..f92db37c1483e0876f95350f22f6cff5c9b79792 GIT binary patch literal 3506 zcmdUy={wX77sr1yW(=|$OUy8svV_}y4~elhqsW>i6cQoEPN-k9$C$>xM3yMaxT$2R z)F>InosjG^5r%9bx1~Jpf8crbym?-n^Lg{Vu5(@IoaZWRecoiH2+EALa1>QnAmq9E zxN6{hIU8%Gpl5j7%;0Wd8*Sze>=q2ae`C=+r$^==*jlYJ69K>f${eoj$8ks>IKcIs zgU8Jl0AHQD4*<6W@Q@;CDn@(KrZ)`=yh$q`I9mh-604;w^$s;S4ecVLJpg_TH&s&L z0R$D2Ewrv4vM5OLn;8W7`sSnGaVrR5GRXI!L=nK3NJ#coDFJxD_VOGNIFKr0T3M)l zSkdawoX`pY2=VgM&aMW4a(1$vH4?yB^JZT8bjbfz@%G@k(6*AKk&zgC$Ac#a=N*St zwEOD!4r+^11Y0J{yeE>|SAM(c^sTN;8^(R1ov#x=M}<)64U-Tddi~X+jz7I`di$;X zFbxGC>IyW3sv@lh<7i$btCi4Yi)Ux9jT1!b79Y@-%Ib#w#p8K) zA(VuS7~r;oU54WoDbr{*J|v*|nGfml2XFTyIkaMN-&}{uBMT>PFeC5mIf&0CBsUK* zFtb|e-|VI~-*ojxrZP6HiJc0?UoN@w$zJ@KFN5m}&dtCBbpVt^1-|g)3`e~Mc zK&Nol*#`kWj;9(&miEF0n4MYxYebuY9{+6-7yrvsjBHdJSl9mhvJXK5#D@4z6-zD# z^InTS!g!J75(8)sRhf*4a-D9h;wAv8lo^4Tz}F;{X@&kI6k}@O$dp8oP#BkBT^Tr5 zdXoTX5~`nz>m_(A)PEgN1*jw2!G?WkRIK@v{%n9!tX8}VZ6s~-1SG=1*^Ps`bFPL4 zacPcQro@P<+VUVW3?#JC2g2a21zn@3j%myMbU_pJ%*`g+YWw2TlYCJfyc@rAwobc2 zKLwv$u2*}W=>U*z_jGsBX&T*smrsJC^q|i2jx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=;e5kF~WE4#RPAxzqX1hv#XT`Os)f8ceL6SPS(c zZ}kitN9B3kD-xsdMn(4K&Oz1-JlsL-4n*7+Ro@d+GZSeErE4ZQ@?a+Ko4Zdpj4Z|W z7ORaYsZU{qAczoZ`Jhk@mk}5FH-uAG$;Ze# z04jtZLl|i;b2MGauqAy-sw!YzB;upb|BxKRm?v~8V$a)84}QS&3%-1C{P@)QY^FL_ z+PBvtXpy8i5VjnALJXH-Y}dPsYvQ6`Cu}8>zvuM-q%_x)ByO4Q9SKOCO|H@o-|D<8_;HuxSD+Z=$`DJ zVrV04XkCS*{v7E%5+r(fGYklOYcMj_up;-q)%?Z8v-}Jwx4k=V>Ys^i!81+z_`EYM z#}p8ruuLC5vd3d0g=?{oud8kE-+ky?98=Wj2ofa|DMr?Sf5vA2v4LiBF zm-AXx4*r;>q(pY(ZWenNMeIbo*GX9T4n#1m9000pI;w&(E_LvrwpJ`B|CVG#z7L{u zqi3=3dTLie3v28|VS`vmbG1r`Mes@IqPeK;X96-~KFYuBa#u1(wfo%XYuYN_HfaDU zJR=Sw#+nvFqV#~pumy25T5>zU7+udD+~3U>(sOXJ5XHpP%38Z;oAf*SPQ0hdIxw!m=Boo_3)~b{Q<_v}+uZ(iSCfMvi{6f8RdsBg z&6CxHr?O*&O%?F2k$x-f#T>H$G2^0X#>G}RG1Mr$JG-Z7rusO9Ej#+h$zWNwn7H!( zwK|E;#?sPK(a(I2lJ`Lu{BDa9`de@Nw>KCnEp= literal 0 HcmV?d00001 diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/disconnect.png.meta b/AxibugEmuOnline.Client/Assets/Resources/Icons/disconnect.png.meta new file mode 100644 index 00000000..9f97d6fe --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Resources/Icons/disconnect.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 630c435b903e3dc4e80038c0a531162d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/sync.png b/AxibugEmuOnline.Client/Assets/Resources/Icons/sync.png new file mode 100644 index 0000000000000000000000000000000000000000..0249e5cac6f9cbecdbc4c45268cffe1696350ad5 GIT binary patch literal 3693 zcmb`K`8U*UAIHBl408|0USy1+Q6rQsTVjl57`trUMU0Xyd$;YuU~EyylC;P&vWpgk zAx3txlclj6JB1=Vx_@~7g6D_pdY{jEy{~gV=Y7umhbzw17|#Ja0|NknLtjtZ{6yRS z94O1lU20SI@5ApZ+msNUSr(`=~6edYIy75t#y?JAPquc4N#?n-1 z?IiN(ih1vMcik01ElvREd@L9dPuoXnysmDktB& zZJRb+vvF|C#KdIv`;+?ck~H}0gnL1;gTTc&(ap87(A8GAZ+o5;+}p-%2pB~jATvJJ z*47%V3Cn?-6#Cmcot?ja2uWGL1D^&^=LYcm{|P6$udAD{JT1nI`aqYpg#`}Gxb>v1 zczAj?SZCfcl@NsR-B1Rg$=C17a1po}V+s$cRoidI*X)*xeqT#rLjY*g!(T@&@;(Vz z(UD6d#wVuKv=c42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YUAI8yj`Nq?y=cx&9k8kmy1{|NLcyueq-P~FfvnuKt!^2R=YAI4KVP+JsSdPL+ zYvQ1!A=ce#qwQvsAU$you348;o9D)`V*6&K%ly8(C|zYZE5x)vT+E>}wp_IaJj2{7 zi?JQK`lQ;weWWd6gg?biZyPn`g@Btk4frPTD(Mc*SQof!cXUT4HCC|SoQc#@)HS%d zK%I+}@-gn$pSEc?p*8ewL030+MmfW=rc#;Z)1|=wd2T#b-Ez}p>pJ`Q$^Q}1*D=;E!`Vmt7qfuR!vFvP literal 0 HcmV?d00001 diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/sync.png.meta b/AxibugEmuOnline.Client/Assets/Resources/Icons/sync.png.meta new file mode 100644 index 00000000..6d0ef801 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Resources/Icons/sync.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: c5a9535bb63e1f14f9a1528566864ab2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/synced.png b/AxibugEmuOnline.Client/Assets/Resources/Icons/synced.png new file mode 100644 index 0000000000000000000000000000000000000000..d6690b0658175a0022e8830158f0a54e6d451b5d GIT binary patch literal 3211 zcmds4`8(9_8ve{?ChHhW%EV;Ll6^#k8D^NFCfhJ$OTMWnS+WSSK``$3#`G`rXZk@{C#O;$ZGMF^g?dh2Y_soTsPPj1c8XXpJ z9s(YH(%&|6yPB(g_)8tfF)`DS9XXn@W0CkUatB+^X!== zTKxONip>ePh@s!{TPJtxcek3ic6ZKE$JgH-{kwm+%~OZ}ab<%adEYESxI-Z9Q{E{Y zgIpGzFD-H7pxL}#i^^YICv%LhS5*%G34jq-~RM5Nlxdi^w z8sgJbcEnkhL10bbSI7wD1!a@*@a?P3o^d|zO=@G4GY}4LFdeUNtf}awpf4kW-3+P) zdXrosdhIv*HQQCVr?07jF@{#==H}C8{GEMOda%BV3b~>_W;4)B$}KG|tr=>5E%aQj zwMW~{Kj)L949_f5mJtS)7lIUEm;+jGrXO#N`*hQ`me(a0>_@QMv6+pl#2wy6s0Q}; z(DH+DulV{l!bKG4k|}k#!X-k_W-s=Bem3~Qeai0)jpf$qD`sonzA7=Wy>_ai!Vn8?@N|t2g zQVzw(LyUK`JLHUZr<%U)rF*^S$*(gop%;x!skcx{>;N2xe(Ut6n4%EtC|H zQ=%$i^i6K}$wn+NxA^U*EL$3BIffELa9s(P`X*BrsoJ#+pRuIz3mP6ZUpDbeds2Nt z__cyC$6rm|YG0K=c;BI=N87CuiMp~Si=5u;UYeM=8kxpx>bbZW`Nt=2>}a<{Mn;ap zW0F&p<^cSf&tHpUsUBSC?>$6GHUks$#?YYoKpqGc;z*FjuoTwL{IOW{U7?FDjcAlq zohL(}iMmKb)EuXq!%9-}6%b(5x}MENb#24#NKI=Og2q%p%*$23ntsi0>QhJ?uGLvh zfr^NQ>_9sdX5un&UQ$1J%}bd{7{J;?G1=adcWOi2jmEWs=N=9xu{Ib6I~$O z2KTVD_Q?Ysul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zKA~Pd{^QqsdFibFg_kQ)Ya<$0j|j}<5tb1(3`zfk9jIZ1JX`)PM4(bFt1iOH*blzp zKpK5oA-kn|<|zM|-W98l%ANLJt{{XU{h*|&u literal 0 HcmV?d00001 diff --git a/AxibugEmuOnline.Client/Assets/Resources/Icons/synced.png.meta b/AxibugEmuOnline.Client/Assets/Resources/Icons/synced.png.meta new file mode 100644 index 00000000..b9281df5 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Resources/Icons/synced.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 28db37d78cad20f4397804dfa4572829 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: From eb2f5d268cdfe8a6b04c2a0b5b35c8ec3e918bfe Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Fri, 18 Apr 2025 13:38:45 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=AD=98=E6=A1=A3=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E4=BA=91=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Manager/SaveSlotManager/SaveFile.cs | 45 +++++++---- .../CheckingNetworkState.cs | 21 +++++ .../CheckingNetworkState.cs.meta | 2 + .../SaveFileSyncStates/CheckingState.cs | 61 ++++++++------- .../SaveFileSyncStates/ConflictState.cs | 5 +- .../SaveFileSyncStates/DownloadingState.cs | 77 ++++++++++--------- .../SaveFileSyncStates/IdleState.cs | 11 +++ ...{UnkownState.cs.meta => IdleState.cs.meta} | 0 .../SaveFileSyncStates/SyncedState.cs | 5 +- .../SaveFileSyncStates/UnkownState.cs | 8 -- .../SaveFileSyncStates/UploadingState.cs | 33 ++++---- .../Manager/SaveSlotManager/SimpleSFM.cs | 17 +++- .../UI/InGameUI/InGameUI_SaveStateMenu.cs | 14 ++++ .../Script/AppMain/UI/OptionUI/OptionUI.cs | 1 - .../UI/OptionUI/OptionUI_SavSlotItem.cs | 48 +++++++++++- 15 files changed, 236 insertions(+), 112 deletions(-) create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs.meta create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/IdleState.cs rename AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/{UnkownState.cs.meta => IdleState.cs.meta} (100%) delete mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UnkownState.cs diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs index ea95067c..30882e71 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs @@ -1,6 +1,7 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Tools; using AxibugProtobuf; +using MAME.Core; using System; using System.IO; using System.Runtime.InteropServices; @@ -8,7 +9,7 @@ using System.Runtime.InteropServices; namespace AxibugEmuOnline.Client { /// 存档文件抽象类 - public class SaveFile + public partial class SaveFile { public SavCloudApi CloudAPI => App.SavMgr.CloudApi; @@ -38,7 +39,24 @@ namespace AxibugEmuOnline.Client } } + public bool IsBusy + { + get + { + if (FSM.CurrentState is DownloadingState) return true; + else if (FSM.CurrentState is UploadingState) return true; + + return false; + } + } + + public SimpleFSM.State GetState() + { + return FSM.CurrentState; + } + public event Action OnSavSuccessed; + public event Action OnStateChanged; /// 存档顺序号,用于判断云存档和本地存档的同步状态,是否存在冲突 public uint Sequecen { get; private set; } @@ -55,11 +73,12 @@ namespace AxibugEmuOnline.Client EmuPlatform = platform; SlotIndex = slotIndex; FSM = new SimpleFSM(this); - FSM.AddState(); + FSM.AddState(); FSM.AddState(); FSM.AddState(); FSM.AddState(); FSM.AddState(); + FSM.OnStateChanged += FSM_OnStateChanged; IsEmpty = !File.Exists(FilePath); @@ -82,7 +101,12 @@ namespace AxibugEmuOnline.Client streaming.Dispose(); } - FSM.ChangeState(); + FSM.ChangeState(); + } + + private void FSM_OnStateChanged() + { + OnStateChanged?.Invoke(); } public void Update() @@ -145,6 +169,8 @@ namespace AxibugEmuOnline.Client public unsafe void Save(uint sequence, byte[] savData, byte[] screenShotData) { + if (IsBusy) return; + var filePath = FilePath; var header = new Header @@ -190,9 +216,9 @@ namespace AxibugEmuOnline.Client /// public void TrySync() { - if (FSM.CurrentState is not UnkownState && FSM.CurrentState is not SyncedState) return; + if (FSM.CurrentState is not IdleState && FSM.CurrentState is not SyncedState) return; - FSM.ChangeState(); + FSM.ChangeState(); } @@ -210,14 +236,5 @@ namespace AxibugEmuOnline.Client [FieldOffset(20)] public uint ScreenShotLength; } - - public enum EnumState - { - Unkown, - Checking, - Downloading, - Uploading, - Synced - } } } \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs new file mode 100644 index 00000000..70f95926 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs @@ -0,0 +1,21 @@ +using AxibugEmuOnline.Client.ClientCore; +using AxibugEmuOnline.Client.Tools; +using System; + +namespace AxibugEmuOnline.Client +{ + public partial class SaveFile + { + + public class CheckingNetworkState : SimpleFSM.State + { + public override void OnUpdate() + { + if (App.network.isConnected) + { + FSM.ChangeState(); + } + } + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs.meta new file mode 100644 index 00000000..91f6544a --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingNetworkState.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 288e73ce3cb773e46b7d37a53a3b43ee \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs index 2dbf54a7..5ae92843 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs @@ -4,45 +4,48 @@ using UnityEngine; namespace AxibugEmuOnline.Client { - public class CheckingState : SimpleFSM.State + public partial class SaveFile { - private float m_timeOut; - - public Protobuf_Mine_GameSavInfo NetData { get; private set; } - - public override void OnEnter(SimpleFSM.State preState) + public class CheckingState : SimpleFSM.State { - m_timeOut = 5f; - Host.CloudAPI.OnFetchGameSavList += CloudAPI_OnFetchGameSavList; - Host.CloudAPI.SendGetGameSavList(Host.RomID); - } + private float m_timeOut; - public override void OnExit(SimpleFSM.State nextState) - { - Host.CloudAPI.OnFetchGameSavList -= CloudAPI_OnFetchGameSavList; - } + public Protobuf_Mine_GameSavInfo NetData { get; private set; } - public override void OnUpdate() - { - m_timeOut -= Time.deltaTime; - if (m_timeOut < 0) //已超时 + public override void OnEnter(SimpleFSM.State preState) { - FSM.ChangeState(); + m_timeOut = 5f; + Host.CloudAPI.OnFetchGameSavList += CloudAPI_OnFetchGameSavList; + Host.CloudAPI.SendGetGameSavList(Host.RomID); } - } - private void CloudAPI_OnFetchGameSavList(int romID, Protobuf_Mine_GameSavInfo[] savSlotData) - { - if (romID != Host.RomID) return; - NetData = savSlotData[Host.SlotIndex]; - - if (NetData == null) //云存档不存在,上传本地存档 + public override void OnExit(SimpleFSM.State nextState) { - FSM.ChangeState(); + Host.CloudAPI.OnFetchGameSavList -= CloudAPI_OnFetchGameSavList; } - else + + public override void OnUpdate() { - FSM.ChangeState(); + m_timeOut -= Time.deltaTime; + if (m_timeOut < 0) //已超时 + { + FSM.ChangeState(); + } + } + + private void CloudAPI_OnFetchGameSavList(int romID, Protobuf_Mine_GameSavInfo[] savSlotData) + { + if (romID != Host.RomID) return; + NetData = savSlotData[Host.SlotIndex]; + + if (NetData == null) //云存档不存在,上传本地存档 + { + FSM.ChangeState(); + } + else + { + FSM.ChangeState(); + } } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs index 5bd1b593..e35f1ee7 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs @@ -2,8 +2,11 @@ namespace AxibugEmuOnline.Client { - public class ConflictState : SimpleFSM.State + public partial class SaveFile { + public class ConflictState : SimpleFSM.State + { + } } } \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs index e0e9e2df..7884f129 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs @@ -3,51 +3,54 @@ using AxibugEmuOnline.Client.Tools; namespace AxibugEmuOnline.Client { - public class DownloadingState : SimpleFSM.State + public partial class SaveFile { - uint m_sequece; - private AxiHttpProxy.SendDownLoadProxy m_downloadTask; - private AxiHttpProxy.SendDownLoadProxy m_downloadTaskImg; - - public override void OnEnter(SimpleFSM.State preState) + public class DownloadingState : SimpleFSM.State { - var checkState = preState as CheckingState; + uint m_sequece; + private AxiHttpProxy.SendDownLoadProxy m_downloadTask; + private AxiHttpProxy.SendDownLoadProxy m_downloadTaskImg; - var netData = checkState.NetData; - - if (Host.Sequecen >= (uint)netData.Sequence) + public override void OnEnter(SimpleFSM.State preState) { - FSM.ChangeState(); - return; + var checkState = preState as CheckingState; + + var netData = checkState.NetData; + + if (Host.Sequecen >= (uint)netData.Sequence) + { + FSM.ChangeState(); + return; + } + + m_sequece = (uint)netData.Sequence; + m_downloadTask = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavUrl}"); + m_downloadTaskImg = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavImgUrl}"); } - m_sequece = (uint)netData.Sequence; - m_downloadTask = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavUrl}"); - m_downloadTaskImg = AxiHttpProxy.GetDownLoad($"{App.httpAPI.WebHost}/{netData.SavImgUrl}"); - } - - public override void OnUpdate() - { - if (!m_downloadTask.downloadHandler.isDone) return; - - if (m_downloadTask.downloadHandler.bHadErr) //下载失败 + public override void OnUpdate() { - FSM.ChangeState(); - return; + if (!m_downloadTask.downloadHandler.isDone) return; + + if (m_downloadTask.downloadHandler.bHadErr) //下载失败 + { + FSM.ChangeState(); + return; + } + + if (!m_downloadTaskImg.downloadHandler.isDone) return; + + if (m_downloadTaskImg.downloadHandler.bHadErr) //下载失败 + { + FSM.ChangeState(); + return; + } + + var savData = Host.CloudAPI.UnGzipData(m_downloadTask.downloadHandler.data); + var imgData = Host.CloudAPI.UnGzipData(m_downloadTaskImg.downloadHandler.data); + Host.Save(m_sequece, savData, imgData); + FSM.ChangeState(); } - - if (!m_downloadTaskImg.downloadHandler.isDone) return; - - if (m_downloadTaskImg.downloadHandler.bHadErr) //下载失败 - { - FSM.ChangeState(); - return; - } - - var savData = Host.CloudAPI.UnGzipData(m_downloadTask.downloadHandler.data); - var imgData = Host.CloudAPI.UnGzipData(m_downloadTaskImg.downloadHandler.data); - Host.Save(m_sequece, savData, imgData); - FSM.ChangeState(); } } } \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/IdleState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/IdleState.cs new file mode 100644 index 00000000..68e014f7 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/IdleState.cs @@ -0,0 +1,11 @@ +using AxibugEmuOnline.Client.Tools; + +namespace AxibugEmuOnline.Client +{ + public partial class SaveFile + { + public class IdleState : SimpleFSM.State + { + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UnkownState.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/IdleState.cs.meta similarity index 100% rename from AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UnkownState.cs.meta rename to AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/IdleState.cs.meta diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncedState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncedState.cs index 00c031e9..46bb251f 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncedState.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncedState.cs @@ -2,7 +2,10 @@ namespace AxibugEmuOnline.Client { - public class SyncedState : SimpleFSM.State + public partial class SaveFile { + public class SyncedState : SimpleFSM.State + { + } } } \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UnkownState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UnkownState.cs deleted file mode 100644 index 81061ba4..00000000 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UnkownState.cs +++ /dev/null @@ -1,8 +0,0 @@ -using AxibugEmuOnline.Client.Tools; - -namespace AxibugEmuOnline.Client -{ - public class UnkownState : SimpleFSM.State - { - } -} \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UploadingState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UploadingState.cs index da9f426b..8276411f 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UploadingState.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/UploadingState.cs @@ -2,27 +2,30 @@ namespace AxibugEmuOnline.Client { - public class UploadingState : SimpleFSM.State + public partial class SaveFile { - public override void OnEnter(SimpleFSM.State preState) + public class UploadingState : SimpleFSM.State { - Host.CloudAPI.OnUploadedSavData += Api_OnUploadedSavData; + public override void OnEnter(SimpleFSM.State preState) + { + Host.CloudAPI.OnUploadedSavData += Api_OnUploadedSavData; - Host.GetSavData(out byte[] savData, out byte[] screenData); - Host.CloudAPI.SendUpLoadGameSav(Host.RomID, Host.SlotIndex, Host.Sequecen, savData, screenData); - } + Host.GetSavData(out byte[] savData, out byte[] screenData); + Host.CloudAPI.SendUpLoadGameSav(Host.RomID, Host.SlotIndex, Host.Sequecen, savData, screenData); + } - public override void OnExit(SimpleFSM.State nextState) - { - Host.CloudAPI.OnUploadedSavData -= Api_OnUploadedSavData; - } + public override void OnExit(SimpleFSM.State nextState) + { + Host.CloudAPI.OnUploadedSavData -= Api_OnUploadedSavData; + } - private void Api_OnUploadedSavData(int romID, int slotIndex, AxibugProtobuf.Protobuf_Mine_GameSavInfo savInfo) - { - if (Host.RomID != romID) return; - if (Host.SlotIndex != slotIndex) return; + private void Api_OnUploadedSavData(int romID, int slotIndex, AxibugProtobuf.Protobuf_Mine_GameSavInfo savInfo) + { + if (Host.RomID != romID) return; + if (Host.SlotIndex != slotIndex) return; - FSM.ChangeState(); + FSM.ChangeState(); + } } } } \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs index 4ad5a06f..814207ee 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs @@ -4,10 +4,10 @@ using System.Linq; namespace AxibugEmuOnline.Client.Tools { - public class SimpleFSM + public partial class SimpleFSM { + public event Action OnStateChanged; private Dictionary m_states = new Dictionary(); - private State m_current; public HOST Host { get; private set; } @@ -16,7 +16,18 @@ namespace AxibugEmuOnline.Client.Tools Host = host; } - public State CurrentState => m_current; + private State m_current; + public State CurrentState + { + get => m_current; + set + { + if (m_current == value) return; + + m_current = value; + OnStateChanged?.Invoke(); + } + } public T AddState() where T : State, new() { var stateType = typeof(T); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs index 994d5f64..1da77c5f 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs @@ -46,6 +46,13 @@ namespace AxibugEmuOnline.Client m_subOptions.Add(new LoadMenuItem(inGameui, savFile)); } + public override void OnShow(OptionUI_MenuItem ui) + { + base.OnShow(ui); + + SavFile.TrySync(); + } + protected override List GetOptionMenus() { return m_subOptions; @@ -65,6 +72,13 @@ namespace AxibugEmuOnline.Client public override void OnExcute(OptionUI optionUI, ref bool cancelHide) { + if (m_savFile.IsBusy) + { + OverlayManager.PopTip("存档正在同步中"); + cancelHide = true; + return; + } + var stateData = m_ingameUI.Core.GetStateBytes(); var tex = m_ingameUI.Core.OutputPixel; var screenData = tex.ToJPG(m_ingameUI.Core.DrawCanvas.transform.localScale); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs index b52e8316..029ae216 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI.cs @@ -439,7 +439,6 @@ namespace AxibugEmuOnline.Client public abstract string Name { get; } public virtual Sprite Icon { get; } public virtual bool Visible => true; - public virtual bool Enable => true; public virtual void OnFocus() { } public virtual void OnShow(OptionUI_MenuItem ui) { } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs index d0fc9d20..5286eadc 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs @@ -1,4 +1,7 @@ -using UnityEngine; +using AxibugEmuOnline.Client.Tools; +using System; +using System.Collections.Generic; +using UnityEngine; using UnityEngine.UI; using static AxibugEmuOnline.Client.InGameUI_SaveStateMenu; @@ -10,15 +13,38 @@ namespace AxibugEmuOnline.Client public Image UI_Empty; public Text UI_SavTime; + public GameObject UI_Disconnect; + public GameObject UI_Syncing; + public GameObject UI_Conflict; + public GameObject UI_Synced; + Texture2D m_screenTex; + Dictionary m_stateNodes = new Dictionary(); + + private void Awake() + { + m_stateNodes[typeof(SaveFile.CheckingState)] = UI_Syncing; + m_stateNodes[typeof(SaveFile.ConflictState)] = UI_Conflict; + m_stateNodes[typeof(SaveFile.DownloadingState)] = UI_Syncing; + m_stateNodes[typeof(SaveFile.SyncedState)] = UI_Synced; + m_stateNodes[typeof(SaveFile.UploadingState)] = UI_Syncing; + m_stateNodes[typeof(SaveFile.CheckingNetworkState)] = UI_Disconnect; + } + protected override void OnSetData(InternalOptionMenu menuData) { base.OnSetData(menuData); RefreshUI(); + MenuData.SavFile.OnSavSuccessed += SavFile_OnSavSuccessed; + MenuData.SavFile.OnStateChanged += UpdateStateNode; + } - MenuData.SavFile.OnSavSuccessed += RefreshUI; + private void SavFile_OnSavSuccessed() + { + MenuData.SavFile.TrySync(); + RefreshUI(); } private void RefreshUI() @@ -48,6 +74,21 @@ namespace AxibugEmuOnline.Client m_screenTex.LoadImage(screenShotData); UI_ScreenShot.texture = m_screenTex; } + + UpdateStateNode(); + } + + private void UpdateStateNode() + { + var stateType = MenuData.SavFile.GetState().GetType(); + + foreach (var item in m_stateNodes) + { + var type = item.Key; + var nodeGo = item.Value; + + nodeGo.SetActiveEx(type == stateType); + } } public override void OnHide() @@ -60,7 +101,8 @@ namespace AxibugEmuOnline.Client m_screenTex = null; } - MenuData.SavFile.OnSavSuccessed -= RefreshUI; + MenuData.SavFile.OnSavSuccessed -= SavFile_OnSavSuccessed; + MenuData.SavFile.OnStateChanged -= UpdateStateNode; } public override void OnExecute(OptionUI optionUI, ref bool cancelHide)