Split into game-specific libraries.

This commit is contained in:
Ray Koopa 2019-01-12 22:02:35 +01:00
parent fd53660c5e
commit 077669b81c
156 changed files with 558 additions and 312 deletions

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Syroot.Worms.Armageddon.ProjectX; using Syroot.Worms.Armageddon.ProjectX;
using Syroot.Worms.Test.Common; using Syroot.Worms.Test.Core;
namespace Syroot.Worms.Test.Armageddon.ProjectX namespace Syroot.Worms.Test.Armageddon.ProjectX
{ {
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon.ProjectX
[TestMethod] [TestMethod]
public void LoadLibraries() public void LoadLibraries()
{ {
TestHelpers.LoadFiles<Library>(Game.WormsArmageddon, "*.pxl"); FileTester.LoadFiles<Library>(Game.Armageddon, "*.pxl");
} }
} }
} }

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Syroot.Worms.Armageddon.ProjectX; using Syroot.Worms.Armageddon.ProjectX;
using Syroot.Worms.Test.Common; using Syroot.Worms.Test.Core;
namespace Syroot.Worms.Test.Armageddon.ProjectX namespace Syroot.Worms.Test.Armageddon.ProjectX
{ {
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon.ProjectX
[TestMethod] [TestMethod]
public void LoadSchemes() public void LoadSchemes()
{ {
TestHelpers.LoadFiles<Scheme>(Game.WormsArmageddon, "*.pxs"); FileTester.LoadFiles<Scheme>(Game.Armageddon, "*.pxs");
} }
} }
} }

View File

@ -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>

View File

@ -5,7 +5,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon.ProjectX namespace Syroot.Worms.Armageddon.ProjectX
{ {
@ -19,7 +19,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
private const int _signature = 0x1BCD0102; private const int _signature = 0x1BCD0102;
private const byte _version = 0x00; private const byte _version = 0x00;
// ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------ // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------
/// <summary> /// <summary>
@ -49,9 +49,9 @@ namespace Syroot.Worms.Armageddon.ProjectX
} }
// ---- PROPERTIES --------------------------------------------------------------------------------------------- // ---- PROPERTIES ---------------------------------------------------------------------------------------------
public byte Version { get; set; } public byte Version { get; set; }
// ---- OPERATORS ---------------------------------------------------------------------------------------------- // ---- OPERATORS ----------------------------------------------------------------------------------------------
/// <summary> /// <summary>
@ -154,7 +154,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
} }
} }
} }
/// <summary> /// <summary>
/// Saves the data in the given file. /// Saves the data in the given file.
/// </summary> /// </summary>
@ -166,7 +166,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
Save(stream); Save(stream);
} }
} }
/// <summary> /// <summary>
/// Gets all attached files. /// Gets all attached files.
/// </summary> /// </summary>

View File

@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon.ProjectX namespace Syroot.Worms.Armageddon.ProjectX
{ {
@ -17,7 +17,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
private const string _signature = "SCHM OF WAPX"; private const string _signature = "SCHM OF WAPX";
private const int _weaponsPerTable = 71; private const int _weaponsPerTable = 71;
// ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------ // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------
/// <summary> /// <summary>
@ -47,7 +47,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
} }
// ---- PROPERTIES --------------------------------------------------------------------------------------------- // ---- PROPERTIES ---------------------------------------------------------------------------------------------
public int Version { get; set; } public int Version { get; set; }
public SchemeFlags Flags { get; set; } public SchemeFlags Flags { get; set; }
@ -200,7 +200,7 @@ namespace Syroot.Worms.Armageddon.ProjectX
} }
} }
} }
/// <summary> /// <summary>
/// Saves the data in the given file. /// Saves the data in the given file.
/// </summary> /// </summary>

View File

@ -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>

View File

