From 077669b81c82ddca271080e0c554238f7ac4adea Mon Sep 17 00:00:00 2001 From: Ray Koopa Date: Sat, 12 Jan 2019 22:02:35 +0100 Subject: [PATCH] Split into game-specific libraries. --- .../LibraryTests.cs | 4 +- .../SchemeTests.cs | 4 +- ...root.Worms.Armageddon.ProjectX.Test.csproj | 13 +++ .../Actions/ActionConverter.cs | 0 .../Actions/BounceAction.cs | 0 .../Actions/DigAction.cs | 0 .../Actions/HomeAction.cs | 0 .../Actions/IAction.cs | 0 .../Actions/RoamAction.cs | 0 .../CollisionFlags.cs | 0 .../Library.cs | 12 +-- .../Mine.cs | 0 .../Scheme.cs | 8 +- .../SchemeFlags.cs | 0 .../Sound.cs | 0 .../Sprite.cs | 0 .../Styles/AirstrikeStyle.cs | 0 .../Styles/AirstrikeSubstyleConverter.cs | 0 .../Styles/BaseballBatStyle.cs | 0 .../Styles/BattleAxeStyle.cs | 0 .../Styles/BlowtorchStyle.cs | 0 .../Styles/BowStyle.cs | 0 .../Styles/CanisterStyle.cs | 0 .../Styles/DragonballStyle.cs | 0 .../Styles/FirepunchStyle.cs | 0 .../Styles/FlamethrowerStyle.cs | 0 .../Styles/GunStyle.cs | 0 .../Styles/IStyle.cs | 0 .../Styles/JetpackStyle.cs | 0 .../Styles/KamikazeStyle.cs | 0 .../Styles/LauncherStyle.cs | 0 .../Styles/MineStyle.cs | 0 .../Styles/NinjaRopeStyle.cs | 0 .../Styles/NuclearTestStyle.cs | 0 .../Styles/ParachuteStyle.cs | 0 .../Styles/PneumaticDrillStyle.cs | 0 .../Styles/ProdStyle.cs | 0 .../Styles/SuicideBomberStyle.cs | 0 .../Syroot.Worms.Armageddon.ProjectX.csproj | 24 +++++ .../Targets/ClusterTarget.cs | 0 .../Targets/FireTarget.cs | 0 .../Targets/ITarget.cs | 0 .../Targets/TargetConverter.cs | 0 .../Weapon.cs | 1 + .../GeneratedMapTests.cs | 4 +- .../LandDataTests.cs | 4 +- .../SchemeTests.cs | 4 +- .../Syroot.Worms.Armageddon.Test.csproj | 13 +++ .../TeamContainerTests.cs | 4 +- .../GeneratedMap.cs | 4 +- .../LandData.cs | 2 +- .../MapGeneratorSettings.cs | 0 .../Scheme.cs | 74 +++++++++++--- .../SchemeEnums.cs | 0 .../SchemeWeaponSetting.cs | 0 .../Syroot.Worms.Armageddon.csproj | 23 +++++ .../Team.cs | 2 +- .../TeamContainer.cs | 6 +- .../AssemblyInfo.cs | 2 +- .../Config.cs | 2 +- .../FodyWeavers.xml | 0 .../FodyWeavers.xsd | 0 .../LauncherConfig.json | 0 .../NativeProcess.cs | 8 +- .../Program.cs | 2 +- .../Properties/launchSettings.json | 2 +- .../Resources/Icon.ico | Bin .../Syroot.Worms.Mgame.Launcher.csproj} | 3 +- .../WinApi/Kernel32.cs | 4 +- .../WinApi/WinBase.cs | 2 +- .../app.manifest | 0 .../Client.cs | 4 +- .../Config.cs | 2 +- .../Log.cs | 2 +- .../Net/GameConnection.cs | 2 +- .../Net/Packet.cs | 2 +- .../Net/PacketAttribute.cs | 2 +- .../Net/PacketFactory.cs | 2 +- .../Net/PacketStream.cs | 2 +- .../Net/Packets/ChannelConnectQuery.cs | 2 +- .../Net/Packets/ChannelConnectReply.cs | 4 +- .../Net/Packets/ChannelEnterFinishReply.cs | 2 +- .../Net/Packets/ChannelEnterQuery.cs | 2 +- .../Net/Packets/ChannelEnterReply.cs | 2 +- .../Net/Packets/ChannelInfosReply.cs | 2 +- .../Net/Packets/ChannelTop20Query.cs | 2 +- .../Net/Packets/ChannelTop20Reply.cs | 4 +- .../Net/Packets/ConnectQuery.cs | 2 +- .../Net/Packets/ConnectReply.cs | 2 +- .../Net/Packets/LoginQuery.cs | 2 +- .../Net/Packets/LoginReply.cs | 2 +- .../Net/Packets/RawQuery.cs | 2 +- .../Net/Packets/ServerInfoReply.cs | 2 +- .../Net/Packets/StartSingleGameQuery.cs | 2 +- .../Net/Packets/StartSingleGameReply.cs | 2 +- .../Program.cs | 2 +- .../Server.cs | 2 +- .../ServerConfig.json} | 0 .../Syroot.Worms.Mgame.Server.csproj} | 8 +- .../Encodings.cs | 2 +- .../OnlineWorms => Syroot.Worms.Mgame}/Igd.cs | 4 +- .../IgdImage.cs | 2 +- .../OnlineWorms => Syroot.Worms.Mgame}/Ksf.cs | 4 +- .../KsfImage.cs | 2 +- .../LaunchConfig.cs | 4 +- .../OnlineWorms => Syroot.Worms.Mgame}/Lpd.cs | 2 +- .../LpdElement.cs | 2 +- .../Palette.cs | 6 +- .../PasswordCrypto.cs | 2 +- .../Syroot.Worms.Mgame.csproj | 23 +++++ src/Syroot.Worms.Scratchpad/Program.cs | 2 +- .../Syroot.Worms.Scratchpad.csproj | 5 + src/Syroot.Worms.Test/ArchiveTests.cs | 4 +- .../Core/{TestHelpers.cs => FileTester.cs} | 59 ++++++------ src/Syroot.Worms.Test/ImageTests.cs | 4 +- .../OnlineWorms/LaunchConfigTests.cs | 32 ------ src/Syroot.Worms.Test/PaletteTests.cs | 4 +- .../Syroot.Worms.Test.csproj | 1 + .../LandDataTests.cs | 4 +- .../Syroot.Worms.WorldParty.Test.csproj | 13 +++ .../TeamContainerTests.cs | 4 +- .../LandData.cs | 2 +- .../Syroot.Worms.WorldParty.csproj | 23 +++++ .../Team.cs | 2 +- .../TeamContainer.cs | 4 +- .../LandDataTests.cs | 4 +- .../SchemeOptionsTests.cs | 4 +- .../SchemeWeaponsTests.cs | 4 +- .../Syroot.Worms.Worms2.Test.csproj | 13 +++ .../TeamContainerTests.cs | 4 +- .../LandData.cs | 2 +- .../SchemeEnums.cs | 0 .../SchemeOptions.cs | 26 ++--- .../SchemeWeaponSetting.cs | 0 .../SchemeWeapons.cs | 2 +- .../Syroot.Worms.Worms2.csproj | 23 +++++ .../Worms2 => Syroot.Worms.Worms2}/Team.cs | 2 +- .../TeamContainer.cs | 4 +- src/Syroot.Worms.sln | 91 ++++++++++++++++-- src/Syroot.Worms/Archive.cs | 8 +- src/Syroot.Worms/Core/ByteExtensions.cs | 63 ++++-------- .../{ => Core}/Graphics/BitmapTools.cs | 7 +- .../{ => Core}/Graphics/IPalette.cs | 2 +- .../Core/{ => IO}/BinaryStreamExtensions.cs | 2 +- src/Syroot.Worms/Core/{ => IO}/ILoadable.cs | 4 +- .../Core/{ => IO}/ILoadableFile.cs | 2 +- src/Syroot.Worms/Core/{ => IO}/ISaveable.cs | 4 +- .../Core/{ => IO}/ISaveableFile.cs | 2 +- .../Core/{ => Riff}/RiffChunkLoadAttribute.cs | 2 +- .../Core/{ => Riff}/RiffChunkSaveAttribute.cs | 2 +- src/Syroot.Worms/Core/{ => Riff}/RiffFile.cs | 3 +- .../Core/{ => Riff}/RiffFileAttribute.cs | 2 +- src/Syroot.Worms/Img.cs | 65 ++++++------- src/Syroot.Worms/RawBitmapData.cs | 2 - src/Syroot.Worms/RiffPalette.cs | 5 +- src/Syroot.Worms/Syroot.Worms.csproj | 3 +- 156 files changed, 558 insertions(+), 312 deletions(-) rename src/{Syroot.Worms.Test/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX.Test}/LibraryTests.cs (85%) rename src/{Syroot.Worms.Test/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX.Test}/SchemeTests.cs (85%) create mode 100644 src/Syroot.Worms.Armageddon.ProjectX.Test/Syroot.Worms.Armageddon.ProjectX.Test.csproj rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Actions/ActionConverter.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Actions/BounceAction.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Actions/DigAction.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Actions/HomeAction.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Actions/IAction.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Actions/RoamAction.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/CollisionFlags.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Library.cs (99%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Mine.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Scheme.cs (99%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/SchemeFlags.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Sound.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Sprite.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/AirstrikeStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/AirstrikeSubstyleConverter.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/BaseballBatStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/BattleAxeStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/BlowtorchStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/BowStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/CanisterStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/DragonballStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/FirepunchStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/FlamethrowerStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/GunStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/IStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/JetpackStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/KamikazeStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/LauncherStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/MineStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/NinjaRopeStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/NuclearTestStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/ParachuteStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/PneumaticDrillStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/ProdStyle.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Styles/SuicideBomberStyle.cs (100%) create mode 100644 src/Syroot.Worms.Armageddon.ProjectX/Syroot.Worms.Armageddon.ProjectX.csproj rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Targets/ClusterTarget.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Targets/FireTarget.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Targets/ITarget.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Targets/TargetConverter.cs (100%) rename src/{Syroot.Worms/Armageddon/ProjectX => Syroot.Worms.Armageddon.ProjectX}/Weapon.cs (99%) rename src/{Syroot.Worms.Test/Armageddon => Syroot.Worms.Armageddon.Test}/GeneratedMapTests.cs (83%) rename src/{Syroot.Worms.Test/Armageddon => Syroot.Worms.Armageddon.Test}/LandDataTests.cs (84%) rename src/{Syroot.Worms.Test/Armageddon => Syroot.Worms.Armageddon.Test}/SchemeTests.cs (83%) create mode 100644 src/Syroot.Worms.Armageddon.Test/Syroot.Worms.Armageddon.Test.csproj rename src/{Syroot.Worms.Test/Armageddon => Syroot.Worms.Armageddon.Test}/TeamContainerTests.cs (85%) rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/GeneratedMap.cs (99%) rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/LandData.cs (99%) rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/MapGeneratorSettings.cs (100%) rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/Scheme.cs (97%) rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/SchemeEnums.cs (100%) rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/SchemeWeaponSetting.cs (100%) create mode 100644 src/Syroot.Worms.Armageddon/Syroot.Worms.Armageddon.csproj rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/Team.cs (99%) rename src/{Syroot.Worms/Armageddon => Syroot.Worms.Armageddon}/TeamContainer.cs (99%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/AssemblyInfo.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/Config.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/FodyWeavers.xml (100%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/FodyWeavers.xsd (100%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/LauncherConfig.json (100%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/NativeProcess.cs (93%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/Program.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/Properties/launchSettings.json (74%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/Resources/Icon.ico (100%) rename src/{Syroot.Worms.OnlineWorms.Launcher/Syroot.Worms.OnlineWorms.Launcher.csproj => Syroot.Worms.Mgame.Launcher/Syroot.Worms.Mgame.Launcher.csproj} (90%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/WinApi/Kernel32.cs (97%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/WinApi/WinBase.cs (92%) rename src/{Syroot.Worms.OnlineWorms.Launcher => Syroot.Worms.Mgame.Launcher}/app.manifest (100%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Client.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Config.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Log.cs (96%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/GameConnection.cs (99%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packet.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/PacketAttribute.cs (96%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/PacketFactory.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/PacketStream.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelConnectQuery.cs (97%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelConnectReply.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelEnterFinishReply.cs (93%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelEnterQuery.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelEnterReply.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelInfosReply.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelTop20Query.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ChannelTop20Reply.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ConnectQuery.cs (91%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ConnectReply.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/LoginQuery.cs (96%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/LoginReply.cs (97%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/RawQuery.cs (96%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/ServerInfoReply.cs (95%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/StartSingleGameQuery.cs (96%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Net/Packets/StartSingleGameReply.cs (94%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Program.cs (93%) rename src/{Syroot.Worms.OnlineWorms.Server => Syroot.Worms.Mgame.Server}/Server.cs (98%) rename src/{Syroot.Worms.OnlineWorms.Server/OWServerConfig.json => Syroot.Worms.Mgame.Server/ServerConfig.json} (100%) rename src/{Syroot.Worms.OnlineWorms.Server/Syroot.Worms.OnlineWorms.Server.csproj => Syroot.Worms.Mgame.Server/Syroot.Worms.Mgame.Server.csproj} (61%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/Encodings.cs (94%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/Igd.cs (98%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/IgdImage.cs (94%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/Ksf.cs (98%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/KsfImage.cs (92%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/LaunchConfig.cs (98%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/Lpd.cs (98%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/LpdElement.cs (96%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/Palette.cs (96%) rename src/{Syroot.Worms/OnlineWorms => Syroot.Worms.Mgame}/PasswordCrypto.cs (99%) create mode 100644 src/Syroot.Worms.Mgame/Syroot.Worms.Mgame.csproj rename src/Syroot.Worms.Test/Core/{TestHelpers.cs => FileTester.cs} (52%) delete mode 100644 src/Syroot.Worms.Test/OnlineWorms/LaunchConfigTests.cs rename src/{Syroot.Worms.Test/WorldParty => Syroot.Worms.WorldParty.Test}/LandDataTests.cs (84%) create mode 100644 src/Syroot.Worms.WorldParty.Test/Syroot.Worms.WorldParty.Test.csproj rename src/{Syroot.Worms.Test/WorldParty => Syroot.Worms.WorldParty.Test}/TeamContainerTests.cs (84%) rename src/{Syroot.Worms/WorldParty => Syroot.Worms.WorldParty}/LandData.cs (99%) create mode 100644 src/Syroot.Worms.WorldParty/Syroot.Worms.WorldParty.csproj rename src/{Syroot.Worms/WorldParty => Syroot.Worms.WorldParty}/Team.cs (99%) rename src/{Syroot.Worms/WorldParty => Syroot.Worms.WorldParty}/TeamContainer.cs (99%) rename src/{Syroot.Worms.Test/Worms2 => Syroot.Worms.Worms2.Test}/LandDataTests.cs (85%) rename src/{Syroot.Worms.Test/Worms2 => Syroot.Worms.Worms2.Test}/SchemeOptionsTests.cs (85%) rename src/{Syroot.Worms.Test/Worms2 => Syroot.Worms.Worms2.Test}/SchemeWeaponsTests.cs (85%) create mode 100644 src/Syroot.Worms.Worms2.Test/Syroot.Worms.Worms2.Test.csproj rename src/{Syroot.Worms.Test/Worms2 => Syroot.Worms.Worms2.Test}/TeamContainerTests.cs (85%) rename src/{Syroot.Worms/Worms2 => Syroot.Worms.Worms2}/LandData.cs (99%) rename src/{Syroot.Worms/Worms2 => Syroot.Worms.Worms2}/SchemeEnums.cs (100%) rename src/{Syroot.Worms/Worms2 => Syroot.Worms.Worms2}/SchemeOptions.cs (99%) rename src/{Syroot.Worms/Worms2 => Syroot.Worms.Worms2}/SchemeWeaponSetting.cs (100%) rename src/{Syroot.Worms/Worms2 => Syroot.Worms.Worms2}/SchemeWeapons.cs (99%) create mode 100644 src/Syroot.Worms.Worms2/Syroot.Worms.Worms2.csproj rename src/{Syroot.Worms/Worms2 => Syroot.Worms.Worms2}/Team.cs (99%) rename src/{Syroot.Worms/Worms2 => Syroot.Worms.Worms2}/TeamContainer.cs (99%) rename src/Syroot.Worms/{ => Core}/Graphics/BitmapTools.cs (91%) rename src/Syroot.Worms/{ => Core}/Graphics/IPalette.cs (92%) rename src/Syroot.Worms/Core/{ => IO}/BinaryStreamExtensions.cs (99%) rename src/Syroot.Worms/Core/{ => IO}/ILoadable.cs (93%) rename src/Syroot.Worms/Core/{ => IO}/ILoadableFile.cs (94%) rename src/Syroot.Worms/Core/{ => IO}/ISaveable.cs (93%) rename src/Syroot.Worms/Core/{ => IO}/ISaveableFile.cs (94%) rename src/Syroot.Worms/Core/{ => Riff}/RiffChunkLoadAttribute.cs (97%) rename src/Syroot.Worms/Core/{ => Riff}/RiffChunkSaveAttribute.cs (97%) rename src/Syroot.Worms/Core/{ => Riff}/RiffFile.cs (99%) rename src/Syroot.Worms/Core/{ => Riff}/RiffFileAttribute.cs (97%) diff --git a/src/Syroot.Worms.Test/Armageddon/ProjectX/LibraryTests.cs b/src/Syroot.Worms.Armageddon.ProjectX.Test/LibraryTests.cs similarity index 85% rename from src/Syroot.Worms.Test/Armageddon/ProjectX/LibraryTests.cs rename to src/Syroot.Worms.Armageddon.ProjectX.Test/LibraryTests.cs index 5c6fa48..1b277b0 100644 --- a/src/Syroot.Worms.Test/Armageddon/ProjectX/LibraryTests.cs +++ b/src/Syroot.Worms.Armageddon.ProjectX.Test/LibraryTests.cs @@ -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(Game.WormsArmageddon, "*.pxl"); + FileTester.LoadFiles(Game.Armageddon, "*.pxl"); } } } diff --git a/src/Syroot.Worms.Test/Armageddon/ProjectX/SchemeTests.cs b/src/Syroot.Worms.Armageddon.ProjectX.Test/SchemeTests.cs similarity index 85% rename from src/Syroot.Worms.Test/Armageddon/ProjectX/SchemeTests.cs rename to src/Syroot.Worms.Armageddon.ProjectX.Test/SchemeTests.cs index 875c742..d7a7ed9 100644 --- a/src/Syroot.Worms.Test/Armageddon/ProjectX/SchemeTests.cs +++ b/src/Syroot.Worms.Armageddon.ProjectX.Test/SchemeTests.cs @@ -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(Game.WormsArmageddon, "*.pxs"); + FileTester.LoadFiles(Game.Armageddon, "*.pxs"); } } } diff --git a/src/Syroot.Worms.Armageddon.ProjectX.Test/Syroot.Worms.Armageddon.ProjectX.Test.csproj b/src/Syroot.Worms.Armageddon.ProjectX.Test/Syroot.Worms.Armageddon.ProjectX.Test.csproj new file mode 100644 index 0000000..7a43085 --- /dev/null +++ b/src/Syroot.Worms.Armageddon.ProjectX.Test/Syroot.Worms.Armageddon.ProjectX.Test.csproj @@ -0,0 +1,13 @@ + + + netcoreapp2.1 + false + + + + + + + + + diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Actions/ActionConverter.cs b/src/Syroot.Worms.Armageddon.ProjectX/Actions/ActionConverter.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Actions/ActionConverter.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Actions/ActionConverter.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Actions/BounceAction.cs b/src/Syroot.Worms.Armageddon.ProjectX/Actions/BounceAction.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Actions/BounceAction.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Actions/BounceAction.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Actions/DigAction.cs b/src/Syroot.Worms.Armageddon.ProjectX/Actions/DigAction.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Actions/DigAction.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Actions/DigAction.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Actions/HomeAction.cs b/src/Syroot.Worms.Armageddon.ProjectX/Actions/HomeAction.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Actions/HomeAction.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Actions/HomeAction.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Actions/IAction.cs b/src/Syroot.Worms.Armageddon.ProjectX/Actions/IAction.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Actions/IAction.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Actions/IAction.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Actions/RoamAction.cs b/src/Syroot.Worms.Armageddon.ProjectX/Actions/RoamAction.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Actions/RoamAction.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Actions/RoamAction.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/CollisionFlags.cs b/src/Syroot.Worms.Armageddon.ProjectX/CollisionFlags.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/CollisionFlags.cs rename to src/Syroot.Worms.Armageddon.ProjectX/CollisionFlags.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Library.cs b/src/Syroot.Worms.Armageddon.ProjectX/Library.cs similarity index 99% rename from src/Syroot.Worms/Armageddon/ProjectX/Library.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Library.cs index 6a625d5..759aca3 100644 --- a/src/Syroot.Worms/Armageddon/ProjectX/Library.cs +++ b/src/Syroot.Worms.Armageddon.ProjectX/Library.cs @@ -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 ------------------------------------------------------------------------------ /// @@ -49,9 +49,9 @@ namespace Syroot.Worms.Armageddon.ProjectX } // ---- PROPERTIES --------------------------------------------------------------------------------------------- - + public byte Version { get; set; } - + // ---- OPERATORS ---------------------------------------------------------------------------------------------- /// @@ -154,7 +154,7 @@ namespace Syroot.Worms.Armageddon.ProjectX } } } - + /// /// Saves the data in the given file. /// @@ -166,7 +166,7 @@ namespace Syroot.Worms.Armageddon.ProjectX Save(stream); } } - + /// /// Gets all attached files. /// diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Mine.cs b/src/Syroot.Worms.Armageddon.ProjectX/Mine.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Mine.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Mine.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Scheme.cs b/src/Syroot.Worms.Armageddon.ProjectX/Scheme.cs similarity index 99% rename from src/Syroot.Worms/Armageddon/ProjectX/Scheme.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Scheme.cs index 8b577dc..8eea9d8 100644 --- a/src/Syroot.Worms/Armageddon/ProjectX/Scheme.cs +++ b/src/Syroot.Worms.Armageddon.ProjectX/Scheme.cs @@ -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 ------------------------------------------------------------------------------ /// @@ -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 } } } - + /// /// Saves the data in the given file. /// diff --git a/src/Syroot.Worms/Armageddon/ProjectX/SchemeFlags.cs b/src/Syroot.Worms.Armageddon.ProjectX/SchemeFlags.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/SchemeFlags.cs rename to src/Syroot.Worms.Armageddon.ProjectX/SchemeFlags.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Sound.cs b/src/Syroot.Worms.Armageddon.ProjectX/Sound.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Sound.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Sound.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Sprite.cs b/src/Syroot.Worms.Armageddon.ProjectX/Sprite.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Sprite.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Sprite.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/AirstrikeStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/AirstrikeStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/AirstrikeStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/AirstrikeStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/AirstrikeSubstyleConverter.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/AirstrikeSubstyleConverter.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/AirstrikeSubstyleConverter.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/AirstrikeSubstyleConverter.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/BaseballBatStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/BaseballBatStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/BaseballBatStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/BaseballBatStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/BattleAxeStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/BattleAxeStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/BattleAxeStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/BattleAxeStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/BlowtorchStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/BlowtorchStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/BlowtorchStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/BlowtorchStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/BowStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/BowStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/BowStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/BowStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/CanisterStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/CanisterStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/CanisterStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/CanisterStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/DragonballStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/DragonballStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/DragonballStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/DragonballStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/FirepunchStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/FirepunchStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/FirepunchStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/FirepunchStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/FlamethrowerStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/FlamethrowerStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/FlamethrowerStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/FlamethrowerStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/GunStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/GunStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/GunStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/GunStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/IStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/IStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/IStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/IStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/JetpackStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/JetpackStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/JetpackStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/JetpackStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/KamikazeStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/KamikazeStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/KamikazeStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/KamikazeStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/LauncherStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/LauncherStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/LauncherStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/LauncherStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/MineStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/MineStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/MineStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/MineStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/NinjaRopeStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/NinjaRopeStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/NinjaRopeStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/NinjaRopeStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/NuclearTestStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/NuclearTestStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/NuclearTestStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/NuclearTestStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/ParachuteStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/ParachuteStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/ParachuteStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/ParachuteStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/PneumaticDrillStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/PneumaticDrillStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/PneumaticDrillStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/PneumaticDrillStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/ProdStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/ProdStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/ProdStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/ProdStyle.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Styles/SuicideBomberStyle.cs b/src/Syroot.Worms.Armageddon.ProjectX/Styles/SuicideBomberStyle.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Styles/SuicideBomberStyle.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Styles/SuicideBomberStyle.cs diff --git a/src/Syroot.Worms.Armageddon.ProjectX/Syroot.Worms.Armageddon.ProjectX.csproj b/src/Syroot.Worms.Armageddon.ProjectX/Syroot.Worms.Armageddon.ProjectX.csproj new file mode 100644 index 0000000..391dbc7 --- /dev/null +++ b/src/Syroot.Worms.Armageddon.ProjectX/Syroot.Worms.Armageddon.ProjectX.csproj @@ -0,0 +1,24 @@ + + + Syroot.Worms.Armageddon-ProjectX + Syroot + (c) Syroot, licensed under MIT + .NET library for loading and modifying files of Worms Armageddon ProjectX. + true + latest + https://gitlab.com/Syroot/Worms/raw/master/res/icon.png + Syroot.Worms.Armageddon.ProjectX + https://gitlab.com/Syroot/Worms/raw/master/LICENSE + https://gitlab.com/Syroot/Worms + Initial release. + worms;team17 + git + https://gitlab.com/Syroot/Worms + net461;netstandard2.0 + 2.0.0-alpha1 + + + + + + \ No newline at end of file diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Targets/ClusterTarget.cs b/src/Syroot.Worms.Armageddon.ProjectX/Targets/ClusterTarget.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Targets/ClusterTarget.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Targets/ClusterTarget.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Targets/FireTarget.cs b/src/Syroot.Worms.Armageddon.ProjectX/Targets/FireTarget.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Targets/FireTarget.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Targets/FireTarget.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Targets/ITarget.cs b/src/Syroot.Worms.Armageddon.ProjectX/Targets/ITarget.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Targets/ITarget.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Targets/ITarget.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Targets/TargetConverter.cs b/src/Syroot.Worms.Armageddon.ProjectX/Targets/TargetConverter.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/ProjectX/Targets/TargetConverter.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Targets/TargetConverter.cs diff --git a/src/Syroot.Worms/Armageddon/ProjectX/Weapon.cs b/src/Syroot.Worms.Armageddon.ProjectX/Weapon.cs similarity index 99% rename from src/Syroot.Worms/Armageddon/ProjectX/Weapon.cs rename to src/Syroot.Worms.Armageddon.ProjectX/Weapon.cs index 1d7c7c1..c8c3ea6 100644 --- a/src/Syroot.Worms/Armageddon/ProjectX/Weapon.cs +++ b/src/Syroot.Worms.Armageddon.ProjectX/Weapon.cs @@ -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 { diff --git a/src/Syroot.Worms.Test/Armageddon/GeneratedMapTests.cs b/src/Syroot.Worms.Armageddon.Test/GeneratedMapTests.cs similarity index 83% rename from src/Syroot.Worms.Test/Armageddon/GeneratedMapTests.cs rename to src/Syroot.Worms.Armageddon.Test/GeneratedMapTests.cs index a27ad3d..265ec33 100644 --- a/src/Syroot.Worms.Test/Armageddon/GeneratedMapTests.cs +++ b/src/Syroot.Worms.Armageddon.Test/GeneratedMapTests.cs @@ -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(Game.Armageddon, "*.lev"); + FileTester.LoadFiles(Game.Armageddon | Game.WorldParty, "*.lev"); } } } diff --git a/src/Syroot.Worms.Test/Armageddon/LandDataTests.cs b/src/Syroot.Worms.Armageddon.Test/LandDataTests.cs similarity index 84% rename from src/Syroot.Worms.Test/Armageddon/LandDataTests.cs rename to src/Syroot.Worms.Armageddon.Test/LandDataTests.cs index e561a26..2a5648a 100644 --- a/src/Syroot.Worms.Test/Armageddon/LandDataTests.cs +++ b/src/Syroot.Worms.Armageddon.Test/LandDataTests.cs @@ -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(Game.WormsArmageddon, "land.dat"); + FileTester.LoadFiles(Game.Armageddon, "land.dat"); } } } diff --git a/src/Syroot.Worms.Test/Armageddon/SchemeTests.cs b/src/Syroot.Worms.Armageddon.Test/SchemeTests.cs similarity index 83% rename from src/Syroot.Worms.Test/Armageddon/SchemeTests.cs rename to src/Syroot.Worms.Armageddon.Test/SchemeTests.cs index 2d106a2..bac8250 100644 --- a/src/Syroot.Worms.Test/Armageddon/SchemeTests.cs +++ b/src/Syroot.Worms.Armageddon.Test/SchemeTests.cs @@ -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(Game.Armageddon, "*.wsc"); + FileTester.LoadFiles(Game.Armageddon | Game.WorldParty, "*.wsc"); } } } diff --git a/src/Syroot.Worms.Armageddon.Test/Syroot.Worms.Armageddon.Test.csproj b/src/Syroot.Worms.Armageddon.Test/Syroot.Worms.Armageddon.Test.csproj new file mode 100644 index 0000000..c6a781d --- /dev/null +++ b/src/Syroot.Worms.Armageddon.Test/Syroot.Worms.Armageddon.Test.csproj @@ -0,0 +1,13 @@ + + + netcoreapp2.1 + false + + + + + + + + + diff --git a/src/Syroot.Worms.Test/Armageddon/TeamContainerTests.cs b/src/Syroot.Worms.Armageddon.Test/TeamContainerTests.cs similarity index 85% rename from src/Syroot.Worms.Test/Armageddon/TeamContainerTests.cs rename to src/Syroot.Worms.Armageddon.Test/TeamContainerTests.cs index a4b69d2..5ba76d4 100644 --- a/src/Syroot.Worms.Test/Armageddon/TeamContainerTests.cs +++ b/src/Syroot.Worms.Armageddon.Test/TeamContainerTests.cs @@ -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(Game.Armageddon, "*.wgt"); + FileTester.LoadFiles(Game.Armageddon, "*.wgt"); } } } diff --git a/src/Syroot.Worms/Armageddon/GeneratedMap.cs b/src/Syroot.Worms.Armageddon/GeneratedMap.cs similarity index 99% rename from src/Syroot.Worms/Armageddon/GeneratedMap.cs rename to src/Syroot.Worms.Armageddon/GeneratedMap.cs index 89affab..ebd0003 100644 --- a/src/Syroot.Worms/Armageddon/GeneratedMap.cs +++ b/src/Syroot.Worms.Armageddon/GeneratedMap.cs @@ -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 . /// public MapGeneratorSettings Settings { get; set; } - + // ---- METHODS (PUBLIC) --------------------------------------------------------------------------------------- /// diff --git a/src/Syroot.Worms/Armageddon/LandData.cs b/src/Syroot.Worms.Armageddon/LandData.cs similarity index 99% rename from src/Syroot.Worms/Armageddon/LandData.cs rename to src/Syroot.Worms.Armageddon/LandData.cs index d48244f..9b2e84e 100644 --- a/src/Syroot.Worms/Armageddon/LandData.cs +++ b/src/Syroot.Worms.Armageddon/LandData.cs @@ -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 { diff --git a/src/Syroot.Worms/Armageddon/MapGeneratorSettings.cs b/src/Syroot.Worms.Armageddon/MapGeneratorSettings.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/MapGeneratorSettings.cs rename to src/Syroot.Worms.Armageddon/MapGeneratorSettings.cs diff --git a/src/Syroot.Worms/Armageddon/Scheme.cs b/src/Syroot.Worms.Armageddon/Scheme.cs similarity index 97% rename from src/Syroot.Worms/Armageddon/Scheme.cs rename to src/Syroot.Worms.Armageddon/Scheme.cs index b1edff3..f7f69fa 100644 --- a/src/Syroot.Worms/Armageddon/Scheme.cs +++ b/src/Syroot.Worms.Armageddon/Scheme.cs @@ -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 _mapWaterRiseToRaw = new Dictionary() { [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 _mapWaterRiseToRaw = new Dictionary() + { + [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. /// public byte RwMaxRopeSpeed { get; set; } - + /// /// 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. /// public bool RwObjectPushByExplosion { get; set; } - + /// /// 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; diff --git a/src/Syroot.Worms/Armageddon/SchemeEnums.cs b/src/Syroot.Worms.Armageddon/SchemeEnums.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/SchemeEnums.cs rename to src/Syroot.Worms.Armageddon/SchemeEnums.cs diff --git a/src/Syroot.Worms/Armageddon/SchemeWeaponSetting.cs b/src/Syroot.Worms.Armageddon/SchemeWeaponSetting.cs similarity index 100% rename from src/Syroot.Worms/Armageddon/SchemeWeaponSetting.cs rename to src/Syroot.Worms.Armageddon/SchemeWeaponSetting.cs diff --git a/src/Syroot.Worms.Armageddon/Syroot.Worms.Armageddon.csproj b/src/Syroot.Worms.Armageddon/Syroot.Worms.Armageddon.csproj new file mode 100644 index 0000000..7df7c6c --- /dev/null +++ b/src/Syroot.Worms.Armageddon/Syroot.Worms.Armageddon.csproj @@ -0,0 +1,23 @@ + + + Syroot.Worms.Armageddon + Syroot + (c) Syroot, licensed under MIT + .NET library for loading and modifying files of Team17's Worms Armageddon. + true + latest + https://gitlab.com/Syroot/Worms/raw/master/res/icon.png + Syroot.Worms.Armageddon + https://gitlab.com/Syroot/Worms/raw/master/LICENSE + https://gitlab.com/Syroot/Worms + Initial release. + worms;team17 + git + https://gitlab.com/Syroot/Worms + net461;netstandard2.0 + 2.0.0-alpha1 + + + + + \ No newline at end of file diff --git a/src/Syroot.Worms/Armageddon/Team.cs b/src/Syroot.Worms.Armageddon/Team.cs similarity index 99% rename from src/Syroot.Worms/Armageddon/Team.cs rename to src/Syroot.Worms.Armageddon/Team.cs index d1c5702..7d6576c 100644 --- a/src/Syroot.Worms/Armageddon/Team.cs +++ b/src/Syroot.Worms.Armageddon/Team.cs @@ -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 { diff --git a/src/Syroot.Worms/Armageddon/TeamContainer.cs b/src/Syroot.Worms.Armageddon/TeamContainer.cs similarity index 99% rename from src/Syroot.Worms/Armageddon/TeamContainer.cs rename to src/Syroot.Worms.Armageddon/TeamContainer.cs index e221fff..fdb31e2 100644 --- a/src/Syroot.Worms/Armageddon/TeamContainer.cs +++ b/src/Syroot.Worms.Armageddon/TeamContainer.cs @@ -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. /// public UnlockedFeatures UnlockedFeatures { get; set; } - + /// /// Gets or sets an unknown value. /// @@ -175,7 +175,7 @@ namespace Syroot.Worms.Armageddon /// The utility weapon Jetpack can be configured. /// UtilityJetpack = 1 << 4, - + /// /// The Grenade upgrade can be enabled. /// diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/AssemblyInfo.cs b/src/Syroot.Worms.Mgame.Launcher/AssemblyInfo.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Launcher/AssemblyInfo.cs rename to src/Syroot.Worms.Mgame.Launcher/AssemblyInfo.cs index 309d94a..9cf5dcb 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/AssemblyInfo.cs +++ b/src/Syroot.Worms.Mgame.Launcher/AssemblyInfo.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace Syroot.Worms.OnlineWorms.Launcher +namespace Syroot.Worms.Mgame.Launcher { /// /// Represents entry assembly information. diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/Config.cs b/src/Syroot.Worms.Mgame.Launcher/Config.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Launcher/Config.cs rename to src/Syroot.Worms.Mgame.Launcher/Config.cs index b740c91..9945f09 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/Config.cs +++ b/src/Syroot.Worms.Mgame.Launcher/Config.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Net; -namespace Syroot.Worms.OnlineWorms.Launcher +namespace Syroot.Worms.Mgame.Launcher { internal class Config { diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/FodyWeavers.xml b/src/Syroot.Worms.Mgame.Launcher/FodyWeavers.xml similarity index 100% rename from src/Syroot.Worms.OnlineWorms.Launcher/FodyWeavers.xml rename to src/Syroot.Worms.Mgame.Launcher/FodyWeavers.xml diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/FodyWeavers.xsd b/src/Syroot.Worms.Mgame.Launcher/FodyWeavers.xsd similarity index 100% rename from src/Syroot.Worms.OnlineWorms.Launcher/FodyWeavers.xsd rename to src/Syroot.Worms.Mgame.Launcher/FodyWeavers.xsd diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/LauncherConfig.json b/src/Syroot.Worms.Mgame.Launcher/LauncherConfig.json similarity index 100% rename from src/Syroot.Worms.OnlineWorms.Launcher/LauncherConfig.json rename to src/Syroot.Worms.Mgame.Launcher/LauncherConfig.json diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/NativeProcess.cs b/src/Syroot.Worms.Mgame.Launcher/NativeProcess.cs similarity index 93% rename from src/Syroot.Worms.OnlineWorms.Launcher/NativeProcess.cs rename to src/Syroot.Worms.Mgame.Launcher/NativeProcess.cs index b286a34..8b6bffb 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/NativeProcess.cs +++ b/src/Syroot.Worms.Mgame.Launcher/NativeProcess.cs @@ -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 { /// /// Represents a Win32 process providing specific functionality not available in the .NET diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/Program.cs b/src/Syroot.Worms.Mgame.Launcher/Program.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Launcher/Program.cs rename to src/Syroot.Worms.Mgame.Launcher/Program.cs index db0709b..ff75cbc 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/Program.cs +++ b/src/Syroot.Worms.Mgame.Launcher/Program.cs @@ -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 { diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/Properties/launchSettings.json b/src/Syroot.Worms.Mgame.Launcher/Properties/launchSettings.json similarity index 74% rename from src/Syroot.Worms.OnlineWorms.Launcher/Properties/launchSettings.json rename to src/Syroot.Worms.Mgame.Launcher/Properties/launchSettings.json index c3f017a..91dae1c 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/Properties/launchSettings.json +++ b/src/Syroot.Worms.Mgame.Launcher/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "Syroot.OnlineWorms.Launcher": { + "Syroot.Worms.Mgame.Launcher": { "commandName": "Project", "workingDirectory": "C:\\Games\\WWP Aqua" } diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/Resources/Icon.ico b/src/Syroot.Worms.Mgame.Launcher/Resources/Icon.ico similarity index 100% rename from src/Syroot.Worms.OnlineWorms.Launcher/Resources/Icon.ico rename to src/Syroot.Worms.Mgame.Launcher/Resources/Icon.ico diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/Syroot.Worms.OnlineWorms.Launcher.csproj b/src/Syroot.Worms.Mgame.Launcher/Syroot.Worms.Mgame.Launcher.csproj similarity index 90% rename from src/Syroot.Worms.OnlineWorms.Launcher/Syroot.Worms.OnlineWorms.Launcher.csproj rename to src/Syroot.Worms.Mgame.Launcher/Syroot.Worms.Mgame.Launcher.csproj index 2075c66..450e88e 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/Syroot.Worms.OnlineWorms.Launcher.csproj +++ b/src/Syroot.Worms.Mgame.Launcher/Syroot.Worms.Mgame.Launcher.csproj @@ -15,10 +15,11 @@ app.manifest - + + diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/WinApi/Kernel32.cs b/src/Syroot.Worms.Mgame.Launcher/WinApi/Kernel32.cs similarity index 97% rename from src/Syroot.Worms.OnlineWorms.Launcher/WinApi/Kernel32.cs rename to src/Syroot.Worms.Mgame.Launcher/WinApi/Kernel32.cs index 7d27dd8..4839524 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/WinApi/Kernel32.cs +++ b/src/Syroot.Worms.Mgame.Launcher/WinApi/Kernel32.cs @@ -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 { diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/WinApi/WinBase.cs b/src/Syroot.Worms.Mgame.Launcher/WinApi/WinBase.cs similarity index 92% rename from src/Syroot.Worms.OnlineWorms.Launcher/WinApi/WinBase.cs rename to src/Syroot.Worms.Mgame.Launcher/WinApi/WinBase.cs index e8e7916..2e3650f 100644 --- a/src/Syroot.Worms.OnlineWorms.Launcher/WinApi/WinBase.cs +++ b/src/Syroot.Worms.Mgame.Launcher/WinApi/WinBase.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.OnlineWorms.Launcher.WinApi +namespace Syroot.Worms.Mgame.Launcher.WinApi { /// /// Represents WinAPI definitions from WinBase.h. diff --git a/src/Syroot.Worms.OnlineWorms.Launcher/app.manifest b/src/Syroot.Worms.Mgame.Launcher/app.manifest similarity index 100% rename from src/Syroot.Worms.OnlineWorms.Launcher/app.manifest rename to src/Syroot.Worms.Mgame.Launcher/app.manifest diff --git a/src/Syroot.Worms.OnlineWorms.Server/Client.cs b/src/Syroot.Worms.Mgame.Server/Client.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Server/Client.cs rename to src/Syroot.Worms.Mgame.Server/Client.cs index eb769bc..e383e3a 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Client.cs +++ b/src/Syroot.Worms.Mgame.Server/Client.cs @@ -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 { /// /// Represents a connection with an Online Worms client which replies to received packets appropriately. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Config.cs b/src/Syroot.Worms.Mgame.Server/Config.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Server/Config.cs rename to src/Syroot.Worms.Mgame.Server/Config.cs index 47f85a6..822a61e 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Config.cs +++ b/src/Syroot.Worms.Mgame.Server/Config.cs @@ -1,6 +1,6 @@ using System.Net; -namespace Syroot.Worms.OnlineWorms.Server +namespace Syroot.Worms.Mgame.Server { internal class Config { diff --git a/src/Syroot.Worms.OnlineWorms.Server/Log.cs b/src/Syroot.Worms.Mgame.Server/Log.cs similarity index 96% rename from src/Syroot.Worms.OnlineWorms.Server/Log.cs rename to src/Syroot.Worms.Mgame.Server/Log.cs index 3e28946..3b1505a 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Log.cs +++ b/src/Syroot.Worms.Mgame.Server/Log.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.OnlineWorms.Server +namespace Syroot.Worms.Mgame.Server { /// /// Represents simplistic textual logging. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/GameConnection.cs b/src/Syroot.Worms.Mgame.Server/Net/GameConnection.cs similarity index 99% rename from src/Syroot.Worms.OnlineWorms.Server/Net/GameConnection.cs rename to src/Syroot.Worms.Mgame.Server/Net/GameConnection.cs index cd5322a..f5d9889 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/GameConnection.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/GameConnection.cs @@ -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 { /// /// Represents a class capable of dispatching received instances to a corresponding method. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packet.cs b/src/Syroot.Worms.Mgame.Server/Net/Packet.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packet.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packet.cs index 1199746..b66cde2 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packet.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packet.cs @@ -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 { /// /// Represents a packet with an ID specifying its contents. To allow the server to instantiate child packet classes, diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/PacketAttribute.cs b/src/Syroot.Worms.Mgame.Server/Net/PacketAttribute.cs similarity index 96% rename from src/Syroot.Worms.OnlineWorms.Server/Net/PacketAttribute.cs rename to src/Syroot.Worms.Mgame.Server/Net/PacketAttribute.cs index d1072d0..c392486 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/PacketAttribute.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/PacketAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Decorates a child class with the ID of the packet it represents. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/PacketFactory.cs b/src/Syroot.Worms.Mgame.Server/Net/PacketFactory.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Server/Net/PacketFactory.cs rename to src/Syroot.Worms.Mgame.Server/Net/PacketFactory.cs index 0379f2f..b2194d7 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/PacketFactory.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/PacketFactory.cs @@ -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 { /// /// Represents a factory creating instances by mapping their ID to types to instantiate. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/PacketStream.cs b/src/Syroot.Worms.Mgame.Server/Net/PacketStream.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Server/Net/PacketStream.cs rename to src/Syroot.Worms.Mgame.Server/Net/PacketStream.cs index b302853..b0980e1 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/PacketStream.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/PacketStream.cs @@ -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 { /// /// Represents a stream formatting data for being sent or received from instances. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelConnectQuery.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelConnectQuery.cs similarity index 97% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelConnectQuery.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelConnectQuery.cs index 55c828c..f557a15 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelConnectQuery.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelConnectQuery.cs @@ -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 { /// /// Represents the client request for a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelConnectReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelConnectReply.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelConnectReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelConnectReply.cs index 72ab4cb..31e88df 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelConnectReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelConnectReply.cs @@ -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 { /// /// Represents the server response to a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterFinishReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterFinishReply.cs similarity index 93% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterFinishReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterFinishReply.cs index f32121e..c00a3f7 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterFinishReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterFinishReply.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents an additional server response to a , causing the client to switch diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterQuery.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterQuery.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterQuery.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterQuery.cs index 8b6dc95..34ec229 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterQuery.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterQuery.cs @@ -2,7 +2,7 @@ using System.Net; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the client request for a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterReply.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterReply.cs index 8d1c449..65e4578 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelEnterReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelEnterReply.cs @@ -2,7 +2,7 @@ using System.Net; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the server response to a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelInfosReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelInfosReply.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelInfosReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelInfosReply.cs index 517987c..78f9d28 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelInfosReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelInfosReply.cs @@ -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 { /// /// Represents an additional server response to a , providing available server channels. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelTop20Query.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelTop20Query.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelTop20Query.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelTop20Query.cs index 55879fb..adcddff 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelTop20Query.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelTop20Query.cs @@ -1,7 +1,7 @@ using System; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the client request for a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelTop20Reply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelTop20Reply.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelTop20Reply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelTop20Reply.cs index 0a04edd..fe990b1 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ChannelTop20Reply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ChannelTop20Reply.cs @@ -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 { /// /// Represents the server response to a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ConnectQuery.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ConnectQuery.cs similarity index 91% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ConnectQuery.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ConnectQuery.cs index 90c6c9f..8aaa86c 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ConnectQuery.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ConnectQuery.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the client request for a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ConnectReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ConnectReply.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ConnectReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ConnectReply.cs index 7c4c3dc..3a6d83e 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ConnectReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ConnectReply.cs @@ -1,7 +1,7 @@ using System; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the server response to a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/LoginQuery.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/LoginQuery.cs similarity index 96% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/LoginQuery.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/LoginQuery.cs index 98ec6e2..fabb748 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/LoginQuery.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/LoginQuery.cs @@ -2,7 +2,7 @@ using System.Net; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the client request for a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/LoginReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/LoginReply.cs similarity index 97% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/LoginReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/LoginReply.cs index 179ab5d..22f09b3 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/LoginReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/LoginReply.cs @@ -1,7 +1,7 @@ using System; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the server response to a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/RawQuery.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/RawQuery.cs similarity index 96% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/RawQuery.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/RawQuery.cs index 741aa26..011079a 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/RawQuery.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/RawQuery.cs @@ -1,7 +1,7 @@ #if DEBUG using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents a special fallback packet which simply stores any ID and the raw packet data. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ServerInfoReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/ServerInfoReply.cs similarity index 95% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ServerInfoReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/ServerInfoReply.cs index 048ee15..91933a9 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/ServerInfoReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/ServerInfoReply.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents an additional server response to a , providing informational server diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/StartSingleGameQuery.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/StartSingleGameQuery.cs similarity index 96% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/StartSingleGameQuery.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/StartSingleGameQuery.cs index 9088945..7d21df8 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/StartSingleGameQuery.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/StartSingleGameQuery.cs @@ -1,7 +1,7 @@ using System; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the client request for a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/StartSingleGameReply.cs b/src/Syroot.Worms.Mgame.Server/Net/Packets/StartSingleGameReply.cs similarity index 94% rename from src/Syroot.Worms.OnlineWorms.Server/Net/Packets/StartSingleGameReply.cs rename to src/Syroot.Worms.Mgame.Server/Net/Packets/StartSingleGameReply.cs index f76ae14..ffe9ebb 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Net/Packets/StartSingleGameReply.cs +++ b/src/Syroot.Worms.Mgame.Server/Net/Packets/StartSingleGameReply.cs @@ -1,7 +1,7 @@ using System; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms.Server.Net +namespace Syroot.Worms.Mgame.Server.Net { /// /// Represents the server response to a . diff --git a/src/Syroot.Worms.OnlineWorms.Server/Program.cs b/src/Syroot.Worms.Mgame.Server/Program.cs similarity index 93% rename from src/Syroot.Worms.OnlineWorms.Server/Program.cs rename to src/Syroot.Worms.Mgame.Server/Program.cs index 0a6fb2c..bd6f6c2 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Program.cs +++ b/src/Syroot.Worms.Mgame.Server/Program.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.OnlineWorms.Server +namespace Syroot.Worms.Mgame.Server { /// /// Represents the main class of the application containing the entry point. diff --git a/src/Syroot.Worms.OnlineWorms.Server/Server.cs b/src/Syroot.Worms.Mgame.Server/Server.cs similarity index 98% rename from src/Syroot.Worms.OnlineWorms.Server/Server.cs rename to src/Syroot.Worms.Mgame.Server/Server.cs index 05f57b4..c747305 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Server.cs +++ b/src/Syroot.Worms.Mgame.Server/Server.cs @@ -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 { /// /// Represents a server listening for incoming client connections and dispatching them into diff --git a/src/Syroot.Worms.OnlineWorms.Server/OWServerConfig.json b/src/Syroot.Worms.Mgame.Server/ServerConfig.json similarity index 100% rename from src/Syroot.Worms.OnlineWorms.Server/OWServerConfig.json rename to src/Syroot.Worms.Mgame.Server/ServerConfig.json diff --git a/src/Syroot.Worms.OnlineWorms.Server/Syroot.Worms.OnlineWorms.Server.csproj b/src/Syroot.Worms.Mgame.Server/Syroot.Worms.Mgame.Server.csproj similarity index 61% rename from src/Syroot.Worms.OnlineWorms.Server/Syroot.Worms.OnlineWorms.Server.csproj rename to src/Syroot.Worms.Mgame.Server/Syroot.Worms.Mgame.Server.csproj index 52274d3..791f2f5 100644 --- a/src/Syroot.Worms.OnlineWorms.Server/Syroot.Worms.OnlineWorms.Server.csproj +++ b/src/Syroot.Worms.Mgame.Server/Syroot.Worms.Mgame.Server.csproj @@ -9,9 +9,15 @@ - + + + + + + + diff --git a/src/Syroot.Worms/OnlineWorms/Encodings.cs b/src/Syroot.Worms.Mgame/Encodings.cs similarity index 94% rename from src/Syroot.Worms/OnlineWorms/Encodings.cs rename to src/Syroot.Worms.Mgame/Encodings.cs index 80120e8..6a353dc 100644 --- a/src/Syroot.Worms/OnlineWorms/Encodings.cs +++ b/src/Syroot.Worms.Mgame/Encodings.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents instances of common pages. diff --git a/src/Syroot.Worms/OnlineWorms/Igd.cs b/src/Syroot.Worms.Mgame/Igd.cs similarity index 98% rename from src/Syroot.Worms/OnlineWorms/Igd.cs rename to src/Syroot.Worms.Mgame/Igd.cs index 00af9ea..0574aaa 100644 --- a/src/Syroot.Worms/OnlineWorms/Igd.cs +++ b/src/Syroot.Worms.Mgame/Igd.cs @@ -2,9 +2,9 @@ using System.Drawing; using System.IO; using Syroot.BinaryData; -using Syroot.Worms.Graphics; +using Syroot.Worms.Core.Graphics; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents an IGD image container. diff --git a/src/Syroot.Worms/OnlineWorms/IgdImage.cs b/src/Syroot.Worms.Mgame/IgdImage.cs similarity index 94% rename from src/Syroot.Worms/OnlineWorms/IgdImage.cs rename to src/Syroot.Worms.Mgame/IgdImage.cs index 2040b58..6839a4a 100644 --- a/src/Syroot.Worms/OnlineWorms/IgdImage.cs +++ b/src/Syroot.Worms.Mgame/IgdImage.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents an image and its metadata as stored in an image container. diff --git a/src/Syroot.Worms/OnlineWorms/Ksf.cs b/src/Syroot.Worms.Mgame/Ksf.cs similarity index 98% rename from src/Syroot.Worms/OnlineWorms/Ksf.cs rename to src/Syroot.Worms.Mgame/Ksf.cs index 35fc0cf..4f604ea 100644 --- a/src/Syroot.Worms/OnlineWorms/Ksf.cs +++ b/src/Syroot.Worms.Mgame/Ksf.cs @@ -2,9 +2,9 @@ using System.Drawing; using System.IO; using Syroot.BinaryData; -using Syroot.Worms.Graphics; +using Syroot.Worms.Core.Graphics; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents a KSF image container. diff --git a/src/Syroot.Worms/OnlineWorms/KsfImage.cs b/src/Syroot.Worms.Mgame/KsfImage.cs similarity index 92% rename from src/Syroot.Worms/OnlineWorms/KsfImage.cs rename to src/Syroot.Worms.Mgame/KsfImage.cs index 39dbf8f..8b6aec6 100644 --- a/src/Syroot.Worms/OnlineWorms/KsfImage.cs +++ b/src/Syroot.Worms.Mgame/KsfImage.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents an image and its metadata as stored in a image container. diff --git a/src/Syroot.Worms/OnlineWorms/LaunchConfig.cs b/src/Syroot.Worms.Mgame/LaunchConfig.cs similarity index 98% rename from src/Syroot.Worms/OnlineWorms/LaunchConfig.cs rename to src/Syroot.Worms.Mgame/LaunchConfig.cs index 63cae4a..dffda12 100644 --- a/src/Syroot.Worms/OnlineWorms/LaunchConfig.cs +++ b/src/Syroot.Worms.Mgame/LaunchConfig.cs @@ -3,9 +3,9 @@ using System.IO; using System.IO.MemoryMappedFiles; using System.Net; using Syroot.BinaryData; -using Syroot.Worms.Core; +using Syroot.Worms.Core.IO; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents the memory mapped file passed to the game executable, configuring the server address. diff --git a/src/Syroot.Worms/OnlineWorms/Lpd.cs b/src/Syroot.Worms.Mgame/Lpd.cs similarity index 98% rename from src/Syroot.Worms/OnlineWorms/Lpd.cs rename to src/Syroot.Worms.Mgame/Lpd.cs index 96dcf00..2163c1c 100644 --- a/src/Syroot.Worms/OnlineWorms/Lpd.cs +++ b/src/Syroot.Worms.Mgame/Lpd.cs @@ -3,7 +3,7 @@ using System.Drawing; using System.IO; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents an LPD layout description file used in Worms World Party Aqua. diff --git a/src/Syroot.Worms/OnlineWorms/LpdElement.cs b/src/Syroot.Worms.Mgame/LpdElement.cs similarity index 96% rename from src/Syroot.Worms/OnlineWorms/LpdElement.cs rename to src/Syroot.Worms.Mgame/LpdElement.cs index ba2aadf..0039dd4 100644 --- a/src/Syroot.Worms/OnlineWorms/LpdElement.cs +++ b/src/Syroot.Worms.Mgame/LpdElement.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents a single UI element described in an file. diff --git a/src/Syroot.Worms/OnlineWorms/Palette.cs b/src/Syroot.Worms.Mgame/Palette.cs similarity index 96% rename from src/Syroot.Worms/OnlineWorms/Palette.cs rename to src/Syroot.Worms.Mgame/Palette.cs index 85121fc..d53c91a 100644 --- a/src/Syroot.Worms/OnlineWorms/Palette.cs +++ b/src/Syroot.Worms.Mgame/Palette.cs @@ -1,10 +1,10 @@ using System.Drawing; using System.IO; using Syroot.BinaryData; -using Syroot.Worms.Core; -using Syroot.Worms.Graphics; +using Syroot.Worms.Core.Graphics; +using Syroot.Worms.Core.IO; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents a PAL color palette. diff --git a/src/Syroot.Worms/OnlineWorms/PasswordCrypto.cs b/src/Syroot.Worms.Mgame/PasswordCrypto.cs similarity index 99% rename from src/Syroot.Worms/OnlineWorms/PasswordCrypto.cs rename to src/Syroot.Worms.Mgame/PasswordCrypto.cs index 046a219..5e1e41e 100644 --- a/src/Syroot.Worms/OnlineWorms/PasswordCrypto.cs +++ b/src/Syroot.Worms.Mgame/PasswordCrypto.cs @@ -2,7 +2,7 @@ using System.IO; using Syroot.BinaryData; -namespace Syroot.Worms.OnlineWorms +namespace Syroot.Worms.Mgame { /// /// Represents the two-way encryption and decryption used to obfuscate passwords passed to the client. diff --git a/src/Syroot.Worms.Mgame/Syroot.Worms.Mgame.csproj b/src/Syroot.Worms.Mgame/Syroot.Worms.Mgame.csproj new file mode 100644 index 0000000..9d16b6a --- /dev/null +++ b/src/Syroot.Worms.Mgame/Syroot.Worms.Mgame.csproj @@ -0,0 +1,23 @@ + + + Syroot.Worms.Mgame + Syroot + (c) Syroot, licensed under MIT + .NET library for loading and modifying files of Mgame Worms clients. + true + latest + https://gitlab.com/Syroot/Worms/raw/master/res/icon.png + Syroot.Worms.Mgame + https://gitlab.com/Syroot/Worms/raw/master/LICENSE + https://gitlab.com/Syroot/Worms + Initial release. + worms;team17 + git + https://gitlab.com/Syroot/Worms + net461;netstandard2.0 + 2.0.0-alpha1 + + + + + \ No newline at end of file diff --git a/src/Syroot.Worms.Scratchpad/Program.cs b/src/Syroot.Worms.Scratchpad/Program.cs index 08e5044..e437577 100644 --- a/src/Syroot.Worms.Scratchpad/Program.cs +++ b/src/Syroot.Worms.Scratchpad/Program.cs @@ -1,7 +1,7 @@ using System; using System.Drawing.Imaging; using System.IO; -using Syroot.Worms.OnlineWorms; +using Syroot.Worms.Mgame; namespace Syroot.Worms.Scratchpad { diff --git a/src/Syroot.Worms.Scratchpad/Syroot.Worms.Scratchpad.csproj b/src/Syroot.Worms.Scratchpad/Syroot.Worms.Scratchpad.csproj index f457600..51e71e8 100644 --- a/src/Syroot.Worms.Scratchpad/Syroot.Worms.Scratchpad.csproj +++ b/src/Syroot.Worms.Scratchpad/Syroot.Worms.Scratchpad.csproj @@ -4,6 +4,11 @@ netcoreapp2.1 + + + + + \ No newline at end of file diff --git a/src/Syroot.Worms.Test/ArchiveTests.cs b/src/Syroot.Worms.Test/ArchiveTests.cs index 94d5929..60f2623 100644 --- a/src/Syroot.Worms.Test/ArchiveTests.cs +++ b/src/Syroot.Worms.Test/ArchiveTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; namespace Syroot.Worms.Test { @@ -17,7 +17,7 @@ namespace Syroot.Worms.Test [TestMethod] public void LoadArchives() { - TestHelpers.LoadFiles(Game.Gen2, "*.dir"); + FileTester.LoadFiles(Game.Team17, "*.dir"); } } } diff --git a/src/Syroot.Worms.Test/Core/TestHelpers.cs b/src/Syroot.Worms.Test/Core/FileTester.cs similarity index 52% rename from src/Syroot.Worms.Test/Core/TestHelpers.cs rename to src/Syroot.Worms.Test/Core/FileTester.cs index c9d7f29..15ec16f 100644 --- a/src/Syroot.Worms.Test/Core/TestHelpers.cs +++ b/src/Syroot.Worms.Test/Core/FileTester.cs @@ -3,23 +3,27 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using Syroot.Worms.Core; +using Syroot.Worms.Core.IO; -namespace Syroot.Worms.Test.Common +namespace Syroot.Worms.Test.Core { /// - /// Represents a collection of methods helping in executing tests. + /// Represents methods helping in executing file-based tests. /// - internal static class TestHelpers + public static class FileTester { - // ---- MEMBERS ------------------------------------------------------------------------------------------------ + // ---- CONSTANTS ---------------------------------------------------------------------------------------------- - private static readonly string[] _gamePathsWorms2 = { @"C:\Games\Worms2" }; - private static readonly string[] _gamePathsWormsArmageddon = { @"C:\Games\Worms Armageddon 3.6.31.0", - @"C:\Games\Worms Armageddon 3.7.2.1" }; - private static readonly string[] _gamePathsWormsWorldParty = { @"C:\Games\Worms World Party" }; + private static readonly Dictionary _gamePaths = new Dictionary + { + [Game.Worms2] = @"C:\Games\Worms2", + [Game.Armageddon] = @"C:\Games\Worms Armageddon 3.6.31.0", + [Game.WorldParty] = @"C:\Games\Worms World Party", + [Game.OnlineWorms] = @"C:\Games\Online Worms", + [Game.WorldPartyAqua] = @"C:\Games\WWP Aqua" + }; - // ---- METHODS (INTERNAL) ------------------------------------------------------------------------------------- + // ---- METHODS (PUBLIC) --------------------------------------------------------------------------------------- /// /// Loads the files found with the given . Excludes file names specified in the @@ -29,7 +33,7 @@ namespace Syroot.Worms.Test.Common /// The games to test. /// The wildcard to match. /// Optionally, the files to exclude. - internal static void LoadFiles(Game games, string wildcard, string[] excludedFiles = null) + public static void LoadFiles(Game games, string wildcard, string[] excludedFiles = null) where T : ILoadableFile, new() { foreach (string fileName in FindFiles(games, wildcard)) @@ -50,35 +54,34 @@ namespace Syroot.Worms.Test.Common private static List FindFiles(Game games, string wildcard) { - List gamePaths = GetGamePaths(games); List files = new List(); - foreach (string testPath in gamePaths) - files.AddRange(Directory.GetFiles(testPath, wildcard, SearchOption.AllDirectories)); + foreach (string path in GetGamePaths(games)) + { + if (Directory.Exists(path)) + files.AddRange(Directory.GetFiles(path, wildcard, SearchOption.AllDirectories)); + } + if (files.Count == 0) + throw new InvalidOperationException("No files found to test."); return files; } - private static List GetGamePaths(Game game) + private static IEnumerable GetGamePaths(Game game) { - List gamePaths = new List(); - if (game.HasFlag(Game.Worms2)) - gamePaths.AddRange(_gamePathsWorms2); - if (game.HasFlag(Game.WormsArmageddon)) - gamePaths.AddRange(_gamePathsWormsArmageddon); - if (game.HasFlag(Game.WormsWorldParty)) - gamePaths.AddRange(_gamePathsWormsWorldParty); - return gamePaths; + return _gamePaths.Where(x => game.HasFlag(x.Key)).Select(x => x.Value); } } [Flags] - internal enum Game + public enum Game { Worms2 = 1 << 0, - WormsArmageddon = 1 << 1, - WormsWorldParty = 1 << 2, + Armageddon = 1 << 1, + WorldParty = 1 << 2, + OnlineWorms = 1 << 3, + WorldPartyAqua = 1 << 4, - Gen2 = Worms2 | WormsArmageddon | WormsWorldParty, - Armageddon = WormsArmageddon | WormsWorldParty, + Team17 = Worms2 | Armageddon | WorldParty, + Mgame = OnlineWorms | WorldPartyAqua, All = -1 } } diff --git a/src/Syroot.Worms.Test/ImageTests.cs b/src/Syroot.Worms.Test/ImageTests.cs index 53f8855..4fb4915 100644 --- a/src/Syroot.Worms.Test/ImageTests.cs +++ b/src/Syroot.Worms.Test/ImageTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; namespace Syroot.Worms.Test { @@ -17,7 +17,7 @@ namespace Syroot.Worms.Test [TestMethod] public void LoadImages() { - TestHelpers.LoadFiles(Game.All, "*.img"); + FileTester.LoadFiles(Game.All, "*.img"); } } } diff --git a/src/Syroot.Worms.Test/OnlineWorms/LaunchConfigTests.cs b/src/Syroot.Worms.Test/OnlineWorms/LaunchConfigTests.cs deleted file mode 100644 index 34ecf39..0000000 --- a/src/Syroot.Worms.Test/OnlineWorms/LaunchConfigTests.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.OnlineWorms; - -namespace Syroot.Worms.Test.OnlineWorms -{ - /// - /// Represents a collection of tests for the class. - /// - [TestClass] - public class LaunchConfigTests - { - // ---- METHODS (PUBLIC) --------------------------------------------------------------------------------------- - - /// - /// Tests if encryptind and decrypting passwords yields the same results. - /// - [TestMethod] - public void CryptPassword() - { - LaunchConfig launchConfig = new LaunchConfig(); - Random random = new Random(326988912); - foreach (string password in new[] { "Unknown123Test", "blablabl10235", "3252380", "SJDAKDFJS", "fdsklfj" }) - { - uint key = (uint)random.Next(0, Int32.MaxValue); - launchConfig.SetPassword(password, key); - string decryptedPassword = launchConfig.GetPassword(); - Assert.Equals(password, decryptedPassword); - } - } - } -} diff --git a/src/Syroot.Worms.Test/PaletteTests.cs b/src/Syroot.Worms.Test/PaletteTests.cs index d3b7b4d..4dcdc97 100644 --- a/src/Syroot.Worms.Test/PaletteTests.cs +++ b/src/Syroot.Worms.Test/PaletteTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; namespace Syroot.Worms.Test { @@ -17,7 +17,7 @@ namespace Syroot.Worms.Test [TestMethod] public void LoadPalettes() { - TestHelpers.LoadFiles(Game.Gen2, "*.pal", new string[] + FileTester.LoadFiles(Game.Team17, "*.pal", new string[] { "wwp.pal", // Contains 4 bytes of trash after the data chunk. "wwpmaped.pal" // Contains 4 bytes of trash after the data chunk. diff --git a/src/Syroot.Worms.Test/Syroot.Worms.Test.csproj b/src/Syroot.Worms.Test/Syroot.Worms.Test.csproj index b9ff566..d1fd4b9 100644 --- a/src/Syroot.Worms.Test/Syroot.Worms.Test.csproj +++ b/src/Syroot.Worms.Test/Syroot.Worms.Test.csproj @@ -1,6 +1,7 @@  netcoreapp2.1 + false diff --git a/src/Syroot.Worms.Test/WorldParty/LandDataTests.cs b/src/Syroot.Worms.WorldParty.Test/LandDataTests.cs similarity index 84% rename from src/Syroot.Worms.Test/WorldParty/LandDataTests.cs rename to src/Syroot.Worms.WorldParty.Test/LandDataTests.cs index 057ed60..1b84038 100644 --- a/src/Syroot.Worms.Test/WorldParty/LandDataTests.cs +++ b/src/Syroot.Worms.WorldParty.Test/LandDataTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; using Syroot.Worms.WorldParty; namespace Syroot.Worms.Test.WorldParty @@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.WorldParty [TestMethod] public void LoadLandData() { - TestHelpers.LoadFiles(Game.WormsWorldParty, "land.dat"); + FileTester.LoadFiles(Game.WorldParty, "land.dat"); } } } diff --git a/src/Syroot.Worms.WorldParty.Test/Syroot.Worms.WorldParty.Test.csproj b/src/Syroot.Worms.WorldParty.Test/Syroot.Worms.WorldParty.Test.csproj new file mode 100644 index 0000000..b7568af --- /dev/null +++ b/src/Syroot.Worms.WorldParty.Test/Syroot.Worms.WorldParty.Test.csproj @@ -0,0 +1,13 @@ + + + netcoreapp2.1 + false + + + + + + + + + diff --git a/src/Syroot.Worms.Test/WorldParty/TeamContainerTests.cs b/src/Syroot.Worms.WorldParty.Test/TeamContainerTests.cs similarity index 84% rename from src/Syroot.Worms.Test/WorldParty/TeamContainerTests.cs rename to src/Syroot.Worms.WorldParty.Test/TeamContainerTests.cs index 449bbdc..93d4019 100644 --- a/src/Syroot.Worms.Test/WorldParty/TeamContainerTests.cs +++ b/src/Syroot.Worms.WorldParty.Test/TeamContainerTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; using Syroot.Worms.WorldParty; namespace Syroot.Worms.Test.WorldParty @@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.WorldParty [TestMethod] public void LoadTeamContainers() { - TestHelpers.LoadFiles(Game.WormsWorldParty, "*.wwp"); + FileTester.LoadFiles(Game.WorldParty, "*.wwp"); } } } diff --git a/src/Syroot.Worms/WorldParty/LandData.cs b/src/Syroot.Worms.WorldParty/LandData.cs similarity index 99% rename from src/Syroot.Worms/WorldParty/LandData.cs rename to src/Syroot.Worms.WorldParty/LandData.cs index 25ebdfe..c20b8c9 100644 --- a/src/Syroot.Worms/WorldParty/LandData.cs +++ b/src/Syroot.Worms.WorldParty/LandData.cs @@ -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.WorldParty { diff --git a/src/Syroot.Worms.WorldParty/Syroot.Worms.WorldParty.csproj b/src/Syroot.Worms.WorldParty/Syroot.Worms.WorldParty.csproj new file mode 100644 index 0000000..cddd487 --- /dev/null +++ b/src/Syroot.Worms.WorldParty/Syroot.Worms.WorldParty.csproj @@ -0,0 +1,23 @@ + + + Syroot.Worms.WorldParty + Syroot + (c) Syroot, licensed under MIT + .NET library for loading and modifying files of Team17's Worms World Party. + true + latest + https://gitlab.com/Syroot/Worms/raw/master/res/icon.png + Syroot.Worms.WorldParty + https://gitlab.com/Syroot/Worms/raw/master/LICENSE + https://gitlab.com/Syroot/Worms + Initial release. + worms;team17 + git + https://gitlab.com/Syroot/Worms + net461;netstandard2.0 + 2.0.0-alpha1 + + + + + \ No newline at end of file diff --git a/src/Syroot.Worms/WorldParty/Team.cs b/src/Syroot.Worms.WorldParty/Team.cs similarity index 99% rename from src/Syroot.Worms/WorldParty/Team.cs rename to src/Syroot.Worms.WorldParty/Team.cs index 4eb9f4f..5fd01be 100644 --- a/src/Syroot.Worms/WorldParty/Team.cs +++ b/src/Syroot.Worms.WorldParty/Team.cs @@ -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.WorldParty { diff --git a/src/Syroot.Worms/WorldParty/TeamContainer.cs b/src/Syroot.Worms.WorldParty/TeamContainer.cs similarity index 99% rename from src/Syroot.Worms/WorldParty/TeamContainer.cs rename to src/Syroot.Worms.WorldParty/TeamContainer.cs index b2fa9ca..c4bb4f9 100644 --- a/src/Syroot.Worms/WorldParty/TeamContainer.cs +++ b/src/Syroot.Worms.WorldParty/TeamContainer.cs @@ -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.WorldParty { @@ -51,7 +51,7 @@ namespace Syroot.Worms.WorldParty /// Gets or sets a value possibly indicating a version of the file format. /// public byte Version { get; set; } - + /// /// Gets or sets an unknown value. /// diff --git a/src/Syroot.Worms.Test/Worms2/LandDataTests.cs b/src/Syroot.Worms.Worms2.Test/LandDataTests.cs similarity index 85% rename from src/Syroot.Worms.Test/Worms2/LandDataTests.cs rename to src/Syroot.Worms.Worms2.Test/LandDataTests.cs index 8e77cd2..1b3052e 100644 --- a/src/Syroot.Worms.Test/Worms2/LandDataTests.cs +++ b/src/Syroot.Worms.Worms2.Test/LandDataTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; using Syroot.Worms.Worms2; namespace Syroot.Worms.Test.Worms2 @@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Worms2 [TestMethod] public void LoadLandData() { - TestHelpers.LoadFiles(Game.Worms2, "land.dat"); + FileTester.LoadFiles(Game.Worms2, "land.dat"); } } } diff --git a/src/Syroot.Worms.Test/Worms2/SchemeOptionsTests.cs b/src/Syroot.Worms.Worms2.Test/SchemeOptionsTests.cs similarity index 85% rename from src/Syroot.Worms.Test/Worms2/SchemeOptionsTests.cs rename to src/Syroot.Worms.Worms2.Test/SchemeOptionsTests.cs index 4d4a1aa..ec4e0f0 100644 --- a/src/Syroot.Worms.Test/Worms2/SchemeOptionsTests.cs +++ b/src/Syroot.Worms.Worms2.Test/SchemeOptionsTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; using Syroot.Worms.Worms2; namespace Syroot.Worms.Test.Worms2 @@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Worms2 [TestMethod] public void LoadSchemeOptions() { - TestHelpers.LoadFiles(Game.Worms2, "*.opt"); + FileTester.LoadFiles(Game.Worms2, "*.opt"); } } } diff --git a/src/Syroot.Worms.Test/Worms2/SchemeWeaponsTests.cs b/src/Syroot.Worms.Worms2.Test/SchemeWeaponsTests.cs similarity index 85% rename from src/Syroot.Worms.Test/Worms2/SchemeWeaponsTests.cs rename to src/Syroot.Worms.Worms2.Test/SchemeWeaponsTests.cs index 8131b75..aa49f8c 100644 --- a/src/Syroot.Worms.Test/Worms2/SchemeWeaponsTests.cs +++ b/src/Syroot.Worms.Worms2.Test/SchemeWeaponsTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; using Syroot.Worms.Worms2; namespace Syroot.Worms.Test.Worms2 @@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Worms2 [TestMethod] public void LoadSchemeWeapons() { - TestHelpers.LoadFiles(Game.Worms2, "*.wep"); + FileTester.LoadFiles(Game.Worms2, "*.wep"); } } } diff --git a/src/Syroot.Worms.Worms2.Test/Syroot.Worms.Worms2.Test.csproj b/src/Syroot.Worms.Worms2.Test/Syroot.Worms.Worms2.Test.csproj new file mode 100644 index 0000000..b72d858 --- /dev/null +++ b/src/Syroot.Worms.Worms2.Test/Syroot.Worms.Worms2.Test.csproj @@ -0,0 +1,13 @@ + + + netcoreapp2.1 + false + + + + + + + + + diff --git a/src/Syroot.Worms.Test/Worms2/TeamContainerTests.cs b/src/Syroot.Worms.Worms2.Test/TeamContainerTests.cs similarity index 85% rename from src/Syroot.Worms.Test/Worms2/TeamContainerTests.cs rename to src/Syroot.Worms.Worms2.Test/TeamContainerTests.cs index a88deb9..00bac68 100644 --- a/src/Syroot.Worms.Test/Worms2/TeamContainerTests.cs +++ b/src/Syroot.Worms.Worms2.Test/TeamContainerTests.cs @@ -1,5 +1,5 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Syroot.Worms.Test.Common; +using Syroot.Worms.Test.Core; using Syroot.Worms.Worms2; namespace Syroot.Worms.Test.Worms2 @@ -18,7 +18,7 @@ namespace Syroot.Worms.Test.Worms2 [TestMethod] public void LoadTeamContainers() { - TestHelpers.LoadFiles(Game.Worms2, "*.st1"); + FileTester.LoadFiles(Game.Worms2, "*.st1"); } } } diff --git a/src/Syroot.Worms/Worms2/LandData.cs b/src/Syroot.Worms.Worms2/LandData.cs similarity index 99% rename from src/Syroot.Worms/Worms2/LandData.cs rename to src/Syroot.Worms.Worms2/LandData.cs index 61e8969..88f8f66 100644 --- a/src/Syroot.Worms/Worms2/LandData.cs +++ b/src/Syroot.Worms.Worms2/LandData.cs @@ -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.Worms2 { diff --git a/src/Syroot.Worms/Worms2/SchemeEnums.cs b/src/Syroot.Worms.Worms2/SchemeEnums.cs similarity index 100% rename from src/Syroot.Worms/Worms2/SchemeEnums.cs rename to src/Syroot.Worms.Worms2/SchemeEnums.cs diff --git a/src/Syroot.Worms/Worms2/SchemeOptions.cs b/src/Syroot.Worms.Worms2/SchemeOptions.cs similarity index 99% rename from src/Syroot.Worms/Worms2/SchemeOptions.cs rename to src/Syroot.Worms.Worms2/SchemeOptions.cs index 8325c6f..9fd80f2 100644 --- a/src/Syroot.Worms/Worms2/SchemeOptions.cs +++ b/src/Syroot.Worms.Worms2/SchemeOptions.cs @@ -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.Worms2 { @@ -60,13 +60,13 @@ namespace Syroot.Worms.Worms2 /// while standing on land. /// public int RetreatTime { get; set; } - + /// /// Gets or sets the time in seconds available for a worm to retreat after using a weapon which ends the turn /// while on a rope. /// public int RetreatTimeRope { get; set; } - + /// /// Gets or sets the maximum number of objects (mines or oil drums) on the map. /// @@ -76,7 +76,7 @@ namespace Syroot.Worms.Worms2 /// Gets or sets the number of seconds a mine requires to explode. -1 is random between 0-3 seconds. /// public int MineDelay { get; set; } - + /// /// Gets or sets a value indicating whether mines can refuse to explode after their count down. /// @@ -86,7 +86,7 @@ namespace Syroot.Worms.Worms2 /// Gets or sets the influence power of the wind affecting weapons in percent. /// public int WindPower { get; set; } - + /// /// Gets or sets the friction deaccelerating objects touching solid ground between 0-5. 0 is default, 1 is low /// friction, 5 is high friction. @@ -102,7 +102,7 @@ namespace Syroot.Worms.Worms2 /// Gets or sets the number of damage in health points which has to be done to replay the turn. /// public int ReplayRequiredDamage { get; set; } - + /// /// Gets or sets a value indicating whether significant turns will be replayed in offline games. /// @@ -117,13 +117,13 @@ namespace Syroot.Worms.Worms2 /// Gets or sets the number of rope swings allowed with one Ninja Rope. /// public int RopeSwings { get; set; } - + /// /// Gets or sets a value indicating whether the total round time until sudden death will be displayed in the /// turn timer. /// public bool ShowRoundTime { get; set; } - + /// /// Gets or sets the amount in pixels which the water will rise between turns after Sudden Death was triggered. /// @@ -155,7 +155,7 @@ namespace Syroot.Worms.Worms2 /// open. /// public bool ExtendedChatControls { get; set; } - + /// /// Gets or sets the delay in seconds between each team's turn to allow relaxed switching of seats. /// @@ -166,7 +166,7 @@ namespace Syroot.Worms.Worms2 /// round. /// public bool EnableStockpiling { get; set; } - + /// /// Gets or sets the percentual probability of a weapon or health crate to drop between turns. /// @@ -176,7 +176,7 @@ namespace Syroot.Worms.Worms2 /// Gets or sets the percentual probability of a crate dropping closer to weak teams. /// public int CrateIntelligence { get; set; } - + /// /// Gets or sets the amount of health included in a health crate added to the collecting worm's energy. /// @@ -212,7 +212,7 @@ namespace Syroot.Worms.Worms2 /// Gets or sets a value indicating whether oil drums will be placed instead of mines. /// public bool UseOilDrums { get; set; } - + // ---- METHODS (PUBLIC) --------------------------------------------------------------------------------------- /// @@ -280,7 +280,7 @@ namespace Syroot.Worms.Worms2 Load(stream); } } - + /// /// Saves the data into the given . /// diff --git a/src/Syroot.Worms/Worms2/SchemeWeaponSetting.cs b/src/Syroot.Worms.Worms2/SchemeWeaponSetting.cs similarity index 100% rename from src/Syroot.Worms/Worms2/SchemeWeaponSetting.cs rename to src/Syroot.Worms.Worms2/SchemeWeaponSetting.cs diff --git a/src/Syroot.Worms/Worms2/SchemeWeapons.cs b/src/Syroot.Worms.Worms2/SchemeWeapons.cs similarity index 99% rename from src/Syroot.Worms/Worms2/SchemeWeapons.cs rename to src/Syroot.Worms.Worms2/SchemeWeapons.cs index d5ea32b..fd0d017 100644 --- a/src/Syroot.Worms/Worms2/SchemeWeapons.cs +++ b/src/Syroot.Worms.Worms2/SchemeWeapons.cs @@ -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.Worms2 { diff --git a/src/Syroot.Worms.Worms2/Syroot.Worms.Worms2.csproj b/src/Syroot.Worms.Worms2/Syroot.Worms.Worms2.csproj new file mode 100644 index 0000000..3ccd725 --- /dev/null +++ b/src/Syroot.Worms.Worms2/Syroot.Worms.Worms2.csproj @@ -0,0 +1,23 @@ + + + Syroot.Worms.Worms2 + Syroot + (c) Syroot, licensed under MIT + .NET library for loading and modifying files of Team17's Worms 2. + true + latest + https://gitlab.com/Syroot/Worms/raw/master/res/icon.png + Syroot.Worms.Worms2 + https://gitlab.com/Syroot/Worms/raw/master/LICENSE + https://gitlab.com/Syroot/Worms + Initial release. + worms;team17 + git + https://gitlab.com/Syroot/Worms + net461;netstandard2.0 + 2.0.0-alpha1 + + + + + \ No newline at end of file diff --git a/src/Syroot.Worms/Worms2/Team.cs b/src/Syroot.Worms.Worms2/Team.cs similarity index 99% rename from src/Syroot.Worms/Worms2/Team.cs rename to src/Syroot.Worms.Worms2/Team.cs index 94f032f..83b0ff5 100644 --- a/src/Syroot.Worms/Worms2/Team.cs +++ b/src/Syroot.Worms.Worms2/Team.cs @@ -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.Worms2 { diff --git a/src/Syroot.Worms/Worms2/TeamContainer.cs b/src/Syroot.Worms.Worms2/TeamContainer.cs similarity index 99% rename from src/Syroot.Worms/Worms2/TeamContainer.cs rename to src/Syroot.Worms.Worms2/TeamContainer.cs index 6be60f9..cff4e14 100644 --- a/src/Syroot.Worms/Worms2/TeamContainer.cs +++ b/src/Syroot.Worms.Worms2/TeamContainer.cs @@ -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.Worms2 { @@ -42,7 +42,7 @@ namespace Syroot.Worms.Worms2 } // ---- PROPERTIES --------------------------------------------------------------------------------------------- - + /// /// Gets or sets the list of instances stored. /// diff --git a/src/Syroot.Worms.sln b/src/Syroot.Worms.sln index c3bc250..150dc90 100644 --- a/src/Syroot.Worms.sln +++ b/src/Syroot.Worms.sln @@ -5,13 +5,37 @@ VisualStudioVersion = 15.0.26403.7 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms", "Syroot.Worms\Syroot.Worms.csproj", "{DD76B6AA-5A5A-4FCD-95AA-9552977525A1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Test", "Syroot.Worms.Test\Syroot.Worms.Test.csproj", "{20ACA971-A9D0-4424-9958-9CEE24F43C9C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Scratchpad", "Syroot.Worms.Scratchpad\Syroot.Worms.Scratchpad.csproj", "{0D7F9DC3-7268-494E-BA1E-6C01525EB9AB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.OnlineWorms.Launcher", "Syroot.Worms.OnlineWorms.Launcher\Syroot.Worms.OnlineWorms.Launcher.csproj", "{510EE83E-9C52-40FD-AC7E-C4981EBF4182}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Mgame.Launcher", "Syroot.Worms.Mgame.Launcher\Syroot.Worms.Mgame.Launcher.csproj", "{510EE83E-9C52-40FD-AC7E-C4981EBF4182}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.OnlineWorms.Server", "Syroot.Worms.OnlineWorms.Server\Syroot.Worms.OnlineWorms.Server.csproj", "{2A06124C-EA75-4946-9959-4AD3DC754B90}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Mgame.Server", "Syroot.Worms.Mgame.Server\Syroot.Worms.Mgame.Server.csproj", "{2A06124C-EA75-4946-9959-4AD3DC754B90}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Armageddon", "Syroot.Worms.Armageddon\Syroot.Worms.Armageddon.csproj", "{D9694108-539C-4DEE-B5DD-284208D48B46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Armageddon.ProjectX", "Syroot.Worms.Armageddon.ProjectX\Syroot.Worms.Armageddon.ProjectX.csproj", "{AC9F52FA-F552-49E0-83AE-79759BF44FED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.WorldParty", "Syroot.Worms.WorldParty\Syroot.Worms.WorldParty.csproj", "{4E124BBA-15B5-422E-93D5-96EA7D4180F3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Worms2", "Syroot.Worms.Worms2\Syroot.Worms.Worms2.csproj", "{BBCECFCC-F2FD-4C4D-A6E9-CC7AA5F10FDD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.Mgame", "Syroot.Worms.Mgame\Syroot.Worms.Mgame.csproj", "{BD8079D9-FDB5-4C7D-8AD4-C80ADC4A4B26}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Projects", "Test Projects", "{99E56312-A064-4AD3-8443-0B56A5F76E6B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library Projects", "Library Projects", "{9E964426-D744-405A-9EAA-D8D7A310B614}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tool Projects", "Tool Projects", "{0B9B0B74-3EB1-46A4-BCCC-F2D6AE59A9EE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syroot.Worms.WorldParty.Test", "Syroot.Worms.WorldParty.Test\Syroot.Worms.WorldParty.Test.csproj", "{239763CD-B7C9-4E8B-A84B-8F24DECF6D7B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syroot.Worms.Armageddon.Test", "Syroot.Worms.Armageddon.Test\Syroot.Worms.Armageddon.Test.csproj", "{748D16FF-35C6-4249-A1E8-04B2D239C954}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syroot.Worms.Worms2.Test", "Syroot.Worms.Worms2.Test\Syroot.Worms.Worms2.Test.csproj", "{3AAC4992-DDB9-4175-82B9-C57F22E12FF6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syroot.Worms.Armageddon.ProjectX.Test", "Syroot.Worms.Armageddon.ProjectX.Test\Syroot.Worms.Armageddon.ProjectX.Test.csproj", "{EF308D4E-26A0-471C-B764-9C4EB713BEAE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syroot.Worms.Test", "Syroot.Worms.Test\Syroot.Worms.Test.csproj", "{351B93B0-301F-42E1-82A0-7FA217154F5D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -23,10 +47,6 @@ Global {DD76B6AA-5A5A-4FCD-95AA-9552977525A1}.Debug|Any CPU.Build.0 = Debug|Any CPU {DD76B6AA-5A5A-4FCD-95AA-9552977525A1}.Release|Any CPU.ActiveCfg = Release|Any CPU {DD76B6AA-5A5A-4FCD-95AA-9552977525A1}.Release|Any CPU.Build.0 = Release|Any CPU - {20ACA971-A9D0-4424-9958-9CEE24F43C9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20ACA971-A9D0-4424-9958-9CEE24F43C9C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20ACA971-A9D0-4424-9958-9CEE24F43C9C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20ACA971-A9D0-4424-9958-9CEE24F43C9C}.Release|Any CPU.Build.0 = Release|Any CPU {0D7F9DC3-7268-494E-BA1E-6C01525EB9AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0D7F9DC3-7268-494E-BA1E-6C01525EB9AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D7F9DC3-7268-494E-BA1E-6C01525EB9AB}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -39,10 +59,65 @@ Global {2A06124C-EA75-4946-9959-4AD3DC754B90}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A06124C-EA75-4946-9959-4AD3DC754B90}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A06124C-EA75-4946-9959-4AD3DC754B90}.Release|Any CPU.Build.0 = Release|Any CPU + {D9694108-539C-4DEE-B5DD-284208D48B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9694108-539C-4DEE-B5DD-284208D48B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9694108-539C-4DEE-B5DD-284208D48B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9694108-539C-4DEE-B5DD-284208D48B46}.Release|Any CPU.Build.0 = Release|Any CPU + {AC9F52FA-F552-49E0-83AE-79759BF44FED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC9F52FA-F552-49E0-83AE-79759BF44FED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC9F52FA-F552-49E0-83AE-79759BF44FED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC9F52FA-F552-49E0-83AE-79759BF44FED}.Release|Any CPU.Build.0 = Release|Any CPU + {4E124BBA-15B5-422E-93D5-96EA7D4180F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E124BBA-15B5-422E-93D5-96EA7D4180F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E124BBA-15B5-422E-93D5-96EA7D4180F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E124BBA-15B5-422E-93D5-96EA7D4180F3}.Release|Any CPU.Build.0 = Release|Any CPU + {BBCECFCC-F2FD-4C4D-A6E9-CC7AA5F10FDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BBCECFCC-F2FD-4C4D-A6E9-CC7AA5F10FDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BBCECFCC-F2FD-4C4D-A6E9-CC7AA5F10FDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BBCECFCC-F2FD-4C4D-A6E9-CC7AA5F10FDD}.Release|Any CPU.Build.0 = Release|Any CPU + {BD8079D9-FDB5-4C7D-8AD4-C80ADC4A4B26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD8079D9-FDB5-4C7D-8AD4-C80ADC4A4B26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD8079D9-FDB5-4C7D-8AD4-C80ADC4A4B26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD8079D9-FDB5-4C7D-8AD4-C80ADC4A4B26}.Release|Any CPU.Build.0 = Release|Any CPU + {239763CD-B7C9-4E8B-A84B-8F24DECF6D7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {239763CD-B7C9-4E8B-A84B-8F24DECF6D7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {239763CD-B7C9-4E8B-A84B-8F24DECF6D7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {239763CD-B7C9-4E8B-A84B-8F24DECF6D7B}.Release|Any CPU.Build.0 = Release|Any CPU + {748D16FF-35C6-4249-A1E8-04B2D239C954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {748D16FF-35C6-4249-A1E8-04B2D239C954}.Debug|Any CPU.Build.0 = Debug|Any CPU + {748D16FF-35C6-4249-A1E8-04B2D239C954}.Release|Any CPU.ActiveCfg = Release|Any CPU + {748D16FF-35C6-4249-A1E8-04B2D239C954}.Release|Any CPU.Build.0 = Release|Any CPU + {3AAC4992-DDB9-4175-82B9-C57F22E12FF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3AAC4992-DDB9-4175-82B9-C57F22E12FF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AAC4992-DDB9-4175-82B9-C57F22E12FF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3AAC4992-DDB9-4175-82B9-C57F22E12FF6}.Release|Any CPU.Build.0 = Release|Any CPU + {EF308D4E-26A0-471C-B764-9C4EB713BEAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF308D4E-26A0-471C-B764-9C4EB713BEAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF308D4E-26A0-471C-B764-9C4EB713BEAE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF308D4E-26A0-471C-B764-9C4EB713BEAE}.Release|Any CPU.Build.0 = Release|Any CPU + {351B93B0-301F-42E1-82A0-7FA217154F5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {351B93B0-301F-42E1-82A0-7FA217154F5D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {351B93B0-301F-42E1-82A0-7FA217154F5D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {351B93B0-301F-42E1-82A0-7FA217154F5D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {DD76B6AA-5A5A-4FCD-95AA-9552977525A1} = {9E964426-D744-405A-9EAA-D8D7A310B614} + {510EE83E-9C52-40FD-AC7E-C4981EBF4182} = {0B9B0B74-3EB1-46A4-BCCC-F2D6AE59A9EE} + {2A06124C-EA75-4946-9959-4AD3DC754B90} = {0B9B0B74-3EB1-46A4-BCCC-F2D6AE59A9EE} + {D9694108-539C-4DEE-B5DD-284208D48B46} = {9E964426-D744-405A-9EAA-D8D7A310B614} + {AC9F52FA-F552-49E0-83AE-79759BF44FED} = {9E964426-D744-405A-9EAA-D8D7A310B614} + {4E124BBA-15B5-422E-93D5-96EA7D4180F3} = {9E964426-D744-405A-9EAA-D8D7A310B614} + {BBCECFCC-F2FD-4C4D-A6E9-CC7AA5F10FDD} = {9E964426-D744-405A-9EAA-D8D7A310B614} + {BD8079D9-FDB5-4C7D-8AD4-C80ADC4A4B26} = {9E964426-D744-405A-9EAA-D8D7A310B614} + {239763CD-B7C9-4E8B-A84B-8F24DECF6D7B} = {99E56312-A064-4AD3-8443-0B56A5F76E6B} + {748D16FF-35C6-4249-A1E8-04B2D239C954} = {99E56312-A064-4AD3-8443-0B56A5F76E6B} + {3AAC4992-DDB9-4175-82B9-C57F22E12FF6} = {99E56312-A064-4AD3-8443-0B56A5F76E6B} + {EF308D4E-26A0-471C-B764-9C4EB713BEAE} = {99E56312-A064-4AD3-8443-0B56A5F76E6B} + {351B93B0-301F-42E1-82A0-7FA217154F5D} = {99E56312-A064-4AD3-8443-0B56A5F76E6B} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1CD4EDE2-A5FB-4A58-A850-3506AB7E7B69} EndGlobalSection diff --git a/src/Syroot.Worms/Archive.cs b/src/Syroot.Worms/Archive.cs index d26185f..55fa268 100644 --- a/src/Syroot.Worms/Archive.cs +++ b/src/Syroot.Worms/Archive.cs @@ -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 { @@ -47,7 +47,7 @@ namespace Syroot.Worms /// /// The name of the file to load the data from. public Archive(string fileName) - { + { Load(fileName); } @@ -100,7 +100,7 @@ namespace Syroot.Worms using (reader.TemporarySeek(offset, SeekOrigin.Begin)) { Add(name, reader.ReadBytes(length)); - } + } } while (nextEntryOffset != 0); } } @@ -143,7 +143,7 @@ namespace Syroot.Worms Length = item.Value.Length }; writer.WriteStructs(item.Value); - + int hash = CalculateHash(item.Key); if (hashTable[hash] == null) { diff --git a/src/Syroot.Worms/Core/ByteExtensions.cs b/src/Syroot.Worms/Core/ByteExtensions.cs index 8d6f4ca..b18ee47 100644 --- a/src/Syroot.Worms/Core/ByteExtensions.cs +++ b/src/Syroot.Worms/Core/ByteExtensions.cs @@ -5,9 +5,9 @@ namespace Syroot.Worms.Core /// /// Represents extension methods for instances. /// - internal static class ByteExtensions + public static class ByteExtensions { - // ---- METHODS (INTERNAL) ------------------------------------------------------------------------------------- + // ---- METHODS (PUBLIC) --------------------------------------------------------------------------------------- /// /// Returns the current byte with the bit at the set (being 1). @@ -15,7 +15,7 @@ namespace Syroot.Worms.Core /// The extended instance. /// The 0-based index of the bit to enable. /// The current byte with the bit enabled. - internal static byte EnableBit(this byte self, int index) + public static byte EnableBit(this byte self, int index) { return (byte)(self | (1 << index)); } @@ -26,7 +26,7 @@ namespace Syroot.Worms.Core /// The extended instance. /// The 0-based index of the bit to disable. /// The current byte with the bit disabled. - internal static byte DisableBit(this byte self, int index) + public static byte DisableBit(this byte self, int index) { return (byte)(self & ~(1 << index)); } @@ -38,7 +38,7 @@ namespace Syroot.Worms.Core /// The extended instance. /// The 0-based index of the bit to check. /// true when the bit is set; otherwise false. - internal static bool GetBit(this byte self, int index) + public static bool GetBit(this byte self, int index) { return (self & (1 << index)) != 0; } @@ -50,7 +50,7 @@ namespace Syroot.Worms.Core /// The extended instance. /// The direction in which to rotate, where positive directions rotate left. /// The current byte with the bits rotated. - internal static byte RotateBits(this byte self, int direction) + public static byte RotateBits(this byte self, int direction) { int bits = sizeof(byte) * 8; if (direction > 0) @@ -73,16 +73,9 @@ namespace Syroot.Worms.Core /// The 0-based index of the bit to enable or disable. /// true to enable the bit; otherwise false. /// The current byte with the bit enabled or disabled. - internal static byte SetBit(this byte self, int index, bool enable) + public static byte SetBit(this byte self, int index, bool enable) { - if (enable) - { - return EnableBit(self, index); - } - else - { - return DisableBit(self, index); - } + return enable ? EnableBit(self, index) : DisableBit(self, index); } /// @@ -92,16 +85,9 @@ namespace Syroot.Worms.Core /// The extended instance. /// The 0-based index of the bit to toggle. /// The current byte with the bit toggled. - internal static byte ToggleBit(this byte self, int index) + public static byte ToggleBit(this byte self, int index) { - if (GetBit(self, index)) - { - return DisableBit(self, index); - } - else - { - return EnableBit(self, index); - } + return GetBit(self, index) ? DisableBit(self, index) : EnableBit(self, index); } /// @@ -111,7 +97,7 @@ namespace Syroot.Worms.Core /// The number of least significant bits which are used to store the /// value. /// The decoded . - internal static byte DecodeByte(this byte self, int bits) + public static byte DecodeByte(this byte self, int bits) { return DecodeByte(self, bits, 0); } @@ -125,7 +111,7 @@ namespace Syroot.Worms.Core /// value. /// The first bit of the encoded value. /// The decoded . - internal static byte DecodeByte(this byte self, int bits, int firstBit) + public static byte DecodeByte(this byte self, int bits, int firstBit) { // Shift to the first bit and keep only the required bits. return (byte)((self >> firstBit) & ((1 << bits) - 1)); @@ -138,7 +124,7 @@ namespace Syroot.Worms.Core /// The number of least significant bits which are used to store the /// value. /// The decoded . - internal static sbyte DecodeSByte(this byte self, int bits) + public static sbyte DecodeSByte(this byte self, int bits) { return DecodeSByte(self, bits, 0); } @@ -152,19 +138,12 @@ namespace Syroot.Worms.Core /// value. /// The first bit of the encoded value. /// The decoded . - internal static sbyte DecodeSByte(this byte self, int bits, int firstBit) + public static sbyte DecodeSByte(this byte self, int bits, int firstBit) { self >>= firstBit; int absMask = 1 << bits; byte abs = (byte)(self & (absMask - 1)); - if (abs.GetBit(bits - 1)) - { - return (sbyte)(abs - absMask); - } - else - { - return (sbyte)abs; - } + return abs.GetBit(bits - 1) ? (sbyte)(abs - absMask) : (sbyte)abs; } /// @@ -175,7 +154,7 @@ namespace Syroot.Worms.Core /// The value to encode. /// The number of bits which are used to store the value. /// The current byte with the value encoded into it. - internal static byte Encode(this byte self, byte value, int bits) + public static byte Encode(this byte self, byte value, int bits) { return Encode(self, value, bits, 0); } @@ -189,17 +168,17 @@ namespace Syroot.Worms.Core /// The number of bits which are used to store the value. /// The first bit used for the encoded value. /// The current byte with the value encoded into it. - internal static byte Encode(this byte self, byte value, int bits, int firstBit) + public static byte Encode(this byte self, byte value, int bits, int firstBit) { // Clear the bits required for the value and fit it into them by truncating. int mask = ((1 << bits) - 1) << firstBit; self &= (byte)~mask; value = (byte)((value << firstBit) & mask); - + // Set the value. return (byte)(self | value); } - + /// /// Returns the current byte with the given set into the given number of /// . @@ -208,7 +187,7 @@ namespace Syroot.Worms.Core /// The value to encode. /// The number of bits which are used to store the value. /// The current byte with the value encoded into it. - internal static byte Encode(this byte self, sbyte value, int bits) + public static byte Encode(this byte self, sbyte value, int bits) { return Encode(self, value, bits, 0); } @@ -222,7 +201,7 @@ namespace Syroot.Worms.Core /// The number of bits which are used to store the value. /// The first bit used for the encoded value. /// The current byte with the value encoded into it. - internal static byte Encode(this byte self, sbyte value, int bits, int firstBit) + public static byte Encode(this byte self, sbyte value, int bits, int firstBit) { // Set the value as a normal byte, but then fix the sign. self = Encode(self, (byte)value, bits, firstBit); diff --git a/src/Syroot.Worms/Graphics/BitmapTools.cs b/src/Syroot.Worms/Core/Graphics/BitmapTools.cs similarity index 91% rename from src/Syroot.Worms/Graphics/BitmapTools.cs rename to src/Syroot.Worms/Core/Graphics/BitmapTools.cs index 96cfe90..041425e 100644 --- a/src/Syroot.Worms/Graphics/BitmapTools.cs +++ b/src/Syroot.Worms/Core/Graphics/BitmapTools.cs @@ -2,14 +2,13 @@ using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; -using Syroot.Worms.Core; -namespace Syroot.Worms.Graphics +namespace Syroot.Worms.Core.Graphics { /// /// Represents a collection of methods helping with palettized images. /// - internal static class BitmapTools + public static class BitmapTools { // ---- METHODS (INTERNAL) ------------------------------------------------------------------------------------- @@ -21,7 +20,7 @@ namespace Syroot.Worms.Graphics /// The palette as a array. /// The data array storing bytes indexing the palette color array. /// The instance. - internal static Bitmap CreateIndexed(Size size, IList palette, byte[] data) + public static Bitmap CreateIndexed(Size size, IList palette, byte[] data) { using (DisposableGCHandle dataPin = new DisposableGCHandle(data, GCHandleType.Pinned)) { diff --git a/src/Syroot.Worms/Graphics/IPalette.cs b/src/Syroot.Worms/Core/Graphics/IPalette.cs similarity index 92% rename from src/Syroot.Worms/Graphics/IPalette.cs rename to src/Syroot.Worms/Core/Graphics/IPalette.cs index 865a542..4f9d8e9 100644 --- a/src/Syroot.Worms/Graphics/IPalette.cs +++ b/src/Syroot.Worms/Core/Graphics/IPalette.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace Syroot.Worms.Graphics +namespace Syroot.Worms.Core.Graphics { /// /// Represents an interface for any class storing indexed image palette colors. diff --git a/src/Syroot.Worms/Core/BinaryStreamExtensions.cs b/src/Syroot.Worms/Core/IO/BinaryStreamExtensions.cs similarity index 99% rename from src/Syroot.Worms/Core/BinaryStreamExtensions.cs rename to src/Syroot.Worms/Core/IO/BinaryStreamExtensions.cs index f778f2b..88a7f16 100644 --- a/src/Syroot.Worms/Core/BinaryStreamExtensions.cs +++ b/src/Syroot.Worms/Core/IO/BinaryStreamExtensions.cs @@ -4,7 +4,7 @@ using System.IO; using System.Runtime.InteropServices; using Syroot.BinaryData; -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.IO { /// /// Represents extension methods for instances. diff --git a/src/Syroot.Worms/Core/ILoadable.cs b/src/Syroot.Worms/Core/IO/ILoadable.cs similarity index 93% rename from src/Syroot.Worms/Core/ILoadable.cs rename to src/Syroot.Worms/Core/IO/ILoadable.cs index 175b210..3688a51 100644 --- a/src/Syroot.Worms/Core/ILoadable.cs +++ b/src/Syroot.Worms/Core/IO/ILoadable.cs @@ -1,6 +1,6 @@ using System.IO; -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.IO { /// /// Represents data which can be loaded by providing a to read from. @@ -8,7 +8,7 @@ namespace Syroot.Worms.Core public interface ILoadable { // ---- METHODS ------------------------------------------------------------------------------------------------ - + /// /// Loads the data from the given . /// diff --git a/src/Syroot.Worms/Core/ILoadableFile.cs b/src/Syroot.Worms/Core/IO/ILoadableFile.cs similarity index 94% rename from src/Syroot.Worms/Core/ILoadableFile.cs rename to src/Syroot.Worms/Core/IO/ILoadableFile.cs index 6780e3f..37b8067 100644 --- a/src/Syroot.Worms/Core/ILoadableFile.cs +++ b/src/Syroot.Worms/Core/IO/ILoadableFile.cs @@ -1,4 +1,4 @@ -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.IO { /// /// Represents a file which can be loaded by providing a file name. diff --git a/src/Syroot.Worms/Core/ISaveable.cs b/src/Syroot.Worms/Core/IO/ISaveable.cs similarity index 93% rename from src/Syroot.Worms/Core/ISaveable.cs rename to src/Syroot.Worms/Core/IO/ISaveable.cs index 47bf9da..fa22c35 100644 --- a/src/Syroot.Worms/Core/ISaveable.cs +++ b/src/Syroot.Worms/Core/IO/ISaveable.cs @@ -1,6 +1,6 @@ using System.IO; -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.IO { /// /// Represents data which can be saved by providing a to write to. @@ -8,7 +8,7 @@ namespace Syroot.Worms.Core public interface ISaveable { // ---- METHODS ------------------------------------------------------------------------------------------------ - + /// /// Saves the data into the given . /// diff --git a/src/Syroot.Worms/Core/ISaveableFile.cs b/src/Syroot.Worms/Core/IO/ISaveableFile.cs similarity index 94% rename from src/Syroot.Worms/Core/ISaveableFile.cs rename to src/Syroot.Worms/Core/IO/ISaveableFile.cs index 5f57d3f..a1fb337 100644 --- a/src/Syroot.Worms/Core/ISaveableFile.cs +++ b/src/Syroot.Worms/Core/IO/ISaveableFile.cs @@ -1,4 +1,4 @@ -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.IO { /// /// Represents a file which can be saved by providing a file name. diff --git a/src/Syroot.Worms/Core/RiffChunkLoadAttribute.cs b/src/Syroot.Worms/Core/Riff/RiffChunkLoadAttribute.cs similarity index 97% rename from src/Syroot.Worms/Core/RiffChunkLoadAttribute.cs rename to src/Syroot.Worms/Core/Riff/RiffChunkLoadAttribute.cs index 4703440..9521c30 100644 --- a/src/Syroot.Worms/Core/RiffChunkLoadAttribute.cs +++ b/src/Syroot.Worms/Core/Riff/RiffChunkLoadAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.Riff { /// /// Represents the attribute to decorate methods in inheriting classes to provide methods diff --git a/src/Syroot.Worms/Core/RiffChunkSaveAttribute.cs b/src/Syroot.Worms/Core/Riff/RiffChunkSaveAttribute.cs similarity index 97% rename from src/Syroot.Worms/Core/RiffChunkSaveAttribute.cs rename to src/Syroot.Worms/Core/Riff/RiffChunkSaveAttribute.cs index fb20e8e..cc7f528 100644 --- a/src/Syroot.Worms/Core/RiffChunkSaveAttribute.cs +++ b/src/Syroot.Worms/Core/Riff/RiffChunkSaveAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.Riff { /// /// Represents the attribute to decorate methods in inheriting classes to provide methods diff --git a/src/Syroot.Worms/Core/RiffFile.cs b/src/Syroot.Worms/Core/Riff/RiffFile.cs similarity index 99% rename from src/Syroot.Worms/Core/RiffFile.cs rename to src/Syroot.Worms/Core/Riff/RiffFile.cs index 5f3da97..92c45eb 100644 --- a/src/Syroot.Worms/Core/RiffFile.cs +++ b/src/Syroot.Worms/Core/Riff/RiffFile.cs @@ -4,8 +4,9 @@ using System.IO; using System.Reflection; using System.Text; using Syroot.BinaryData; +using Syroot.Worms.Core.IO; -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.Riff { /// /// Represents the format of RIFF files, which manage their data in chunks. diff --git a/src/Syroot.Worms/Core/RiffFileAttribute.cs b/src/Syroot.Worms/Core/Riff/RiffFileAttribute.cs similarity index 97% rename from src/Syroot.Worms/Core/RiffFileAttribute.cs rename to src/Syroot.Worms/Core/Riff/RiffFileAttribute.cs index 30e22f4..33897f9 100644 --- a/src/Syroot.Worms/Core/RiffFileAttribute.cs +++ b/src/Syroot.Worms/Core/Riff/RiffFileAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Syroot.Worms.Core +namespace Syroot.Worms.Core.Riff { /// /// Represents the attribute to decorate inheriting classes to provide their file identifier. diff --git a/src/Syroot.Worms/Img.cs b/src/Syroot.Worms/Img.cs index 4043b0e..a6fb4a6 100644 --- a/src/Syroot.Worms/Img.cs +++ b/src/Syroot.Worms/Img.cs @@ -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 { @@ -43,7 +44,7 @@ namespace Syroot.Worms /// /// The to load the data from. /// true to align the data array by 4 bytes. - internal Img(Stream stream, bool alignData) => Load(stream, alignData); + public Img(Stream stream, bool alignData) => Load(stream, alignData); // ---- PROPERTIES --------------------------------------------------------------------------------------------- @@ -70,40 +71,12 @@ namespace Syroot.Worms Load(stream); } - /// - /// Saves the data into the given . - /// - /// The to save the data to. - public void Save(Stream stream) => Save(stream, false, false); - - /// - /// Saves the optionally compressed data into the given . - /// - /// The to save the data to. - /// true to compress image data. - public void Save(Stream stream, bool compress) => Save(stream, compress, false); - - /// - /// Saves the data in the given file. - /// - /// The name of the file to save the data in. - public void Save(string fileName) => Save(fileName, false, false); - - /// - /// Saves the optionally compressed data in the given file. - /// - /// The name of the file to save the data in. - /// true to compress image data. - public void Save(string fileName, bool compress) => Save(fileName, compress, false); - - // ---- METHODS (INTERNAL) ------------------------------------------------------------------------------------- - /// /// Loads the data from the given . The data block can be aligned to a 4-bte boundary. /// /// The to load the data from. /// true to align the data array by 4 bytes. - internal void Load(Stream stream, bool alignData) + public void Load(Stream stream, bool alignData) { using (BinaryStream reader = new BinaryStream(stream, encoding: Encoding.ASCII, leaveOpen: true)) { @@ -167,12 +140,38 @@ namespace Syroot.Worms /// /// The name of the file to load the data from. /// true to align the data array by 4 bytes. - internal void Load(string fileName, bool alignData) + public void Load(string fileName, bool alignData) { using (FileStream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) Load(stream); } + /// + /// Saves the data into the given . + /// + /// The to save the data to. + public void Save(Stream stream) => Save(stream, false, false); + + /// + /// Saves the optionally compressed data into the given . + /// + /// The to save the data to. + /// true to compress image data. + public void Save(Stream stream, bool compress) => Save(stream, compress, false); + + /// + /// Saves the data in the given file. + /// + /// The name of the file to save the data in. + public void Save(string fileName) => Save(fileName, false, false); + + /// + /// Saves the optionally compressed data in the given file. + /// + /// The name of the file to save the data in. + /// true to compress image data. + public void Save(string fileName, bool compress) => Save(fileName, compress, false); + /// /// Saves the optionally compressed data into the given . The data block can be aligned /// to a 4-bte boundary. @@ -180,7 +179,7 @@ namespace Syroot.Worms /// The to save the data to. /// true to compress image data. /// true to align the data array by 4 bytes. - internal void Save(Stream stream, bool compress, bool alignData) + public void Save(Stream stream, bool compress, bool alignData) { using (BinaryStream writer = new BinaryStream(stream, encoding: Encoding.ASCII)) { @@ -236,7 +235,7 @@ namespace Syroot.Worms /// The name of the file to save the data in. /// true to compress image data. /// true to align the data array by 4 bytes. - internal void Save(string fileName, bool compress, bool alignData) + public void Save(string fileName, bool compress, bool alignData) { using (FileStream stream = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None)) Save(stream, compress, alignData); diff --git a/src/Syroot.Worms/RawBitmapData.cs b/src/Syroot.Worms/RawBitmapData.cs index 3cae69b..4432352 100644 --- a/src/Syroot.Worms/RawBitmapData.cs +++ b/src/Syroot.Worms/RawBitmapData.cs @@ -1,4 +1,3 @@ -using System; using System.Drawing; namespace Syroot.Worms @@ -6,7 +5,6 @@ namespace Syroot.Worms /// /// Represents a pixel-based 2D image in different color formats. /// - [Obsolete("Use System.Drawing instead as it is now available in .NET Core.")] public class RawBitmapData { // ---- PROPERTIES --------------------------------------------------------------------------------------------- diff --git a/src/Syroot.Worms/RiffPalette.cs b/src/Syroot.Worms/RiffPalette.cs index 11cc51c..bf0eff8 100644 --- a/src/Syroot.Worms/RiffPalette.cs +++ b/src/Syroot.Worms/RiffPalette.cs @@ -1,8 +1,9 @@ using System.Drawing; using System.IO; using Syroot.BinaryData; -using Syroot.Worms.Core; -using Syroot.Worms.Graphics; +using Syroot.Worms.Core.Graphics; +using Syroot.Worms.Core.IO; +using Syroot.Worms.Core.Riff; namespace Syroot.Worms { diff --git a/src/Syroot.Worms/Syroot.Worms.csproj b/src/Syroot.Worms/Syroot.Worms.csproj index 7b858e0..459ffb9 100644 --- a/src/Syroot.Worms/Syroot.Worms.csproj +++ b/src/Syroot.Worms/Syroot.Worms.csproj @@ -1,7 +1,6 @@  Syroot.Worms - Worms Syroot (c) Syroot, licensed under MIT .NET library for loading and modifying files of Team17 Worms games. @@ -22,6 +21,6 @@ - + \ No newline at end of file