diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs index 1b103618..5365fa68 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs @@ -1,5 +1,6 @@ using AxibugEmuOnline.Client.Manager; using AxibugEmuOnline.Client.Network; +using AxibugProtobuf; using System; using System.Collections; using System.IO; @@ -64,7 +65,7 @@ namespace AxibugEmuOnline.Client.ClientCore emu = new AppEmu(); //netgame = new AppNetGame(); httpAPI = new HttpAPI(); - nesRomLib = new RomLib(EnumSupportEmuPlatform.NES); + nesRomLib = new RomLib(RomPlatformType.Nes); CacheMgr = new CacheManager(); roomMgr = new AppRoom(); share = new AppShare(); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs index 4ca46464..1583993d 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using AxibugProtobuf; +using UnityEngine; namespace AxibugEmuOnline.Client { @@ -17,7 +18,7 @@ namespace AxibugEmuOnline.Client void DoReset(); IControllerSetuper GetControllerSetuper(); - EnumSupportEmuPlatform Platform { get; } + RomPlatformType Platform { get; } uint Frame { get; } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs index 9012dbe9..d994bb40 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs @@ -1,5 +1,6 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Event; +using AxibugProtobuf; using UnityEngine; namespace AxibugEmuOnline.Client.Manager @@ -31,7 +32,7 @@ namespace AxibugEmuOnline.Client.Manager if (!m_emuCore.IsNull()) StopGame(); var roomInfo = App.roomMgr.mineRoomMiniInfo; - roomInfo.FetchRomFileInRoomInfo(EnumSupportEmuPlatform.NES, (_, romFile) => + roomInfo.FetchRomFileInRoomInfo(RomPlatformType.Nes, (_, romFile) => { if (!romFile.RomReady) //这个rom并没有下载,所以取消进入房间 { @@ -51,7 +52,7 @@ namespace AxibugEmuOnline.Client.Manager switch (romFile.Platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: m_emuCore = GameObject.Instantiate(Resources.Load("NES/NesEmulator")).GetComponent(); break; } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs index 47c23e13..869df7b4 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/Filter/FilterManager.cs @@ -1,4 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using System; using System.Collections.Generic; using System.Linq; @@ -12,7 +13,7 @@ namespace AxibugEmuOnline.Client public class FilterManager { private List m_filters; - private Dictionary m_filterPlatforms = new Dictionary(); + private Dictionary m_filterPlatforms = new Dictionary(); private AlphaWraper m_previewFilterWraper; FilterRomSetting m_filterRomSetting; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs index 0c04834a..afabf2e2 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/ScreenScaler.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using AxibugProtobuf; +using UnityEngine; using UnityEngine.UI; namespace AxibugEmuOnline.Client @@ -22,7 +23,7 @@ namespace AxibugEmuOnline.Client /// /// /// - public EnumScalerMode GetMode(EnumSupportEmuPlatform platform) + public EnumScalerMode GetMode(RomPlatformType platform) { int setVal = PlayerPrefs.GetInt($"{nameof(ScreenScaler)}.PlatMode.{platform}", -1); if (setVal == -1) @@ -36,10 +37,10 @@ namespace AxibugEmuOnline.Client /// /// /// 不指定模拟器平台时,使用全局设置的缩放模式 - public void CalcScale(RawImage rawImg, EnumSupportEmuPlatform? platform = null) + public void CalcScale(RawImage rawImg, RomPlatformType? platform = null) { var targetMode = platform == null ? GlobalMode : GetMode(platform.Value); - var resolution = GetRawResolution(platform == null ? EnumSupportEmuPlatform.NES : platform.Value); + var resolution = GetRawResolution(platform == null ? RomPlatformType.Nes : platform.Value); var canvasRect = (rawImg.canvas.transform as RectTransform).rect; switch (targetMode) { @@ -88,11 +89,11 @@ namespace AxibugEmuOnline.Client } } - public Vector2Int GetRawResolution(EnumSupportEmuPlatform platform) + public Vector2Int GetRawResolution(RomPlatformType platform) { switch (platform) { - case EnumSupportEmuPlatform.NES: return new Vector2Int(256, 240); + case RomPlatformType.Nes: return new Vector2Int(256, 240); default: return new Vector2Int(256, 240); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs deleted file mode 100644 index a588b658..00000000 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace AxibugEmuOnline.Client -{ - public enum EnumSupportEmuPlatform - { - NES - } -} diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs.meta deleted file mode 100644 index 89840290..00000000 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/EnumPlatform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 355fa00c125158f4ba90003b0fd5d788 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs index 6cd9e04d..425828bd 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs @@ -1,11 +1,10 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using ICSharpCode.SharpZipLib.Zip; using System; using System.Collections; using System.IO; using UnityEngine; -using UnityEngine.Networking; -using static UnityEngine.EventSystems.EventTrigger; namespace AxibugEmuOnline.Client { @@ -13,7 +12,6 @@ namespace AxibugEmuOnline.Client { private HttpAPI.Resp_RomInfo webData; private bool hasLocalFile; - private EnumSupportEmuPlatform platform; //private UnityWebRequest downloadRequest; private AxiHttpProxy.SendDownLoadProxy downloadRequest; @@ -22,8 +20,8 @@ namespace AxibugEmuOnline.Client /// 指示该Rom文件的存放路径 public string LocalFilePath => IsUserRom ? - $"{App.PersistentDataPath}/UserRoms/{platform}/{FileName}" : - $"{App.PersistentDataPath}/RemoteRoms/{platform}/{FileName}"; + $"{App.PersistentDataPath}/UserRoms/{Platform}/{FileName}" : + $"{App.PersistentDataPath}/RemoteRoms/{Platform}/{FileName}"; /// 指示该Rom文件是否已下载完毕 public bool RomReady => hasLocalFile; @@ -36,7 +34,7 @@ namespace AxibugEmuOnline.Client public float Progress => IsDownloading ? downloadRequest.downloadHandler.DownLoadPr : 0; - public EnumSupportEmuPlatform Platform => platform; + public RomPlatformType Platform => webData != null ? (RomPlatformType)webData.ptype : RomPlatformType.Invalid; /// 指示该Rom信息是否已填充 public bool InfoReady => webData != null; /// 唯一标识 @@ -61,9 +59,8 @@ namespace AxibugEmuOnline.Client public event Action OnDownloadOver; public event Action OnInfoFilled; - public RomFile(EnumSupportEmuPlatform platform, int index, int insidePage) + public RomFile(int index, int insidePage) { - this.platform = platform; Index = index; Page = insidePage; } @@ -181,14 +178,5 @@ namespace AxibugEmuOnline.Client OnInfoFilled?.Invoke(); } - private RomFile() { } - public static RomFile CreateExistRom(EnumSupportEmuPlatform platform, string fileName) - { - var res = new RomFile(); - res.IsUserRom = true; - res.FileName = fileName; - res.hasLocalFile = File.Exists(res.LocalFilePath); - return res; - } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs index 0abab9f5..3df00135 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs @@ -1,5 +1,6 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Common; +using AxibugProtobuf; using System; using System.Collections.Generic; using System.IO; @@ -19,30 +20,21 @@ namespace AxibugEmuOnline.Client private Dictionary nesRomFileNameMapper = new Dictionary(); private HttpAPI.GetRomListAPI m_romGetFunc; private HttpAPI.SearchRomListAPI m_romSearchFunc; - private EnumSupportEmuPlatform m_platform; + private RomPlatformType m_platform; private string lastSearchKey; - public RomLib(EnumSupportEmuPlatform platform) + public RomLib(RomPlatformType platform) { m_platform = platform; switch (platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: m_romGetFunc = App.httpAPI.GetNesRomList; m_romSearchFunc = App.httpAPI.SearchNesRomList; break; } } - public RomFile GetExistRom(string fileName) - { - var res = RomFile.CreateExistRom(m_platform, fileName); - - nesRomFileNameMapper[res.FileName] = res; - - return res; - } - public RomFile GetRomFile(string romFileName) { RomFile romFile; @@ -89,15 +81,12 @@ namespace AxibugEmuOnline.Client for (int i = 0; i < nesRomFetchList.Length; i++) { //以后考虑用对象池实例化RomFile - nesRomFetchList[i] = new RomFile(m_platform, i, i / PAGE_SIZE); + nesRomFetchList[i] = new RomFile(i, i / PAGE_SIZE); } SaveRomInfoFromWeb(romList); callback.Invoke(nesRomFetchList); - }, - //TODO 平台参数 - AxibugProtobuf.RomPlatformType.Nes - , 0, PAGE_SIZE); + }, m_platform, 0, PAGE_SIZE); } else { @@ -115,15 +104,12 @@ namespace AxibugEmuOnline.Client for (int i = 0; i < nesRomFetchList.Length; i++) { //以后考虑用对象池实例化RomFile - nesRomFetchList[i] = new RomFile(m_platform, i, i / PAGE_SIZE); + nesRomFetchList[i] = new RomFile(i, i / PAGE_SIZE); } SaveRomInfoFromWeb(romList); callback.Invoke(nesRomFetchList); - }, - //TODO 平台参数 - AxibugProtobuf.RomPlatformType.Nes - , searchKey, 0, PAGE_SIZE); + }, m_platform, searchKey, 0, PAGE_SIZE); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs index 3ecf771b..b6977b31 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.IO; using System.Xml.Linq; using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using UnityEditor; using UnityEngine; using VirtualNes.Core; @@ -58,7 +59,7 @@ namespace AxibugEmuOnline.Client VideoProvider.ApplyFilterEffect(); } - public EnumSupportEmuPlatform Platform => EnumSupportEmuPlatform.NES; + public RomPlatformType Platform => RomPlatformType.Nes; private CoreSupporter m_coreSupporter; /// /// 指定ROM开始游戏 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs index c4faca6f..f75af24d 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/VideoProvider.cs @@ -1,4 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using System; using System.Runtime.InteropServices; using UnityEngine; @@ -84,7 +85,7 @@ namespace AxibugEmuOnline.Client public void ApplyScreenScaler() { - App.settings.ScreenScaler.CalcScale(Image, EnumSupportEmuPlatform.NES); + App.settings.ScreenScaler.CalcScale(Image, RomPlatformType.Nes); } private unsafe void PrepareUI(uint* screenData) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs index df483bad..188c6399 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs @@ -133,15 +133,15 @@ namespace AxibugProtobuf { "U3dpdGNoSm95Q29uEAcSEgoOWEJPWDM2MENvbnRyb2wQCBISCg5YQk9YT05F", "Q29udHJvbBAJEhEKDVBTVml0YUNvbnRyb2wQChISCg5XaWlVUGFkQ29udHJv", "bBALEhQKEFdpaVJlbW90ZUNvbnRyb2wQDBIWChJOaW50ZW5kbzNEU0NvbnRy", - "b2wQDSqUAQoPUm9tUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEK", - "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", - "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", - "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", - "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", - "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", - "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", - "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", - "Mw==")); + "b2wQDSqiAQoPUm9tUGxhdGZvcm1UeXBlEgsKB0ludmFsaWQQABIHCgNOZXMQ", + "ARIRCg1NYXN0ZXJfU3lzdGVtEAISDQoJR2FtZV9HZWFyEAMSDAoIR2FtZV9C", + "b3kQBBISCg5HYW1lX0JveV9Db2xvchAFEhEKDUNvbGVjb19WaXNpb24QBhIL", + "CgdTQ18zMDAwEAcSCwoHU0dfMTAwMBAIEggKA0FsbBDnBypwCg1Sb29tR2Ft", + "ZVN0YXRlEhIKDk5vbmVfR2FtZVN0YXRlEAASDAoIT25seUhvc3QQARIRCg1X", + "YWl0UmF3VXBkYXRlEAISDQoJV2FpdFJlYWR5EAMSCQoFUGF1c2UQBBIQCgxJ", + "bk9ubGluZUdhbWUQBSpOChFMb2dpblJlc3VsdFN0YXR1cxIhCh1Mb2dpblJl", + "c3VsdFN0YXR1c19CYXNlRGVmYXVsdBAAEgYKAk9LEAESDgoKQWNjb3VudEVy", + "chACQgJIAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.RomPlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -416,7 +416,7 @@ namespace AxibugProtobuf { } public enum RomPlatformType { - [pbr::OriginalName("All")] All = 0, + [pbr::OriginalName("Invalid")] Invalid = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, @@ -425,6 +425,7 @@ namespace AxibugProtobuf { [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, [pbr::OriginalName("SC_3000")] Sc3000 = 7, [pbr::OriginalName("SG_1000")] Sg1000 = 8, + [pbr::OriginalName("All")] All = 999, } public enum RoomGameState { diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs index 37c54e10..8da6736a 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/GamesUI/RomListMenuItem.cs @@ -1,4 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using System; using System.Collections.Generic; using UnityEngine; @@ -8,7 +9,7 @@ namespace AxibugEmuOnline.Client public class RomListMenuItem : VirtualSubMenuItem { [SerializeField] - protected EnumSupportEmuPlatform Platform; + protected RomPlatformType Platform; private RomLib RomLib { @@ -16,7 +17,7 @@ namespace AxibugEmuOnline.Client { switch (Platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: return App.nesRomLib; default: throw new System.NotImplementedException($"未实现的平台 {Platform}"); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs index 6842aed6..b926f668 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/RoomUI/RoomItem.cs @@ -86,7 +86,7 @@ namespace AxibugEmuOnline.Client SetBaseInfo("--", $"{hostNick}的房间", $"{cur}/{max}"); SetIcon(null); - roomInfo.FetchRomFileInRoomInfo(EnumSupportEmuPlatform.NES, (room, romFile) => + roomInfo.FetchRomFileInRoomInfo(RomPlatformType.Nes, (room, romFile) => { if (room.RoomID != RoomID) return; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs index 2689c5ef..6754ee49 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs @@ -34,7 +34,7 @@ namespace AxibugEmuOnline.Client } private static Dictionary s_RomFileCahcesInRoomInfo = new Dictionary(); - public static void FetchRomFileInRoomInfo(this Protobuf_Room_MiniInfo roomInfo, EnumSupportEmuPlatform platform, Action callback) + public static void FetchRomFileInRoomInfo(this Protobuf_Room_MiniInfo roomInfo, RomPlatformType platform, Action callback) { RomFile romFile; @@ -45,10 +45,10 @@ namespace AxibugEmuOnline.Client } switch (platform) { - case EnumSupportEmuPlatform.NES: + case RomPlatformType.Nes: App.StartCoroutine(App.httpAPI.GetRomInfo(roomInfo.GameRomID, (romWebData) => { - RomFile _romFile = new RomFile(EnumSupportEmuPlatform.NES, 0, 0); + RomFile _romFile = new RomFile(0, 0); _romFile.SetWebData(romWebData); s_RomFileCahcesInRoomInfo[roomInfo.GameRomID] = _romFile; diff --git a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs index df483bad..188c6399 100644 --- a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs @@ -133,15 +133,15 @@ namespace AxibugProtobuf { "U3dpdGNoSm95Q29uEAcSEgoOWEJPWDM2MENvbnRyb2wQCBISCg5YQk9YT05F", "Q29udHJvbBAJEhEKDVBTVml0YUNvbnRyb2wQChISCg5XaWlVUGFkQ29udHJv", "bBALEhQKEFdpaVJlbW90ZUNvbnRyb2wQDBIWChJOaW50ZW5kbzNEU0NvbnRy", - "b2wQDSqUAQoPUm9tUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEK", - "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", - "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", - "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", - "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", - "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", - "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", - "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", - "Mw==")); + "b2wQDSqiAQoPUm9tUGxhdGZvcm1UeXBlEgsKB0ludmFsaWQQABIHCgNOZXMQ", + "ARIRCg1NYXN0ZXJfU3lzdGVtEAISDQoJR2FtZV9HZWFyEAMSDAoIR2FtZV9C", + "b3kQBBISCg5HYW1lX0JveV9Db2xvchAFEhEKDUNvbGVjb19WaXNpb24QBhIL", + "CgdTQ18zMDAwEAcSCwoHU0dfMTAwMBAIEggKA0FsbBDnBypwCg1Sb29tR2Ft", + "ZVN0YXRlEhIKDk5vbmVfR2FtZVN0YXRlEAASDAoIT25seUhvc3QQARIRCg1X", + "YWl0UmF3VXBkYXRlEAISDQoJV2FpdFJlYWR5EAMSCQoFUGF1c2UQBBIQCgxJ", + "bk9ubGluZUdhbWUQBSpOChFMb2dpblJlc3VsdFN0YXR1cxIhCh1Mb2dpblJl", + "c3VsdFN0YXR1c19CYXNlRGVmYXVsdBAAEgYKAk9LEAESDgoKQWNjb3VudEVy", + "chACQgJIAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.RomPlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -416,7 +416,7 @@ namespace AxibugProtobuf { } public enum RomPlatformType { - [pbr::OriginalName("All")] All = 0, + [pbr::OriginalName("Invalid")] Invalid = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, @@ -425,6 +425,7 @@ namespace AxibugProtobuf { [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, [pbr::OriginalName("SC_3000")] Sc3000 = 7, [pbr::OriginalName("SG_1000")] Sg1000 = 8, + [pbr::OriginalName("All")] All = 999, } public enum RoomGameState { diff --git a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs index df483bad..188c6399 100644 --- a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs +++ b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs @@ -133,15 +133,15 @@ namespace AxibugProtobuf { "U3dpdGNoSm95Q29uEAcSEgoOWEJPWDM2MENvbnRyb2wQCBISCg5YQk9YT05F", "Q29udHJvbBAJEhEKDVBTVml0YUNvbnRyb2wQChISCg5XaWlVUGFkQ29udHJv", "bBALEhQKEFdpaVJlbW90ZUNvbnRyb2wQDBIWChJOaW50ZW5kbzNEU0NvbnRy", - "b2wQDSqUAQoPUm9tUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEK", - "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", - "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", - "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", - "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", - "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", - "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", - "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", - "Mw==")); + "b2wQDSqiAQoPUm9tUGxhdGZvcm1UeXBlEgsKB0ludmFsaWQQABIHCgNOZXMQ", + "ARIRCg1NYXN0ZXJfU3lzdGVtEAISDQoJR2FtZV9HZWFyEAMSDAoIR2FtZV9C", + "b3kQBBISCg5HYW1lX0JveV9Db2xvchAFEhEKDUNvbGVjb19WaXNpb24QBhIL", + "CgdTQ18zMDAwEAcSCwoHU0dfMTAwMBAIEggKA0FsbBDnBypwCg1Sb29tR2Ft", + "ZVN0YXRlEhIKDk5vbmVfR2FtZVN0YXRlEAASDAoIT25seUhvc3QQARIRCg1X", + "YWl0UmF3VXBkYXRlEAISDQoJV2FpdFJlYWR5EAMSCQoFUGF1c2UQBBIQCgxJ", + "bk9ubGluZUdhbWUQBSpOChFMb2dpblJlc3VsdFN0YXR1cxIhCh1Mb2dpblJl", + "c3VsdFN0YXR1c19CYXNlRGVmYXVsdBAAEgYKAk9LEAESDgoKQWNjb3VudEVy", + "chACQgJIAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.RomPlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -416,7 +416,7 @@ namespace AxibugProtobuf { } public enum RomPlatformType { - [pbr::OriginalName("All")] All = 0, + [pbr::OriginalName("Invalid")] Invalid = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, @@ -425,6 +425,7 @@ namespace AxibugProtobuf { [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, [pbr::OriginalName("SC_3000")] Sc3000 = 7, [pbr::OriginalName("SG_1000")] Sg1000 = 8, + [pbr::OriginalName("All")] All = 999, } public enum RoomGameState { diff --git a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto index 7150bcec..f2aaa5e0 100644 --- a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto +++ b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto @@ -126,7 +126,7 @@ enum GamePadType //手柄类型 enum RomPlatformType { - All = 0; + Invalid = 0; Nes = 1; Master_System = 2; Game_Gear = 3; @@ -135,6 +135,7 @@ enum RomPlatformType Coleco_Vision = 6; SC_3000 = 7; SG_1000 = 8; + All = 999; } //enum RoomPlayerState