package uk.co.alynn.games.suchrobot;

import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.assets.loaders.TextureLoader.TextureParameter;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public enum Sprite {
    ROBOT_DEBUG("robot.png", 1, 1.0f),
    NODE_DEBUG("node.png", 1, 1.0f),
    ROBOT_IDLE("Animations/Robo-idle/RoboIdle_%.png", 24, 0.1f);
    
    private String path;
    private float scale;

    private Sprite(String path, int frameCount, float scale) {
        this.path = path.replace("%", "00000");
        this.scale = scale;
    }
    
    public void queueLoad() {
        TextureParameter param = new TextureParameter();
        param.minFilter = TextureFilter.MipMapLinearLinear;
        param.genMipMaps = true;
        AssetManager mgr = Overlord.get().assetManager;
        mgr.load(path, Texture.class);
    }
    
    private Texture getTexture() {
        AssetManager mgr = Overlord.get().assetManager;
        Texture tex = mgr.get(path, Texture.class);
        if (tex == null) {
            throw new RuntimeException("Could not get texture " + name());
        }
        return tex;
    }
    
    public void draw(SpriteBatch batch, float x, float y) {
        Texture tex = getTexture();
        batch.draw(tex, x, y, tex.getWidth() * scale, tex.getHeight() * scale);
    }
}

@@ -349,24 +349,32 @@
 ng%22, 1, 1.0f
+, 16, 16
 ),%0A    NODE_
@@ -398,16 +398,24 @@
  1, 1.0f
+, 16, 16
 ),%0A    R
@@ -444,13 +444,17 @@
 Robo
--
 idle
+Alpha
 /Rob
@@ -458,16 +458,31 @@
 RoboIdle
+/RoboIdle_00001
 _%25.png%22,
@@ -490,16 +490,26 @@
 24, 0.1f
+, 512, 380
 );%0A    %0A
@@ -557,16 +557,50 @@
 t scale;
+%0A    private int anchorX, anchorY;
 %0A%0A    pr
@@ -652,16 +652,42 @@
 at scale
+, int anchorX, int anchorY
 ) %7B%0A    
@@ -754,24 +754,88 @@
 le = scale;%0A
+        this.anchorX = anchorX;%0A        this.anchorY = anchorY;%0A
     %7D%0A    %0A 
@@ -1530,11 +1530,61 @@
 x, x
-, y
+ - (this.anchorX * scale), y - (this.anchorY * scale)
 , te

Fix the anchor points