From c77684d89ba3b7f589ffad6f09f4601f9e1f5b3a Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Tue, 7 Jan 2025 10:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95=E4=B8=BA=E5=A4=9A=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0rom=E9=80=89=E6=8B=A9=EF=BC=88api=EF=BC=8C=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E9=80=BB=E8=BE=91=EF=BC=8C=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AB=AF=E7=BB=9F=E8=AE=A1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/AppMain/Manager/AppShare.cs | 5 +- .../Assets/Script/AppMain/Manager/HttpAPI.cs | 33 ++-- .../Script/AppMain/Manager/RomLib/RomLib.cs | 20 +- .../Protobuf/ProtobufAxibugEmuOnline.cs | 176 +++++------------- .../Assets/Script/AppMain/Utility.cs | 6 +- .../Manager/GameShareManager.cs | 10 +- AxibugEmuOnline.Server/Manager/RoomManager.cs | 2 +- AxibugEmuOnline.Server/Program.cs | 4 +- .../FolderProfile1.pubxml.user | 2 +- .../Protobuf/ProtobufAxibugEmuOnline.cs | 176 +++++------------- .../Controllers/ApiController.cs | 24 +-- .../PublishProfiles/FolderProfile.pubxml.user | 2 +- .../out/CS/ProtobufAxibugEmuOnline.cs | 176 +++++------------- .../proto/protobuf_AxibugEmuOnline.proto | 9 +- README_WEBAPI.md | 99 ++++++---- 15 files changed, 278 insertions(+), 466 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppShare.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppShare.cs index 304c1f79..d690c246 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppShare.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppShare.cs @@ -18,13 +18,12 @@ namespace AxibugEmuOnline.Client.Manager /// /// /// [0]收藏[1]取消收藏 - public void SendGameStar(int RomID, PlatformType Platform, int Motion) + public void SendGameStar(int RomID, int Motion) { Protobuf_Game_Mark req = new Protobuf_Game_Mark() { State = Motion, RomID = RomID, - PlatformType = Platform }; App.log.Info($"LeavnRoom"); App.network.SendToServer((int)CommandID.CmdGameMark, ProtoBufHelper.Serizlize(req)); @@ -37,7 +36,7 @@ namespace AxibugEmuOnline.Client.Manager void RecvGameStar(byte[] reqData) { Protobuf_Game_Mark_RESP msg = ProtoBufHelper.DeSerizlize(reqData); - Eventer.Instance.PostEvent(EEvent.OnDoStars, msg.PlatformType, msg.RomID); + Eventer.Instance.PostEvent(EEvent.OnDoStars, msg.RomID); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs index ece039cf..078a16db 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs @@ -1,4 +1,5 @@ using AxibugEmuOnline.Client.ClientCore; +using AxibugProtobuf; using System; using System.Collections; using System.Collections.Generic; @@ -12,19 +13,19 @@ namespace AxibugEmuOnline.Client public string WebHost = "http://emu.axibug.com"; public string WebSiteApi => WebHost + "/api"; - public delegate void GetRomListAPI(Action callback, int page, int pageSize = 10); - public delegate void SearchRomListAPI(Action callback, string searchKey, int page, int pageSize = 10); + public delegate void GetRomListAPI(Action callback, AxibugProtobuf.RomPlatformType Platform, int page, int pageSize = 10); + public delegate void SearchRomListAPI(Action callback, AxibugProtobuf.RomPlatformType Platform, string searchKey, int page, int pageSize = 10); - public void GetNesRomList(Action callback, int page, int pageSize = 10) + public void GetNesRomList(Action callback, AxibugProtobuf.RomPlatformType platform, int page, int pageSize = 10) { - App.StartCoroutine(GetNesRomListFlow(page, pageSize, callback)); + App.StartCoroutine(GetRomListFlow(platform,page, pageSize, callback)); } - public void SearchNesRomList(Action callback, string searchKey, int page, int pageSize = 10) + public void SearchNesRomList(Action callback, AxibugProtobuf.RomPlatformType platform, string searchKey, int page, int pageSize = 10) { - App.StartCoroutine(SearchNesRomListFlow(searchKey, page, pageSize, callback)); + App.StartCoroutine(SearchNesRomListFlow(platform,searchKey, page, pageSize, callback)); } - private IEnumerator SearchNesRomListFlow(string searchKey, int page, int pageSize, Action callback) + private IEnumerator SearchNesRomListFlow(AxibugProtobuf.RomPlatformType platform,string searchKey, int page, int pageSize, Action callback) { if (!string.IsNullOrEmpty(searchKey)) { @@ -72,9 +73,9 @@ namespace AxibugEmuOnline.Client }*/ } - private IEnumerator GetNesRomListFlow(int page, int pageSize, Action callback) + private IEnumerator GetRomListFlow(AxibugProtobuf.RomPlatformType platform, int page, int pageSize, Action callback) { - string url = $"{WebSiteApi}/NesRomList?Page={page}&PageSize={pageSize}"; + string url = $"{WebSiteApi}/RomList?Page={page}&PageSize={pageSize}&PType={(int)platform}"; App.log.Info($"GetRomList=>{url}"); AxiHttpProxy.SendWebRequestProxy request = AxiHttpProxy.Get(url); yield return request.SendWebRequest; @@ -106,10 +107,10 @@ namespace AxibugEmuOnline.Client */ } - public IEnumerator GetNesRomInfo(int RomID, Action callback) + public IEnumerator GetRomInfo(int RomID, Action callback) { - AxiHttpProxy.SendWebRequestProxy request = AxiHttpProxy.Get($"{WebSiteApi}/RomInfo?PType={PlatformType.Nes}&RomID={RomID}"); + AxiHttpProxy.SendWebRequestProxy request = AxiHttpProxy.Get($"{WebSiteApi}/RomInfo?RomID={RomID}"); yield return request.SendWebRequest; if (!request.downloadHandler.isDone) { @@ -140,12 +141,6 @@ namespace AxibugEmuOnline.Client } - enum PlatformType : byte - { - All = 0, - Nes = 1, - } - enum GameType : byte { NONE = 0, @@ -180,8 +175,10 @@ namespace AxibugEmuOnline.Client [Serializable] public class Resp_RomInfo { - public int orderid; + public int orderid; public int id; + //TODO 后续根据ptype,启动游戏时选择核心。和列表设计和UI分组解耦,比如无视平台搜索列表,收藏列表 + public int ptype; public string romName; public string gType; public string desc; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs index 20f31484..0abab9f5 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs @@ -94,7 +94,10 @@ namespace AxibugEmuOnline.Client SaveRomInfoFromWeb(romList); callback.Invoke(nesRomFetchList); - }, 0, PAGE_SIZE); + }, + //TODO 平台参数 + AxibugProtobuf.RomPlatformType.Nes + , 0, PAGE_SIZE); } else { @@ -117,7 +120,10 @@ namespace AxibugEmuOnline.Client SaveRomInfoFromWeb(romList); callback.Invoke(nesRomFetchList); - }, searchKey, 0, PAGE_SIZE); + }, + //TODO 平台参数 + AxibugProtobuf.RomPlatformType.Nes + , searchKey, 0, PAGE_SIZE); } } @@ -143,7 +149,10 @@ namespace AxibugEmuOnline.Client { FetchPageCmd.Remove(page); SaveRomInfoFromWeb(resp); - }, lastSearchKey, pageNo, PAGE_SIZE); + }, + //TODO 平台参数 + AxibugProtobuf.RomPlatformType.Nes, + lastSearchKey, pageNo, PAGE_SIZE); } else { @@ -151,7 +160,10 @@ namespace AxibugEmuOnline.Client { FetchPageCmd.Remove(page); SaveRomInfoFromWeb(resp); - }, pageNo, PAGE_SIZE); + }, + //TODO 平台参数 + AxibugProtobuf.RomPlatformType.Nes, + pageNo, PAGE_SIZE); } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs index 4e4141ce..df483bad 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs @@ -99,53 +99,52 @@ namespace AxibugProtobuf { "ZFRpbWVVcxgDIAEoAhIgChhBdWRpb0ZyYW1lUGxheU5lZWRUaW1lVXMYBCAB", "KAIiKgoYUHJvdG9idWZfUm9vbV9HZXRfU2NyZWVuEg4KBlJvb21JRBgBIAEo", "BSJTCh1Qcm90b2J1Zl9Sb29tX0dldF9TY3JlZW5fUkVTUBIOCgZSb29tSUQY", - "ASABKAUSDwoHRnJhbWVJRBgCIAEoBRIRCglSYXdCaXRtYXAYAyABKAwiZgoS", + "ASABKAUSDwoHRnJhbWVJRBgCIAEoBRIRCglSYXdCaXRtYXAYAyABKAwiMgoS", "UHJvdG9idWZfR2FtZV9NYXJrEg0KBVJvbUlEGAEgASgFEg0KBXN0YXRlGAIg", - "ASgFEjIKDFBsYXRmb3JtVHlwZRgDIAEoDjIcLkF4aWJ1Z1Byb3RvYnVmLlBs", - "YXRmb3JtVHlwZSJcChdQcm90b2J1Zl9HYW1lX01hcmtfUkVTUBINCgVSb21J", - "RBgBIAEoBRIyCgxQbGF0Zm9ybVR5cGUYAiABKA4yHC5BeGlidWdQcm90b2J1", - "Zi5QbGF0Zm9ybVR5cGUqoQUKCUNvbW1hbmRJRBIOCgpDTURfREVGQVVMEAAS", - "DAoIQ01EX1BJTkcQARIMCghDTURfUE9ORxACEg4KCUNNRF9MT0dJThDRDxIY", - "ChNDTURfVVNFUl9PTkxJTkVMSVNUELgXEhIKDUNNRF9VU0VSX0pPSU4Q1xcS", - "EwoOQ01EX1VTRVJfTEVBVkUQ2BcSGgoVQ01EX1VTRVJfU1RBVEVfVVBEQVRF", - "ENkXEhgKE0NNRF9Nb2RpZnlfTmlja05hbWUQnRgSHAoXQ01EX1VwZGF0ZV9T", - "ZWxmVXNlckluZm8QphgSHQoYQ01EX1VwZGF0ZV9PdGhlclVzZXJJbmZvEKgY", - "EhAKC0NNRF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AgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", + "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", + "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", + "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", + "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", + "Mw==")); 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.PlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + 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[] { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Ping), global::AxibugProtobuf.Protobuf_Ping.Parser, new[]{ "Seed" }, null, null, null, null), @@ -186,8 +185,8 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Player_Ready), global::AxibugProtobuf.Protobuf_Room_Player_Ready.Parser, new[]{ "PushFrameNeedTimeUs", "LoadStateNeedTimeUs", "VideoFrameShowNeedTimeUs", "AudioFramePlayNeedTimeUs" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Get_Screen), global::AxibugProtobuf.Protobuf_Room_Get_Screen.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Get_Screen_RESP), global::AxibugProtobuf.Protobuf_Room_Get_Screen_RESP.Parser, new[]{ "RoomID", "FrameID", "RawBitmap" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark), global::AxibugProtobuf.Protobuf_Game_Mark.Parser, new[]{ "RomID", "State", "PlatformType" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark_RESP), global::AxibugProtobuf.Protobuf_Game_Mark_RESP.Parser, new[]{ "RomID", "PlatformType" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark), global::AxibugProtobuf.Protobuf_Game_Mark.Parser, new[]{ "RomID", "State" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark_RESP), global::AxibugProtobuf.Protobuf_Game_Mark_RESP.Parser, new[]{ "RomID" }, null, null, null, null) })); } #endregion @@ -371,7 +370,7 @@ namespace AxibugProtobuf { public enum DeviceType { /// - ///缺省不使用 + ///通用 /// [pbr::OriginalName("DeviceType_Default")] Default = 0, [pbr::OriginalName("PC")] Pc = 1, @@ -416,13 +415,16 @@ namespace AxibugProtobuf { [pbr::OriginalName("Nintendo3DSControl")] Nintendo3Dscontrol = 13, } - public enum PlatformType { + public enum RomPlatformType { [pbr::OriginalName("All")] All = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, [pbr::OriginalName("Game_Boy")] GameBoy = 4, [pbr::OriginalName("Game_Boy_Color")] GameBoyColor = 5, + [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, + [pbr::OriginalName("SC_3000")] Sc3000 = 7, + [pbr::OriginalName("SG_1000")] Sg1000 = 8, } public enum RoomGameState { @@ -9023,7 +9025,6 @@ namespace AxibugProtobuf { public Protobuf_Game_Mark(Protobuf_Game_Mark other) : this() { romID_ = other.romID_; state_ = other.state_; - platformType_ = other.platformType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -9060,20 +9061,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlatformType" field. - public const int PlatformTypeFieldNumber = 3; - private global::AxibugProtobuf.PlatformType platformType_ = global::AxibugProtobuf.PlatformType.All; - /// - ///平台类型 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.PlatformType PlatformType { - get { return platformType_; } - set { - platformType_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Game_Mark); @@ -9089,7 +9076,6 @@ namespace AxibugProtobuf { } if (RomID != other.RomID) return false; if (State != other.State) return false; - if (PlatformType != other.PlatformType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -9098,7 +9084,6 @@ namespace AxibugProtobuf { int hash = 1; if (RomID != 0) hash ^= RomID.GetHashCode(); if (State != 0) hash ^= State.GetHashCode(); - if (PlatformType != global::AxibugProtobuf.PlatformType.All) hash ^= PlatformType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9123,10 +9108,6 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(24); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -9144,10 +9125,6 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(24); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -9163,9 +9140,6 @@ namespace AxibugProtobuf { if (State != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlatformType); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9183,9 +9157,6 @@ namespace AxibugProtobuf { if (other.State != 0) { State = other.State; } - if (other.PlatformType != global::AxibugProtobuf.PlatformType.All) { - PlatformType = other.PlatformType; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -9208,10 +9179,6 @@ namespace AxibugProtobuf { State = input.ReadInt32(); break; } - case 24: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } #endif @@ -9234,10 +9201,6 @@ namespace AxibugProtobuf { State = input.ReadInt32(); break; } - case 24: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } } @@ -9275,7 +9238,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Protobuf_Game_Mark_RESP(Protobuf_Game_Mark_RESP other) : this() { romID_ = other.romID_; - platformType_ = other.platformType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -9298,20 +9260,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlatformType" field. - public const int PlatformTypeFieldNumber = 2; - private global::AxibugProtobuf.PlatformType platformType_ = global::AxibugProtobuf.PlatformType.All; - /// - ///平台类型 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.PlatformType PlatformType { - get { return platformType_; } - set { - platformType_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Game_Mark_RESP); @@ -9326,7 +9274,6 @@ namespace AxibugProtobuf { return true; } if (RomID != other.RomID) return false; - if (PlatformType != other.PlatformType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -9334,7 +9281,6 @@ namespace AxibugProtobuf { public override int GetHashCode() { int hash = 1; if (RomID != 0) hash ^= RomID.GetHashCode(); - if (PlatformType != global::AxibugProtobuf.PlatformType.All) hash ^= PlatformType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9355,10 +9301,6 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(16); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -9372,10 +9314,6 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(16); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -9388,9 +9326,6 @@ namespace AxibugProtobuf { if (RomID != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlatformType); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9405,9 +9340,6 @@ namespace AxibugProtobuf { if (other.RomID != 0) { RomID = other.RomID; } - if (other.PlatformType != global::AxibugProtobuf.PlatformType.All) { - PlatformType = other.PlatformType; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -9426,10 +9358,6 @@ namespace AxibugProtobuf { RomID = input.ReadInt32(); break; } - case 16: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } #endif @@ -9448,10 +9376,6 @@ namespace AxibugProtobuf { RomID = input.ReadInt32(); break; } - case 16: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs index 8ad14e0e..2689c5ef 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs @@ -38,7 +38,7 @@ namespace AxibugEmuOnline.Client { RomFile romFile; - if (s_RomFileCahcesInRoomInfo.TryGetValue(roomInfo.GameRomID, out romFile)) + if (s_RomFileCahcesInRoomInfo.TryGetValue(roomInfo.GameRomID, out romFile)) { callback.Invoke(roomInfo, romFile); return; @@ -46,10 +46,10 @@ namespace AxibugEmuOnline.Client switch (platform) { case EnumSupportEmuPlatform.NES: - App.StartCoroutine(App.httpAPI.GetNesRomInfo(roomInfo.GameRomID, (romWebData) => + App.StartCoroutine(App.httpAPI.GetRomInfo(roomInfo.GameRomID, (romWebData) => { RomFile _romFile = new RomFile(EnumSupportEmuPlatform.NES, 0, 0); - _romFile.SetWebData(romWebData); + _romFile.SetWebData(romWebData); s_RomFileCahcesInRoomInfo[roomInfo.GameRomID] = _romFile; callback.Invoke(roomInfo, _romFile); diff --git a/AxibugEmuOnline.Server/Manager/GameShareManager.cs b/AxibugEmuOnline.Server/Manager/GameShareManager.cs index baa0b57e..c793691b 100644 --- a/AxibugEmuOnline.Server/Manager/GameShareManager.cs +++ b/AxibugEmuOnline.Server/Manager/GameShareManager.cs @@ -49,12 +49,11 @@ namespace AxibugEmuOnline.Server.Manager } else { - query = "INSERT INTO `haoyue_emu`.`rom_stars` (`uid`, `platform`, `romid`) VALUES (?uid, ?platform, ?romid);"; + query = "INSERT INTO `haoyue_emu`.`rom_stars` (`uid`, `romid`) VALUES (?uid, ?romid);"; using (var command = new MySqlCommand(query, conn)) { // 设置参数值 command.Parameters.AddWithValue("?uid", _c.UID); - command.Parameters.AddWithValue("?platform", (int)msg.PlatformType); command.Parameters.AddWithValue("?romid", msg.RomID); command.ExecuteNonQuery(); } @@ -64,12 +63,11 @@ namespace AxibugEmuOnline.Server.Manager { if (bHad) { - query = "DELETE from rom_stars where uid = ?uid and romid = ?romid and platform = ?platform"; + query = "DELETE from rom_stars where uid = ?uid and romid = ?romid"; using (var command = new MySqlCommand(query, conn)) { // 设置参数值 command.Parameters.AddWithValue("?uid", _c.UID); - command.Parameters.AddWithValue("?platform", (int)msg.PlatformType); command.Parameters.AddWithValue("?romid", msg.RomID); command.ExecuteNonQuery(); } @@ -81,10 +79,9 @@ namespace AxibugEmuOnline.Server.Manager } } //更新收藏数 - query = "update romlist_nes set stars = (SELECT COUNT(id) from rom_stars where rom_stars.romid = ?romid and rom_stars.platform = ?platform) where romlist_nes.id = ?romid"; + query = "update romlist set stars = (SELECT COUNT(id) from rom_stars where rom_stars.romid = ?romid) where romlist.id = ?romid"; using (var command = new MySqlCommand(query, conn)) { - command.Parameters.AddWithValue("?platform", (int)msg.PlatformType); command.Parameters.AddWithValue("?romid", msg.RomID); command.ExecuteNonQuery(); } @@ -94,7 +91,6 @@ namespace AxibugEmuOnline.Server.Manager { } Haoyue_SQLPoolManager.EnqueueSQLConn(conn); - respData.PlatformType = msg.PlatformType; respData.RomID = msg.RomID; AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdGameMark, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(respData)); } diff --git a/AxibugEmuOnline.Server/Manager/RoomManager.cs b/AxibugEmuOnline.Server/Manager/RoomManager.cs index 2f372b90..d5a15ea1 100644 --- a/AxibugEmuOnline.Server/Manager/RoomManager.cs +++ b/AxibugEmuOnline.Server/Manager/RoomManager.cs @@ -126,7 +126,7 @@ namespace AxibugEmuOnline.Server if (state == RoomLogType.Create) { - query = "update romlist_nes set playcount = playcount + 1 where id = ?romid"; + query = "update romlist set playcount = playcount + 1 where id = ?romid"; using (var command = new MySqlCommand(query, conn)) { command.Parameters.AddWithValue("?romid", RomID); diff --git a/AxibugEmuOnline.Server/Program.cs b/AxibugEmuOnline.Server/Program.cs index 67654f14..37f2f044 100644 --- a/AxibugEmuOnline.Server/Program.cs +++ b/AxibugEmuOnline.Server/Program.cs @@ -94,7 +94,7 @@ namespace AxibugEmuOnline.Server List<(int id, string romurl, string name)> list = new List<(int id, string romurl, string name)>(); List<(int id, string romurl, string name)> Nonelist = new List<(int id, string romurl, string name)>(); - string query = $"SELECT id,`Name`,GameType,Note,RomUrl,ImgUrl,`Hash` FROM romlist_nes"; + string query = $"SELECT id,`Name`,GameType,Note,RomUrl,ImgUrl,`Hash` FROM romlist"; using (var command = new MySqlCommand(query, conn)) { // 执行查询并处理结果 @@ -122,7 +122,7 @@ namespace AxibugEmuOnline.Server } string romhash = Helper.FileMD5Hash(rompath); AppSrv.g_Log.Info($"第{i}个,Name->{list[i].name},Hash->{romhash}"); - query = $"update romlist_nes SET `Hash` = '{romhash}' where Id ={list[i].id}"; + query = $"update romlist SET `Hash` = '{romhash}' where Id ={list[i].id}"; using (var command = new MySqlCommand(query, conn)) { // 执行查询并处理结果 diff --git a/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user index 99e925a8..32b91c40 100644 --- a/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2025-01-06T16:21:47.4863058Z||;True|2025-01-07T00:16:42.7998249+08:00||;False|2025-01-07T00:16:02.8107509+08:00||;False|2025-01-02T15:36:18.1906464+08:00||;False|2025-01-02T15:36:06.5622643+08:00||;True|2024-12-27T18:24:49.7554320+08:00||; + True|2025-01-07T02:47:36.6196477Z||;True|2025-01-07T01:21:34.5863249+08:00||;False|2025-01-07T01:20:39.5344134+08:00||;True|2025-01-07T00:21:47.4863058+08:00||;True|2025-01-07T00:16:42.7998249+08:00||;False|2025-01-07T00:16:02.8107509+08:00||;False|2025-01-02T15:36:18.1906464+08:00||;False|2025-01-02T15:36:06.5622643+08:00||;True|2024-12-27T18:24:49.7554320+08:00||; \ No newline at end of file diff --git a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs index 4e4141ce..df483bad 100644 --- a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs @@ -99,53 +99,52 @@ namespace AxibugProtobuf { "ZFRpbWVVcxgDIAEoAhIgChhBdWRpb0ZyYW1lUGxheU5lZWRUaW1lVXMYBCAB", "KAIiKgoYUHJvdG9idWZfUm9vbV9HZXRfU2NyZWVuEg4KBlJvb21JRBgBIAEo", "BSJTCh1Qcm90b2J1Zl9Sb29tX0dldF9TY3JlZW5fUkVTUBIOCgZSb29tSUQY", - "ASABKAUSDwoHRnJhbWVJRBgCIAEoBRIRCglSYXdCaXRtYXAYAyABKAwiZgoS", + "ASABKAUSDwoHRnJhbWVJRBgCIAEoBRIRCglSYXdCaXRtYXAYAyABKAwiMgoS", "UHJvdG9idWZfR2FtZV9NYXJrEg0KBVJvbUlEGAEgASgFEg0KBXN0YXRlGAIg", - "ASgFEjIKDFBsYXRmb3JtVHlwZRgDIAEoDjIcLkF4aWJ1Z1Byb3RvYnVmLlBs", - "YXRmb3JtVHlwZSJcChdQcm90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g1D", - "TURfR0FNRV9NQVJLEPVOKtABCglFcnJvckNvZGUSEAoMRVJST1JfREVGQVVM", - "EAASDAoIRVJST1JfT0sQARIYChRFUlJPUl9ST09NX05PVF9GT1VORBAKEicK", - "I0VSUk9SX1JPT01fU0xPVF9BTFJFQURMWV9IQURfUExBWUVSEAsSIQodRVJS", - "T1JfUk9PTV9DQU5UX0RPX0NVUlJfU1RBVEUQMhIfChpFUlJPUl9ST01fQUxS", - "RUFEWV9IQURfU1RBUhCTAxIcChdFUlJPUl9ST01fRE9OVF9IQURfU1RBUhCU", - "AypACglMb2dpblR5cGUSDQoJVXNlRGV2aWNlEAASDgoKVXNlQWNjb3VudBAB", - "EhQKEFVzZUhhb1l1ZUFjY291bnQQAiqlAQoKRGV2aWNlVHlwZRIWChJEZXZp", - "Y2VUeXBlX0RlZmF1bHQQABIGCgJQQxABEgsKB0FuZHJvaWQQAhIHCgNJT1MQ", - "AxIHCgNQU1YQBBIHCgNQUzMQBRIHCgNQUzQQBhILCgdYQk9YMzYwEAcSCwoH", - "WEJPWE9ORRAIEggKBFdpaVUQCRIPCgtOaW50ZW5kbzNEUxAKEhEKDUFuZHJv", - "aWRDYXJBcHAQCyqTAgoLR2FtZVBhZFR5cGUSDAoIS2V5Ym9hcmQQABIRCg1H", - "bG9iYWxHYW1lUGFkEAESDgoKVG91Y2hQYW5lbBACEg4KCkRTM0NvbnRyb2wQ", - "AxIOCgpEUzRDb250cm9sEAQSDgoKRFM1Q29udHJvbBAFEhQKEFN3aXRjaFBy", - "b0NvbnRyb2wQBhIQCgxTd2l0Y2hKb3lDb24QBxISCg5YQk9YMzYwQ29udHJv", - "bBAIEhIKDlhCT1hPTkVDb250cm9sEAkSEQoNUFNWaXRhQ29udHJvbBAKEhIK", - "DldpaVVQYWRDb250cm9sEAsSFAoQV2lpUmVtb3RlQ29udHJvbBAMEhYKEk5p", - "bnRlbmRvM0RTQ29udHJvbBANKmQKDFBsYXRmb3JtVHlwZRIHCgNBbGwQABIH",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UzNDb250cm9sEAMSDgoKRFM0Q29udHJv", + "bBAEEg4KCkRTNUNvbnRyb2wQBRIUChBTd2l0Y2hQcm9Db250cm9sEAYSEAoM", + "U3dpdGNoSm95Q29uEAcSEgoOWEJPWDM2MENvbnRyb2wQCBISCg5YQk9YT05F", + "Q29udHJvbBAJEhEKDVBTVml0YUNvbnRyb2wQChISCg5XaWlVUGFkQ29udHJv", + "bBALEhQKEFdpaVJlbW90ZUNvbnRyb2wQDBIWChJOaW50ZW5kbzNEU0NvbnRy", + "b2wQDSqUAQoPUm9tUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEK", + "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", + "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", + "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", + "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", + "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", + "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", + "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", + "Mw==")); 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.PlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + 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[] { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Ping), global::AxibugProtobuf.Protobuf_Ping.Parser, new[]{ "Seed" }, null, null, null, null), @@ -186,8 +185,8 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Player_Ready), global::AxibugProtobuf.Protobuf_Room_Player_Ready.Parser, new[]{ "PushFrameNeedTimeUs", "LoadStateNeedTimeUs", "VideoFrameShowNeedTimeUs", "AudioFramePlayNeedTimeUs" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Get_Screen), global::AxibugProtobuf.Protobuf_Room_Get_Screen.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Get_Screen_RESP), global::AxibugProtobuf.Protobuf_Room_Get_Screen_RESP.Parser, new[]{ "RoomID", "FrameID", "RawBitmap" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark), global::AxibugProtobuf.Protobuf_Game_Mark.Parser, new[]{ "RomID", "State", "PlatformType" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark_RESP), global::AxibugProtobuf.Protobuf_Game_Mark_RESP.Parser, new[]{ "RomID", "PlatformType" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark), global::AxibugProtobuf.Protobuf_Game_Mark.Parser, new[]{ "RomID", "State" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark_RESP), global::AxibugProtobuf.Protobuf_Game_Mark_RESP.Parser, new[]{ "RomID" }, null, null, null, null) })); } #endregion @@ -371,7 +370,7 @@ namespace AxibugProtobuf { public enum DeviceType { /// - ///缺省不使用 + ///通用 /// [pbr::OriginalName("DeviceType_Default")] Default = 0, [pbr::OriginalName("PC")] Pc = 1, @@ -416,13 +415,16 @@ namespace AxibugProtobuf { [pbr::OriginalName("Nintendo3DSControl")] Nintendo3Dscontrol = 13, } - public enum PlatformType { + public enum RomPlatformType { [pbr::OriginalName("All")] All = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, [pbr::OriginalName("Game_Boy")] GameBoy = 4, [pbr::OriginalName("Game_Boy_Color")] GameBoyColor = 5, + [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, + [pbr::OriginalName("SC_3000")] Sc3000 = 7, + [pbr::OriginalName("SG_1000")] Sg1000 = 8, } public enum RoomGameState { @@ -9023,7 +9025,6 @@ namespace AxibugProtobuf { public Protobuf_Game_Mark(Protobuf_Game_Mark other) : this() { romID_ = other.romID_; state_ = other.state_; - platformType_ = other.platformType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -9060,20 +9061,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlatformType" field. - public const int PlatformTypeFieldNumber = 3; - private global::AxibugProtobuf.PlatformType platformType_ = global::AxibugProtobuf.PlatformType.All; - /// - ///平台类型 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.PlatformType PlatformType { - get { return platformType_; } - set { - platformType_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Game_Mark); @@ -9089,7 +9076,6 @@ namespace AxibugProtobuf { } if (RomID != other.RomID) return false; if (State != other.State) return false; - if (PlatformType != other.PlatformType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -9098,7 +9084,6 @@ namespace AxibugProtobuf { int hash = 1; if (RomID != 0) hash ^= RomID.GetHashCode(); if (State != 0) hash ^= State.GetHashCode(); - if (PlatformType != global::AxibugProtobuf.PlatformType.All) hash ^= PlatformType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9123,10 +9108,6 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(24); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -9144,10 +9125,6 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(24); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -9163,9 +9140,6 @@ namespace AxibugProtobuf { if (State != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlatformType); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9183,9 +9157,6 @@ namespace AxibugProtobuf { if (other.State != 0) { State = other.State; } - if (other.PlatformType != global::AxibugProtobuf.PlatformType.All) { - PlatformType = other.PlatformType; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -9208,10 +9179,6 @@ namespace AxibugProtobuf { State = input.ReadInt32(); break; } - case 24: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } #endif @@ -9234,10 +9201,6 @@ namespace AxibugProtobuf { State = input.ReadInt32(); break; } - case 24: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } } @@ -9275,7 +9238,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Protobuf_Game_Mark_RESP(Protobuf_Game_Mark_RESP other) : this() { romID_ = other.romID_; - platformType_ = other.platformType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -9298,20 +9260,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlatformType" field. - public const int PlatformTypeFieldNumber = 2; - private global::AxibugProtobuf.PlatformType platformType_ = global::AxibugProtobuf.PlatformType.All; - /// - ///平台类型 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.PlatformType PlatformType { - get { return platformType_; } - set { - platformType_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Game_Mark_RESP); @@ -9326,7 +9274,6 @@ namespace AxibugProtobuf { return true; } if (RomID != other.RomID) return false; - if (PlatformType != other.PlatformType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -9334,7 +9281,6 @@ namespace AxibugProtobuf { public override int GetHashCode() { int hash = 1; if (RomID != 0) hash ^= RomID.GetHashCode(); - if (PlatformType != global::AxibugProtobuf.PlatformType.All) hash ^= PlatformType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9355,10 +9301,6 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(16); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -9372,10 +9314,6 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(16); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -9388,9 +9326,6 @@ namespace AxibugProtobuf { if (RomID != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlatformType); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9405,9 +9340,6 @@ namespace AxibugProtobuf { if (other.RomID != 0) { RomID = other.RomID; } - if (other.PlatformType != global::AxibugProtobuf.PlatformType.All) { - PlatformType = other.PlatformType; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -9426,10 +9358,6 @@ namespace AxibugProtobuf { RomID = input.ReadInt32(); break; } - case 16: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } #endif @@ -9448,10 +9376,6 @@ namespace AxibugProtobuf { RomID = input.ReadInt32(); break; } - case 16: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } } diff --git a/AxibugEmuOnline.Web/Controllers/ApiController.cs b/AxibugEmuOnline.Web/Controllers/ApiController.cs index ec4f92a4..dc4c17be 100644 --- a/AxibugEmuOnline.Web/Controllers/ApiController.cs +++ b/AxibugEmuOnline.Web/Controllers/ApiController.cs @@ -29,16 +29,20 @@ namespace AxibugEmuOnline.Web.Controllers } [HttpGet] - public JsonResult NesRomList(string SearchKey, int Ptype, int GType, int Page, int PageSize) + public JsonResult RomList(string SearchKey, int Ptype, int GType, int Page, int PageSize) { string searchPattern = $"%{SearchKey}%"; Resp_GameList resp = new Resp_GameList(); resp.gameList = new List(); - MySqlConnection conn = Haoyue_SQLPoolManager.DequeueSQLConn("NesRomList"); + MySqlConnection conn = Haoyue_SQLPoolManager.DequeueSQLConn("RomList"); { + string platformCond = ""; + if (GType > 0) + { + platformCond = $" and PlatformType = '{Ptype}' "; + } GameType SearchGType = (GameType)GType; - string GameTypeCond = ""; switch (SearchGType) { @@ -53,7 +57,7 @@ namespace AxibugEmuOnline.Web.Controllers break; } - string query = "SELECT count(id) FROM romlist_nes where `Name` like ?searchPattern " + GameTypeCond; + string query = "SELECT count(id) FROM romlist where `Name` like ?searchPattern " + platformCond + GameTypeCond; using (var command = new MySqlCommand(query, conn)) { // òֵ @@ -73,7 +77,7 @@ namespace AxibugEmuOnline.Web.Controllers string HotOrderBy = "ORDER BY playcount DESC, id ASC"; - query = $"SELECT id,`Name`,GameType,Note,RomUrl,ImgUrl,`Hash`,`playcount`,`stars` FROM romlist_nes where `Name` like ?searchPattern {GameTypeCond} {HotOrderBy} LIMIT ?offset, ?pageSize;"; + query = $"SELECT id,`Name`,GameType,Note,RomUrl,ImgUrl,`Hash`,`playcount`,`stars`,`PlatformType` FROM romlist where `Name` like ?searchPattern {platformCond} {GameTypeCond} {HotOrderBy} LIMIT ?offset, ?pageSize;"; using (var command = new MySqlCommand(query, conn)) { // òֵ @@ -98,6 +102,7 @@ namespace AxibugEmuOnline.Web.Controllers hash = !reader.IsDBNull(6) ? reader.GetString(6) : string.Empty, playcount = reader.GetInt32(7), stars = reader.GetInt32(8), + ptype = reader.GetInt32(9), }); } } @@ -114,7 +119,7 @@ namespace AxibugEmuOnline.Web.Controllers Resp_RomInfo resp = new Resp_RomInfo(); MySqlConnection conn = Haoyue_SQLPoolManager.DequeueSQLConn("NesRomList"); { - string query = $"SELECT id,`Name`,GameType,Note,RomUrl,ImgUrl,`Hash`,`playcount`,`stars` FROM romlist_nes where id = ?romid;"; + string query = $"SELECT id,`Name`,GameType,Note,RomUrl,ImgUrl,`Hash`,`playcount`,`stars`,`PlatformType` FROM romlist where id = ?romid;"; using (var command = new MySqlCommand(query, conn)) { // òֵ @@ -133,6 +138,7 @@ namespace AxibugEmuOnline.Web.Controllers resp.hash = !reader.IsDBNull(6) ? reader.GetString(6) : string.Empty; resp.playcount = reader.GetInt32(7); resp.stars = reader.GetInt32(8); + resp.ptype = reader.GetInt32(9); } } } @@ -141,11 +147,6 @@ namespace AxibugEmuOnline.Web.Controllers return new JsonResult(resp); } - enum PlatformType : byte - { - All = 0, - Nes, - } enum GameType : byte { @@ -191,6 +192,7 @@ namespace AxibugEmuOnline.Web.Controllers { public int orderid { get; set; } public int id { get; set; } + public int ptype { get; set; } public string romName { get; set; } public string gType { get; set; } public string desc { get; set; } diff --git a/AxibugEmuOnline.Web/Properties/PublishProfiles/FolderProfile.pubxml.user b/AxibugEmuOnline.Web/Properties/PublishProfiles/FolderProfile.pubxml.user index 09bae634..5ac5b6ea 100644 --- a/AxibugEmuOnline.Web/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/AxibugEmuOnline.Web/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>G:\Sin365\AxibugEmuOnline\AxibugEmuOnline.Web\bin\Release\net8.0\publish\ - True|2024-09-12T06:18:38.6992653Z||;True|2024-09-12T14:08:58.4526827+08:00||;True|2024-08-22T14:13:06.3067002+08:00||;True|2024-08-14T10:33:10.9180984+08:00||;True|2024-08-13T18:28:27.5050523+08:00||;True|2024-08-13T18:25:47.6591234+08:00||;True|2024-08-13T18:25:17.5344107+08:00||;True|2024-08-13T17:46:23.4523329+08:00||; + True|2025-01-07T02:37:18.6461694Z||;True|2024-09-12T14:18:38.6992653+08:00||;True|2024-09-12T14:08:58.4526827+08:00||;True|2024-08-22T14:13:06.3067002+08:00||;True|2024-08-14T10:33:10.9180984+08:00||;True|2024-08-13T18:28:27.5050523+08:00||;True|2024-08-13T18:25:47.6591234+08:00||;True|2024-08-13T18:25:17.5344107+08:00||;True|2024-08-13T17:46:23.4523329+08:00||; \ No newline at end of file diff --git a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs index 4e4141ce..df483bad 100644 --- a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs +++ b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs @@ -99,53 +99,52 @@ namespace AxibugProtobuf { "ZFRpbWVVcxgDIAEoAhIgChhBdWRpb0ZyYW1lUGxheU5lZWRUaW1lVXMYBCAB", "KAIiKgoYUHJvdG9idWZfUm9vbV9HZXRfU2NyZWVuEg4KBlJvb21JRBgBIAEo", "BSJTCh1Qcm90b2J1Zl9Sb29tX0dldF9TY3JlZW5fUkVTUBIOCgZSb29tSUQY", - "ASABKAUSDwoHRnJhbWVJRBgCIAEoBRIRCglSYXdCaXRtYXAYAyABKAwiZgoS", + "ASABKAUSDwoHRnJhbWVJRBgCIAEoBRIRCglSYXdCaXRtYXAYAyABKAwiMgoS", "UHJvdG9idWZfR2FtZV9NYXJrEg0KBVJvbUlEGAEgASgFEg0KBXN0YXRlGAIg", - "ASgFEjIKDFBsYXRmb3JtVHlwZRgDIAEoDjIcLkF4aWJ1Z1Byb3RvYnVmLlBs", - "YXRmb3JtVHlwZSJcChdQcm90b2J1Zl9HYW1lX01hcmtfUkVTUBINCgVSb21J", - "RBgBIAEoBRIyCgxQbGF0Zm9ybVR5cGUYAiABKA4yHC5BeGlidWdQcm90b2J1", - "Zi5QbGF0Zm9ybVR5cGUqoQUKCUNvbW1hbmRJRBIOCgpDTURfREVGQVVMEAAS", - "DAoIQ01EX1BJTkcQARIMCghDTURfUE9ORxACEg4KCUNNRF9MT0dJThDRDxIY", - "ChNDTURfVVNFUl9PTkxJTkVMSVNUELgXEhIKDUNNRF9VU0VSX0pPSU4Q1xcS", - "EwoOQ01EX1VTRVJfTEVBVkUQ2BcSGgoVQ01EX1VTR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xABEhEK", + "DU1hc3Rlcl9TeXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAE", + "EhIKDkdhbWVfQm95X0NvbG9yEAUSEQoNQ29sZWNvX1Zpc2lvbhAGEgsKB1ND", + "XzMwMDAQBxILCgdTR18xMDAwEAgqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25l", + "X0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRAC", + "Eg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUq", + "TgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFz", + "ZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3Rv", + "Mw==")); 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.PlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + 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[] { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Ping), global::AxibugProtobuf.Protobuf_Ping.Parser, new[]{ "Seed" }, null, null, null, null), @@ -186,8 +185,8 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Player_Ready), global::AxibugProtobuf.Protobuf_Room_Player_Ready.Parser, new[]{ "PushFrameNeedTimeUs", "LoadStateNeedTimeUs", "VideoFrameShowNeedTimeUs", "AudioFramePlayNeedTimeUs" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Get_Screen), global::AxibugProtobuf.Protobuf_Room_Get_Screen.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Get_Screen_RESP), global::AxibugProtobuf.Protobuf_Room_Get_Screen_RESP.Parser, new[]{ "RoomID", "FrameID", "RawBitmap" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark), global::AxibugProtobuf.Protobuf_Game_Mark.Parser, new[]{ "RomID", "State", "PlatformType" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark_RESP), global::AxibugProtobuf.Protobuf_Game_Mark_RESP.Parser, new[]{ "RomID", "PlatformType" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark), global::AxibugProtobuf.Protobuf_Game_Mark.Parser, new[]{ "RomID", "State" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Game_Mark_RESP), global::AxibugProtobuf.Protobuf_Game_Mark_RESP.Parser, new[]{ "RomID" }, null, null, null, null) })); } #endregion @@ -371,7 +370,7 @@ namespace AxibugProtobuf { public enum DeviceType { /// - ///缺省不使用 + ///通用 /// [pbr::OriginalName("DeviceType_Default")] Default = 0, [pbr::OriginalName("PC")] Pc = 1, @@ -416,13 +415,16 @@ namespace AxibugProtobuf { [pbr::OriginalName("Nintendo3DSControl")] Nintendo3Dscontrol = 13, } - public enum PlatformType { + public enum RomPlatformType { [pbr::OriginalName("All")] All = 0, [pbr::OriginalName("Nes")] Nes = 1, [pbr::OriginalName("Master_System")] MasterSystem = 2, [pbr::OriginalName("Game_Gear")] GameGear = 3, [pbr::OriginalName("Game_Boy")] GameBoy = 4, [pbr::OriginalName("Game_Boy_Color")] GameBoyColor = 5, + [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, + [pbr::OriginalName("SC_3000")] Sc3000 = 7, + [pbr::OriginalName("SG_1000")] Sg1000 = 8, } public enum RoomGameState { @@ -9023,7 +9025,6 @@ namespace AxibugProtobuf { public Protobuf_Game_Mark(Protobuf_Game_Mark other) : this() { romID_ = other.romID_; state_ = other.state_; - platformType_ = other.platformType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -9060,20 +9061,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlatformType" field. - public const int PlatformTypeFieldNumber = 3; - private global::AxibugProtobuf.PlatformType platformType_ = global::AxibugProtobuf.PlatformType.All; - /// - ///平台类型 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.PlatformType PlatformType { - get { return platformType_; } - set { - platformType_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Game_Mark); @@ -9089,7 +9076,6 @@ namespace AxibugProtobuf { } if (RomID != other.RomID) return false; if (State != other.State) return false; - if (PlatformType != other.PlatformType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -9098,7 +9084,6 @@ namespace AxibugProtobuf { int hash = 1; if (RomID != 0) hash ^= RomID.GetHashCode(); if (State != 0) hash ^= State.GetHashCode(); - if (PlatformType != global::AxibugProtobuf.PlatformType.All) hash ^= PlatformType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9123,10 +9108,6 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(24); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -9144,10 +9125,6 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(24); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -9163,9 +9140,6 @@ namespace AxibugProtobuf { if (State != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(State); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlatformType); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9183,9 +9157,6 @@ namespace AxibugProtobuf { if (other.State != 0) { State = other.State; } - if (other.PlatformType != global::AxibugProtobuf.PlatformType.All) { - PlatformType = other.PlatformType; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -9208,10 +9179,6 @@ namespace AxibugProtobuf { State = input.ReadInt32(); break; } - case 24: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } #endif @@ -9234,10 +9201,6 @@ namespace AxibugProtobuf { State = input.ReadInt32(); break; } - case 24: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } } @@ -9275,7 +9238,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Protobuf_Game_Mark_RESP(Protobuf_Game_Mark_RESP other) : this() { romID_ = other.romID_; - platformType_ = other.platformType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -9298,20 +9260,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlatformType" field. - public const int PlatformTypeFieldNumber = 2; - private global::AxibugProtobuf.PlatformType platformType_ = global::AxibugProtobuf.PlatformType.All; - /// - ///平台类型 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.PlatformType PlatformType { - get { return platformType_; } - set { - platformType_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Game_Mark_RESP); @@ -9326,7 +9274,6 @@ namespace AxibugProtobuf { return true; } if (RomID != other.RomID) return false; - if (PlatformType != other.PlatformType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -9334,7 +9281,6 @@ namespace AxibugProtobuf { public override int GetHashCode() { int hash = 1; if (RomID != 0) hash ^= RomID.GetHashCode(); - if (PlatformType != global::AxibugProtobuf.PlatformType.All) hash ^= PlatformType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9355,10 +9301,6 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(16); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -9372,10 +9314,6 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - output.WriteRawTag(16); - output.WriteEnum((int) PlatformType); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -9388,9 +9326,6 @@ namespace AxibugProtobuf { if (RomID != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(RomID); } - if (PlatformType != global::AxibugProtobuf.PlatformType.All) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlatformType); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9405,9 +9340,6 @@ namespace AxibugProtobuf { if (other.RomID != 0) { RomID = other.RomID; } - if (other.PlatformType != global::AxibugProtobuf.PlatformType.All) { - PlatformType = other.PlatformType; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -9426,10 +9358,6 @@ namespace AxibugProtobuf { RomID = input.ReadInt32(); break; } - case 16: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } #endif @@ -9448,10 +9376,6 @@ namespace AxibugProtobuf { RomID = input.ReadInt32(); break; } - case 16: { - PlatformType = (global::AxibugProtobuf.PlatformType) input.ReadEnum(); - break; - } } } } diff --git a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto index a58e980f..7150bcec 100644 --- a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto +++ b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto @@ -92,7 +92,7 @@ enum LoginType enum DeviceType //设备类型 { - DeviceType_Default = 0;//缺省不使用 + DeviceType_Default = 0;//通用 PC = 1; Android = 2; IOS = 3; @@ -124,7 +124,7 @@ enum GamePadType //手柄类型 Nintendo3DSControl = 13; } -enum PlatformType +enum RomPlatformType { All = 0; Nes = 1; @@ -132,6 +132,9 @@ enum PlatformType Game_Gear = 3; Game_Boy = 4; Game_Boy_Color = 5; + Coleco_Vision = 6; + SC_3000 = 7; + SG_1000 = 8; } //enum RoomPlayerState @@ -422,11 +425,9 @@ message Protobuf_Game_Mark { int32 RomID = 1;//RomID int32 state = 2;//[0]收藏 [1]取消收藏 - PlatformType PlatformType = 3;//平台类型 } message Protobuf_Game_Mark_RESP { int32 RomID = 1;//RomID - PlatformType PlatformType = 2;//平台类型 } \ No newline at end of file diff --git a/README_WEBAPI.md b/README_WEBAPI.md index 853b81dd..25b7f691 100644 --- a/README_WEBAPI.md +++ b/README_WEBAPI.md @@ -7,23 +7,45 @@ ``` platform 模拟器所在平台 -[0] 通用 -[1] PC +enum DeviceType //设备类型 +{ + DeviceType_Default = 0;//通用 + PC = 1; + Android = 2; + IOS = 3; + PSV = 4; + PS3 = 5; + PS4 = 6; + XBOX360 = 7; + XBOXONE = 8; + WiiU = 9; + Nintendo3DS = 10; + AndroidCarApp = 11;//汽车Android车机 +} PType Rom所属平台 - enum PlatformType : byte - { - All = 0, - Nes = 1, - } +enum RomPlatformType +{ + All = 0; + Nes = 1; + Master_System = 2; + Game_Gear = 3; + Game_Boy = 4; + Game_Boy_Color = 5; + Coleco_Vision = 6; + SC_3000 = 7; + SG_1000 = 8; +} + +游戏类型 ``` ### 基本信息检查 ``` -{WebHost}/api/NesRomList?platform=<平台编号>&version=<版本> +{WebHost}/api/CheckStandInfo?platform=<平台编号>&version=<版本> ``` Request: @@ -59,13 +81,13 @@ class Resp_CheckStandInfo ### Nes游戏列表 ``` -{WebHost}/api/NesRomList?Page=<页码>&PageSize=<单大小>&SearchKey=<可选的模糊查询关键字>&PType=<平台枚举(int)>>ype=<游戏类型枚举> +{WebHost}/api/RomList?Page=<页码>&PageSize=<单大小>&SearchKey=<可选的模糊查询关键字>&PType=<平台枚举(int)>>ype=<游戏类型枚举> ``` Request: ``` -http://emu.axibug.com/api/NesRomList?Page=0&PageSize=5&SearchKey=%热血&PType=1>ype=1 +http://emu.axibug.com/api/RomList?Page=0&PageSize=5&SearchKey=%热血&PType=1>ype=1 ``` Response: @@ -79,57 +101,67 @@ Response: { "orderid": 0, "id": 190, + "ptype": 1, "romName": "热血物语", "gType": "ACT", "desc": "设有拳击及体力槽的热血系列节目。是带有RPG色彩的街头斗殴节目。", "url": "roms/fcrom/Downtown%20-%20Nekketsu%20Monogatari%20(J).zip", "imgUrl": "images/fcrom/Downtown%20-%20Nekketsu%20Monogatari%20(J).JPG", - "hash": "", - "stars": 0 + "hash": "62e2b8ee88d894d9adea32273c9bbfc3", + "stars": 0, + "playcount": 72 }, { "orderid": 1, "id": 460, + "ptype": 1, "romName": "热血时代剧(热血道中记)", "gType": "ACT", "desc": "以古代日本为舞台展开的热血系列节目。设有多种必杀技可使用。", "url": "roms/fcrom/Kunio%20Kun%20No%20Jidaigekidayo%20Zenin%20Shuugou%20(J).zip", "imgUrl": "images/fcrom/Kunio%20Kun%20No%20Jidaigekidayo%20Zenin%20Shuugou%20(J).JPG", - "hash": "", - "stars": 0 + "hash": "45c4a12530d64e774f0ef7aebe211b81", + "stars": 0, + "playcount": 0 }, { "orderid": 2, "id": 585, + "ptype": 1, "romName": "热血硬派", "gType": "ACT", "desc": "有着多种模式的格斗节目。各版面均有不同的趣味性。是热血系列游戏最初的作品。", "url": "roms/fcrom/Nekketsu%20Kouha%20-%20Kunio%20Kun%20(J).zip", "imgUrl": "images/fcrom/Nekketsu%20Kouha%20-%20Kunio%20Kun%20(J).JPG", - "hash": "", - "stars": 0 + "hash": "a731fd23627e0db18c88d1fff4bc8039", + "stars": 0, + "playcount": 0 }, { "orderid": 3, "id": 674, + "ptype": 1, "romName": "热血物语(美版)", "gType": "ACT", "desc": "设有拳击及体力槽的热血系列节目。是带有RPG色彩的街头斗殴节目。", "url": "roms/fcrom/River%20City%20Brawl%20(J).zip", "imgUrl": "images/fcrom/River%20City%20Brawl%20(J).JPG", - "hash": "", - "stars": 0 + "hash": "956381cb137c4cadee36249ad16a79fa", + "stars": 0, + "playcount": 0 }, { "orderid": 4, "id": 826, + "ptype": 1, "romName": "热血时代剧美版(热血道中记美版)", "gType": "ACT", "desc": "以古代日本为舞台展开的热血系列节目。设有多种必杀技可使用。", "url": "roms/fcrom/Technos%20Samurai%20-%20Downtown%20Special%20(J).zip", "imgUrl": "images/fcrom/Technos%20Samurai%20-%20Downtown%20Special%20(J).JPG", - "hash": "", - "stars": 0 + "hash": "b96fb8afda11a73c1693fb6a197347c4", + "stars": 0, + "playcount": 0 } ] } @@ -146,19 +178,20 @@ Response: public List gameList { get; set; } } - public class Resp_RomInfo - { - public int orderid { get; set; } - public int id { get; set; } - public string romName { get; set; } - public string gType { get; set; } - public string desc { get; set; } - public string url { get; set; } - public string imgUrl { get; set; } - public string hash { get; set; } - public int stars { get; set; } - public int playcount { get; set; } - } + public class Resp_RomInfo + { + public int orderid { get; set; } + public int id { get; set; } + public int ptype { get; set; } + public string romName { get; set; } + public string gType { get; set; } + public string desc { get; set; } + public string url { get; set; } + public string imgUrl { get; set; } + public string hash { get; set; } + public int stars { get; set; } + public int playcount { get; set; } + } ```