c2e39cc...409d4d9

commit 409d4d96ead69028a164274637d23e350acb73fb
Merge: 95169f539 26e89c63d
Author: EdusFF <pitkanen.eetu@gmail.com>
Date:   Mon Mar 11 15:13:27 2019 +0200

    Merge branch 'dev' of github.com:Regalis11/Barotrauma into dev

commit 95169f53937f9a7e168a884171eaa21ae7f08023
Author: EdusFF <pitkanen.eetu@gmail.com>
Date:   Mon Mar 11 15:13:11 2019 +0200

    Modified: ServerMessage structure to allow _ ; in player & submarine names

commit 26e89c63dc8da771aea9f09978a630a6cff60a6f
Merge: b7646d06d fb0b821bc
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Mon Mar 11 14:42:44 2019 +0200

    Merge branch 'kuraiookami-logicExpantion' into dev

    # Conflicts:
    #       Barotrauma/BarotraumaShared/SharedContent.projitems

commit fb0b821bc97891cdeec8f2c740a12119696393ea
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Mon Mar 11 14:41:21 2019 +0200

    Use invariant culture when parsing floats or converting them to strings in signal components

commit f0c8afba934b41358cf5d59a22b87caf33f98a61
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Mon Mar 11 14:00:44 2019 +0200

    Update new signal components to use identifiers & added names and descriptions to the text file, use invariant culture in equalscomponent, memorycomponent doesn't require the signals to be floats

commit 674d9ec804fc4770b602d4b09240b08cafc8ccec
Merge: 3ea33fb54 242e2429f
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Mon Mar 11 12:01:27 2019 +0200

    Merge branch 'logicExpantion' of https://github.com/kuraiookami/Barotrauma into kuraiookami-logicExpantion

    # Conflicts:
    #       Barotrauma/BarotraumaShared/BarotraumaShared.projitems
    #       Barotrauma/BarotraumaShared/Content/Items/Electricity/poweritems.xml
    #       Barotrauma/BarotraumaShared/Content/Items/Electricity/signalitems.xml
    #       Barotrauma/BarotraumaShared/Source/Items/Components/Power/PowerContainer.cs
    #       Barotrauma/BarotraumaShared/Source/Items/Components/Signal/AdderComponent.cs

commit b7646d06d53fb05227276e6286d0e15da5dc9080
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Mon Mar 11 11:37:33 2019 +0200

    Re-enabled multiplayer campaign

commit cf7258f6410a5995c881ec6e95eb9def5cd90ad4
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Mon Mar 11 11:28:48 2019 +0200

    Fixed item interfaces getting repositioned every frame when the editing HUD is open. Closes #1212

commit e8906239c779cf71de694bc65c81058e5cae16ef
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Mon Mar 11 11:12:05 2019 +0200

    Fixed VoipCapture creating new "could not start voice capture" popups constantly if there's no suitable capture device. Closes #1262

commit a30f47fbe47fde4fccb0453c1773a76d730d226b
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Sun Mar 10 19:04:59 2019 +0200

    Disable audio instead of crashing if no audio device is found. Closes #1214

commit 242e2429fd2c3ed199ac26b55e2cbdc8636e73f9
Author: Darkwolf <Darkwolf0101@gmail.com>
Date:   Mon Jan 21 21:26:57 2019 -0600

    Expansion of Barotrauma's logic system.

    Changed:
    - AdderComponent and children can clamp their output
    - Powercontainer signals for charge,charge% and charge rate

    Added:
    - ColorComponent: Dynamic signals for light set_color inputs
    - MemoryComponent: Stores and sends a signal that is edge latched
    - DivideComponent: Standard division
    - MultiplyComponent: Standard multiplication
    - SubtractComponent: Standard subtraction
    - XorComponent: Exclusive or
    - EqualsComponent: Equals comparison
    - GreaterComponent: Greater than comparison
