Unstable 1.2.4.0
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ using System.Text;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
static class Quad
|
||||
static class GraphicsQuad
|
||||
{
|
||||
private static VertexBuffer vertexBuffer = null;
|
||||
private static IndexBuffer indexBuffer = null;
|
||||
@@ -35,7 +35,7 @@ namespace Barotrauma
|
||||
Vector2 pos,
|
||||
Rectangle srcRect,
|
||||
Color color,
|
||||
float rotation,
|
||||
float rotationRad,
|
||||
Vector2 origin,
|
||||
Vector2 scale,
|
||||
SpriteEffects effects,
|
||||
@@ -55,9 +55,8 @@ namespace Barotrauma
|
||||
(srcRectBottom, srcRectTop) = (srcRectTop, srcRectBottom);
|
||||
}
|
||||
|
||||
rotation = MathHelper.ToRadians(rotation);
|
||||
float sin = (float)Math.Sin(rotation);
|
||||
float cos = (float)Math.Cos(rotation);
|
||||
float sin = (float)Math.Sin(rotationRad);
|
||||
float cos = (float)Math.Cos(rotationRad);
|
||||
|
||||
var size = srcRect.Size.ToVector2() * scale;
|
||||
|
||||
@@ -183,11 +182,11 @@ namespace Barotrauma
|
||||
commandList.Add(command);
|
||||
}
|
||||
|
||||
public void Draw(Texture2D texture, Vector2 pos, Rectangle? srcRect, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float depth)
|
||||
public void Draw(Texture2D texture, Vector2 pos, Rectangle? srcRect, Color color, float rotationRad, Vector2 origin, Vector2 scale, SpriteEffects effects, float depth)
|
||||
{
|
||||
if (isDisposed) { return; }
|
||||
|
||||
var command = Command.FromTransform(texture, pos, srcRect ?? texture.Bounds, color, rotation, origin, scale, effects, depth, commandList.Count);
|
||||
var command = Command.FromTransform(texture, pos, srcRect ?? texture.Bounds, color, rotationRad, origin, scale, effects, depth, commandList.Count);
|
||||
AppendCommand(command);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Barotrauma
|
||||
float zoom = (float)texWidth / (float)boundingBox.Width;
|
||||
int texHeight = (int)(zoom * boundingBox.Height);
|
||||
|
||||
using Camera cam = new Camera();
|
||||
Camera cam = new Camera();
|
||||
cam.SetResolution(new Point(texWidth, texHeight));
|
||||
cam.MaxZoom = zoom;
|
||||
cam.MinZoom = zoom * 0.5f;
|
||||
|
||||
Reference in New Issue
Block a user