@ -3,6 +3,7 @@ using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core;
using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon.ProjectX namespace Syroot.Worms.Armageddon.ProjectX
{ {

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Syroot.Worms.Armageddon; using Syroot.Worms.Armageddon;
using Syroot.Worms.Test.Common; using Syroot.Worms.Test.Core;
namespace Syroot.Worms.Test.Armageddon namespace Syroot.Worms.Test.Armageddon
{ {
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
[TestMethod] [TestMethod]
public void LoadGeneratedMaps() public void LoadGeneratedMaps()
{ {
TestHelpers.LoadFiles<GeneratedMap>(Game.Armageddon, "*.lev"); FileTester.LoadFiles<GeneratedMap>(Game.Armageddon | Game.WorldParty, "*.lev");
} }
} }
} }

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Syroot.Worms.Armageddon; using Syroot.Worms.Armageddon;
using Syroot.Worms.Test.Common; using Syroot.Worms.Test.Core;
namespace Syroot.Worms.Test.Armageddon namespace Syroot.Worms.Test.Armageddon
{ {
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
[TestMethod] [TestMethod]
public void LoadLandData() public void LoadLandData()
{ {
TestHelpers.LoadFiles<LandData>(Game.WormsArmageddon, "land.dat"); FileTester.LoadFiles<LandData>(Game.Armageddon, "land.dat");
} }
} }
} }

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Syroot.Worms.Armageddon; using Syroot.Worms.Armageddon;
using Syroot.Worms.Test.Common; using Syroot.Worms.Test.Core;
namespace Syroot.Worms.Test.Armageddon namespace Syroot.Worms.Test.Armageddon
{ {
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
[TestMethod] [TestMethod]
public void LoadSchemes() public void LoadSchemes()
{ {
TestHelpers.LoadFiles<Scheme>(Game.Armageddon, "*.wsc"); FileTester.LoadFiles<Scheme>(Game.Armageddon | Game.WorldParty, "*.wsc");
} }
} }
} }

View File

@ -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>

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Syroot.Worms.Armageddon; using Syroot.Worms.Armageddon;
using Syroot.Worms.Test.Common; using Syroot.Worms.Test.Core;
namespace Syroot.Worms.Test.Armageddon namespace Syroot.Worms.Test.Armageddon
{ {
@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Armageddon
[TestMethod] [TestMethod]
public void LoadTeamContainers() public void LoadTeamContainers()
{ {
TestHelpers.LoadFiles<TeamContainer>(Game.Armageddon, "*.wgt"); FileTester.LoadFiles<TeamContainer>(Game.Armageddon, "*.wgt");
} }
} }
} }

View File

