mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
TerrainAtlas2D - Using tabs instead of spaces
This commit is contained in:
parent
efd783e3f7
commit
ac4a684548
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user