This commit is contained in:
Joonas Rikkonen
2019-03-18 22:45:09 +02:00
parent 5dc31c213f
commit 80ab27df22
90 changed files with 4705 additions and 1944 deletions
@@ -1,507 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">ReleaseLinux</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{008C0F83-E914-4966-9135-EA885059EDD8}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Barotrauma</RootNamespace>
<AssemblyName>Barotrauma</AssemblyName>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<ReleaseVersion>0.9.0.0</ReleaseVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\ReleaseLinux\</OutputPath>
<DefineConstants>TRACE;LINUX;CLIENT</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\DebugLinux\</OutputPath>
<DefineConstants>TRACE;LINUX;CLIENT;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseMac|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\ReleaseMac\</OutputPath>
<DefineConstants>TRACE;OSX;CLIENT</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugMac|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\DebugMac\</OutputPath>
<DefineConstants>TRACE;OSX;CLIENT;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWindows|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\ReleaseWindows\</OutputPath>
<DefineConstants>TRACE;WINDOWS;CLIENT</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWindows|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\DebugWindows\</OutputPath>
<DefineConstants>TRACE;WINDOWS;CLIENT;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Source\Camera.cs" />
<Compile Include="Source\Characters\AICharacter.cs" />
<Compile Include="Source\Characters\AI\AIController.cs" />
<Compile Include="Source\Characters\AI\AITarget.cs" />
<Compile Include="Source\Characters\AI\EnemyAIController.cs" />
<Compile Include="Source\Characters\AI\HumanAIController.cs" />
<Compile Include="Source\Characters\Animation\Ragdoll.cs" />
<Compile Include="Source\Characters\Attack.cs" />
<Compile Include="Source\Characters\Health\AfflictionHusk.cs" />
<Compile Include="Source\Characters\Health\AfflictionPsychosis.cs" />
<Compile Include="Source\Characters\Health\CharacterHealth.cs" />
<Compile Include="Source\Characters\Health\DamageModifier.cs" />
<Compile Include="Source\Events\EventManager.cs" />
<Compile Include="Source\Events\Missions\CombatMission.cs" />
<Compile Include="Source\GameSession\GameModes\Tutorials\ContextualTutorial.cs" />
<Compile Include="Source\GameSession\GameModes\Tutorials\ScenarioTutorial.cs" />
<Compile Include="Source\GUI\ChatBox.cs" />
<Compile Include="Source\GUI\GUIRadioButtonGroup.cs" />
<Compile Include="Source\GUI\ParamsEditor.cs" />
<Compile Include="Source\GUI\ShapeExtensions.cs" />
<Compile Include="Source\GUI\Graph.cs" />
<Compile Include="Source\Characters\CharacterHealth.cs" />
<Compile Include="Source\GameSession\GameModes\MultiPlayerCampaign.cs" />
<Compile Include="Source\GUI\GUICanvas.cs" />
<Compile Include="Source\GUI\GUICustomComponent.cs" />
<Compile Include="Source\GUI\GUILayoutGroup.cs" />
<Compile Include="Source\GUI\HUDLayoutSettings.cs" />
<Compile Include="Source\GUI\RectTransform.cs" />
<Compile Include="Source\GUI\SpriteSheetPlayer.cs" />
<Compile Include="Source\GUI\UISprite.cs" />
<Compile Include="Source\GUI\Widget.cs" />
<Compile Include="Source\Items\Components\ElectricalDischarger.cs" />
<Compile Include="Source\Items\Components\LevelResource.cs" />
<Compile Include="Source\Items\Components\Machines\Controller.cs" />
<Compile Include="Source\Items\Components\Repairable.cs" />
<Compile Include="Source\Items\Components\RepairTool.cs" />
<Compile Include="Source\Items\Components\Signal\CustomInterface.cs" />
<Compile Include="Source\Items\Components\Signal\MotionSensor.cs" />
<Compile Include="Source\Items\Components\Signal\WifiComponent.cs" />
<Compile Include="Source\Items\ItemInventory.cs" />
<Compile Include="Source\Map\ItemAssemblyPrefab.cs" />
<Compile Include="Source\Map\Levels\BackgroundCreatures\BackgroundCreature.cs" />
<Compile Include="Source\Map\Levels\BackgroundCreatures\BackgroundCreatureManager.cs" />
<Compile Include="Source\Map\Levels\BackgroundCreatures\BackgroundCreaturePrefab.cs" />
<Compile Include="Source\Characters\Character.cs" />
<Compile Include="Source\Characters\CharacterHUD.cs" />
<Compile Include="Source\Characters\CharacterInfo.cs" />
<Compile Include="Source\Characters\CharacterNetworking.cs" />
<Compile Include="Source\Characters\CharacterSound.cs" />
<Compile Include="Source\Characters\HUDProgressBar.cs" />
<Compile Include="Source\Characters\Jobs\JobPrefab.cs" />
<Compile Include="Source\Characters\Limb.cs" />
<Compile Include="Source\DebugConsole.cs" />
<Compile Include="Source\EventInput\EventInput.cs" />
<Compile Include="Source\EventInput\KeyboardDispatcher.cs" />
<Compile Include="Source\Events\Missions\Mission.cs" />
<Compile Include="Source\Events\Missions\MissionMode.cs" />
<Compile Include="Source\Fonts\ScalableFont.cs" />
<Compile Include="Source\GameMain.cs" />
<Compile Include="Source\GameSession\CrewManager.cs" />
<Compile Include="Source\GameSession\GameMode.cs" />
<Compile Include="Source\GameSession\GameModes\SinglePlayerCampaign.cs" />
<Compile Include="Source\GameSession\GameModes\Tutorials\BasicTutorial.cs" />
<Compile Include="Source\GameSession\GameModes\Tutorials\EditorTutorial.cs" />
<Compile Include="Source\GameSession\GameModes\Tutorials\TutorialMode.cs" />
<Compile Include="Source\GameSession\GameModes\Tutorials\Tutorial.cs" />
<Compile Include="Source\GameSession\GameSession.cs" />
<Compile Include="Source\GameSession\RoundSummary.cs" />
<Compile Include="Source\GameSettings.cs" />
<Compile Include="Source\GUI\ComponentStyle.cs" />
<Compile Include="Source\GUI\GUI.cs" />
<Compile Include="Source\GUI\GUIButton.cs" />
<Compile Include="Source\GUI\GUIComponent.cs" />
<Compile Include="Source\GUI\GUIDropDown.cs" />
<Compile Include="Source\GUI\GUIFrame.cs" />
<Compile Include="Source\GUI\GUIImage.cs" />
<Compile Include="Source\GUI\GUIListBox.cs" />
<Compile Include="Source\GUI\GUIMessage.cs" />
<Compile Include="Source\GUI\GUIMessageBox.cs" />
<Compile Include="Source\GUI\GUINumberInput.cs" />
<Compile Include="Source\GUI\GUIProgressBar.cs" />
<Compile Include="Source\GUI\GUIScrollBar.cs" />
<Compile Include="Source\GUI\GUIStyle.cs" />
<Compile Include="Source\GUI\GUITextBlock.cs" />
<Compile Include="Source\GUI\GUITextBox.cs" />
<Compile Include="Source\GUI\GUITickBox.cs" />
<Compile Include="Source\GUI\LoadingScreen.cs" />
<Compile Include="Source\Items\CharacterInventory.cs" />
<Compile Include="Source\Items\Components\Door.cs" />
<Compile Include="Source\Items\Components\ItemComponent.cs" />
<Compile Include="Source\Items\Components\ItemContainer.cs" />
<Compile Include="Source\Items\Components\ItemLabel.cs" />
<Compile Include="Source\Items\Components\LightComponent.cs" />
<Compile Include="Source\Items\Components\Machines\Deconstructor.cs" />
<Compile Include="Source\Items\Components\Machines\Engine.cs" />
<Compile Include="Source\Items\Components\Machines\Fabricator.cs" />
<Compile Include="Source\Items\Components\Machines\MiniMap.cs" />
<Compile Include="Source\Items\Components\Machines\Pump.cs" />
<Compile Include="Source\Items\Components\Machines\Sonar.cs" />
<Compile Include="Source\Items\Components\Machines\Reactor.cs" />
<Compile Include="Source\Items\Components\Machines\Steering.cs" />
<Compile Include="Source\Items\Components\Power\PowerContainer.cs" />
<Compile Include="Source\Items\Components\Power\Powered.cs" />
<Compile Include="Source\Items\Components\Power\PowerTransfer.cs" />
<Compile Include="Source\Items\Components\Signal\Connection.cs" />
<Compile Include="Source\Items\Components\Signal\ConnectionPanel.cs" />
<Compile Include="Source\Items\Components\Signal\Wire.cs" />
<Compile Include="Source\Items\Components\StatusHUD.cs" />
<Compile Include="Source\Items\Components\Turret.cs" />
<Compile Include="Source\Items\DockingPort.cs" />
<Compile Include="Source\Items\Inventory.cs" />
<Compile Include="Source\Items\Item.cs" />
<Compile Include="Source\Items\ItemPrefab.cs" />
<Compile Include="Source\Items\Rope.cs" />
<Compile Include="Source\Map\Explosion.cs" />
<Compile Include="Source\Map\FireSource.cs" />
<Compile Include="Source\Map\Gap.cs" />
<Compile Include="Source\Map\Hull.cs" />
<Compile Include="Source\Map\Levels\LevelObjects\LevelObject.cs" />
<Compile Include="Source\Map\Levels\LevelObjects\LevelObjectManager.cs" />
<Compile Include="Source\Map\Levels\LevelObjects\LevelObjectPrefab.cs" />
<Compile Include="Source\Map\Levels\CaveGenerator.cs" />
<Compile Include="Source\Map\Levels\Level.cs" />
<Compile Include="Source\Map\Levels\LevelObjects\LevelTrigger.cs" />
<Compile Include="Source\Map\Levels\LevelRenderer.cs" />
<Compile Include="Source\Map\Levels\Ruins\RuinGenerator.cs" />
<Compile Include="Source\Map\Levels\WaterRenderer.cs" />
<Compile Include="Source\Map\Levels\LevelWall.cs" />
<Compile Include="Source\Map\Lights\ConvexHull.cs" />
<Compile Include="Source\Map\Lights\LightManager.cs" />
<Compile Include="Source\Map\Lights\LightSource.cs" />
<Compile Include="Source\Map\LinkedSubmarine.cs" />
<Compile Include="Source\Map\Map\Location.cs" />
<Compile Include="Source\Map\Map\Map.cs" />
<Compile Include="Source\Map\MapEntity.cs" />
<Compile Include="Source\Map\MapEntityPrefab.cs" />
<Compile Include="Source\Map\Structure.cs" />
<Compile Include="Source\Map\StructurePrefab.cs" />
<Compile Include="Source\Map\Submarine.cs" />
<Compile Include="Source\Map\SubmarineBody.cs" />
<Compile Include="Source\Map\WayPoint.cs" />
<Compile Include="Source\Media\Video.cs" />
<Compile Include="Source\Networking\BanList.cs" />
<Compile Include="Source\Networking\ChatMessage.cs" />
<Compile Include="Source\Networking\Client.cs" />
<Compile Include="Source\Networking\EntitySpawner.cs" />
<Compile Include="Source\Networking\FileTransfer\FileReceiver.cs" />
<Compile Include="Source\Networking\GameClient.cs" />
<Compile Include="Source\Networking\NetEntityEvent\ClientEntityEventManager.cs" />
<Compile Include="Source\Networking\NetEntityEvent\NetEntityEvent.cs" />
<Compile Include="Source\Networking\NetStats.cs" />
<Compile Include="Source\Networking\OrderChatMessage.cs" />
<Compile Include="Source\Networking\RespawnManager.cs" />
<Compile Include="Source\Networking\ServerInfo.cs" />
<Compile Include="Source\Networking\ServerLog.cs" />
<Compile Include="Source\Networking\ServerSettings.cs" />
<Compile Include="Source\Networking\SteamManager.cs" />
<Compile Include="Source\Networking\Voip\VoipCapture.cs" />
<Compile Include="Source\Networking\Voip\VoipClient.cs" />
<Compile Include="Source\Networking\Voip\VoipConfig.cs" />
<Compile Include="Source\Networking\Voting.cs" />
<Compile Include="Source\Networking\WhiteList.cs" />
<Compile Include="Source\Particles\Decal.cs" />
<Compile Include="Source\Particles\DecalManager.cs" />
<Compile Include="Source\Particles\DecalPrefab.cs" />
<Compile Include="Source\Particles\Particle.cs" />
<Compile Include="Source\Particles\ParticleEmitter.cs" />
<Compile Include="Source\Particles\ParticleManager.cs" />
<Compile Include="Source\Particles\ParticlePrefab.cs" />
<Compile Include="Source\Physics\PhysicsBody.cs" />
<Compile Include="Source\PlayerInput.cs" />
<Compile Include="Source\Program.cs" />
<Compile Include="Source\Screens\CharacterEditorScreen.cs" />
<Compile Include="Source\Screens\BlurEffect.cs" />
<Compile Include="Source\Screens\CampaignSetupUI.cs" />
<Compile Include="Source\Screens\CampaignUI.cs" />
<Compile Include="Source\Screens\LevelEditorScreen.cs" />
<Compile Include="Source\Screens\SpriteEditorScreen.cs" />
<Compile Include="Source\Screens\SteamWorkshopScreen.cs" />
<Compile Include="Source\Screens\SubEditorScreen.cs" />
<Compile Include="Source\Screens\GameScreen.cs" />
<Compile Include="Source\Screens\LobbyScreen.cs" />
<Compile Include="Source\Screens\MainMenuScreen.cs" />
<Compile Include="Source\Screens\NetLobbyScreen.cs" />
<Compile Include="Source\Screens\ParticleEditorScreen.cs" />
<Compile Include="Source\Screens\Screen.cs" />
<Compile Include="Source\Screens\ServerListScreen.cs" />
<Compile Include="Source\Serialization\SerializableEntityEditor.cs" />
<Compile Include="Source\Sounds\OggSound.cs" />
<Compile Include="Source\Sounds\Sound.cs" />
<Compile Include="Source\Sounds\SoundChannel.cs" />
<Compile Include="Source\Sounds\SoundFilters.cs" />
<Compile Include="Source\Sounds\SoundManager.cs" />
<Compile Include="Source\Sounds\SoundPlayer.cs" />
<Compile Include="Source\Sounds\VoipSound.cs" />
<Compile Include="Source\Sounds\VideoSound.cs" />
<Compile Include="Source\Sprite\DeformableSprite.cs" />
<Compile Include="Source\Sprite\DeformAnimations\CustomDeformation.cs" />
<Compile Include="Source\Sprite\DeformAnimations\Inflate.cs" />
<Compile Include="Source\Sprite\DeformAnimations\NoiseDeformation.cs" />
<Compile Include="Source\Sprite\DeformAnimations\PositionalDeformation.cs" />
<Compile Include="Source\Sprite\DeformAnimations\JointBendDeformation.cs" />
<Compile Include="Source\Sprite\DeformAnimations\SpriteDeformation.cs" />
<Compile Include="Source\Sprite\Sprite.cs" />
<Compile Include="Source\Sprite\SpriteSheet.cs" />
<Compile Include="Source\Utils\MathUtils.cs" />
<Compile Include="Source\Utils\TextureLoader.cs" />
<Compile Include="Source\Utils\ToolBox.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Concentus, Version=1.1.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\Concentus.1.1.7\lib\portable-net45+win+wpa81+wp80\Concentus.dll</HintPath>
</Reference>
<Reference Include="GameAnalytics.Mono, Version=1.0.6710.29255, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\NLog.4.3.8\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="nVLC, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\nVLC.3.0.0\lib\net40\nVLC.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="NVorbis, Version=0.8.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\NVorbis.0.8.6\lib\net35\NVorbis.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="PresentationCore" />
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.4.2.0\lib\net45\SharpDX.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.Direct2D1, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Direct2D1.4.2.0\lib\net45\SharpDX.Direct2D1.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.Direct3D11, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Direct3D11.4.2.0\lib\net45\SharpDX.Direct3D11.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.Direct3D9, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Direct3D9.4.2.0\lib\net45\SharpDX.Direct3D9.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.DXGI, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.DXGI.4.2.0\lib\net45\SharpDX.DXGI.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.Mathematics, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Mathematics.4.2.0\lib\net45\SharpDX.Mathematics.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.MediaFoundation, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.MediaFoundation.4.2.0\lib\net45\SharpDX.MediaFoundation.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.XAudio2, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.XAudio2.4.2.0\lib\net45\SharpDX.XAudio2.dll</HintPath>
</Reference>
<Reference Condition="$(DefineConstants.Contains('WINDOWS'))" Include="SharpDX.XInput, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.XInput.4.2.0\lib\net45\SharpDX.XInput.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Condition="$(DefineConstants.Contains('LINUX')) OR $(DefineConstants.Contains('OSX'))" Include="MonoGame.Framework.DesktopGL">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="freetype6.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libvlc.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libvlccore.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\access\libfilesystem_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\audio_filter\libaudio_format_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\audio_filter\libugly_resampler_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\audio_output\libamem_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\codec\libavcodec_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\demux\libmp4_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\packetizer\libpacketizer_mpeg4audio_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\packetizer\libpacketizer_mpeg4video_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\video_chroma\librv32_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\video_chroma\libswscale_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\video_output\libvmem_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="wrap_oal.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="MonoGame.Framework.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="OpenTK.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SharpFont.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Libraries\Facepunch.Steamworks\Facepunch.Steamworks.csproj">
<Project>{3af0347c-5a9b-4421-868c-8ee3dbfaebc6}</Project>
<Name>Facepunch.Steamworks</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Hyper.ComponentModel\Hyper.ComponentModel.csproj">
<Project>{3b8f9edb-6e5e-450c-abc2-ec49075d0b50}</Project>
<Name>Hyper.ComponentModel</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Lidgren.Network\Lidgren.Network.csproj">
<Project>{49ba1c69-6104-41ac-a5d8-b54fa9f696e8}</Project>
<Name>Lidgren.Network</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\SharpFont\Source\SharpFont\SharpFont.csproj">
<Project>{c293db32-fa42-486d-b128-5a12522fae4e}</Project>
<Name>SharpFont</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Farseer Physics Engine 3.5\Farseer Physics MonoGame.csproj">
<Project>{0AAD36E3-51A5-4A07-AB60-5C8A66BD38B7}</Project>
<Name>Farseer Physics MonoGame</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="libvlc.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<None Include="libopenal.1.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="..\BarotraumaShared\BarotraumaShared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets'))" />
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets'))" />
</Target>
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
<PropertyGroup>
<ReferencePath>
</ReferencePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWindows|x64'">
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
</PropertyGroup>
</Project>
@@ -0,0 +1,222 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>51aff563-4982-474d-a92f-50b06db05b3d</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>ClientCode</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Source\Camera.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AICharacter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\AIController.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\AITarget.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\EnemyAIController.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\HumanAIController.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Animation\HumanoidAnimParams.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Animation\Ragdoll.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Attack.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Character.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\CharacterHealth.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\CharacterHUD.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\CharacterInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\CharacterNetworking.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\CharacterSound.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Health\AfflictionHusk.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Health\AfflictionPsychosis.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Health\CharacterHealth.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Health\DamageModifier.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\HUDProgressBar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Jobs\JobPrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\Limb.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\DebugConsole.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\EventInput\EventInput.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\EventInput\KeyboardDispatcher.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Events\EventManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Events\Missions\CombatMission.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Events\Missions\Mission.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Events\Missions\MissionMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Fonts\ScalableFont.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameMain.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\CrewManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\MultiPlayerCampaign.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\SinglePlayerCampaign.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\Tutorials\BasicTutorial.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\Tutorials\ContextualTutorial.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\Tutorials\EditorTutorial.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\Tutorials\ScenarioTutorial.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\Tutorials\Tutorial.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameModes\Tutorials\TutorialMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\GameSession.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSession\RoundSummary.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GameSettings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\ChatBox.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\ComponentStyle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\Graph.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUI.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIButton.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUICanvas.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIComponent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUICustomComponent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIDropDown.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIFrame.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIImage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUILayoutGroup.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIListBox.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIMessage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIMessageBox.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUINumberInput.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIProgressBar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIRadioButtonGroup.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIScrollBar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUIStyle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUITextBlock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUITextBox.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\GUITickBox.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\HUDLayoutSettings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\LoadingScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\ParamsEditor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\RectTransform.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\ShapeExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\SpriteSheetPlayer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\UISprite.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\GUI\Widget.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\CharacterInventory.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Door.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\ElectricalDischarger.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\ItemComponent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\ItemContainer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\ItemLabel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\LevelResource.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\LightComponent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Controller.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Deconstructor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Engine.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Fabricator.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\MiniMap.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Pump.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Reactor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Sonar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Machines\Steering.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Power\PowerContainer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Power\Powered.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Power\PowerTransfer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Repairable.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\RepairTool.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Signal\Connection.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Signal\ConnectionPanel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Signal\CustomInterface.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Signal\MotionSensor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Signal\WifiComponent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Signal\Wire.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\StatusHUD.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Components\Turret.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\DockingPort.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Inventory.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Item.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\ItemInventory.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\ItemPrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Items\Rope.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Explosion.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\FireSource.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Gap.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Hull.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\ItemAssemblyPrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\BackgroundCreatures\BackgroundCreature.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\BackgroundCreatures\BackgroundCreatureManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\BackgroundCreatures\BackgroundCreaturePrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\CaveGenerator.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\Level.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\LevelObjects\LevelObject.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\LevelObjects\LevelObjectManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\LevelObjects\LevelObjectPrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\LevelObjects\LevelTrigger.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\LevelRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\LevelWall.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\Ruins\RuinGenerator.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Levels\WaterRenderer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Lights\ConvexHull.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Lights\LightManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Lights\LightSource.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\LinkedSubmarine.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\MapEntity.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\MapEntityPrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Map\Location.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Map\Map.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Structure.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\StructurePrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\Submarine.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\SubmarineBody.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Map\WayPoint.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Media\Video.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\BanList.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\ChatMessage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\Client.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\EntitySpawner.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\FileTransfer\FileReceiver.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\GameClient.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\NetEntityEvent\ClientEntityEventManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\NetEntityEvent\NetEntityEvent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\NetStats.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\OrderChatMessage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\RespawnManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\ServerInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\ServerLog.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\ServerSettings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\SteamManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\Voip\VoipCapture.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\Voip\VoipClient.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\Voip\VoipConfig.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\Voting.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Networking\WhiteList.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Particles\Decal.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Particles\DecalManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Particles\DecalPrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Particles\Particle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Particles\ParticleEmitter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Particles\ParticleManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Particles\ParticlePrefab.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Physics\PhysicsBody.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\PlayerInput.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Program.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\BlurEffect.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\CampaignSetupUI.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\CampaignUI.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\CharacterEditorScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\GameScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\LevelEditorScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\LobbyScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\MainMenuScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\NetLobbyScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\ParticleEditorScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\Screen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\ServerListScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\SpriteEditorScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\SteamWorkshopScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Screens\SubEditorScreen.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Serialization\SerializableEntityEditor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\OggSound.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\Sound.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\SoundChannel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\SoundFilters.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\SoundManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\SoundPlayer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\VideoSound.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sounds\VoipSound.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\DeformableSprite.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\DeformAnimations\CustomDeformation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\DeformAnimations\Inflate.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\DeformAnimations\JointBendDeformation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\DeformAnimations\NoiseDeformation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\DeformAnimations\PositionalDeformation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\DeformAnimations\SpriteDeformation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\Sprite.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Sprite\SpriteSheet.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Utils\MathUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Utils\TextureLoader.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Utils\ToolBox.cs" />
</ItemGroup>
</Project>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>51aff563-4982-474d-a92f-50b06db05b3d</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<ReleaseVersion>0.9.0.0</ReleaseVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="ClientCode.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
@@ -0,0 +1,51 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/$(Platform)
/intermediateDir:obj/$(Platform)
/platform:Windows
/config:
/profile:Reach
/compress:False
#-------------------------------- References --------------------------------#
#---------------------------------- Content ---------------------------------#
#begin Effects/blurshader.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/blurshader.fx
#begin Effects/damageshader.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/damageshader.fx
#begin Effects/deformshader.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/deformshader.fx
#begin Effects/losshader.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/losshader.fx
#begin Effects/postprocess.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/postprocess.fx
#begin Effects/watershader.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/watershader.fx
@@ -0,0 +1,51 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/$(Platform)
/intermediateDir:obj/$(Platform)
/platform:DesktopGL
/config:
/profile:Reach
/compress:False
#-------------------------------- References --------------------------------#
#---------------------------------- Content ---------------------------------#
#begin Effects/blurshader_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/blurshader_opengl.fx
#begin Effects/damageshader_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/damageshader_opengl.fx
#begin Effects/deformshader_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/deformshader_opengl.fx
#begin Effects/losshader_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/losshader_opengl.fx
#begin Effects/postprocess_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/postprocess_opengl.fx
#begin Effects/watershader_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:Effects/watershader_opengl.fx
@@ -0,0 +1,33 @@
// Pixel shader applies a one dimensional gaussian blur filter.
// This is used twice by the bloom postprocess, first to
// blur horizontally, and then again to blur vertically.
sampler TextureSampler : register(s0);
#define SAMPLE_COUNT 15
float2 SampleOffsets[SAMPLE_COUNT];
float SampleWeights[SAMPLE_COUNT];
float4 PixelShaderF(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = 0;
// Combine a number of weighted image filter taps.
for (int i = 0; i < SAMPLE_COUNT; i++)
{
c += tex2D(TextureSampler, texCoord + SampleOffsets[i]) * SampleWeights[i];
}
return c;
}
technique GaussianBlur
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 PixelShaderF();
}
}
@@ -0,0 +1,33 @@
// Pixel shader applies a one dimensional gaussian blur filter.
// This is used twice by the bloom postprocess, first to
// blur horizontally, and then again to blur vertically.
sampler TextureSampler : register(s0);
#define SAMPLE_COUNT 15
float2 SampleOffsets[SAMPLE_COUNT];
float SampleWeights[SAMPLE_COUNT];
float4 PixelShaderF(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = 0;
// Combine a number of weighted image filter taps.
for (int i = 0; i < SAMPLE_COUNT; i++)
{
c += tex2D(TextureSampler, texCoord + SampleOffsets[i]) * SampleWeights[i];
}
return c;
}
technique GaussianBlur
{
pass Pass1
{
PixelShader = compile ps_2_0 PixelShaderF();
}
}
@@ -0,0 +1,39 @@
Texture2D xTexture;
sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; };
Texture2D xStencil;
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
float4 inColor;
float aCutoff;
float aMultiplier;
float cCutoff;
float cMultiplier;
float4 main(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = xTexture.Sample(TextureSampler, texCoord) * inColor;
float4 stencilColor = xStencil.Sample(StencilSampler, texCoord);
float aDiff = stencilColor.a - aCutoff;
clip(aDiff);
float cDiff = stencilColor.a - cCutoff;
return float4(
lerp(stencilColor.rgb, c.rgb, clamp(cDiff * cMultiplier, 0.0f, 1.0f)),
min(aDiff * aMultiplier, c.a));
}
technique StencilShader
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 main();
}
}
@@ -0,0 +1,39 @@
Texture xTexture;
sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; };
Texture xStencil;
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
float4 inColor;
float aCutoff;
float aMultiplier;
float cCutoff;
float cMultiplier;
float4 main(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = tex2D(TextureSampler, texCoord) * inColor;
float4 stencilColor = tex2D(StencilSampler, texCoord);
float aDiff = stencilColor.a - aCutoff;
clip(aDiff);
float cDiff = stencilColor.a - cCutoff;
return float4(
lerp(stencilColor.rgb, c.rgb, clamp(cDiff * cMultiplier, 0.0f, 1.0f)),
min(aDiff * aMultiplier, c.a));
}
technique StencilShader
{
pass Pass1
{
PixelShader = compile ps_2_0 main();
}
}
@@ -0,0 +1,84 @@
Texture2D xTexture;
sampler TextureSampler = sampler_state { Texture = <xTexture>; };
float4x4 xTransform;
const int MaxDeformResolution = 15 * 15;
float2 deformArray[15 * 15];
int deformArrayWidth;
int deformArrayHeight;
float2 uvTopLeft;
float2 uvBottomRight;
float4 tintColor;
struct VertexShaderInput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0;
};
struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0;
};
VertexShaderOutput mainVS(in VertexShaderInput input)
{
VertexShaderOutput output = (VertexShaderOutput)0;
float2 normalizedUv = (input.TexCoords - uvTopLeft) / (uvBottomRight - uvTopLeft);
int2 deformIndexTopLeft =
{
min(floor(normalizedUv.x * (deformArrayWidth - 1)), deformArrayWidth - 1),
min(floor(normalizedUv.y * (deformArrayHeight - 1)), deformArrayHeight - 1)
};
int2 deformIndexBottomRight =
{
min(deformIndexTopLeft.x + 1, deformArrayWidth - 1),
min(deformIndexTopLeft.y + 1, deformArrayHeight - 1)
};
float2 deformTopLeft = deformArray[deformIndexTopLeft.x + deformIndexTopLeft.y * deformArrayWidth];
float2 deformTopRight = deformArray[deformIndexBottomRight.x + deformIndexTopLeft.y * deformArrayWidth];
float2 deformBottomLeft = deformArray[deformIndexTopLeft.x + deformIndexBottomRight.y * deformArrayWidth];
float2 deformBottomRight = deformArray[deformIndexBottomRight.x + deformIndexBottomRight.y * deformArrayWidth];
float divX = 1.0 / (deformArrayWidth - 1);
float divY = 1.0 / (deformArrayHeight - 1);
float2 vertexOffset =
{
lerp(
lerp(deformTopLeft, deformTopRight, (normalizedUv.x % divX) / divX),
lerp(deformBottomLeft, deformBottomRight, (normalizedUv.x % divX) / divX),
(normalizedUv.y % divY) / divY)
};
output.Position = mul(input.Position + float4(vertexOffset, 0, 0), xTransform);
output.Color = input.Color * tintColor;
output.TexCoords = input.TexCoords;
return output;
}
float4 mainPS(VertexShaderOutput input) : COLOR
{
return xTexture.Sample(TextureSampler, input.TexCoords) * input.Color;
}
technique DeformShader
{
pass Pass1
{
VertexShader = compile vs_4_0_level_9_1 mainVS();
PixelShader = compile ps_4_0_level_9_1 mainPS();
}
}
@@ -0,0 +1,84 @@
Texture2D xTexture;
sampler TextureSampler = sampler_state { Texture = <xTexture>; };
float4x4 xTransform;
static const int MaxDeformResolution = 15 * 15;
float2 deformArray[15 * 15];
int deformArrayWidth;
int deformArrayHeight;
float2 uvTopLeft;
float2 uvBottomRight;
float4 tintColor;
struct VertexShaderInput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0;
};
struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0;
};
VertexShaderOutput mainVS(in VertexShaderInput input)
{
VertexShaderOutput output = (VertexShaderOutput)0;
float2 normalizedUv = (input.TexCoords - uvTopLeft) / (uvBottomRight - uvTopLeft);
int2 deformIndexTopLeft =
{
min(floor(normalizedUv.x * (deformArrayWidth - 1)), deformArrayWidth - 1),
min(floor(normalizedUv.y * (deformArrayHeight - 1)), deformArrayHeight - 1)
};
int2 deformIndexBottomRight =
{
min(deformIndexTopLeft.x + 1, deformArrayWidth - 1),
min(deformIndexTopLeft.y + 1, deformArrayHeight - 1)
};
float2 deformTopLeft = deformArray[deformIndexTopLeft.x + deformIndexTopLeft.y * deformArrayWidth];
float2 deformTopRight = deformArray[deformIndexBottomRight.x + deformIndexTopLeft.y * deformArrayWidth];
float2 deformBottomLeft = deformArray[deformIndexTopLeft.x + deformIndexBottomRight.y * deformArrayWidth];
float2 deformBottomRight = deformArray[deformIndexBottomRight.x + deformIndexBottomRight.y * deformArrayWidth];
float divX = 1.0 / deformArrayWidth;
float divY = 1.0 / deformArrayHeight;
float2 vertexOffset =
{
lerp(
lerp(deformTopLeft, deformTopRight, (normalizedUv.x % divX) / divX),
lerp(deformBottomLeft, deformBottomRight, (normalizedUv.x % divX) / divX),
(normalizedUv.y % divY) / divY)
};
output.Position = mul(input.Position + float4(vertexOffset, 0, 0), xTransform);
output.Color = input.Color * tintColor;
output.TexCoords = input.TexCoords;
return output;
}
float4 mainPS(VertexShaderOutput input) : COLOR
{
return xTexture.Sample(TextureSampler, input.TexCoords) * input.Color;
}
technique DeformShader
{
pass Pass1
{
VertexShader = compile vs_3_0 mainVS();
PixelShader = compile ps_3_0 mainPS();
}
}
@@ -0,0 +1,30 @@
Texture2D xTexture;
sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; };
Texture2D xLosTexture;
sampler LosSampler = sampler_state { Texture = <xLosTexture>; };
float4 main(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 sampleColor = xTexture.Sample(TextureSampler, texCoord);
float4 losColor = xLosTexture.Sample(LosSampler, texCoord);
float obscureAmount = 1.0f - losColor.r;
float4 outColor = float4(
sampleColor.r * color.r,
sampleColor.g * color.g,
sampleColor.b * color.b,
obscureAmount);
return outColor;
}
technique LosShader
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 main();
}
}
@@ -0,0 +1,30 @@
Texture xTexture;
sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; };
Texture xLosTexture;
sampler LosSampler = sampler_state { Texture = <xLosTexture>; };
float4 main(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 sampleColor = tex2D(TextureSampler, texCoord);
float4 losColor = tex2D(LosSampler, texCoord);
float obscureAmount = 1.0f - losColor.r;
float4 outColor = float4(
sampleColor.r * color.r,
sampleColor.g * color.g,
sampleColor.b * color.b,
obscureAmount);
return outColor;
}
technique LosShader
{
pass Pass1
{
PixelShader = compile ps_2_0 main();
}
}
@@ -0,0 +1,228 @@
Texture2D xTexture;
sampler TextureSampler = sampler_state { Texture = <xTexture>; };
Texture2D xDistortTexture;
sampler DistortSampler =
sampler_state
{
Texture = <xDistortTexture>;
MagFilter = LINEAR;
MinFilter = LINEAR;
MipFilter = LINEAR;
AddressU = WRAP;
AddressV = WRAP;
};
float blurDistance;
float2 distortScale;
float2 distortUvOffset;
float3 chromaticAberrationStrength;
// Apply radial distortion to the given coordinate.
float2 radialDistortion(float2 coord, float distortion)
{
float2 cc = coord - 0.5;
float dist = dot(cc, cc) * distortion;
//return coord * (pos + cc * (1.0 + dist) * dist) / pos;
return coord + (dist * dist + dist) * cc;
}
/*float4 sampleWithChromaticAberration(float2 samplePos)
{
return float4(
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.r)).r,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.g)).g,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.b)).b,
1);
}*/
float3 sampleChannelsSeparately(float2 samplePosR, float2 samplePosG, float2 samplePosB)
{
return float3(
tex2D(TextureSampler, samplePosR).r,
tex2D(TextureSampler, samplePosG).g,
tex2D(TextureSampler, samplePosB).b);
}
float3 sampleWithChromaticAberration(float2 samplePos)
{
return float3(
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.r)).r,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.g)).g,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.b)).b);
}
float4 blur(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 sample;
sample = tex2D(TextureSampler, float2(texCoord.x + blurDistance, texCoord.y + blurDistance));
sample += tex2D(TextureSampler, float2(texCoord.x - blurDistance, texCoord.y - blurDistance));
sample += tex2D(TextureSampler, float2(texCoord.x + blurDistance, texCoord.y - blurDistance));
sample += tex2D(TextureSampler, float2(texCoord.x - blurDistance, texCoord.y + blurDistance));
sample = sample * 0.25f;
return sample;
}
float4 distort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
return tex2D(TextureSampler, samplePos);
}
float4 blurDistort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
float4 sample;
sample = tex2D(TextureSampler, float2(samplePos.x + blurDistance, samplePos.y + blurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - blurDistance, samplePos.y - blurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x + blurDistance, samplePos.y - blurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - blurDistance, samplePos.y + blurDistance));
sample = sample * 0.25f;
return sample;
}
float4 chromaticAberration(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
return float4(sampleWithChromaticAberration(texCoord), 1);
}
float4 chromaticAberrationDistort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
return float4(sampleWithChromaticAberration(samplePos), 1);
}
float4 blurChromaticAberration(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float2 samplePosR = radialDistortion(texCoord, chromaticAberrationStrength.r);
float2 samplePosG = radialDistortion(texCoord, chromaticAberrationStrength.g);
float2 samplePosB = radialDistortion(texCoord, chromaticAberrationStrength.b);
float2 blurTopLeft = -blurDistance;
float2 blurTopRight = float2(blurDistance, -blurDistance);
float2 blurBottomRight = blurDistance;
float2 blurBottomLeft = float2(-blurDistance, blurDistance);
float3 sample;
sample = sampleChannelsSeparately(samplePosR + blurTopLeft, samplePosG + blurTopLeft, samplePosB + blurTopLeft);
sample += sampleChannelsSeparately(samplePosR + blurTopRight, samplePosG + blurTopRight, samplePosB + blurTopRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomRight, samplePosG + blurBottomRight, samplePosB + blurBottomRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomLeft, samplePosG + blurBottomLeft, samplePosB + blurBottomLeft);
sample = sample * 0.25f;
return float4(sample, 1);
}
float4 blurChromaticAberrationDistort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
float2 samplePosR = radialDistortion(samplePos, chromaticAberrationStrength.r);
float2 samplePosG = radialDistortion(samplePos, chromaticAberrationStrength.g);
float2 samplePosB = radialDistortion(samplePos, chromaticAberrationStrength.b);
float2 blurTopLeft = -blurDistance;
float2 blurTopRight = float2(blurDistance, -blurDistance);
float2 blurBottomRight = blurDistance;
float2 blurBottomLeft = float2(-blurDistance, blurDistance);
float3 sample;
sample = sampleChannelsSeparately(samplePosR + blurTopLeft, samplePosG + blurTopLeft, samplePosB + blurTopLeft);
sample += sampleChannelsSeparately(samplePosR + blurTopRight, samplePosG + blurTopRight, samplePosB + blurTopRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomRight, samplePosG + blurBottomRight, samplePosB + blurBottomRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomLeft, samplePosG + blurBottomLeft, samplePosB + blurBottomLeft);
sample = sample * 0.25f;
return float4(sample, 1);
}
technique Distort
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 distort();
}
}
technique Blur
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 blur();
}
}
technique BlurDistort
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 blurDistort();
}
}
technique BlurChromaticAberration
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 blurChromaticAberration();
}
}
technique ChromaticAberration
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 chromaticAberration();
}
}
technique ChromaticAberrationDistort
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 chromaticAberrationDistort();
}
}
technique BlurChromaticAberrationDistort
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 blurChromaticAberrationDistort();
}
}
@@ -0,0 +1,228 @@
Texture2D xTexture;
sampler TextureSampler = sampler_state { Texture = <xTexture>; };
Texture2D xDistortTexture;
sampler DistortSampler =
sampler_state
{
Texture = <xDistortTexture>;
MagFilter = LINEAR;
MinFilter = LINEAR;
MipFilter = LINEAR;
AddressU = WRAP;
AddressV = WRAP;
};
float blurDistance;
float2 distortScale;
float2 distortUvOffset;
float3 chromaticAberrationStrength;
// Apply radial distortion to the given coordinate.
float2 radialDistortion(float2 coord, float distortion)
{
float2 cc = coord - 0.5;
float dist = dot(cc, cc) * distortion;
//return coord * (pos + cc * (1.0 + dist) * dist) / pos;
return coord + (dist * dist + dist) * cc;
}
/*float4 sampleWithChromaticAberration(float2 samplePos)
{
return float4(
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.r)).r,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.g)).g,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.b)).b,
1);
}*/
float3 sampleChannelsSeparately(float2 samplePosR, float2 samplePosG, float2 samplePosB)
{
return float3(
tex2D(TextureSampler, samplePosR).r,
tex2D(TextureSampler, samplePosG).g,
tex2D(TextureSampler, samplePosB).b);
}
float3 sampleWithChromaticAberration(float2 samplePos)
{
return float3(
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.r)).r,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.g)).g,
tex2D(TextureSampler, radialDistortion(samplePos, chromaticAberrationStrength.b)).b);
}
float4 blur(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 sample;
sample = tex2D(TextureSampler, float2(texCoord.x + blurDistance, texCoord.y + blurDistance));
sample += tex2D(TextureSampler, float2(texCoord.x - blurDistance, texCoord.y - blurDistance));
sample += tex2D(TextureSampler, float2(texCoord.x + blurDistance, texCoord.y - blurDistance));
sample += tex2D(TextureSampler, float2(texCoord.x - blurDistance, texCoord.y + blurDistance));
sample = sample * 0.25f;
return sample;
}
float4 distort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
return tex2D(TextureSampler, samplePos);
}
float4 blurDistort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
float4 sample;
sample = tex2D(TextureSampler, float2(samplePos.x + blurDistance, samplePos.y + blurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - blurDistance, samplePos.y - blurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x + blurDistance, samplePos.y - blurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - blurDistance, samplePos.y + blurDistance));
sample = sample * 0.25f;
return sample;
}
float4 chromaticAberration(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
return float4(sampleWithChromaticAberration(texCoord), 1);
}
float4 chromaticAberrationDistort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
return float4(sampleWithChromaticAberration(samplePos), 1);
}
float4 blurChromaticAberration(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float2 samplePosR = radialDistortion(texCoord, chromaticAberrationStrength.r);
float2 samplePosG = radialDistortion(texCoord, chromaticAberrationStrength.g);
float2 samplePosB = radialDistortion(texCoord, chromaticAberrationStrength.b);
float2 blurTopLeft = -blurDistance;
float2 blurTopRight = float2(blurDistance, -blurDistance);
float2 blurBottomRight = blurDistance;
float2 blurBottomLeft = float2(-blurDistance, blurDistance);
float3 sample;
sample = sampleChannelsSeparately(samplePosR + blurTopLeft, samplePosG + blurTopLeft, samplePosB + blurTopLeft);
sample += sampleChannelsSeparately(samplePosR + blurTopRight, samplePosG + blurTopRight, samplePosB + blurTopRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomRight, samplePosG + blurBottomRight, samplePosB + blurBottomRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomLeft, samplePosG + blurBottomLeft, samplePosB + blurBottomLeft);
sample = sample * 0.25f;
return float4(sample, 1);
}
float4 blurChromaticAberrationDistort(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(DistortSampler, texCoord + distortUvOffset);
bumpColor = (bumpColor + tex2D(DistortSampler, texCoord - distortUvOffset * 2.0f)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * distortScale.x;
samplePos.y += (bumpColor.g - 0.5f) * distortScale.y;
float2 samplePosR = radialDistortion(samplePos, chromaticAberrationStrength.r);
float2 samplePosG = radialDistortion(samplePos, chromaticAberrationStrength.g);
float2 samplePosB = radialDistortion(samplePos, chromaticAberrationStrength.b);
float2 blurTopLeft = -blurDistance;
float2 blurTopRight = float2(blurDistance, -blurDistance);
float2 blurBottomRight = blurDistance;
float2 blurBottomLeft = float2(-blurDistance, blurDistance);
float3 sample;
sample = sampleChannelsSeparately(samplePosR + blurTopLeft, samplePosG + blurTopLeft, samplePosB + blurTopLeft);
sample += sampleChannelsSeparately(samplePosR + blurTopRight, samplePosG + blurTopRight, samplePosB + blurTopRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomRight, samplePosG + blurBottomRight, samplePosB + blurBottomRight);
sample += sampleChannelsSeparately(samplePosR + blurBottomLeft, samplePosG + blurBottomLeft, samplePosB + blurBottomLeft);
sample = sample * 0.25f;
return float4(sample, 1);
}
technique Distort
{
pass Pass1
{
PixelShader = compile ps_3_0 distort();
}
}
technique Blur
{
pass Pass1
{
PixelShader = compile ps_3_0 blur();
}
}
technique BlurDistort
{
pass Pass1
{
PixelShader = compile ps_3_0 blurDistort();
}
}
technique BlurChromaticAberration
{
pass Pass1
{
PixelShader = compile ps_3_0 blurChromaticAberration();
}
}
technique ChromaticAberration
{
pass Pass1
{
PixelShader = compile ps_3_0 chromaticAberration();
}
}
technique ChromaticAberrationDistort
{
pass Pass1
{
PixelShader = compile ps_3_0 chromaticAberrationDistort();
}
}
technique BlurChromaticAberrationDistort
{
pass Pass1
{
PixelShader = compile ps_3_0 blurChromaticAberrationDistort();
}
}
@@ -0,0 +1,143 @@
float xBlurDistance;
Texture2D xWaterBumpMap;
sampler WaterBumpSampler =
sampler_state
{
Texture = <xWaterBumpMap>;
MagFilter = LINEAR;
MinFilter = LINEAR;
MipFilter = LINEAR;
AddressU = WRAP;
AddressV = WRAP;
};
Texture2D xTexture;
sampler TextureSampler = sampler_state { Texture = <xTexture>; };
float4x4 xTransform;
float4x4 xUvTransform;
struct VertexShaderInput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0; // added
};
struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0; // added
};
float xWaveWidth;
float xWaveHeight;
float2 xBumpPos;
float2 xBumpScale;
float2 xUvOffset;
float4 waterColor;
VertexShaderOutput mainVS(in VertexShaderInput input)
{
VertexShaderOutput output = (VertexShaderOutput)0;
output.Position = mul(input.Position, xTransform);
output.Color = input.Color;
output.TexCoords = mul(input.Position, xUvTransform).xy;
return output;
}
float4 mainPS(VertexShaderOutput input) : COLOR
{
float4 bumpColor = xWaterBumpMap.Sample(WaterBumpSampler, xUvOffset + (input.TexCoords+xBumpPos) * xBumpScale);
bumpColor = (bumpColor + xWaterBumpMap.Sample(WaterBumpSampler, xUvOffset + (input.TexCoords-xBumpPos*2) * xBumpScale)) * 0.5f;
float2 samplePos = input.TexCoords;
samplePos.x += (bumpColor.r - 0.5f) * xWaveWidth * input.Color.r;
samplePos.y += (bumpColor.g - 0.5f) * xWaveHeight * input.Color.g;
float4 sample = xTexture.Sample(TextureSampler, samplePos);
sample.a = input.Color.a;
sample = lerp(sample, sample * waterColor, input.Color.b);
return sample;
}
float4 mainPSBlurred(VertexShaderOutput input) : COLOR
{
float4 bumpColor = xWaterBumpMap.Sample(WaterBumpSampler, xUvOffset + (input.TexCoords + xBumpPos) * xBumpScale);
bumpColor = (bumpColor + xWaterBumpMap.Sample(WaterBumpSampler, xUvOffset + (input.TexCoords - xBumpPos * 2) * xBumpScale)) * 0.5f;
float2 samplePos = input.TexCoords;
samplePos.x += (bumpColor.r - 0.5f) * xWaveWidth * input.Color.r;
samplePos.y += (bumpColor.g - 0.5f) * xWaveHeight * input.Color.g;
float4 sample;
sample = xTexture.Sample(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y + xBlurDistance));
sample += xTexture.Sample(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y - xBlurDistance));
sample += xTexture.Sample(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y - xBlurDistance));
sample += xTexture.Sample(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y + xBlurDistance));
sample = sample * 0.25;
sample.a = input.Color.a;
sample = lerp(sample, sample * waterColor, input.Color.b);
return sample;
}
float4 mainPostProcess(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(WaterBumpSampler, texCoord + xUvOffset + xBumpPos);
bumpColor = (bumpColor + tex2D(WaterBumpSampler, texCoord - xUvOffset * 2.0f + xBumpPos)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * xWaveWidth;
samplePos.y += (bumpColor.g - 0.5f) * xWaveHeight;
float4 sample;
sample = tex2D(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y + xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y - xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y - xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y + xBlurDistance));
sample = sample * 0.25;
return sample;
}
technique WaterShader
{
pass Pass1
{
VertexShader = compile vs_4_0_level_9_1 mainVS();
PixelShader = compile ps_4_0_level_9_1 mainPS();
}
}
technique WaterShaderBlurred
{
pass Pass1
{
VertexShader = compile vs_4_0_level_9_1 mainVS();
PixelShader = compile ps_4_0_level_9_1 mainPSBlurred();
}
}
technique WaterShaderPostProcess
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 mainPostProcess();
}
}
@@ -0,0 +1,150 @@
float xBlurDistance;
Texture xWaterBumpMap;
sampler WaterBumpSampler =
sampler_state
{
Texture = <xWaterBumpMap>;
MagFilter = LINEAR;
MinFilter = LINEAR;
MipFilter = LINEAR;
AddressU = WRAP;
AddressV = WRAP;
};
Texture xTexture;
sampler TextureSampler = sampler_state { Texture = <xTexture>; };
float4x4 xTransform;
float4x4 xUvTransform;
struct VertexShaderInput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0; // added
};
struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TexCoords: TEXCOORD0; // added
};
float xWaveWidth;
float xWaveHeight;
float2 xBumpPos;
float2 xBumpScale;
float2 xUvOffset;
float4 waterColor;
VertexShaderOutput mainVS(in VertexShaderInput input)
{
VertexShaderOutput output = (VertexShaderOutput)0;
output.Position = mul(input.Position, xTransform);
output.Color = input.Color;
float4 texCoords = mul(input.Position, xUvTransform);
float2 texCoords2D = texCoords.xy;
//This is to stop the HLSL compiler from optimizing xUvTransform since that crashes MonoGame
//Seems to be a known bug, see https://github.com/MonoGame/MonoGame/issues/5628
//We should probably send this to them so they have more to work with
texCoords2D.x += floor(texCoords.w*0.001);
//--------
output.TexCoords = texCoords2D;
return output;
}
float4 mainPS(VertexShaderOutput input) : COLOR
{
float4 bumpColor = tex2D(WaterBumpSampler, xUvOffset + (input.TexCoords+xBumpPos) * xBumpScale);
bumpColor = (bumpColor + tex2D(WaterBumpSampler, xUvOffset + (input.TexCoords-xBumpPos*2) * xBumpScale)) * 0.5f;
float2 samplePos = input.TexCoords;
samplePos.x += (bumpColor.r - 0.5f) * xWaveWidth * input.Color.r;
samplePos.y += (bumpColor.g - 0.5f) * xWaveHeight * input.Color.g;
float4 sample = tex2D(TextureSampler, samplePos);
sample.a = input.Color.a;
sample = lerp(sample, sample * waterColor, input.Color.b);
return sample;
}
float4 mainPSBlurred(VertexShaderOutput input) : COLOR
{
float4 bumpColor = tex2D(WaterBumpSampler, xUvOffset + (input.TexCoords + xBumpPos) * xBumpScale);
bumpColor = (bumpColor + tex2D(WaterBumpSampler, xUvOffset + (input.TexCoords - xBumpPos * 2) * xBumpScale)) * 0.5f;
float2 samplePos = input.TexCoords;
samplePos.x += (bumpColor.r - 0.5f) * xWaveWidth * input.Color.r;
samplePos.y += (bumpColor.g - 0.5f) * xWaveHeight * input.Color.g;
float4 sample;
sample = tex2D(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y + xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y - xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y - xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y + xBlurDistance));
sample = sample * 0.25;
sample.a = input.Color.a;
sample = lerp(sample, sample * waterColor, input.Color.b);
return sample;
}
float4 mainPostProcess(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 bumpColor = tex2D(WaterBumpSampler, texCoord + xUvOffset + xBumpPos);
bumpColor = (bumpColor + tex2D(WaterBumpSampler, texCoord - xUvOffset * 2.0f + xBumpPos)) * 0.5f;
float2 samplePos = texCoord;
samplePos.x += (bumpColor.r - 0.5f) * xWaveWidth;
samplePos.y += (bumpColor.g - 0.5f) * xWaveHeight;
float4 sample;
sample = tex2D(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y + xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y - xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x + xBlurDistance, samplePos.y - xBlurDistance));
sample += tex2D(TextureSampler, float2(samplePos.x - xBlurDistance, samplePos.y + xBlurDistance));
sample = sample * 0.25;
return sample;
}
technique WaterShader
{
pass Pass1
{
VertexShader = compile vs_3_0 mainVS();
PixelShader = compile ps_3_0 mainPS();
}
}
technique WaterShaderBlurred
{
pass Pass1
{
VertexShader = compile vs_3_0 mainVS();
PixelShader = compile ps_3_0 mainPSBlurred();
}
}
technique WaterShaderPostProcess
{
pass Pass1
{
PixelShader = compile ps_3_0 mainPostProcess();
}
}
@@ -0,0 +1,203 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">ReleaseLinux</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D7F9FDD3-AF03-46AD-A2C2-F590899712B7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Barotrauma</RootNamespace>
<AssemblyName>Barotrauma</AssemblyName>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<ReleaseVersion>0.9.0.0</ReleaseVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseLinux|x64' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\ReleaseLinux\</OutputPath>
<DefineConstants>TRACE;LINUX;CLIENT</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugLinux|x64' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\DebugLinux\</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX;CLIENT</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Concentus, Version=1.1.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\Concentus.1.1.7\lib\portable-net45+win+wpa81+wp80\Concentus.dll</HintPath>
</Reference>
<Reference Include="GameAnalytics.Mono, Version=1.0.6710.29255, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
</Reference>
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\NLog.4.3.8\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="nVLC, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\nVLC.3.0.0\lib\net40\nVLC.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Content Include="MonoGame.Framework.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="OpenTK.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SharpFont.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Libraries\Facepunch.Steamworks\Facepunch.Steamworks.csproj">
<Project>{3af0347c-5a9b-4421-868c-8ee3dbfaebc6}</Project>
<Name>Facepunch.Steamworks</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Farseer Physics Engine 3.5\Farseer Physics MonoGame DesktopGL.csproj">
<Project>{0aad36e3-51a5-4a07-ab60-5c8a66bd38b7}</Project>
<Name>Farseer Physics MonoGame DesktopGL</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Hyper.ComponentModel\Hyper.ComponentModel.csproj">
<Project>{3b8f9edb-6e5e-450c-abc2-ec49075d0b50}</Project>
<Name>Hyper.ComponentModel</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Lidgren.Network\Lidgren.Network.csproj">
<Project>{49ba1c69-6104-41ac-a5d8-b54fa9f696e8}</Project>
<Name>Lidgren.Network</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\SharpFont\Source\SharpFont\SharpFont.csproj">
<Project>{c293db32-fa42-486d-b128-5a12522fae4e}</Project>
<Name>SharpFont</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Content\Effects\blurshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\damageshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\deformshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\losshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\postprocess_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\watershader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="libopenal.so.1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="libsteam_api64.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="ClientCode.projitems" Label="Shared" />
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets'))" />
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets'))" />
</Target>
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,203 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">ReleaseMac</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CC996BB6-3781-4868-B996-07F9CDC936ED}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Barotrauma</RootNamespace>
<AssemblyName>Barotrauma</AssemblyName>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<ReleaseVersion>0.9.0.0</ReleaseVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseMac|x64' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\ReleaseMac\</OutputPath>
<DefineConstants>TRACE;OSX;CLIENT</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugMac|x64' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\DebugMac\</OutputPath>
<DefineConstants>TRACE;DEBUG;OSX;CLIENT</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Concentus, Version=1.1.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\Concentus.1.1.7\lib\portable-net45+win+wpa81+wp80\Concentus.dll</HintPath>
</Reference>
<Reference Include="GameAnalytics.Mono, Version=1.0.6710.29255, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
</Reference>
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\NLog.4.3.8\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="nVLC, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\nVLC.3.0.0\lib\net40\nVLC.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Content Include="MonoGame.Framework.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="OpenTK.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SharpFont.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Libraries\Facepunch.Steamworks\Facepunch.Steamworks.csproj">
<Project>{3af0347c-5a9b-4421-868c-8ee3dbfaebc6}</Project>
<Name>Facepunch.Steamworks</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Farseer Physics Engine 3.5\Farseer Physics MonoGame DesktopGL.csproj">
<Project>{0aad36e3-51a5-4a07-ab60-5c8a66bd38b7}</Project>
<Name>Farseer Physics MonoGame DesktopGL</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Hyper.ComponentModel\Hyper.ComponentModel.csproj">
<Project>{3b8f9edb-6e5e-450c-abc2-ec49075d0b50}</Project>
<Name>Hyper.ComponentModel</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Lidgren.Network\Lidgren.Network.csproj">
<Project>{49ba1c69-6104-41ac-a5d8-b54fa9f696e8}</Project>
<Name>Lidgren.Network</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\SharpFont\Source\SharpFont\SharpFont.csproj">
<Project>{c293db32-fa42-486d-b128-5a12522fae4e}</Project>
<Name>SharpFont</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Content\Effects\blurshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\damageshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\deformshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\losshader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\postprocess_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\watershader_opengl.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="libsteam_api.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="libvlc.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="ClientCode.projitems" Label="Shared" />
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets'))" />
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets'))" />
</Target>
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -26,6 +26,8 @@ namespace Barotrauma
}
}
#if FALSE
//TODO: fix
public void Save()
{
XDocument doc = XMLExtensions.TryLoadXml(filePath);
@@ -44,5 +46,6 @@ namespace Barotrauma
writer.Flush();
}
}
#endif
}
}
@@ -119,7 +119,8 @@ namespace Barotrauma
switch (subElement.Name.ToString().ToLowerInvariant())
{
case "sound":
sounds.Add(new CharacterSound(subElement));
var characterSound = new CharacterSound(subElement);
if (characterSound.Sound != null) { sounds.Add(characterSound); }
break;
case "damageemitter":
damageEmitters.Add(new ParticleEmitter(subElement));
@@ -25,7 +25,7 @@ namespace Barotrauma
}
public Sound Sound
{
get { return roundSound.Sound; }
get { return roundSound?.Sound; }
}
public readonly Gender Gender;
@@ -2514,6 +2514,555 @@ namespace Barotrauma
TextManager.WriteToCSV();
NPCConversation.WriteToCSV();
}));
#endif
commands.Add(new Command("cleanbuild", "", (string[] args) =>
{
GameMain.Config.MusicVolume = 0.5f;
GameMain.Config.SoundVolume = 0.5f;
NewMessage("Music and sound volume set to 0.5", Color.Green);
commands.Add(new Command("camerasettings", "camerasettings [defaultzoom] [zoomsmoothness] [movesmoothness] [minzoom] [maxzoom]: debug command for testing camera settings. The values default to 1.1, 8.0, 8.0, 0.1 and 2.0.", (string[] args) =>
{
float defaultZoom = Screen.Selected.Cam.DefaultZoom;
if (args.Length > 0) float.TryParse(args[0], NumberStyles.Number, CultureInfo.InvariantCulture, out defaultZoom);
float zoomSmoothness = Screen.Selected.Cam.ZoomSmoothness;
if (args.Length > 1) float.TryParse(args[1], NumberStyles.Number, CultureInfo.InvariantCulture, out zoomSmoothness);
float moveSmoothness = Screen.Selected.Cam.MoveSmoothness;
if (args.Length > 2) float.TryParse(args[2], NumberStyles.Number, CultureInfo.InvariantCulture, out moveSmoothness);
float minZoom = Screen.Selected.Cam.MinZoom;
if (args.Length > 3) float.TryParse(args[3], NumberStyles.Number, CultureInfo.InvariantCulture, out minZoom);
float maxZoom = Screen.Selected.Cam.MaxZoom;
if (args.Length > 4) float.TryParse(args[4], NumberStyles.Number, CultureInfo.InvariantCulture, out maxZoom);
Screen.Selected.Cam.DefaultZoom = defaultZoom;
Screen.Selected.Cam.ZoomSmoothness = zoomSmoothness;
Screen.Selected.Cam.MoveSmoothness = moveSmoothness;
Screen.Selected.Cam.MinZoom = minZoom;
Screen.Selected.Cam.MaxZoom = maxZoom;
}));
commands.Add(new Command("waterparams", "waterparams [distortionscalex] [distortionscaley] [distortionstrengthx] [distortionstrengthy] [bluramount]: default 0.5 0.5 0.5 0.5 1", (string[] args) =>
{
float distortScaleX = 0.5f, distortScaleY = 0.5f;
float distortStrengthX = 0.5f, distortStrengthY = 0.5f;
float blurAmount = 0.0f;
if (args.Length > 0) float.TryParse(args[0], NumberStyles.Number, CultureInfo.InvariantCulture, out distortScaleX);
if (args.Length > 1) float.TryParse(args[1], NumberStyles.Number, CultureInfo.InvariantCulture, out distortScaleY);
if (args.Length > 2) float.TryParse(args[2], NumberStyles.Number, CultureInfo.InvariantCulture, out distortStrengthX);
if (args.Length > 3) float.TryParse(args[3], NumberStyles.Number, CultureInfo.InvariantCulture, out distortStrengthY);
if (args.Length > 4) float.TryParse(args[4], NumberStyles.Number, CultureInfo.InvariantCulture, out blurAmount);
WaterRenderer.DistortionScale = new Vector2(distortScaleX, distortScaleY);
WaterRenderer.DistortionStrength = new Vector2(distortStrengthX, distortStrengthY);
WaterRenderer.BlurAmount = blurAmount;
}));
commands.Add(new Command("refreshrect", "Updates the dimensions of the selected items to match the ones defined in the prefab. Applied only in the subeditor.", (string[] args) =>
{
//TODO: maybe do this automatically during loading when possible?
if (Screen.Selected == GameMain.SubEditorScreen)
{
if (!MapEntity.SelectedAny)
{
ThrowError("You have to select item(s) first!");
}
else
{
foreach (var mapEntity in MapEntity.SelectedList)
{
if (mapEntity is Item item)
{
item.Rect = new Rectangle(item.Rect.X, item.Rect.Y,
(int)(item.Prefab.sprite.size.X * item.Prefab.Scale),
(int)(item.Prefab.sprite.size.Y * item.Prefab.Scale));
}
else if (mapEntity is Structure structure)
{
if (!structure.ResizeHorizontal)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
(int)structure.Prefab.ScaledSize.X,
structure.Rect.Height);
}
if (!structure.ResizeVertical)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
structure.Rect.Width,
(int)structure.Prefab.ScaledSize.Y);
}
}
}
}
}
}, isCheat: false));
#endif
GameMain.Config.SaveNewPlayerConfig();
commands.Add(new Command("loadtexts", "loadtexts [sourcefile] [destinationfile]: Loads all lines of text from a given .txt file and inserts them sequientially into the elements of an xml file. If the file paths are omitted, EnglishVanilla.txt and EnglishVanilla.xml are used.", (string[] args) =>
{
string sourcePath = args.Length > 0 ? args[0] : "Content/Texts/EnglishVanilla.txt";
string destinationPath = args.Length > 1 ? args[1] : "Content/Texts/EnglishVanilla.xml";
string[] lines;
try
{
lines = File.ReadAllLines(sourcePath);
}
catch (Exception e)
{
ThrowError("Reading the file \"" + sourcePath + "\" failed.", e);
return;
}
var doc = XMLExtensions.TryLoadXml(destinationPath);
int i = 0;
foreach (XElement element in doc.Root.Elements())
{
if (i >= lines.Length)
{
ThrowError("Error while loading texts to the xml file. The xml has more elements than the number of lines in the text file.");
return;
}
element.Value = lines[i];
i++;
}
doc.Save(destinationPath);
},
() =>
{
var files = TextManager.GetTextFiles().Select(f => f.Replace("\\", "/"));
return new string[][]
{
files.Where(f => Path.GetExtension(f)==".txt").ToArray(),
files.Where(f => Path.GetExtension(f)==".xml").ToArray()
};
}));
commands.Add(new Command("updatetextfile", "updatetextfile [sourcefile] [destinationfile]: Inserts all the xml elements that are only present in the source file into the destination file. Can be used to update outdated translation files more easily.", (string[] args) =>
{
if (args.Length < 2) return;
string sourcePath = args[0];
string destinationPath = args[1];
var sourceDoc = XMLExtensions.TryLoadXml(sourcePath);
var destinationDoc = XMLExtensions.TryLoadXml(destinationPath);
XElement destinationElement = destinationDoc.Root.Elements().First();
foreach (XElement element in sourceDoc.Root.Elements())
{
if (destinationDoc.Root.Element(element.Name) == null)
{
element.Value = "!!!!!!!!!!!!!" + element.Value;
destinationElement.AddAfterSelf(element);
}
XNode nextNode = destinationElement.NextNode;
while ((!(nextNode is XElement) || nextNode == element) && nextNode != null) nextNode = nextNode.NextNode;
destinationElement = nextNode as XElement;
}
destinationDoc.Save(destinationPath);
},
() =>
{
var files = TextManager.GetTextFiles().Where(f => Path.GetExtension(f) == ".xml").Select(f => f.Replace("\\", "/")).ToArray();
return new string[][]
{
files,
files
};
}));
commands.Add(new Command("dumpentitytexts", "dumpentitytexts [filepath]: gets the names and descriptions of all entity prefabs and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EntityTexts.txt", (string[] args) =>
{
string filePath = args.Length > 0 ? args[0] : "Content/Texts/EntityTexts.txt";
List<string> lines = new List<string>();
foreach (MapEntityPrefab me in MapEntityPrefab.List)
{
lines.Add("<EntityName." + me.Identifier + ">" + me.Name + "</" + me.Identifier + ".Name>");
lines.Add("<EntityDescription." + me.Identifier + ">" + me.Description + "</" + me.Identifier + ".Description>");
}
File.WriteAllLines(filePath, lines);
}));
#if DEBUG
commands.Add(new Command("checkduplicates", "Checks the given language for duplicate translation keys and writes to file.", (string[] args) =>
{
if (args.Length != 1) return;
TextManager.CheckForDuplicates(args[0]);
}));
commands.Add(new Command("writetocsv", "Writes the default language (English) to a .csv file.", (string[] args) =>
{
TextManager.WriteToCSV();
NPCConversation.WriteToCSV();
}));
#endif
commands.Add(new Command("cleanbuild", "", (string[] args) =>
{
GameMain.Config.MusicVolume = 0.5f;
GameMain.Config.SoundVolume = 0.5f;
NewMessage("Music and sound volume set to 0.5", Color.Green);
commands.Add(new Command("camerasettings", "camerasettings [defaultzoom] [zoomsmoothness] [movesmoothness] [minzoom] [maxzoom]: debug command for testing camera settings. The values default to 1.1, 8.0, 8.0, 0.1 and 2.0.", (string[] args) =>
{
float defaultZoom = Screen.Selected.Cam.DefaultZoom;
if (args.Length > 0) float.TryParse(args[0], NumberStyles.Number, CultureInfo.InvariantCulture, out defaultZoom);
float zoomSmoothness = Screen.Selected.Cam.ZoomSmoothness;
if (args.Length > 1) float.TryParse(args[1], NumberStyles.Number, CultureInfo.InvariantCulture, out zoomSmoothness);
float moveSmoothness = Screen.Selected.Cam.MoveSmoothness;
if (args.Length > 2) float.TryParse(args[2], NumberStyles.Number, CultureInfo.InvariantCulture, out moveSmoothness);
float minZoom = Screen.Selected.Cam.MinZoom;
if (args.Length > 3) float.TryParse(args[3], NumberStyles.Number, CultureInfo.InvariantCulture, out minZoom);
float maxZoom = Screen.Selected.Cam.MaxZoom;
if (args.Length > 4) float.TryParse(args[4], NumberStyles.Number, CultureInfo.InvariantCulture, out maxZoom);
Screen.Selected.Cam.DefaultZoom = defaultZoom;
Screen.Selected.Cam.ZoomSmoothness = zoomSmoothness;
Screen.Selected.Cam.MoveSmoothness = moveSmoothness;
Screen.Selected.Cam.MinZoom = minZoom;
Screen.Selected.Cam.MaxZoom = maxZoom;
}));
commands.Add(new Command("waterparams", "waterparams [distortionscalex] [distortionscaley] [distortionstrengthx] [distortionstrengthy] [bluramount]: default 0.5 0.5 0.5 0.5 1", (string[] args) =>
{
float distortScaleX = 0.5f, distortScaleY = 0.5f;
float distortStrengthX = 0.5f, distortStrengthY = 0.5f;
float blurAmount = 0.0f;
if (args.Length > 0) float.TryParse(args[0], NumberStyles.Number, CultureInfo.InvariantCulture, out distortScaleX);
if (args.Length > 1) float.TryParse(args[1], NumberStyles.Number, CultureInfo.InvariantCulture, out distortScaleY);
if (args.Length > 2) float.TryParse(args[2], NumberStyles.Number, CultureInfo.InvariantCulture, out distortStrengthX);
if (args.Length > 3) float.TryParse(args[3], NumberStyles.Number, CultureInfo.InvariantCulture, out distortStrengthY);
if (args.Length > 4) float.TryParse(args[4], NumberStyles.Number, CultureInfo.InvariantCulture, out blurAmount);
WaterRenderer.DistortionScale = new Vector2(distortScaleX, distortScaleY);
WaterRenderer.DistortionStrength = new Vector2(distortStrengthX, distortStrengthY);
WaterRenderer.BlurAmount = blurAmount;
}));
commands.Add(new Command("refreshrect", "Updates the dimensions of the selected items to match the ones defined in the prefab. Applied only in the subeditor.", (string[] args) =>
{
//TODO: maybe do this automatically during loading when possible?
if (Screen.Selected == GameMain.SubEditorScreen)
{
if (!MapEntity.SelectedAny)
{
ThrowError("You have to select item(s) first!");
}
else
{
foreach (var mapEntity in MapEntity.SelectedList)
{
if (mapEntity is Item item)
{
item.Rect = new Rectangle(item.Rect.X, item.Rect.Y,
(int)(item.Prefab.sprite.size.X * item.Prefab.Scale),
(int)(item.Prefab.sprite.size.Y * item.Prefab.Scale));
}
else if (mapEntity is Structure structure)
{
if (!structure.ResizeHorizontal)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
(int)structure.Prefab.ScaledSize.X,
structure.Rect.Height);
}
if (!structure.ResizeVertical)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
structure.Rect.Width,
(int)structure.Prefab.ScaledSize.Y);
}
}
}
}
}
}, isCheat: false));
#endif
GameMain.Config.SaveNewPlayerConfig();
commands.Add(new Command("loadtexts", "loadtexts [sourcefile] [destinationfile]: Loads all lines of text from a given .txt file and inserts them sequientially into the elements of an xml file. If the file paths are omitted, EnglishVanilla.txt and EnglishVanilla.xml are used.", (string[] args) =>
{
string sourcePath = args.Length > 0 ? args[0] : "Content/Texts/EnglishVanilla.txt";
string destinationPath = args.Length > 1 ? args[1] : "Content/Texts/EnglishVanilla.xml";
string[] lines;
try
{
lines = File.ReadAllLines(sourcePath);
}
catch (Exception e)
{
ThrowError("Reading the file \"" + sourcePath + "\" failed.", e);
return;
}
var doc = XMLExtensions.TryLoadXml(destinationPath);
int i = 0;
foreach (XElement element in doc.Root.Elements())
{
if (i >= lines.Length)
{
ThrowError("Error while loading texts to the xml file. The xml has more elements than the number of lines in the text file.");
return;
}
element.Value = lines[i];
i++;
}
doc.Save(destinationPath);
},
() =>
{
var files = TextManager.GetTextFiles().Select(f => f.Replace("\\", "/"));
return new string[][]
{
files.Where(f => Path.GetExtension(f)==".txt").ToArray(),
files.Where(f => Path.GetExtension(f)==".xml").ToArray()
};
}));
commands.Add(new Command("updatetextfile", "updatetextfile [sourcefile] [destinationfile]: Inserts all the xml elements that are only present in the source file into the destination file. Can be used to update outdated translation files more easily.", (string[] args) =>
{
if (args.Length < 2) return;
string sourcePath = args[0];
string destinationPath = args[1];
var sourceDoc = XMLExtensions.TryLoadXml(sourcePath);
var destinationDoc = XMLExtensions.TryLoadXml(destinationPath);
XElement destinationElement = destinationDoc.Root.Elements().First();
foreach (XElement element in sourceDoc.Root.Elements())
{
if (destinationDoc.Root.Element(element.Name) == null)
{
element.Value = "!!!!!!!!!!!!!" + element.Value;
destinationElement.AddAfterSelf(element);
}
XNode nextNode = destinationElement.NextNode;
while ((!(nextNode is XElement) || nextNode == element) && nextNode != null) nextNode = nextNode.NextNode;
destinationElement = nextNode as XElement;
}
destinationDoc.Save(destinationPath);
},
() =>
{
var files = TextManager.GetTextFiles().Where(f => Path.GetExtension(f) == ".xml").Select(f => f.Replace("\\", "/")).ToArray();
return new string[][]
{
files,
files
};
}));
commands.Add(new Command("dumpentitytexts", "dumpentitytexts [filepath]: gets the names and descriptions of all entity prefabs and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EntityTexts.txt", (string[] args) =>
{
string filePath = args.Length > 0 ? args[0] : "Content/Texts/EntityTexts.txt";
List<string> lines = new List<string>();
foreach (MapEntityPrefab me in MapEntityPrefab.List)
{
lines.Add("<EntityName." + me.Identifier + ">" + me.Name + "</" + me.Identifier + ".Name>");
lines.Add("<EntityDescription." + me.Identifier + ">" + me.Description + "</" + me.Identifier + ".Description>");
}
File.WriteAllLines(filePath, lines);
}));
#if DEBUG
commands.Add(new Command("checkduplicates", "Checks the given language for duplicate translation keys and writes to file.", (string[] args) =>
{
if (args.Length != 1) return;
TextManager.CheckForDuplicates(args[0]);
}));
commands.Add(new Command("writetocsv", "Writes the default language (English) to a .csv file.", (string[] args) =>
{
TextManager.WriteToCSV();
NPCConversation.WriteToCSV();
}));
#endif
commands.Add(new Command("cleanbuild", "", (string[] args) =>
{
GameMain.Config.MusicVolume = 0.5f;
GameMain.Config.SoundVolume = 0.5f;
NewMessage("Music and sound volume set to 0.5", Color.Green);
commands.Add(new Command("camerasettings", "camerasettings [defaultzoom] [zoomsmoothness] [movesmoothness] [minzoom] [maxzoom]: debug command for testing camera settings. The values default to 1.1, 8.0, 8.0, 0.1 and 2.0.", (string[] args) =>
{
float defaultZoom = Screen.Selected.Cam.DefaultZoom;
if (args.Length > 0) float.TryParse(args[0], NumberStyles.Number, CultureInfo.InvariantCulture, out defaultZoom);
float zoomSmoothness = Screen.Selected.Cam.ZoomSmoothness;
if (args.Length > 1) float.TryParse(args[1], NumberStyles.Number, CultureInfo.InvariantCulture, out zoomSmoothness);
float moveSmoothness = Screen.Selected.Cam.MoveSmoothness;
if (args.Length > 2) float.TryParse(args[2], NumberStyles.Number, CultureInfo.InvariantCulture, out moveSmoothness);
float minZoom = Screen.Selected.Cam.MinZoom;
if (args.Length > 3) float.TryParse(args[3], NumberStyles.Number, CultureInfo.InvariantCulture, out minZoom);
float maxZoom = Screen.Selected.Cam.MaxZoom;
if (args.Length > 4) float.TryParse(args[4], NumberStyles.Number, CultureInfo.InvariantCulture, out maxZoom);
Screen.Selected.Cam.DefaultZoom = defaultZoom;
Screen.Selected.Cam.ZoomSmoothness = zoomSmoothness;
Screen.Selected.Cam.MoveSmoothness = moveSmoothness;
Screen.Selected.Cam.MinZoom = minZoom;
Screen.Selected.Cam.MaxZoom = maxZoom;
}));
commands.Add(new Command("waterparams", "waterparams [distortionscalex] [distortionscaley] [distortionstrengthx] [distortionstrengthy] [bluramount]: default 0.5 0.5 0.5 0.5 1", (string[] args) =>
{
float distortScaleX = 0.5f, distortScaleY = 0.5f;
float distortStrengthX = 0.5f, distortStrengthY = 0.5f;
float blurAmount = 0.0f;
if (args.Length > 0) float.TryParse(args[0], NumberStyles.Number, CultureInfo.InvariantCulture, out distortScaleX);
if (args.Length > 1) float.TryParse(args[1], NumberStyles.Number, CultureInfo.InvariantCulture, out distortScaleY);
if (args.Length > 2) float.TryParse(args[2], NumberStyles.Number, CultureInfo.InvariantCulture, out distortStrengthX);
if (args.Length > 3) float.TryParse(args[3], NumberStyles.Number, CultureInfo.InvariantCulture, out distortStrengthY);
if (args.Length > 4) float.TryParse(args[4], NumberStyles.Number, CultureInfo.InvariantCulture, out blurAmount);
WaterRenderer.DistortionScale = new Vector2(distortScaleX, distortScaleY);
WaterRenderer.DistortionStrength = new Vector2(distortStrengthX, distortStrengthY);
WaterRenderer.BlurAmount = blurAmount;
}));
commands.Add(new Command("refreshrect", "Updates the dimensions of the selected items to match the ones defined in the prefab. Applied only in the subeditor.", (string[] args) =>
{
//TODO: maybe do this automatically during loading when possible?
if (Screen.Selected == GameMain.SubEditorScreen)
{
if (!MapEntity.SelectedAny)
{
ThrowError("You have to select item(s) first!");
}
else
{
foreach (var mapEntity in MapEntity.SelectedList)
{
if (mapEntity is Item item)
{
item.Rect = new Rectangle(item.Rect.X, item.Rect.Y,
(int)(item.Prefab.sprite.size.X * item.Prefab.Scale),
(int)(item.Prefab.sprite.size.Y * item.Prefab.Scale));
}
else if (mapEntity is Structure structure)
{
if (!structure.ResizeHorizontal)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
(int)structure.Prefab.ScaledSize.X,
structure.Rect.Height);
}
if (!structure.ResizeVertical)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
structure.Rect.Width,
(int)structure.Prefab.ScaledSize.Y);
}
}
}
}
}
}, isCheat: false));
#endif
GameMain.Config.SaveNewPlayerConfig();
commands.Add(new Command("loadtexts", "loadtexts [sourcefile] [destinationfile]: Loads all lines of text from a given .txt file and inserts them sequientially into the elements of an xml file. If the file paths are omitted, EnglishVanilla.txt and EnglishVanilla.xml are used.", (string[] args) =>
{
string sourcePath = args.Length > 0 ? args[0] : "Content/Texts/EnglishVanilla.txt";
string destinationPath = args.Length > 1 ? args[1] : "Content/Texts/EnglishVanilla.xml";
string[] lines;
try
{
lines = File.ReadAllLines(sourcePath);
}
catch (Exception e)
{
ThrowError("Reading the file \"" + sourcePath + "\" failed.", e);
return;
}
var doc = XMLExtensions.TryLoadXml(destinationPath);
int i = 0;
foreach (XElement element in doc.Root.Elements())
{
if (i >= lines.Length)
{
ThrowError("Error while loading texts to the xml file. The xml has more elements than the number of lines in the text file.");
return;
}
element.Value = lines[i];
i++;
}
doc.Save(destinationPath);
},
() =>
{
var files = TextManager.GetTextFiles().Select(f => f.Replace("\\", "/"));
return new string[][]
{
files.Where(f => Path.GetExtension(f)==".txt").ToArray(),
files.Where(f => Path.GetExtension(f)==".xml").ToArray()
};
}));
commands.Add(new Command("updatetextfile", "updatetextfile [sourcefile] [destinationfile]: Inserts all the xml elements that are only present in the source file into the destination file. Can be used to update outdated translation files more easily.", (string[] args) =>
{
if (args.Length < 2) return;
string sourcePath = args[0];
string destinationPath = args[1];
var sourceDoc = XMLExtensions.TryLoadXml(sourcePath);
var destinationDoc = XMLExtensions.TryLoadXml(destinationPath);
XElement destinationElement = destinationDoc.Root.Elements().First();
foreach (XElement element in sourceDoc.Root.Elements())
{
if (destinationDoc.Root.Element(element.Name) == null)
{
element.Value = "!!!!!!!!!!!!!" + element.Value;
destinationElement.AddAfterSelf(element);
}
XNode nextNode = destinationElement.NextNode;
while ((!(nextNode is XElement) || nextNode == element) && nextNode != null) nextNode = nextNode.NextNode;
destinationElement = nextNode as XElement;
}
destinationDoc.Save(destinationPath);
},
() =>
{
var files = TextManager.GetTextFiles().Where(f => Path.GetExtension(f) == ".xml").Select(f => f.Replace("\\", "/")).ToArray();
return new string[][]
{
files,
files
};
}));
commands.Add(new Command("dumpentitytexts", "dumpentitytexts [filepath]: gets the names and descriptions of all entity prefabs and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EntityTexts.txt", (string[] args) =>
{
string filePath = args.Length > 0 ? args[0] : "Content/Texts/EntityTexts.txt";
List<string> lines = new List<string>();
foreach (MapEntityPrefab me in MapEntityPrefab.List)
{
lines.Add("<EntityName." + me.Identifier + ">" + me.Name + "</" + me.Identifier + ".Name>");
lines.Add("<EntityDescription." + me.Identifier + ">" + me.Description + "</" + me.Identifier + ".Description>");
}
File.WriteAllLines(filePath, lines);
}));
#if DEBUG
commands.Add(new Command("checkduplicates", "Checks the given language for duplicate translation keys and writes to file.", (string[] args) =>
{
if (args.Length != 1) return;
TextManager.CheckForDuplicates(args[0]);
}));
commands.Add(new Command("writetocsv", "Writes the default language (English) to a .csv file.", (string[] args) =>
{
TextManager.WriteToCSV();
NPCConversation.WriteToCSV();
}));
commands.Add(new Command("loadtexts", "loadtexts [sourcefile] [destinationfile]: Loads all lines of text from a given .txt file and inserts them sequientially into the elements of an xml file. If the file paths are omitted, EnglishVanilla.txt and EnglishVanilla.xml are used.", (string[] args) =>
{
@@ -1580,12 +1580,12 @@ namespace Barotrauma
public static void PlayUISound(GUISoundType soundType)
{
if (sounds == null) return;
if (sounds == null) { return; }
int soundIndex = (int)soundType;
if (soundIndex < 0 || soundIndex >= sounds.Length) return;
if (soundIndex < 0 || soundIndex >= sounds.Length) { return; }
sounds[soundIndex].Play(null, "ui");
sounds[soundIndex]?.Play(null, "ui");
}
#endregion
}
@@ -95,21 +95,54 @@ namespace Barotrauma
}
}
var reports = Order.PrefabList.FindAll(o => o.TargetAllCharacters && o.SymbolSprite != null);
reportButtonFrame = new GUILayoutGroup(new RectTransform(
new Point((HUDLayoutSettings.CrewArea.Height - (int)((reports.Count - 1) * 5 * GUI.Scale)) / reports.Count, HUDLayoutSettings.CrewArea.Height), guiFrame.RectTransform))
{
AbsoluteSpacing = (int)(5 * GUI.Scale),
UserData = "reportbuttons",
CanBeFocused = false
};
//report buttons
foreach (Order order in reports)
{
if (!order.TargetAllCharacters || order.SymbolSprite == null) continue;
var btn = new GUIButton(new RectTransform(new Point(reportButtonFrame.Rect.Width), reportButtonFrame.RectTransform), style: null)
{
OnClicked = (GUIButton button, object userData) =>
{
if (Character.Controlled == null || Character.Controlled.SpeechImpediment >= 100.0f) return false;
SetCharacterOrder(null, order, null, Character.Controlled);
return true;
},
UserData = order,
ToolTip = order.Name
};
new GUIFrame(new RectTransform(new Vector2(1.5f), btn.RectTransform, Anchor.Center), "OuterGlow")
{
Color = Color.Red * 0.8f,
HoverColor = Color.Red * 1.0f,
PressedColor = Color.Red * 0.6f,
UserData = "highlighted",
CanBeFocused = false,
Visible = false
};
var img = new GUIImage(new RectTransform(Vector2.One, btn.RectTransform), order.Prefab.SymbolSprite, scaleToFit: true)
{
Color = order.Color,
HoverColor = Color.Lerp(order.Color, Color.White, 0.5f),
ToolTip = order.Name
};
}
screenResolution = new Point(GameMain.GraphicsWidth, GameMain.GraphicsHeight);
prevUIScale = GUI.Scale;
}
#endregion
#region Character list management
public Rectangle GetCharacterListArea()
{
return characterListBox.Rect;
}
partial void InitProjectSpecific()
{
guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent)
@@ -1296,6 +1329,31 @@ namespace Barotrauma
if (GameMain.NetworkMember != null) GameMain.Client.SelectCrewCharacter(character, previewPlayer);
ToggleReportButton("reportintruders", hasIntruders);
foreach (GUIComponent reportButton in reportButtonFrame.Children)
{
var highlight = reportButton.GetChildByUserData("highlighted");
if (highlight.Visible)
{
highlight.RectTransform.LocalScale = new Vector2(1.25f + (float)Math.Sin(Timing.TotalTime * 5.0f) * 0.25f);
}
}
}
else
{
reportButtonFrame.Visible = false;
}
}
/// <summary>
/// Should report buttons be visible on the screen atm?
/// </summary>
private bool ReportButtonsVisible()
{
return CharacterHealth.OpenHealthWindow == null;
}
private bool ReportButtonClicked(GUIButton button, object userData)
{
//order targeted to all characters
@@ -626,28 +626,6 @@ namespace Barotrauma
new GUIMessageBox(TextManager.Get("RestartRequiredLabel"), TextManager.Get("RestartRequiredLanguage"));
return true;
};
//spacing
new GUIFrame(new RectTransform(new Vector2(1.0f, 0.02f), generalLayoutGroup.RectTransform), style: null);
new GUIButton(new RectTransform(new Vector2(0.4f, 1.0f), buttonArea.RectTransform, Anchor.BottomLeft),
TextManager.Get("Cancel"))
{
IgnoreLayoutGroups = true,
OnClicked = (x, y) =>
{
if (UnsavedSettings)
{
LoadPlayerConfig();
}
if (Screen.Selected == GameMain.MainMenuScreen) GameMain.MainMenuScreen.ReturnToMainMenu(null, null);
GUI.SettingsMenuOpen = false;
return true;
}
};
//spacing
new GUIFrame(new RectTransform(new Vector2(1.0f, 0.02f), generalLayoutGroup.RectTransform), style: null);
@@ -184,63 +184,6 @@ namespace Barotrauma.Items.Components
}
}
}
public void ApplyTo(RectTransform target)
{
if (RelativeOffset.HasValue)
{
target.RelativeOffset = RelativeOffset.Value;
}
else if (AbsoluteOffset.HasValue)
{
target.AbsoluteOffset = AbsoluteOffset.Value;
}
if (RelativeSize.HasValue)
{
target.RelativeSize = RelativeSize.Value;
}
else if (AbsoluteSize.HasValue)
{
target.NonScaledSize = AbsoluteSize.Value;
}
if (Anchor.HasValue)
{
target.Anchor = Anchor.Value;
}
if (Pivot.HasValue)
{
target.Pivot = Pivot.Value;
}
else
{
target.Pivot = RectTransform.MatchPivotToAnchor(target.Anchor);
}
target.RecalculateChildren(true, true);
}
}
public GUIFrame GuiFrame { get; protected set; }
[Serialize(false, false)]
public bool AllowUIOverlap
{
get;
set;
}
private ItemComponent linkToUIComponent;
[Serialize("", false)]
public string LinkUIToComponent
{
get;
set;
}
[Serialize(0, false)]
public int HudPriority
{
get;
private set;
}
private bool shouldMuffleLooping;
@@ -597,8 +597,9 @@ namespace Barotrauma
if (HasInGameEditableProperties ||
Screen.Selected == GameMain.SubEditorScreen)
{
GUIComponent prevEditingHUD = editingHUD;
UpdateEditing(cam);
editingHUDCreated = editingHUD != null;
editingHUDCreated = editingHUD != null && editingHUD != prevEditingHUD;
}
List<ItemComponent> prevActiveHUDs = new List<ItemComponent>(activeHUDs);
@@ -39,7 +39,7 @@ namespace Barotrauma
public Sprite PreviewImage;
private static List<RoundSound> roundSounds = null;
public static RoundSound LoadRoundSound(XElement element, bool stream=false)
public static RoundSound LoadRoundSound(XElement element, bool stream = false)
{
string filename = element.GetAttributeString("file", "");
if (string.IsNullOrEmpty(filename)) filename = element.GetAttributeString("sound", "");
@@ -66,6 +66,7 @@ namespace Barotrauma
try
{
existingSound = GameMain.SoundManager.LoadSound(filename, stream);
if (existingSound == null) { return null; }
}
catch (FileNotFoundException e)
{
@@ -814,7 +814,7 @@ namespace Barotrauma.Networking
steamAuthTicket = null;
string disconnectMsg = inc.ReadString();
string[] splitMsg = disconnectMsg.Split(';');
string[] splitMsg = disconnectMsg.Split('/');
DisconnectReason disconnectReason = DisconnectReason.Unknown;
if (splitMsg.Length > 0) Enum.TryParse(splitMsg[0], out disconnectReason);
@@ -1110,7 +1110,7 @@ namespace Barotrauma.Networking
GameMain.GameScreen.Select();
AddChatMessage($"ServerMessage.HowToCommunicate_[chatbutton]={GameMain.Config.KeyBind(InputType.Chat).ToString()}_[radiobutton]={GameMain.Config.KeyBind(InputType.RadioChat).ToString()}", ChatMessageType.Server);
AddChatMessage($"ServerMessage.HowToCommunicate~[chatbutton]={GameMain.Config.KeyBind(InputType.Chat).ToString()}~[radiobutton]={GameMain.Config.KeyBind(InputType.RadioChat).ToString()}", ChatMessageType.Server);
yield return CoroutineStatus.Success;
}
@@ -1,6 +1,7 @@
using Lidgren.Network;
using OpenTK.Audio.OpenAL;
using System;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
@@ -66,7 +67,14 @@ namespace Barotrauma.Networking
if (captureDevice == IntPtr.Zero)
{
new GUIMessageBox(TextManager.Get("Error"), TextManager.Get("VoipCaptureDeviceNotFound"));
if (!GUIMessageBox.MessageBoxes.Any(mb => mb.UserData as string == "capturedevicenotfound"))
{
new GUIMessageBox(TextManager.Get("Error"), TextManager.Get("VoipCaptureDeviceNotFound"))
{
UserData = "capturedevicenotfound"
};
}
GameMain.Config.VoiceSetting = GameSettings.VoiceMode.Disabled;
Instance?.Dispose();
Instance = null;
return;
@@ -401,43 +401,6 @@ namespace Barotrauma
UpdateSourceRect(limb, newRect);
}
}
UpdateJointCreation();
if (PlayerInput.KeyHit(Keys.Left))
{
foreach (var limb in selectedLimbs)
{
var newRect = limb.ActiveSprite.SourceRect;
newRect.X--;
UpdateSourceRect(limb, newRect);
}
}
if (PlayerInput.KeyHit(Keys.Right))
{
foreach (var limb in selectedLimbs)
{
var newRect = limb.ActiveSprite.SourceRect;
newRect.X++;
UpdateSourceRect(limb, newRect);
}
}
if (PlayerInput.KeyHit(Keys.Down))
{
foreach (var limb in selectedLimbs)
{
var newRect = limb.ActiveSprite.SourceRect;
newRect.Y++;
UpdateSourceRect(limb, newRect);
}
}
if (PlayerInput.KeyHit(Keys.Up))
{
foreach (var limb in selectedLimbs)
{
var newRect = limb.ActiveSprite.SourceRect;
newRect.Y--;
UpdateSourceRect(limb, newRect);
}
}
}
if (!isFreezed)
{
@@ -505,7 +505,7 @@ namespace Barotrauma
" -ownerkey " + ownerKey.ToString();
string filename = "DedicatedServer.exe";
#if LINUX
#if LINUX || OSX
filename = "mono";
arguments = "./DedicatedServer.exe " + arguments;
#endif
@@ -440,15 +440,7 @@ namespace Barotrauma
{
OnSelected = VotableClicked
};
#if !DEBUG
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), midInfoColumn.RectTransform),
"Coming up: Multiplayer campaign", textAlignment: Alignment.Center, style: "ListBoxElement")
{
ToolTip = "Multiplayer campaign mode is not available in this version of Barotrauma. Coming up in the Early Access release!"
};
#endif
voteText = new GUITextBlock(new RectTransform(new Vector2(0.5f, 1.0f), modeLabel.RectTransform, Anchor.TopRight),
TextManager.Get("Votes"), textAlignment: Alignment.CenterRight)
{
@@ -12,6 +12,12 @@ namespace Barotrauma.Sounds
public class SoundManager : IDisposable
{
public const int SOURCE_COUNT = 32;
public bool Disabled
{
Default = 0,
Voice = 1
}
private IntPtr alcDevice;
private OpenTK.ContextHandle alcContext;
@@ -21,7 +27,7 @@ namespace Barotrauma.Sounds
Default = 0,
Voice = 1
}
private SoundSourcePool[] sourcePools;
private readonly SoundSourcePool[] sourcePools;
private List<Sound> loadedSounds;
private readonly SoundChannel[][] playingChannels = new SoundChannel[2][];
@@ -34,6 +40,7 @@ namespace Barotrauma.Sounds
get { return listenerPosition; }
set
{
if (Disabled) { return; }
listenerPosition = value;
AL.Listener(ALListener3f.Position,value.X,value.Y,value.Z);
ALError alError = AL.GetError();
@@ -44,12 +51,13 @@ namespace Barotrauma.Sounds
}
}
private float[] listenerOrientation;
private float[] listenerOrientation = new float[6];
public Vector3 ListenerTargetVector
{
get { return new Vector3(listenerOrientation[0], listenerOrientation[1], listenerOrientation[2]); }
set
{
if (Disabled) { return; }
listenerOrientation[0] = value.X; listenerOrientation[1] = value.Y; listenerOrientation[2] = value.Z;
AL.Listener(ALListenerfv.Orientation, ref listenerOrientation);
ALError alError = AL.GetError();
@@ -64,6 +72,7 @@ namespace Barotrauma.Sounds
get { return new Vector3(listenerOrientation[3], listenerOrientation[4], listenerOrientation[5]); }
set
{
if (Disabled) { return; }
listenerOrientation[3] = value.X; listenerOrientation[4] = value.Y; listenerOrientation[5] = value.Z;
AL.Listener(ALListenerfv.Orientation, ref listenerOrientation);
ALError alError = AL.GetError();
@@ -80,6 +89,7 @@ namespace Barotrauma.Sounds
get { return listenerGain; }
set
{
if (Disabled) { return; }
if (Math.Abs(ListenerGain - value) < 0.001f) { return; }
listenerGain = value;
AL.Listener(ALListenerf.Gain, listenerGain);
@@ -100,20 +110,20 @@ namespace Barotrauma.Sounds
get { return loadedSounds.Select(s => s.Filename).Distinct().Count(); }
}
private Dictionary<string, Pair<float,bool>> categoryModifiers;
private Dictionary<string, Pair<float, bool>> categoryModifiers;
public SoundManager()
{
loadedSounds = new List<Sound>();
streamingThread = null;
categoryModifiers = null;
alcDevice = Alc.OpenDevice(null);
if (alcDevice == null)
{
throw new Exception("Failed to open an ALC device!");
DebugConsole.ThrowError("Failed to open an ALC device! Disabling audio playback...");
Disabled = true;
return;
}
AlcError alcError = Alc.GetError(alcDevice);
@@ -122,13 +132,15 @@ namespace Barotrauma.Sounds
//The audio device probably wasn't ready, this happens quite often
//Just wait a while and try again
Thread.Sleep(100);
alcDevice = Alc.OpenDevice(null);
alcError = Alc.GetError(alcDevice);
if (alcError != AlcError.NoError)
{
throw new Exception("Error initializing ALC device: " + alcError.ToString());
DebugConsole.ThrowError("Error initializing ALC device: " + alcError.ToString() + ". Disabling audio playback...");
Disabled = true;
return;
}
}
@@ -136,18 +148,24 @@ namespace Barotrauma.Sounds
alcContext = Alc.CreateContext(alcDevice, alcContextAttrs);
if (alcContext == null)
{
throw new Exception("Failed to create an ALC context! (error code: "+Alc.GetError(alcDevice).ToString()+")");
DebugConsole.ThrowError("Failed to create an ALC context! (error code: " + Alc.GetError(alcDevice).ToString() + "). Disabling audio playback...");
Disabled = true;
return;
}
if (!Alc.MakeContextCurrent(alcContext))
{
throw new Exception("Failed to assign the current ALC context! (error code: " + Alc.GetError(alcDevice).ToString() + ")");
DebugConsole.ThrowError("Failed to assign the current ALC context! (error code: " + Alc.GetError(alcDevice).ToString() + "). Disabling audio playback...");
Disabled = true;
return;
}
alcError = Alc.GetError(alcDevice);
if (alcError != AlcError.NoError)
{
throw new Exception("Error after assigning ALC context: " + alcError.ToString());
DebugConsole.ThrowError("Error after assigning ALC context: " + alcError.ToString() + ". Disabling audio playback...");
Disabled = true;
return;
}
ALError alError = ALError.NoError;
@@ -164,10 +182,11 @@ namespace Barotrauma.Sounds
alError = AL.GetError();
if (alError != ALError.NoError)
{
throw new Exception("Error setting distance model: " + AL.GetErrorString(alError));
DebugConsole.ThrowError("Error setting distance model: " + AL.GetErrorString(alError) + ". Disabling audio playback...");
Disabled = true;
return;
}
listenerOrientation = new float[6];
ListenerPosition = Vector3.Zero;
ListenerTargetVector = new Vector3(0.0f, 0.0f, 1.0f);
ListenerUpVector = new Vector3(0.0f, -1.0f, 0.0f);
@@ -175,6 +194,8 @@ namespace Barotrauma.Sounds
public Sound LoadSound(string filename, bool stream = false)
{
if (Disabled) { return null; }
if (!File.Exists(filename))
{
throw new FileNotFoundException("Sound file \"" + filename + "\" doesn't exist!");
@@ -187,6 +208,8 @@ namespace Barotrauma.Sounds
public Sound LoadSound(XElement element, bool stream = false)
{
if (Disabled) { return null; }
string filePath = element.GetAttributeString("file", "");
if (!File.Exists(filePath))
{
@@ -208,13 +231,13 @@ namespace Barotrauma.Sounds
public SoundChannel GetSoundChannelFromIndex(SourcePoolIndex poolIndex, int ind)
{
if (ind < 0 || ind >= playingChannels[(int)poolIndex].Length) return null;
if (Disabled || ind < 0 || ind >= playingChannels[(int)poolIndex].Length) return null;
return playingChannels[(int)poolIndex][ind];
}
public uint GetSourceFromIndex(SourcePoolIndex poolIndex, int srcInd)
{
if (srcInd < 0 || srcInd >= sourcePools[(int)poolIndex].ALSources.Length) return 0;
if (Disabled || srcInd < 0 || srcInd >= sourcePools[(int)poolIndex].ALSources.Length) return 0;
if (!AL.IsSource(sourcePools[(int)poolIndex].ALSources[srcInd]))
{
@@ -226,6 +249,8 @@ namespace Barotrauma.Sounds
public int AssignFreeSourceToChannel(SoundChannel newChannel)
{
if (Disabled) { return -1; }
lock (playingChannels)
{
//remove a channel that has stopped
@@ -244,7 +269,6 @@ namespace Barotrauma.Sounds
//we couldn't get a free source to assign to this channel!
return -1;
}
}
#if DEBUG
public void DebugSource(int ind)
@@ -259,6 +283,7 @@ namespace Barotrauma.Sounds
public bool IsPlaying(Sound sound)
{
if (Disabled) { return false; }
lock (playingChannels)
{
for (int i = 0; i < playingChannels[(int)sound.SourcePoolIndex].Length; i++)
@@ -275,6 +300,7 @@ namespace Barotrauma.Sounds
public int CountPlayingInstances(Sound sound)
{
if (Disabled) { return 0; }
int count = 0;
lock (playingChannels)
{
@@ -289,9 +315,11 @@ namespace Barotrauma.Sounds
}
return count;
}
#endif
public SoundChannel GetChannelFromSound(Sound sound)
{
if (Disabled) { return null; }
lock (playingChannels)
{
for (int i = 0; i < playingChannels[(int)sound.SourcePoolIndex].Length; i++)
@@ -308,6 +336,7 @@ namespace Barotrauma.Sounds
public void KillChannels(Sound sound)
{
if (Disabled) { return; }
lock (playingChannels)
{
for (int i = 0; i < playingChannels[(int)sound.SourcePoolIndex].Length; i++)
@@ -335,6 +364,7 @@ namespace Barotrauma.Sounds
public void SetCategoryGainMultiplier(string category, float gain)
{
if (Disabled) { return; }
category = category.ToLower();
if (categoryModifiers == null) categoryModifiers = new Dictionary<string, Pair<float, bool>>();
if (!categoryModifiers.ContainsKey(category))
@@ -362,6 +392,7 @@ namespace Barotrauma.Sounds
public float GetCategoryGainMultiplier(string category)
{
if (Disabled) { return 0.0f; }
category = category.ToLower();
if (categoryModifiers == null || !categoryModifiers.ContainsKey(category)) return 1.0f;
return categoryModifiers[category].First;
@@ -369,6 +400,8 @@ namespace Barotrauma.Sounds
public void SetCategoryMuffle(string category,bool muffle)
{
if (Disabled) { return; }
category = category.ToLower();
if (categoryModifiers == null) categoryModifiers = new Dictionary<string, Pair<float, bool>>();
@@ -380,6 +413,7 @@ namespace Barotrauma.Sounds
{
categoryModifiers[category].Second = muffle;
}
}
for (int i = 0; i < playingChannels.Length; i++)
{
@@ -395,6 +429,8 @@ namespace Barotrauma.Sounds
public bool GetCategoryMuffle(string category)
{
if (Disabled) { return false; }
category = category.ToLower();
if (categoryModifiers == null || !categoryModifiers.ContainsKey(category)) return false;
return categoryModifiers[category].Second;
@@ -402,6 +438,7 @@ namespace Barotrauma.Sounds
public void InitStreamThread()
{
if (Disabled) { return; }
if (streamingThread == null || streamingThread.ThreadState.HasFlag(ThreadState.Stopped))
{
streamingThread = new Thread(UpdateStreaming)
@@ -446,6 +483,8 @@ namespace Barotrauma.Sounds
public void Dispose()
{
if (Disabled) { return; }
lock (playingChannels)
{
for (int i = 0; i < playingChannels.Length; i++)
@@ -464,8 +503,8 @@ namespace Barotrauma.Sounds
{
loadedSounds[i].Dispose();
}
sourcePools[(int)SourcePoolIndex.Default].Dispose();
sourcePools[(int)SourcePoolIndex.Voice].Dispose();
sourcePools[(int)SourcePoolIndex.Default]?.Dispose();
sourcePools[(int)SourcePoolIndex.Voice]?.Dispose();
if (!Alc.MakeContextCurrent(OpenTK.ContextHandle.Zero))
{
@@ -126,7 +126,7 @@ namespace Barotrauma
if (startUpSoundElement != null)
{
startUpSound = GameMain.SoundManager.LoadSound(startUpSoundElement, false);
startUpSound.Play();
startUpSound?.Play();
}
yield return CoroutineStatus.Running;
@@ -144,23 +144,22 @@ namespace Barotrauma
switch (soundElement.Name.ToString().ToLowerInvariant())
{
case "music":
musicClips.Add(new BackgroundMusic(soundElement));
musicClips.AddIfNotNull(new BackgroundMusic(soundElement));
break;
case "splash":
SplashSounds.Add(GameMain.SoundManager.LoadSound(soundElement, false));
SplashSounds.AddIfNotNull(GameMain.SoundManager.LoadSound(soundElement, false));
break;
case "flow":
FlowSounds.Add(GameMain.SoundManager.LoadSound(soundElement, false));
FlowSounds.AddIfNotNull(GameMain.SoundManager.LoadSound(soundElement, false));
break;
case "waterambience":
waterAmbiences.Add(GameMain.SoundManager.LoadSound(soundElement, false));
waterAmbiences.AddIfNotNull(GameMain.SoundManager.LoadSound(soundElement, false));
break;
case "damagesound":
Sound damageSound = GameMain.SoundManager.LoadSound(soundElement, false);
if (damageSound == null) continue;
if (damageSound == null) { continue; }
string damageSoundType = soundElement.GetAttributeString("damagesoundtype", "None");
damageSounds.Add(new DamageSound(
damageSound,
soundElement.GetAttributeVector2("damagerange", Vector2.Zero),
@@ -174,7 +173,6 @@ namespace Barotrauma
{
miscSoundList.Add(new KeyValuePair<string, Sound>(soundElement.Name.ToString().ToLowerInvariant(), sound));
}
break;
}
}
@@ -481,7 +479,7 @@ namespace Barotrauma
private static void UpdateMusic(float deltaTime)
{
if (musicClips == null) return;
if (musicClips == null || GameMain.SoundManager.Disabled) { return; }
if (OverrideMusicType != null && OverrideMusicDuration.HasValue)
{
@@ -0,0 +1,275 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">ReleaseWindows</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{008C0F83-E914-4966-9135-EA885059EDD8}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Barotrauma</RootNamespace>
<AssemblyName>Barotrauma</AssemblyName>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<ReleaseVersion>0.9.0.0</ReleaseVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWindows|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\ReleaseWindows\</OutputPath>
<DefineConstants>TRACE;WINDOWS;CLIENT</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWindows|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\DebugWindows\</OutputPath>
<DefineConstants>TRACE;WINDOWS;CLIENT;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Concentus, Version=1.1.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\Concentus.1.1.7\lib\portable-net45+win+wpa81+wp80\Concentus.dll</HintPath>
</Reference>
<Reference Include="GameAnalytics.Mono, Version=1.0.6710.29255, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
</Reference>
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\NLog.4.3.8\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="nVLC, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\nVLC.3.0.0\lib\net40\nVLC.dll</HintPath>
</Reference>
<Reference Include="NVorbis, Version=0.8.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\NVorbis.0.8.6\lib\net35\NVorbis.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.4.2.0\lib\net45\SharpDX.dll</HintPath>
</Reference>
<Reference Include="SharpDX.Direct2D1, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Direct2D1.4.2.0\lib\net45\SharpDX.Direct2D1.dll</HintPath>
</Reference>
<Reference Include="SharpDX.Direct3D11, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Direct3D11.4.2.0\lib\net45\SharpDX.Direct3D11.dll</HintPath>
</Reference>
<Reference Include="SharpDX.Direct3D9, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Direct3D9.4.2.0\lib\net45\SharpDX.Direct3D9.dll</HintPath>
</Reference>
<Reference Include="SharpDX.DXGI, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.DXGI.4.2.0\lib\net45\SharpDX.DXGI.dll</HintPath>
</Reference>
<Reference Include="SharpDX.Mathematics, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.Mathematics.4.2.0\lib\net45\SharpDX.Mathematics.dll</HintPath>
</Reference>
<Reference Include="SharpDX.MediaFoundation, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.MediaFoundation.4.2.0\lib\net45\SharpDX.MediaFoundation.dll</HintPath>
</Reference>
<Reference Include="SharpDX.XAudio2, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.XAudio2.4.2.0\lib\net45\SharpDX.XAudio2.dll</HintPath>
</Reference>
<Reference Include="SharpDX.XInput, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\SharpDX.XInput.4.2.0\lib\net45\SharpDX.XInput.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Content Include="freetype6.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libvlc.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libvlccore.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\access\libfilesystem_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\audio_filter\libaudio_format_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\audio_filter\libugly_resampler_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\audio_output\libamem_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\codec\libavcodec_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\demux\libmp4_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\packetizer\libpacketizer_mpeg4audio_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\packetizer\libpacketizer_mpeg4video_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\video_chroma\librv32_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\video_chroma\libswscale_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="plugins\video_output\libvmem_plugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="steam_api64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="wrap_oal.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="MonoGame.Framework.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="OpenTK.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SharpFont.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Libraries\Facepunch.Steamworks\Facepunch.Steamworks.csproj">
<Project>{3af0347c-5a9b-4421-868c-8ee3dbfaebc6}</Project>
<Name>Facepunch.Steamworks</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Farseer Physics Engine 3.5\Farseer Physics MonoGame WindowsDX.csproj">
<Project>{830461aa-3e2e-4bde-9b27-1b3280836521}</Project>
<Name>Farseer Physics MonoGame WindowsDX</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Hyper.ComponentModel\Hyper.ComponentModel.csproj">
<Project>{3b8f9edb-6e5e-450c-abc2-ec49075d0b50}</Project>
<Name>Hyper.ComponentModel</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\Lidgren.Network\Lidgren.Network.csproj">
<Project>{49ba1c69-6104-41ac-a5d8-b54fa9f696e8}</Project>
<Name>Lidgren.Network</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\SharpFont\Source\SharpFont\SharpFont.csproj">
<Project>{c293db32-fa42-486d-b128-5a12522fae4e}</Project>
<Name>SharpFont</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Content\Effects\blurshader.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\damageshader.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\deformshader.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\losshader.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\postprocess.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Effects\watershader.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="ClientCode.projitems" Label="Shared" />
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets'))" />
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets'))" />
</Target>
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+51 -51
View File
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Concentus" version="1.1.7" targetFramework="net45" />
<package id="GameAnalytics.Mono.SDK" version="1.1.12" targetFramework="net45" />
<package id="Microsoft.NETCore.Platforms" version="3.0.0-preview.19073.11" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.7.1.189" targetFramework="net45" />
<package id="MonoGame.Framework.WindowsDX" version="3.7.1.189" targetFramework="net45" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="net45" />
<package id="NLog" version="4.3.8" targetFramework="net45" />
<package id="nVLC" version="3.0.0" targetFramework="net45" />
<package id="NVorbis" version="0.8.6" targetFramework="net45" />
<package id="OpenTK" version="3.0.1" targetFramework="net45" />
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
<package id="SharpDX" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Direct2D1" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Direct3D11" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Direct3D9" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.DXGI" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Mathematics" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.MediaFoundation" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.XAudio2" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.XInput" version="4.2.0" targetFramework="net45" />
<package id="System.Collections" version="4.3.0" targetFramework="net45" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net45" />
<package id="System.Globalization" version="4.3.0" targetFramework="net45" />
<package id="System.IO" version="4.3.0" targetFramework="net45" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net45" />
<package id="System.Linq" version="4.3.0" targetFramework="net45" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net45" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net45" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net45" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net45" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime" version="4.3.1" targetFramework="net45" />
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net45" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net45" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net45" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net45" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net45" />
<package id="System.Threading" version="4.3.0" targetFramework="net45" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net45" />
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net45" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net45" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Concentus" version="1.1.7" targetFramework="net45" />
<package id="GameAnalytics.Mono.SDK" version="1.1.12" targetFramework="net45" />
<package id="Microsoft.NETCore.Platforms" version="3.0.0-preview.19073.11" targetFramework="net45" />
<package id="MonoGame.Framework.DesktopGL" version="3.7.1.189" targetFramework="net45" />
<package id="MonoGame.Framework.WindowsDX" version="3.7.1.189" targetFramework="net45" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="net45" />
<package id="NLog" version="4.3.8" targetFramework="net45" />
<package id="nVLC" version="3.0.0" targetFramework="net45" />
<package id="NVorbis" version="0.8.6" targetFramework="net45" />
<package id="OpenTK" version="3.0.1" targetFramework="net45" />
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
<package id="SharpDX" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Direct2D1" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Direct3D11" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Direct3D9" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.DXGI" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.Mathematics" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.MediaFoundation" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.XAudio2" version="4.2.0" targetFramework="net45" />
<package id="SharpDX.XInput" version="4.2.0" targetFramework="net45" />
<package id="System.Collections" version="4.3.0" targetFramework="net45" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net45" />
<package id="System.Globalization" version="4.3.0" targetFramework="net45" />
<package id="System.IO" version="4.3.0" targetFramework="net45" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net45" />
<package id="System.Linq" version="4.3.0" targetFramework="net45" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net45" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net45" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net45" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net45" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime" version="4.3.1" targetFramework="net45" />
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net45" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net45" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net45" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net45" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net45" />
<package id="System.Threading" version="4.3.0" targetFramework="net45" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net45" />
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net45" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net45" />
</packages>
Binary file not shown.