@ -1,7 +1,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon namespace Syroot.Worms.Armageddon
{ {
@ -45,7 +45,7 @@ namespace Syroot.Worms.Armageddon
/// Gets or sets the <see cref="MapGeneratorSettings"/>. /// Gets or sets the <see cref="MapGeneratorSettings"/>.
/// </summary> /// </summary>
public MapGeneratorSettings Settings { get; set; } public MapGeneratorSettings Settings { get; set; }
// ---- METHODS (PUBLIC) --------------------------------------------------------------------------------------- // ---- METHODS (PUBLIC) ---------------------------------------------------------------------------------------
/// <summary> /// <summary>

View File

@ -2,7 +2,7 @@ using System.Drawing;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon namespace Syroot.Worms.Armageddon
{ {

View File

@ -4,6 +4,7 @@ using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core;
using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon namespace Syroot.Worms.Armageddon
{ {
@ -17,18 +18,59 @@ namespace Syroot.Worms.Armageddon
// ---- CONSTANTS ---------------------------------------------------------------------------------------------- // ---- CONSTANTS ----------------------------------------------------------------------------------------------
private const string _signature = "SCHM"; private const string _signature = "SCHM";
// Lookup tables. // Lookup tables.
private static readonly Dictionary<byte, byte> _mapWaterRiseToRaw = new Dictionary<byte, byte>() { [0] = 0, private static readonly Dictionary<byte, byte> _mapWaterRiseToRaw = new Dictionary<byte, byte>()
[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, [0] = 0,
[116] = 22, [117] = 57, [125] = 5, [133] = 63, [141] = 45, [148] = 30, [149] = 9, [157] = 21, [165] = 17, [5] = 1,
[173] = 61, [180] = 6, [181] = 39, [189] = 37, [197] = 31, [205] = 51, [208] = 12, [212] = 14, [213] = 41, [13] = 19,
[221] = 53, [229] = 49, [237] = 35, [244] = 10, [245] = 7, [253] = 59 }; [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, 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, 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 }; 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250 };
// ---- MEMBERS ------------------------------------------------------------------------------------------------ // ---- MEMBERS ------------------------------------------------------------------------------------------------
private byte _mineDelay; private byte _mineDelay;
@ -539,7 +581,7 @@ namespace Syroot.Worms.Armageddon
/// is unlimited. Configurable with the /speed command. /// is unlimited. Configurable with the /speed command.
/// </summary> /// </summary>
public byte RwMaxRopeSpeed { get; set; } public byte RwMaxRopeSpeed { get; set; }
/// <summary> /// <summary>
/// Gets or sets a value indicating whether using a weapon does no longer end the turn and allows to shoot /// 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. /// multiple weapons in one turn. Configurable with the /sdet or /multishot commands.
@ -557,7 +599,7 @@ namespace Syroot.Worms.Armageddon
/// the /ope command. /// the /ope command.
/// </summary> /// </summary>
public bool RwObjectPushByExplosion { get; set; } public bool RwObjectPushByExplosion { get; set; }
/// <summary> /// <summary>
/// Gets or sets a value indicating whether worms can be selected at any time during the turn, as long as worm /// 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. /// selection is activated. Configurable with the /swat command.
@ -642,7 +684,7 @@ namespace Syroot.Worms.Armageddon
WormEnergy = reader.Read1Byte(); WormEnergy = reader.Read1Byte();
LoadTurnTimeConfig(reader); LoadTurnTimeConfig(reader);
LoadRoundTimeConfig(reader); LoadRoundTimeConfig(reader);
NumberOfWins = (byte)Math.Max(1, (int)reader.ReadByte()); NumberOfWins = (byte)Math.Max(1, reader.ReadByte());
Blood = reader.ReadBoolean(); Blood = reader.ReadBoolean();
AquaSheep = reader.ReadBoolean(); AquaSheep = reader.ReadBoolean();
SheepHeaven = reader.ReadBoolean(); SheepHeaven = reader.ReadBoolean();
@ -654,7 +696,7 @@ namespace Syroot.Worms.Armageddon
UpgradedLongbow = reader.ReadBoolean(); UpgradedLongbow = reader.ReadBoolean();
EnableTeamWeapons = reader.ReadBoolean(); EnableTeamWeapons = reader.ReadBoolean();
EnableSuperWeapons = reader.ReadBoolean(); EnableSuperWeapons = reader.ReadBoolean();
// Read the weapon settings. Old versions do not store super weapon settings. // Read the weapon settings. Old versions do not store super weapon settings.
Weapons = new SchemeWeaponSetting[64]; Weapons = new SchemeWeaponSetting[64];
int weaponCount = GetWeaponCount(); int weaponCount = GetWeaponCount();
@ -785,7 +827,7 @@ namespace Syroot.Worms.Armageddon
// Invalid values default to 8 mines. // Invalid values default to 8 mines.
ObjectTypes = SchemeObjectType.Mines; ObjectTypes = SchemeObjectType.Mines;
ObjectCount = SchemeObjectCount.Count8; ObjectCount = SchemeObjectCount.Count8;
byte raw = reader.Read1Byte(); byte raw = reader.Read1Byte();
if (raw < 12) if (raw < 12)
{ {
@ -822,7 +864,7 @@ namespace Syroot.Worms.Armageddon
ObjectCount = (SchemeObjectCount)_objectCounts[(raw - (8 + modulo)) / 4]; ObjectCount = (SchemeObjectCount)_objectCounts[(raw - (8 + modulo)) / 4];
} }
} }
private void LoadMineDelayConfig(BinaryStream reader) private void LoadMineDelayConfig(BinaryStream reader)
{ {
byte raw = reader.Read1Byte(); byte raw = reader.Read1Byte();
@ -926,13 +968,13 @@ namespace Syroot.Worms.Armageddon
RwWindPower = (byte)Weapons[(int)SchemeWeapon.SuicideBomber].Probability; RwWindPower = (byte)Weapons[(int)SchemeWeapon.SuicideBomber].Probability;
RwWormBouncyness = (byte)Weapons[(int)SchemeWeapon.Armageddon].Probability; RwWormBouncyness = (byte)Weapons[(int)SchemeWeapon.Armageddon].Probability;
} }
private int GetWeaponCount() private int GetWeaponCount()
{ {
// Old versions do not store super weapon settings. // Old versions do not store super weapon settings.
return Version == SchemeVersion.Extended ? 64 : 45; return Version == SchemeVersion.Extended ? 64 : 45;
} }
private void SaveObjectTypesAndCount(BinaryStream writer, SchemeSaveFormat format) private void SaveObjectTypesAndCount(BinaryStream writer, SchemeSaveFormat format)
{ {
byte raw = 0; byte raw = 0;

View 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>

View File

@ -3,7 +3,7 @@ using System.Drawing;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon namespace Syroot.Worms.Armageddon
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
using Syroot.Worms.Core; using Syroot.Worms.Core.IO;
namespace Syroot.Worms.Armageddon namespace Syroot.Worms.Armageddon
{ {
@ -57,7 +57,7 @@ namespace Syroot.Worms.Armageddon
/// Gets or sets the unlocked utilities, weapon upgrades, and game cheats. /// Gets or sets the unlocked utilities, weapon upgrades, and game cheats.
/// </summary> /// </summary>
public UnlockedFeatures UnlockedFeatures { get; set; } public UnlockedFeatures UnlockedFeatures { get; set; }
/// <summary> /// <summary>
/// Gets or sets an unknown value. /// Gets or sets an unknown value.
/// </summary> /// </summary>
@ -175,7 +175,7 @@ namespace Syroot.Worms.Armageddon
/// The utility weapon Jetpack can be configured. /// The utility weapon Jetpack can be configured.
/// </summary> /// </summary>
UtilityJetpack = 1 << 4, UtilityJetpack = 1 << 4,
/// <summary> /// <summary>
/// The Grenade upgrade can be enabled. /// The Grenade upgrade can be enabled.
/// </summary> /// </summary>

View File

@ -1,6 +1,6 @@
using System.Reflection; using System.Reflection;
namespace Syroot.Worms.OnlineWorms.Launcher namespace Syroot.Worms.Mgame.Launcher
{ {
/// <summary> /// <summary>
/// Represents entry assembly information. /// Represents entry assembly information.

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
namespace Syroot.Worms.OnlineWorms.Launcher namespace Syroot.Worms.Mgame.Launcher
{ {
internal class Config internal class Config
{ {

View File

@ -1,10 +1,10 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using static Syroot.Worms.OnlineWorms.Launcher.WinApi.Kernel32; using static Syroot.Worms.Mgame.Launcher.WinApi.Kernel32;
using static Syroot.Worms.OnlineWorms.Launcher.WinApi.WinBase; using static Syroot.Worms.Mgame.Launcher.WinApi.WinBase;
using static Syroot.Worms.OnlineWorms.Launcher.WinApi.WinBase.WaitResult; using static Syroot.Worms.Mgame.Launcher.WinApi.WinBase.WaitResult;
namespace Syroot.Worms.OnlineWorms.Launcher namespace Syroot.Worms.Mgame.Launcher
{ {
/// <summary> /// <summary>
/// Represents a Win32 process providing specific functionality not available in the .NET <see cref="Process"/> /// Represents a Win32 process providing specific functionality not available in the .NET <see cref="Process"/>

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
namespace Syroot.Worms.OnlineWorms.Launcher namespace Syroot.Worms.Mgame.Launcher
{ {
internal class Program internal class Program
{ {

View File

@ -1,6 +1,6 @@
{ {
"profiles": { "profiles": {
"Syroot.OnlineWorms.Launcher": { "Syroot.Worms.Mgame.Launcher": {
"commandName": "Project", "commandName": "Project",
"workingDirectory": "C:\\Games\\WWP Aqua" "workingDirectory": "C:\\Games\\WWP Aqua"
} }

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -15,10 +15,11 @@
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" 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="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
<ProjectReference Include="..\Syroot.Worms.Mgame\Syroot.Worms.Mgame.csproj" />
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" /> <ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<None Update="LauncherConfig.json"> <None Update="LauncherConfig.json">

View File

@ -1,8 +1,8 @@
using System; using System;
using System.Runtime.InteropServices; 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 internal static class Kernel32
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Syroot.Worms.OnlineWorms.Launcher.WinApi namespace Syroot.Worms.Mgame.Launcher.WinApi
{ {
/// <summary> /// <summary>
/// Represents WinAPI definitions from WinBase.h. /// Represents WinAPI definitions from WinBase.h.

View File

@ -3,9 +3,9 @@ using System.Drawing;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Threading; 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> /// <summary>
/// Represents a connection with an Online Worms client which replies to received packets appropriately. /// Represents a connection with an Online Worms client which replies to received packets appropriately.

View File

@ -1,6 +1,6 @@
using System.Net; using System.Net;
namespace Syroot.Worms.OnlineWorms.Server namespace Syroot.Worms.Mgame.Server
{ {
internal class Config internal class Config
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Syroot.Worms.OnlineWorms.Server namespace Syroot.Worms.Mgame.Server
{ {
/// <summary> /// <summary>
/// Represents simplistic textual logging. /// Represents simplistic textual logging.

View File

@ -6,7 +6,7 @@ using System.Net.Sockets;
using System.Reflection; using System.Reflection;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents a class capable of dispatching received <see cref="Packet"/> instances to a corresponding method. /// Represents a class capable of dispatching received <see cref="Packet"/> instances to a corresponding method.

View File

@ -6,7 +6,7 @@ using System.Net;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents a packet with an ID specifying its contents. To allow the server to instantiate child packet classes, /// Represents a packet with an ID specifying its contents. To allow the server to instantiate child packet classes,

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Decorates a <see cref="Packet"/> child class with the ID of the packet it represents. /// Decorates a <see cref="Packet"/> child class with the ID of the packet it represents.

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents a factory creating <see cref="Packet"/> instances by mapping their ID to types to instantiate. /// Represents a factory creating <see cref="Packet"/> instances by mapping their ID to types to instantiate.

View File

@ -3,7 +3,7 @@ using System.IO;
using System.Text; using System.Text;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents a stream formatting data for being sent or received from <see cref="Packet"/> instances. /// Represents a stream formatting data for being sent or received from <see cref="Packet"/> instances.

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Net; using System.Net;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the client request for a <see cref="ChannelConnectReply"/>. /// Represents the client request for a <see cref="ChannelConnectReply"/>.

View File

@ -1,8 +1,8 @@
using System; using System;
using Syroot.BinaryData; 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> /// <summary>
/// Represents the server response to a <see cref="ChannelConnectQuery"/>. /// Represents the server response to a <see cref="ChannelConnectQuery"/>.

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents an additional server response to a <see cref="ChannelTop20Query"/>, causing the client to switch /// Represents an additional server response to a <see cref="ChannelTop20Query"/>, causing the client to switch

View File

@ -2,7 +2,7 @@
using System.Net; using System.Net;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the client request for a <see cref="ChannelEnterReply"/>. /// Represents the client request for a <see cref="ChannelEnterReply"/>.

View File

@ -2,7 +2,7 @@
using System.Net; using System.Net;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the server response to a <see cref="ChannelEnterQuery"/>. /// Represents the server response to a <see cref="ChannelEnterQuery"/>.

View File

@ -4,7 +4,7 @@ using System.Drawing;
using System.Net; using System.Net;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents an additional server response to a <see cref="LoginQuery"/>, providing available server channels. /// Represents an additional server response to a <see cref="LoginQuery"/>, providing available server channels.

View File

@ -1,7 +1,7 @@
using System; using System;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the client request for a <see cref="ChannelConnectReply"/>. /// Represents the client request for a <see cref="ChannelConnectReply"/>.

View File

@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Syroot.BinaryData; 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> /// <summary>
/// Represents the server response to a <see cref="ChannelTop20Query"/>. /// Represents the server response to a <see cref="ChannelTop20Query"/>.

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the client request for a <see cref="ConnectReply"/>. /// Represents the client request for a <see cref="ConnectReply"/>.

View File

@ -1,7 +1,7 @@
using System; using System;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the server response to a <see cref="ConnectQuery"/>. /// Represents the server response to a <see cref="ConnectQuery"/>.

View File

@ -2,7 +2,7 @@
using System.Net; using System.Net;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the client request for a <see cref="LoginReply"/>. /// Represents the client request for a <see cref="LoginReply"/>.

View File

@ -1,7 +1,7 @@
using System; using System;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the server response to a <see cref="LoginQuery"/>. /// Represents the server response to a <see cref="LoginQuery"/>.

View File

@ -1,7 +1,7 @@
#if DEBUG #if DEBUG
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents a special fallback packet which simply stores any ID and the raw packet data. /// Represents a special fallback packet which simply stores any ID and the raw packet data.

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents an additional server response to a <see cref="LoginQuery"/>, providing informational server /// Represents an additional server response to a <see cref="LoginQuery"/>, providing informational server

View File

@ -1,7 +1,7 @@
using System; using System;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the client request for a <see cref="StartSingleGameReply"/>. /// Represents the client request for a <see cref="StartSingleGameReply"/>.

View File

@ -1,7 +1,7 @@
using System; using System;
using Syroot.BinaryData; using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net namespace Syroot.Worms.Mgame.Server.Net
{ {
/// <summary> /// <summary>
/// Represents the server response to a <see cref="StartSingleGameQuery"/>. /// Represents the server response to a <see cref="StartSingleGameQuery"/>.

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Syroot.Worms.OnlineWorms.Server namespace Syroot.Worms.Mgame.Server
{ {
/// <summary> /// <summary>
/// Represents the main class of the application containing the entry point. /// Represents the main class of the application containing the entry point.

View File

@ -4,7 +4,7 @@ using System.Net.Sockets;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
namespace Syroot.Worms.OnlineWorms.Server namespace Syroot.Worms.Mgame.Server
{ {
/// <summary> /// <summary>
/// Represents a server listening for incoming client connections and dispatching them into <see cref="Client"/> /// Represents a server listening for incoming client connections and dispatching them into <see cref="Client"/>

View File

@ -9,9 +9,15 @@
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" 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="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>
<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" /> <ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,6 @@
using System.Text; using System.Text;
namespace Syroot.Worms.OnlineWorms namespace Syroot.Worms.Mgame
{ {
/// <summary> /// <summary>
/// Represents instances of common <see cref="Encoding"/> pages. /// Represents instances of common <see cref="Encoding"/> pages.

Some files were not shown because too many files have changed in this diff Show More