mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-03-04 09:25:22 +03:00
Split into game-specific libraries.
This commit is contained in:
parent
fd53660c5e
commit
077669b81c
@ -1,6 +1,6 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon.ProjectX;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Test.Core;
|
||||
|
||||
namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||
[TestMethod]
|
||||
public void LoadLibraries()
|
||||
{
|
||||
TestHelpers.LoadFiles<Library>(Game.WormsArmageddon, "*.pxl");
|
||||
FileTester.LoadFiles<Library>(Game.Armageddon, "*.pxl");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon.ProjectX;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Test.Core;
|
||||
|
||||
namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||
[TestMethod]
|
||||
public void LoadSchemes()
|
||||
{
|
||||
TestHelpers.LoadFiles<Scheme>(Game.WormsArmageddon, "*.pxs");
|
||||
FileTester.LoadFiles<Scheme>(Game.Armageddon, "*.pxs");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Armageddon.ProjectX\Syroot.Worms.Armageddon.ProjectX.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Test\Syroot.Worms.Test.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -5,7 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon.ProjectX
|
||||
{
|
||||
@ -19,7 +19,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
|
||||
|
||||
private const int _signature = 0x1BCD0102;
|
||||
private const byte _version = 0x00;
|
||||
|
||||
|
||||
// ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
@ -49,9 +49,9 @@ namespace Syroot.Worms.Armageddon.ProjectX
|
||||
}
|
||||
|
||||
// ---- PROPERTIES ---------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
public byte Version { get; set; }
|
||||
|
||||
|
||||
// ---- OPERATORS ----------------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
@ -154,7 +154,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Saves the data in the given file.
|
||||
/// </summary>
|
||||
@ -166,7 +166,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
|
||||
Save(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets all attached files.
|
||||
/// </summary>
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon.ProjectX
|
||||
{
|
||||
@ -17,7 +17,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
|
||||
|
||||
private const string _signature = "SCHM OF WAPX";
|
||||
private const int _weaponsPerTable = 71;
|
||||
|
||||
|
||||
// ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
@ -47,7 +47,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
|
||||
}
|
||||
|
||||
// ---- PROPERTIES ---------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
public int Version { get; set; }
|
||||
|
||||
public SchemeFlags Flags { get; set; }
|
||||
@ -200,7 +200,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Saves the data in the given file.
|
||||
/// </summary>
|
@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Syroot.Worms.Armageddon-ProjectX</AssemblyName>
|
||||
<Authors>Syroot</Authors>
|
||||
<Copyright>(c) Syroot, licensed under MIT</Copyright>
|
||||
<Description>.NET library for loading and modifying files of Worms Armageddon ProjectX.</Description>
|
||||
<GenerateDocumentationFile Condition="'$(Configuration)'=='Release'">true</GenerateDocumentationFile>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageIconUrl>https://gitlab.com/Syroot/Worms/raw/master/res/icon.png</PackageIconUrl>
|
||||
<PackageId>Syroot.Worms.Armageddon.ProjectX</PackageId>
|
||||
<PackageLicenseUrl>https://gitlab.com/Syroot/Worms/raw/master/LICENSE</PackageLicenseUrl>
|
||||
<PackageProjectUrl>https://gitlab.com/Syroot/Worms</PackageProjectUrl>
|
||||
<PackageReleaseNotes>Initial release.</PackageReleaseNotes>
|
||||
<PackageTags>worms;team17</PackageTags>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://gitlab.com/Syroot/Worms</RepositoryUrl>
|
||||
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
|
||||
<Version>2.0.0-alpha1</Version>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Syroot.Worms.Armageddon\Syroot.Worms.Armageddon.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -3,6 +3,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon.ProjectX
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Test.Core;
|
||||
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
|
||||
[TestMethod]
|
||||
public void LoadGeneratedMaps()
|
||||
{
|
||||
TestHelpers.LoadFiles<GeneratedMap>(Game.Armageddon, "*.lev");
|
||||
FileTester.LoadFiles<GeneratedMap>(Game.Armageddon | Game.WorldParty, "*.lev");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Test.Core;
|
||||
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
|
||||
[TestMethod]
|
||||
public void LoadLandData()
|
||||
{
|
||||
TestHelpers.LoadFiles<LandData>(Game.WormsArmageddon, "land.dat");
|
||||
FileTester.LoadFiles<LandData>(Game.Armageddon, "land.dat");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Test.Core;
|
||||
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
|
||||
[TestMethod]
|
||||
public void LoadSchemes()
|
||||
{
|
||||
TestHelpers.LoadFiles<Scheme>(Game.Armageddon, "*.wsc");
|
||||
FileTester.LoadFiles<Scheme>(Game.Armageddon | Game.WorldParty, "*.wsc");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Armageddon\Syroot.Worms.Armageddon.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Test\Syroot.Worms.Test.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Test.Core;
|
||||
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
|
||||
[TestMethod]
|
||||
public void LoadTeamContainers()
|
||||
{
|
||||
TestHelpers.LoadFiles<TeamContainer>(Game.Armageddon, "*.wgt");
|
||||
FileTester.LoadFiles<TeamContainer>(Game.Armageddon, "*.wgt");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon
|
||||
{
|
||||
@ -45,7 +45,7 @@ namespace Syroot.Worms.Armageddon
|
||||
/// Gets or sets the <see cref="MapGeneratorSettings"/>.
|
||||
/// </summary>
|
||||
public MapGeneratorSettings Settings { get; set; }
|
||||
|
||||
|
||||
// ---- METHODS (PUBLIC) ---------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
@ -2,7 +2,7 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon
|
||||
{
|
@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon
|
||||
{
|
||||
@ -17,18 +18,59 @@ namespace Syroot.Worms.Armageddon
|
||||
// ---- CONSTANTS ----------------------------------------------------------------------------------------------
|
||||
|
||||
private const string _signature = "SCHM";
|
||||
|
||||
|
||||
// Lookup tables.
|
||||
private static readonly Dictionary<byte, byte> _mapWaterRiseToRaw = new Dictionary<byte, byte>() { [0] = 0,
|
||||
[5] = 1, [13] = 19, [20] = 2, [21] = 55, [29] = 43, [37] = 47, [45] = 3, [52] = 26, [53] = 25, [61] = 27,
|
||||
[64] = 8, [69] = 33, [77] = 13, [80] = 4, [84] = 18, [85] = 23, [93] = 11, [101] = 15, [109] = 29,
|
||||
[116] = 22, [117] = 57, [125] = 5, [133] = 63, [141] = 45, [148] = 30, [149] = 9, [157] = 21, [165] = 17,
|
||||
[173] = 61, [180] = 6, [181] = 39, [189] = 37, [197] = 31, [205] = 51, [208] = 12, [212] = 14, [213] = 41,
|
||||
[221] = 53, [229] = 49, [237] = 35, [244] = 10, [245] = 7, [253] = 59 };
|
||||
private static readonly Dictionary<byte, byte> _mapWaterRiseToRaw = new Dictionary<byte, byte>()
|
||||
{
|
||||
[0] = 0,
|
||||
[5] = 1,
|
||||
[13] = 19,
|
||||
[20] = 2,
|
||||
[21] = 55,
|
||||
[29] = 43,
|
||||
[37] = 47,
|
||||
[45] = 3,
|
||||
[52] = 26,
|
||||
[53] = 25,
|
||||
[61] = 27,
|
||||
[64] = 8,
|
||||
[69] = 33,
|
||||
[77] = 13,
|
||||
[80] = 4,
|
||||
[84] = 18,
|
||||
[85] = 23,
|
||||
[93] = 11,
|
||||
[101] = 15,
|
||||
[109] = 29,
|
||||
[116] = 22,
|
||||
[117] = 57,
|
||||
[125] = 5,
|
||||
[133] = 63,
|
||||
[141] = 45,
|
||||
[148] = 30,
|
||||
[149] = 9,
|
||||
[157] = 21,
|
||||
[165] = 17,
|
||||
[173] = 61,
|
||||
[180] = 6,
|
||||
[181] = 39,
|
||||
[189] = 37,
|
||||
[197] = 31,
|
||||
[205] = 51,
|
||||
[208] = 12,
|
||||
[212] = 14,
|
||||
[213] = 41,
|
||||
[221] = 53,
|
||||
[229] = 49,
|
||||
[237] = 35,
|
||||
[244] = 10,
|
||||
[245] = 7,
|
||||
[253] = 59
|
||||
};
|
||||
private static readonly byte[] _objectCounts = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85,
|
||||
90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250 };
|
||||
|
||||
|
||||
// ---- MEMBERS ------------------------------------------------------------------------------------------------
|
||||
|
||||
private byte _mineDelay;
|
||||
@ -539,7 +581,7 @@ namespace Syroot.Worms.Armageddon
|
||||
/// is unlimited. Configurable with the /speed command.
|
||||
/// </summary>
|
||||
public byte RwMaxRopeSpeed { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether using a weapon does no longer end the turn and allows to shoot
|
||||
/// multiple weapons in one turn. Configurable with the /sdet or /multishot commands.
|
||||
@ -557,7 +599,7 @@ namespace Syroot.Worms.Armageddon
|
||||
/// the /ope command.
|
||||
/// </summary>
|
||||
public bool RwObjectPushByExplosion { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether worms can be selected at any time during the turn, as long as worm
|
||||
/// selection is activated. Configurable with the /swat command.
|
||||
@ -642,7 +684,7 @@ namespace Syroot.Worms.Armageddon
|
||||
WormEnergy = reader.Read1Byte();
|
||||
LoadTurnTimeConfig(reader);
|
||||
LoadRoundTimeConfig(reader);
|
||||
NumberOfWins = (byte)Math.Max(1, (int)reader.ReadByte());
|
||||
NumberOfWins = (byte)Math.Max(1, reader.ReadByte());
|
||||
Blood = reader.ReadBoolean();
|
||||
AquaSheep = reader.ReadBoolean();
|
||||
SheepHeaven = reader.ReadBoolean();
|
||||
@ -654,7 +696,7 @@ namespace Syroot.Worms.Armageddon
|
||||
UpgradedLongbow = reader.ReadBoolean();
|
||||
EnableTeamWeapons = reader.ReadBoolean();
|
||||
EnableSuperWeapons = reader.ReadBoolean();
|
||||
|
||||
|
||||
// Read the weapon settings. Old versions do not store super weapon settings.
|
||||
Weapons = new SchemeWeaponSetting[64];
|
||||
int weaponCount = GetWeaponCount();
|
||||
@ -785,7 +827,7 @@ namespace Syroot.Worms.Armageddon
|
||||
// Invalid values default to 8 mines.
|
||||
ObjectTypes = SchemeObjectType.Mines;
|
||||
ObjectCount = SchemeObjectCount.Count8;
|
||||
|
||||
|
||||
byte raw = reader.Read1Byte();
|
||||
if (raw < 12)
|
||||
{
|
||||
@ -822,7 +864,7 @@ namespace Syroot.Worms.Armageddon
|
||||
ObjectCount = (SchemeObjectCount)_objectCounts[(raw - (8 + modulo)) / 4];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void LoadMineDelayConfig(BinaryStream reader)
|
||||
{
|
||||
byte raw = reader.Read1Byte();
|
||||
@ -926,13 +968,13 @@ namespace Syroot.Worms.Armageddon
|
||||
RwWindPower = (byte)Weapons[(int)SchemeWeapon.SuicideBomber].Probability;
|
||||
RwWormBouncyness = (byte)Weapons[(int)SchemeWeapon.Armageddon].Probability;
|
||||
}
|
||||
|
||||
|
||||
private int GetWeaponCount()
|
||||
{
|
||||
// Old versions do not store super weapon settings.
|
||||
return Version == SchemeVersion.Extended ? 64 : 45;
|
||||
}
|
||||
|
||||
|
||||
private void SaveObjectTypesAndCount(BinaryStream writer, SchemeSaveFormat format)
|
||||
{
|
||||
byte raw = 0;
|
23
src/Syroot.Worms.Armageddon/Syroot.Worms.Armageddon.csproj
Normal file
23
src/Syroot.Worms.Armageddon/Syroot.Worms.Armageddon.csproj
Normal file
@ -0,0 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Syroot.Worms.Armageddon</AssemblyName>
|
||||
<Authors>Syroot</Authors>
|
||||
<Copyright>(c) Syroot, licensed under MIT</Copyright>
|
||||
<Description>.NET library for loading and modifying files of Team17's Worms Armageddon.</Description>
|
||||
<GenerateDocumentationFile Condition="'$(Configuration)'=='Release'">true</GenerateDocumentationFile>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageIconUrl>https://gitlab.com/Syroot/Worms/raw/master/res/icon.png</PackageIconUrl>
|
||||
<PackageId>Syroot.Worms.Armageddon</PackageId>
|
||||
<PackageLicenseUrl>https://gitlab.com/Syroot/Worms/raw/master/LICENSE</PackageLicenseUrl>
|
||||
<PackageProjectUrl>https://gitlab.com/Syroot/Worms</PackageProjectUrl>
|
||||
<PackageReleaseNotes>Initial release.</PackageReleaseNotes>
|
||||
<PackageTags>worms;team17</PackageTags>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://gitlab.com/Syroot/Worms</RepositoryUrl>
|
||||
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
|
||||
<Version>2.0.0-alpha1</Version>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -3,7 +3,7 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.Armageddon
|
||||
{
|
||||
@ -57,7 +57,7 @@ namespace Syroot.Worms.Armageddon
|
||||
/// Gets or sets the unlocked utilities, weapon upgrades, and game cheats.
|
||||
/// </summary>
|
||||
public UnlockedFeatures UnlockedFeatures { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an unknown value.
|
||||
/// </summary>
|
||||
@ -175,7 +175,7 @@ namespace Syroot.Worms.Armageddon
|
||||
/// The utility weapon Jetpack can be configured.
|
||||
/// </summary>
|
||||
UtilityJetpack = 1 << 4,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The Grenade upgrade can be enabled.
|
||||
/// </summary>
|
@ -1,6 +1,6 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Launcher
|
||||
namespace Syroot.Worms.Mgame.Launcher
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents entry assembly information.
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Launcher
|
||||
namespace Syroot.Worms.Mgame.Launcher
|
||||
{
|
||||
internal class Config
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using static Syroot.Worms.OnlineWorms.Launcher.WinApi.Kernel32;
|
||||
using static Syroot.Worms.OnlineWorms.Launcher.WinApi.WinBase;
|
||||
using static Syroot.Worms.OnlineWorms.Launcher.WinApi.WinBase.WaitResult;
|
||||
using static Syroot.Worms.Mgame.Launcher.WinApi.Kernel32;
|
||||
using static Syroot.Worms.Mgame.Launcher.WinApi.WinBase;
|
||||
using static Syroot.Worms.Mgame.Launcher.WinApi.WinBase.WaitResult;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Launcher
|
||||
namespace Syroot.Worms.Mgame.Launcher
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a Win32 process providing specific functionality not available in the .NET <see cref="Process"/>
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Launcher
|
||||
namespace Syroot.Worms.Mgame.Launcher
|
||||
{
|
||||
internal class Program
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"profiles": {
|
||||
"Syroot.OnlineWorms.Launcher": {
|
||||
"Syroot.Worms.Mgame.Launcher": {
|
||||
"commandName": "Project",
|
||||
"workingDirectory": "C:\\Games\\WWP Aqua"
|
||||
}
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -15,10 +15,11 @@
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Costura.Fody" Version="3.2.2" />
|
||||
<PackageReference Include="Costura.Fody" Version="3.3.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Mgame\Syroot.Worms.Mgame.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<None Update="LauncherConfig.json">
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using static Syroot.Worms.OnlineWorms.Launcher.WinApi.WinBase;
|
||||
using static Syroot.Worms.Mgame.Launcher.WinApi.WinBase;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Launcher.WinApi
|
||||
namespace Syroot.Worms.Mgame.Launcher.WinApi
|
||||
{
|
||||
internal static class Kernel32
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Launcher.WinApi
|
||||
namespace Syroot.Worms.Mgame.Launcher.WinApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents WinAPI definitions from WinBase.h.
|
@ -3,9 +3,9 @@ using System.Drawing;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using Syroot.Worms.OnlineWorms.Server.Net;
|
||||
using Syroot.Worms.Mgame.Server.Net;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server
|
||||
namespace Syroot.Worms.Mgame.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a connection with an Online Worms client which replies to received packets appropriately.
|
@ -1,6 +1,6 @@
|
||||
using System.Net;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server
|
||||
namespace Syroot.Worms.Mgame.Server
|
||||
{
|
||||
internal class Config
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server
|
||||
namespace Syroot.Worms.Mgame.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents simplistic textual logging.
|
@ -6,7 +6,7 @@ using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a class capable of dispatching received <see cref="Packet"/> instances to a corresponding method.
|
@ -6,7 +6,7 @@ using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a packet with an ID specifying its contents. To allow the server to instantiate child packet classes,
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Decorates a <see cref="Packet"/> child class with the ID of the packet it represents.
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a factory creating <see cref="Packet"/> instances by mapping their ID to types to instantiate.
|
@ -3,7 +3,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a stream formatting data for being sent or received from <see cref="Packet"/> instances.
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the client request for a <see cref="ChannelConnectReply"/>.
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the server response to a <see cref="ChannelConnectQuery"/>.
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an additional server response to a <see cref="ChannelTop20Query"/>, causing the client to switch
|
@ -2,7 +2,7 @@
|
||||
using System.Net;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the client request for a <see cref="ChannelEnterReply"/>.
|
@ -2,7 +2,7 @@
|
||||
using System.Net;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the server response to a <see cref="ChannelEnterQuery"/>.
|
@ -4,7 +4,7 @@ using System.Drawing;
|
||||
using System.Net;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an additional server response to a <see cref="LoginQuery"/>, providing available server channels.
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the client request for a <see cref="ChannelConnectReply"/>.
|
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Syroot.BinaryData;
|
||||
using Syroot.Worms.Core;
|
||||
using Syroot.Worms.Core.IO;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the server response to a <see cref="ChannelTop20Query"/>.
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the client request for a <see cref="ConnectReply"/>.
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the server response to a <see cref="ConnectQuery"/>.
|
@ -2,7 +2,7 @@
|
||||
using System.Net;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the client request for a <see cref="LoginReply"/>.
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the server response to a <see cref="LoginQuery"/>.
|
@ -1,7 +1,7 @@
|
||||
#if DEBUG
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a special fallback packet which simply stores any ID and the raw packet data.
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an additional server response to a <see cref="LoginQuery"/>, providing informational server
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the client request for a <see cref="StartSingleGameReply"/>.
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||
namespace Syroot.Worms.Mgame.Server.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the server response to a <see cref="StartSingleGameQuery"/>.
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server
|
||||
namespace Syroot.Worms.Mgame.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the main class of the application containing the entry point.
|
@ -4,7 +4,7 @@ using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms.Server
|
||||
namespace Syroot.Worms.Mgame.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a server listening for incoming client connections and dispatching them into <see cref="Client"/>
|
@ -9,9 +9,15 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Syroot.Worms.Armageddon.ProjectX\Syroot.Worms.Armageddon.ProjectX.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Armageddon\Syroot.Worms.Armageddon.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Mgame.Launcher\Syroot.Worms.Mgame.Launcher.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Mgame\Syroot.Worms.Mgame.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms.WorldParty\Syroot.Worms.WorldParty.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms.Worms2\Syroot.Worms.Worms2.csproj" />
|
||||
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
@ -1,6 +1,6 @@
|
||||
using System.Text;
|
||||
|
||||
namespace Syroot.Worms.OnlineWorms
|
||||
namespace Syroot.Worms.Mgame
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents instances of common <see cref="Encoding"/> pages.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user