Fixed client compilation errors

This commit is contained in:
juanjp600
2017-06-14 18:24:11 -03:00
parent 96b08ed8aa
commit e4a878113f
9 changed files with 10 additions and 54 deletions

View File

@@ -8,6 +8,8 @@ namespace Barotrauma
{
partial class GameScreen : Screen
{
private Color waterColor = new Color(0.75f, 0.8f, 0.9f, 1.0f);
private BlurEffect lightBlur;
readonly RenderTarget2D renderTargetBackground;

View File

@@ -5,39 +5,8 @@ using Microsoft.Xna.Framework.Graphics;
namespace Barotrauma
{
class SpriteSheet : Sprite
partial class SpriteSheet : Sprite
{
private Rectangle[] sourceRects;
public int FrameCount
{
get { return sourceRects.Length; }
}
public SpriteSheet(XElement element, string path = "", string file = "")
: base(element, path, file)
{
int columnCount = Math.Max(ToolBox.GetAttributeInt(element, "columns", 1), 1);
int rowCount = Math.Max(ToolBox.GetAttributeInt(element, "rows", 1), 1);
sourceRects = new Rectangle[rowCount * columnCount];
int cellWidth = SourceRect.Width / columnCount;
int cellHeight = SourceRect.Height / rowCount;
for (int x = 0; x < columnCount; x++)
{
for (int y = 0; y < rowCount; y++)
{
sourceRects[x + y * columnCount] = new Rectangle(x * cellWidth, y * cellHeight, cellWidth, cellHeight);
}
}
origin = ToolBox.GetAttributeVector2(element, "origin", new Vector2(0.5f, 0.5f));
origin.X = origin.X * cellWidth;
origin.Y = origin.Y * cellHeight;
}
public override void Draw(SpriteBatch spriteBatch, Vector2 pos, Color color, Vector2 origin, float rotate, Vector2 scale, SpriteEffects spriteEffect = SpriteEffects.None, float? depth = default(float?))
{
if (texture == null) return;

View File

@@ -9,7 +9,7 @@ namespace Barotrauma
{
public partial class Sprite
{
private void LoadTexture(ref Vector4 sourceVector,ref bool shouldReturn)
private void LoadTexture(ref Vector4 sourceVector, ref bool shouldReturn)
{
//do nothing
}
@@ -23,3 +23,5 @@ namespace Barotrauma
{
//do nothing
}
}
}

View File

@@ -1298,7 +1298,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\Objectives\AIObjectiveManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\Objectives\AIObjectiveOperateItem.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\Objectives\AIObjectiveRescue.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\Objectives\AIObjectiveRescureAll.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\Objectives\AIObjectiveRescueAll.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\Order.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\PathFinder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Characters\AI\SteeringManager.cs" />

View File

@@ -181,7 +181,7 @@ namespace Barotrauma
return priority;
}
private static float GetHullSafety(Hull hull, Character character)
public static float GetHullSafety(Hull hull, Character character)
{
if (hull == null) return 0.0f;

View File

@@ -7,8 +7,6 @@ namespace Barotrauma
{
private Camera cam;
private Color waterColor = new Color(0.75f, 0.8f, 0.9f, 1.0f);
public override Camera Cam
{
get { return cam; }

View File

@@ -1,11 +1,10 @@
using Microsoft.Xna.Framework;
using System;
using System.Xml.Linq;
using Microsoft.Xna.Framework.Graphics;
namespace Barotrauma
{
class SpriteSheet : Sprite
partial class SpriteSheet : Sprite
{
private Rectangle[] sourceRects;
@@ -37,19 +36,5 @@ namespace Barotrauma
origin.X = origin.X * cellWidth;
origin.Y = origin.Y * cellHeight;
}
public override void Draw(SpriteBatch spriteBatch, Vector2 pos, Color color, Vector2 origin, float rotate, Vector2 scale, SpriteEffects spriteEffect = SpriteEffects.None, float? depth = default(float?))
{
if (texture == null) return;
spriteBatch.Draw(texture, pos + offset, sourceRects[0], color, rotation + rotate, origin, scale, spriteEffect, depth == null ? this.depth : (float)depth);
}
public void Draw(SpriteBatch spriteBatch, int spriteIndex, Vector2 pos, Color color, Vector2 origin, float rotate, Vector2 scale, SpriteEffects spriteEffect = SpriteEffects.None, float? depth = default(float?))
{
if (texture == null) return;
spriteBatch.Draw(texture, pos + offset, sourceRects[spriteIndex], color, rotation + rotate, origin, scale, spriteEffect, depth == null ? this.depth : (float)depth);
}
}
}

View File

@@ -418,7 +418,7 @@ Global
{008C0F83-E914-4966-9135-EA885059EDD8} = {F35DF9BF-0BED-4FEF-A51C-DD83C531882F}
{0AAD36E3-51A5-4A07-AB60-5C8A66BD38B7} = {DE36F45F-F09E-4719-B953-00D148F7722A}
{49BA1C69-6104-41AC-A5D8-B54FA9F696E8} = {DE36F45F-F09E-4719-B953-00D148F7722A}
{251AAFE1-F24B-4837-9128-9D04FCBFD528} = {DE36F45F-F09E-4719-B953-00D148F7722A}
{251AAFE1-F24B-4837-9128-9D04FCBFD528} = {F35DF9BF-0BED-4FEF-A51C-DD83C531882F}
{3B8F9EDB-6E5E-450C-ABC2-EC49075D0B50} = {DE36F45F-F09E-4719-B953-00D148F7722A}
{C293DB32-FA42-486D-B128-5A12522FAE4E} = {DE36F45F-F09E-4719-B953-00D148F7722A}
{2E4773B7-961A-4328-9D77-9749F9071CA2} = {DE36F45F-F09E-4719-B953-00D148F7722A}