Minor bug fixes.

This commit is contained in:
2026-09-06 20:08:23 -04:00
parent ebcfd9cd39
commit 6e88a9e9e2
24 changed files with 126 additions and 43 deletions

View File

@@ -64,8 +64,10 @@ public class OmegaImage
}
/// <summary>
/// Full Omega draw. X,Y is the top-left of the pattern; rotation (degrees, clockwise)
/// pivots around (centerX, centerY) as a fraction of the pattern size.
/// Full Omega draw. X,Y is the top-left of the unscaled pattern; rotation and scale
/// are applied around the pivot (centerX, centerY), which stays at its unscaled
/// position — matching DirectX-era Draw semantics (a half-scaled 64px sprite at X
/// with center 0.5 still has its pivot at X+32).
/// </summary>
public void Draw(SpriteBatch sb, float x, float y, float rotation = 0,
float centerX = 0, float centerY = 0, float scaleX = 1, float scaleY = 1,
@@ -73,7 +75,7 @@ public class OmegaImage
{
var src = PatternRect(pattern);
var origin = new Vector2(centerX * TileWidth, centerY * TileHeight);
var pos = new Vector2(x + origin.X * scaleX, y + origin.Y * scaleY);
var pos = new Vector2(x + origin.X, y + origin.Y);
var color = new Color(red, green, blue, alpha);
sb.Draw(Texture, pos, src, color, MathHelper.ToRadians(rotation), origin,
new Vector2(scaleX, scaleY), SpriteEffects.None, 0);