diff --git a/core/src/main/assets/items.png b/core/src/main/assets/items.png index dea28adf9..fd73baa22 100644 Binary files a/core/src/main/assets/items.png and b/core/src/main/assets/items.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java index 008f92ae2..7fcebb7fa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java @@ -67,7 +67,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip private static final float FLASH_INTERVAL = 0.05f; //the amount the sprite is raised from flat when viewed in a raised perspective - protected float perspectiveRaise = 0.375f; //6 pixels + protected float perspectiveRaise = 6 / 16f; //6 pixels //the width and height of the shadow are a percentage of sprite size //offset is the number of pixels the shadow is moved down or up (handy for some animations) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java index 7ca4b56a1..d9b2f0e1d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java @@ -62,7 +62,7 @@ public class ItemSprite extends MovieClip { private float dropInterval; //the amount the sprite is raised from flat when viewed in a raised perspective - protected float perspectiveRaise = 0.3125f; //5 pixels + protected float perspectiveRaise = 5 / 16f; //5 pixels //the width and height of the shadow are a percentage of sprite size //offset is the number of pixels the shadow is moved down or up (handy for some animations) @@ -193,7 +193,7 @@ public class ItemSprite extends MovieClip { public ItemSprite view( int image, Glowing glowing ) { if (this.emitter != null) this.emitter.killAndErase(); emitter = null; - frame( ItemSpriteSheet.film.get( image ) ); + frame( image ); if ((this.glowing = glowing) == null) { resetColor(); } @@ -202,6 +202,12 @@ public class ItemSprite extends MovieClip { public void frame( int image ){ frame( ItemSpriteSheet.film.get( image )); + + float height = ItemSpriteSheet.film.height( image ); + //adds extra raise to very short items, so they are visible + if (height < 8f){ + perspectiveRaise = (5 + 8 - height) / 16f; + } } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java index f90d6789e..c7a40d779 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java @@ -308,7 +308,7 @@ public class ItemSpriteSheet { assignItemRect(ARTIFACT_CHALICE1, 12, 15); assignItemRect(ARTIFACT_CHALICE2, 12, 15); assignItemRect(ARTIFACT_CHALICE3, 12, 15); - assignItemRect(ARTIFACT_SANDALS, 16, 5 ); + assignItemRect(ARTIFACT_SANDALS, 16, 6 ); assignItemRect(ARTIFACT_SHOES, 16, 6 ); assignItemRect(ARTIFACT_BOOTS, 16, 9 ); assignItemRect(ARTIFACT_GREAVES, 16, 14);