Abyss Gravel and other abyss fixes

This commit is contained in:
Heart-Plus-Up committed 2023-01-18 15:22:46 -07:00
1 parent 33e1258b68
commit c5556201ca
5 files changed
+89 -4

No files matched your search

+89 -4
View File
@@ -9,8 +9,7 @@ namespace CalamityMod.Tiles.Abyss
{
public class AbyssGravel : ModTile
{
int subsheetHeight = 270;
int subsheetWidth = 288;
int animationFrameWidth = 288;
public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AbyssGravelMine", 3);
@@ -63,10 +62,96 @@ namespace CalamityMod.Tiles.Abyss
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
{
frameXOffset = i % 1 * subsheetWidth; //the 1 should be 2, but it looks weird right now, should be looked into later
frameYOffset = j % 1 * subsheetHeight;
int uniqueAnimationFrameX = 0;
int xPos = i % 4;
int yPos = j % 4;
switch (xPos)
{
case 0:
switch (yPos)
{
case 0:
uniqueAnimationFrameX = 0;
break;
case 1:
uniqueAnimationFrameX = 2;
break;
case 2:
uniqueAnimationFrameX = 1;
break;
case 3:
uniqueAnimationFrameX = 2;
break;
default:
uniqueAnimationFrameX = 2;
break;
}
break;
case 1:
switch (yPos)
{
case 0:
uniqueAnimationFrameX = 2;
break;
case 1:
uniqueAnimationFrameX = 0;
break;
case 2:
uniqueAnimationFrameX = 2;
break;
case 3:
uniqueAnimationFrameX = 2;
break;
default:
uniqueAnimationFrameX = 2;
break;
}
break;
case 2:
switch (yPos)
{
case 0:
uniqueAnimationFrameX = 2;
break;
case 1:
uniqueAnimationFrameX = 0;
break;
case 2:
uniqueAnimationFrameX = 1;
break;
case 3:
uniqueAnimationFrameX = 2;
break;
default:
uniqueAnimationFrameX = 2;
break;
}
break;
case 3:
switch (yPos)
{
case 0:
uniqueAnimationFrameX = 1;
break;
case 1:
uniqueAnimationFrameX = 2;
break;
case 2:
uniqueAnimationFrameX = 0;
break;
case 3:
uniqueAnimationFrameX = 2;
break;
default:
uniqueAnimationFrameX = 2;
break;
}
break;
}
frameXOffset = uniqueAnimationFrameX * animationFrameWidth;
}
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
{
TileFraming.CustomMergeFrame(i, j, Type, TileID.Dirt);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB