@@ -1 +1,1198 @@
 %0A
+package com.manic.game;%0A%0A%0A%0A%0Aimport java.util.Iterator;%0Aimport java.util.Set;%0Aimport java.util.SortedMap;%0A%0Aimport com.badlogic.gdx.graphics.g2d.Sprite;%0Aimport com.badlogic.gdx.graphics.g2d.SpriteBatch;%0A%0A%0A%0Apublic class SpriteHandler %7B%0A%0A%09%0A%09%0A%09//Maps orders to sprites%0A%09private SortedMap %3C Integer , Sprite %3E sprites;%0A%09%0A%09%0A%0A%09%0A%09public void render()%0A%09%7B%0A%09%09%09%0A%09%09%0A%09%09//Use a better system%0A%09%09SpriteBatch batch = new SpriteBatch ( sprites.size() );%0A%09%09%0A%09%09%0A%09%09//keySet() returns the keys in ascending order, which is weird, but the doc says so%0A%09%09Set%3CInteger%3E orders = sprites.keySet();%0A%09%09%0A%09%09%0A%09%09batch.begin();%0A%09%09%0A%09%09//We need order here so we could do sprites at the correct %22depth%22%0A%09%09for ( Iterator%3CInteger%3E i_order = orders.iterator() ; i_order.hasNext() ; )%0A%09%09%7B%0A%09%09%0A%09%09%09%0A%09%09%09Integer cur_order = (Integer) i_order.next();%0A%09%09%09%0A%09%09%09%0A%09%09%09Sprite spr = sprites.get( cur_order );%0A%09%09%09%0A%09%09%09%0A%09%09%09batch.draw(spr, spr.getX(), spr.getY() );%0A%09%09%09%0A%09%09%09%0A%09%09%09%0A%09%09%09%0A%09%09%09%0A%09%09%7D%0A%09%09%0A%09%09%0A%09%09batch.end();%0A%09%09%0A%09%09%0A%09%09%0A%09%09%0A%09%7D%0A%09%0A%09public void addSprite ( int order , Sprite spr )%0A%09%7B%0A%09%09%0A%09%09sprites.put( order , spr );%0A%09%09%0A%09%7D%0A%09%0A%09public void deleteSprite ( int order )%0A%09%7B%0A%09%09%0A%09%09sprites.remove ( order );%0A%09%09%0A%09%7D%0A%09%0A%09%0A%09public void deleteAll ()%0A%09%7B%0A%09%09%0A%09%09//Todo%0A%09%09%0A%09%7D%0A%09%0A%09%0A%7D%0A

Update SpriteHandler.java