From 1f8f5c2773501095db19e34d6a47840dae8c4293 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Fri, 8 Nov 2024 12:01:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96,XMBshader=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs | 2 +- .../Assets/Script/UI/XMBBackGround.shader | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs b/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs index da07fda..59f3e4d 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs @@ -214,7 +214,7 @@ namespace AxibugEmuOnline.Client.Event } catch (Exception e) { - App.log.Error(e.Message); + App.log.Error(e.InnerException.ToString()); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/UI/XMBBackGround.shader b/AxibugEmuOnline.Client/Assets/Script/UI/XMBBackGround.shader index 0932bd2..1c017c0 100644 --- a/AxibugEmuOnline.Client/Assets/Script/UI/XMBBackGround.shader +++ b/AxibugEmuOnline.Client/Assets/Script/UI/XMBBackGround.shader @@ -2,7 +2,6 @@ { Properties { - _MainTex ("Sprite Texture", 2D) = "white" {} _Color ("Tint", Color) = (1,1,1,1) _StencilComp ("Stencil Comparison", Float) = 8 @@ -75,12 +74,9 @@ UNITY_VERTEX_OUTPUT_STEREO }; - sampler2D _MainTex; fixed4 _Color; fixed4 _TextureSampleAdd; - float4 _ClipRect; - float4 _MainTex_ST; - float4 _MainTex_TexelSize; + float4 _ClipRect; float wave(float x, float frequency, float speed, float midHeight, float maxHeight) { @@ -105,7 +101,7 @@ OUT.worldPosition = v.vertex; OUT.vertex = UnityObjectToClipPos(OUT.worldPosition); - OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); + OUT.texcoord =v.texcoord; OUT.color = v.color * _Color; return OUT; From d87d2da55ad4a8186deec13657ea3779d566a94b Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Fri, 8 Nov 2024 13:48:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=94=E6=9C=BA?= =?UTF-8?q?=E6=B5=81=E7=A8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs | 2 +- AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs | 4 ++-- .../Assets/Script/Manager/RomLib/RomLib.cs | 7 +++++++ .../Assets/Script/NesEmulator/NesEmulator.cs | 2 ++ AxibugEmuOnline.Client/Assets/Script/Network/NetMsg.cs | 2 +- .../Assets/Script/UI/InGameUI/StepPerformer.cs | 2 -- .../Assets/Script/UI/RoomListMenuItem.cs | 6 +++--- AxibugEmuOnline.Client/Assets/Script/Utility.cs | 2 +- 8 files changed, 17 insertions(+), 10 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs b/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs index 59f3e4d..6efe5d1 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Event/Eventer.cs @@ -214,7 +214,7 @@ namespace AxibugEmuOnline.Client.Event } catch (Exception e) { - App.log.Error(e.InnerException.ToString()); + App.log.Error(e.ToString()); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs b/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs index b59b5ad..2fb0d33 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs @@ -369,13 +369,13 @@ namespace AxibugEmuOnline.Client.Manager if (WaitStep != msg.WaitStep) { WaitStep = msg.WaitStep; - Eventer.Instance.PostEvent(EEvent.OnRoomWaitStepChange, WaitStep); if (WaitStep == 1) { byte[] decompressRawData = Helper.DecompressByteArray(msg.LoadStateRaw.ToByteArray()); App.log.Info($"收到即时存档数据 解压后;{decompressRawData.Length}"); RawData = decompressRawData; } + Eventer.Instance.PostEvent(EEvent.OnRoomWaitStepChange, WaitStep); } } @@ -435,7 +435,7 @@ namespace AxibugEmuOnline.Client.Manager /// /// /// - public static bool GetFreeSlot(this Protobuf_Room_MiniInfo roomMiniInfo,out int[] freeSlots) + public static bool GetFreeSlot(this Protobuf_Room_MiniInfo roomMiniInfo, out int[] freeSlots) { List temp = new List(); if (roomMiniInfo.Player1UID > 0) temp.Add(0); diff --git a/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomLib.cs b/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomLib.cs index b4105d9..8e5dfb6 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomLib.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomLib.cs @@ -47,6 +47,8 @@ namespace AxibugEmuOnline.Client return romFile; } + + /// 清除所有下载的Rom文件 public void ClearRomFile() { @@ -119,5 +121,10 @@ namespace AxibugEmuOnline.Client { return Helper.FileMD5Hash(data); } + + public void AddRomFile(RomFile rom) + { + nesRomFileNameMapper[rom.FileName] = rom; + } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs index 69d64fe..1dff67b 100644 --- a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs +++ b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs @@ -31,6 +31,8 @@ namespace AxibugEmuOnline.Client Supporter.Setup(new CoreSupporter()); Debuger.Setup(new CoreDebuger()); + App.nesRomLib.AddRomFile(rom); + try { NesCore = new NES(rom.FileName); diff --git a/AxibugEmuOnline.Client/Assets/Script/Network/NetMsg.cs b/AxibugEmuOnline.Client/Assets/Script/Network/NetMsg.cs index 96660b5..4b4dfa1 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Network/NetMsg.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Network/NetMsg.cs @@ -86,7 +86,7 @@ namespace AxibugEmuOnline.Client.Network } catch (Exception e) { - App.log.Error(e.Message); + App.log.Error(e.ToString()); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/StepPerformer.cs b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/StepPerformer.cs index 1b3f342..c111be7 100644 --- a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/StepPerformer.cs +++ b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/StepPerformer.cs @@ -1,6 +1,4 @@ using AxibugEmuOnline.Client.ClientCore; -using System; -using VirtualNes.Core; namespace AxibugEmuOnline.Client { diff --git a/AxibugEmuOnline.Client/Assets/Script/UI/RoomListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/UI/RoomListMenuItem.cs index 48a2fb3..1e85ed3 100644 --- a/AxibugEmuOnline.Client/Assets/Script/UI/RoomListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/UI/RoomListMenuItem.cs @@ -10,7 +10,7 @@ namespace AxibugEmuOnline.Client protected override void Awake() { - Eventer.Instance.RegisterEvent(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll); + Eventer.Instance.RegisterEvent(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll); Eventer.Instance.RegisterEvent(EEvent.OnRoomListSingleClose, OnRoomClosed); Eventer.Instance.RegisterEvent(EEvent.OnRoomListSingleAdd, OnRoomSingleAdd); base.Awake(); @@ -19,7 +19,7 @@ namespace AxibugEmuOnline.Client protected override void OnDestroy() { - Eventer.Instance.UnregisterEvent(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll); + Eventer.Instance.UnregisterEvent(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll); Eventer.Instance.UnregisterEvent(EEvent.OnRoomListSingleUpdate, OnRoomSingleAdd); Eventer.Instance.UnregisterEvent(EEvent.OnRoomListSingleClose, OnRoomClosed); } @@ -46,7 +46,7 @@ namespace AxibugEmuOnline.Client } } - private void OnRoomListUpdateAll(int obj) + private void OnRoomListUpdateAll() { if (m_entering) { diff --git a/AxibugEmuOnline.Client/Assets/Script/Utility.cs b/AxibugEmuOnline.Client/Assets/Script/Utility.cs index 973471a..212a716 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Utility.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Utility.cs @@ -53,7 +53,7 @@ namespace AxibugEmuOnline.Client RomFile romFile = new RomFile(EnumPlatform.NES, 0, 0); romFile.SetWebData(romWebData); s_RomFileCahcesInRoomInfo[roomInfo.GameRomID] = romFile; - + callback.Invoke(roomInfo,romFile); })); break;