Fixing some compile warnings. (#331)

All the obsoletions from netmessages will be for another PR.
This commit is contained in:
Pieter-Jan Briers
2017-08-13 19:30:23 +02:00
committed by Silver
parent 1d2614d75f
commit 480ed6d74c
10 changed files with 14 additions and 30 deletions

View File

@@ -11,7 +11,7 @@ namespace SS14.Client.Graphics.Sprite
/// </summary>
[DebuggerDisplay("[SpriteBatch] IsDrawing: {Drawing} | ")]
public class SpriteBatch : Drawable
{
{
private QueueItem activeItem;
private List<QueueItem> QueuedTextures = new List<QueueItem>();
@@ -19,15 +19,14 @@ namespace SS14.Client.Graphics.Sprite
private readonly uint Max;
private int count;
private bool Drawing;
private uint queueCount;
public int Count
{
get { return count; }
}
public BlendMode BlendingSettings;
public SpriteBatch(uint maxCapacity = 100000)
{
Max = maxCapacity * 4;
@@ -35,7 +34,7 @@ namespace SS14.Client.Graphics.Sprite
}
public void BeginDrawing()
{
{
count = 0;
// we use these a lot, and the overall number of textures
// remains stable, so recycle them to avoid excess calls into
@@ -52,13 +51,13 @@ namespace SS14.Client.Graphics.Sprite
}
public void EndDrawing()
{
{
Drawing = false;
}
private void Using(Texture texture)
{
if (!Drawing)
if (!Drawing)
throw new Exception("Call Begin first.");
if (activeItem == null || activeItem.Texture != texture)
@@ -71,7 +70,7 @@ namespace SS14.Client.Graphics.Sprite
else
{
activeItem = new QueueItem(texture);
}
}
QueuedTextures.Add(activeItem);
}
}
@@ -117,7 +116,7 @@ namespace SS14.Client.Graphics.Sprite
activeItem.Verticies.Append
(
new Vertex(
new SFML.System.Vector2f(
new SFML.System.Vector2f(
pX * cos - pY * sin + S.Position.X,
pX * sin + pY * cos + S.Position.Y),
S.Color,
@@ -156,7 +155,7 @@ namespace SS14.Client.Graphics.Sprite
);
}
/*
public unsafe void Draw(Texture texture, FloatRect rec, IntRect src, Color color)
{

View File

@@ -49,8 +49,6 @@ namespace SS14.Client
[Dependency]
readonly private IResourceCache _resourceCache;
[Dependency]
readonly private IEntityNetworkManager _entityNetworkManager;
[Dependency]
readonly private ITileDefinitionManager _tileDefinitionManager;
[Dependency]
readonly private ISS14Serializer _serializer;

View File

@@ -113,9 +113,6 @@ namespace SS14.Server
/// <inheritdoc />
public event EventRunLevelChanged OnRunLevelChanged;
/// <inheritdoc />
public event EventTick OnTick;
/// <inheritdoc />
public void Restart()
{
@@ -397,7 +394,9 @@ namespace SS14.Server
if (runLevel == Level)
return;
var oldLevel = Level;
Level = runLevel;
OnRunLevelChanged?.Invoke(oldLevel, Level);
if (Level == RunLevel.Lobby)
{
_startAt = DateTime.Now.AddSeconds(GAME_COUNTDOWN);

View File

@@ -25,8 +25,6 @@ namespace SS14.Server.Chat
{
public class ChatManager : IChatManager
{
[Dependency]
private IBaseServer _serverMain;
[Dependency]
private readonly IReflectionManager reflectionManager;
[Dependency]

View File

@@ -56,10 +56,5 @@
/// The Run Level of the server has changed.
/// </summary>
event EventRunLevelChanged OnRunLevelChanged;
/// <summary>
/// The local clock has ticked.
/// </summary>
event EventTick OnTick;
}
}

View File

@@ -14,8 +14,6 @@ namespace SS14.Server.ServerConsole
{
public class ConsoleManager : IConsoleManager, IPostInjectInit, IDisposable
{
[Dependency]
private readonly IConfigurationManager configurationManager;
private Dictionary<string, IConsoleCommand> availableCommands = new Dictionary<string, IConsoleCommand>();
private readonly Dictionary<int, string> commandHistory = new Dictionary<int, string>();
private string currentBuffer = "";

View File

@@ -59,7 +59,6 @@ namespace SS14.Shared.Network.Messages
case MapMessage.SendTileMap:
//not dealing with this right now...
throw new NotImplementedException();
break;
}
}

View File

@@ -118,7 +118,7 @@ namespace SS14.Shared.Network
netConfig.ConnectionTimeout = 30000f;
#endif
_netPeer = new NetPeer(netConfig);
_netPeer.Start();
_strings.Initialize(this);
@@ -292,7 +292,7 @@ namespace SS14.Shared.Network
message.ReadByte(); // status
reason = message.ReadString();
}
catch (NetException e)
catch (NetException)
{
reason = String.Empty;
}
@@ -378,7 +378,7 @@ namespace SS14.Shared.Network
}
#endregion Packets
#region NetMessages
/// <inheritdoc />

View File

@@ -27,7 +27,6 @@ namespace SS14.UnitTesting.SS14.Client.Helpers
private RenderImage blur;
private FrameEventArgs _frameEvent;
private EventArgs _frameEventArgs;
private Clock clock;
private Sprite sprite;

View File

@@ -18,7 +18,6 @@ namespace SS14.UnitTesting.SS14.Client.Helpers
private RenderImage renderimage;
private FrameEventArgs _frameEvent;
private EventArgs _frameEventArgs;
private Clock clock = new Clock();
private StarScroller Stars;