Removed NioTSO client and server

- NioTSO client isn't needed because we're using RayLib
- Added FreeSO's API server to handle most backend operations
This commit is contained in:
Tony Bark 2024-05-01 02:55:43 -04:00
parent f12ba1502b
commit 22191ce648
591 changed files with 53264 additions and 3362 deletions

View file

@ -0,0 +1,43 @@
namespace FSO.Common.Content
{
/// <summary>
/// Represents the ID of a content resource.
/// Consists of two parts: TypeID (uint) and FileID (uint).
/// </summary>
public class ContentID
{
public uint TypeID;
public uint FileID;
public string FileName;
private long v;
/// <summary>
/// Creates a new ContentID instance.
/// </summary>
/// <param name="typeID">The TypeID of the content resource.</param>
/// <param name="fileID">The FileID of the content resource.</param>
public ContentID(uint typeID, uint fileID)
{
this.TypeID = typeID;
this.FileID = fileID;
}
public ContentID(string name)
{
this.FileName = name;
}
public ContentID(long v)
{
this.TypeID = (uint)v;
this.FileID = (uint)(v >> 32);
}
public ulong Shift()
{
var fileIDLong = ((ulong)FileID) << 32;
return fileIDLong | TypeID;
}
}
}

View file

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TSO.Common.content
{
public interface IContent
{
}
}

View file

@ -0,0 +1,13 @@
using System.Collections.Generic;
namespace FSO.Common.Content
{
public interface IContentProvider <T>
{
T Get(ulong id);
T Get(string name);
T Get(uint type, uint fileID);
T Get(ContentID id);
List<IContentReference<T>> List();
}
}

View file

@ -0,0 +1,13 @@
namespace FSO.Common.Content
{
public interface IContentReference <T> : IContentReference
{
T Get();
}
public interface IContentReference
{
object GetGeneric();
object GetThrowawayGeneric();
}
}

Binary file not shown.