TerrainAtlas2D - Using tabs instead of spaces

This commit is contained in:
pawelsberg 2018-03-13 13:59:27 +00:00 committed by GitHub
parent efd783e3f7
commit ac4a684548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,22 +15,22 @@ namespace ClassicalSharp {
public Bitmap AtlasBitmap;
public int TileSize;
Game game;
Game game;
public TerrainAtlas2D(Game game) { this.game = game; }
/// <summary> Updates the underlying atlas bitmap, fields, and texture. </summary>
public void UpdateState(Bitmap bmp) {
AtlasBitmap = bmp;
TileSize = bmp.Width / TilesPerRow;
UpdateState();
UpdateState();
}
/// <summary> Updates the underlying atlas bitmap </summary>
public void UpdateState()
{
using (FastBitmap fastBmp = new FastBitmap(AtlasBitmap, true, true))
BlockInfo.RecalculateSpriteBB(fastBmp);
}
/// <summary> Updates the underlying atlas bitmap </summary>
public void UpdateState()
{
using (FastBitmap fastBmp = new FastBitmap(AtlasBitmap, true, true))
BlockInfo.RecalculateSpriteBB(fastBmp);
}
/// <summary> Creates a new texture that contains the tile at the specified index. </summary>
public int LoadTextureElement(int index) {
@ -51,4 +51,4 @@ namespace ClassicalSharp {
AtlasBitmap.Dispose();
}
}
}
}