package stray.blocks;

import stray.Main;
import stray.util.AssetMap;
import stray.world.World;

import com.badlogic.gdx.graphics.Texture;

public class BlockSpace extends Block {

	public BlockSpace(String path) {
		super(path);
	}

	public void renderPlain(Main main, float camerax, float cameray, int x, int y, int magic) {
		if (animationlink != null) {
			main.batch.draw(main.animations.get(animationlink).getCurrentFrame(), x
					* World.tilesizex - camerax, y * World.tilesizey - cameray, World.tilesizex,
					World.tilesizey);
			return;
		}

		if (usingMissingTex) {
			main.batch.draw(main.manager.get(AssetMap.get("blockmissingtexture"), Texture.class), x
					* World.tilesizex - camerax, y * World.tilesizey - cameray, World.tilesizex,
					World.tilesizey);
			return;
		}

		if (path == null) return;

		if (!connectedTextures) {
			if (!variants) {
				drawAt(main.batch, main.manager.get(sprites.get("defaulttex"), Texture.class), x
						* World.tilesizex - camerax, y * World.tilesizey - cameray);
			} else {
				drawAt(main.batch, main.manager.get(sprites.get("defaulttex"
						+ ((variantNum(magic, x, y)) & (varianttypes - 1))), Texture.class), x
						* World.tilesizex - camerax, y * World.tilesizey - cameray);
			}
		} else {
			drawAt(main.batch, main.manager.get(sprites.get("full"), Texture.class), x
					* World.tilesizex - camerax, y * World.tilesizey - cameray);

		}
	}

}

@@ -890,39 +890,32 @@
 ariants) %7B%0D%0A%09%09%09%09
-drawAt(
 main.batch, main
@@ -900,34 +900,38 @@
 %0D%0A%09%09%09%09main.batch
-, 
+.draw(
 main.manager.get
@@ -1004,32 +1004,47 @@
 izex - camerax, 
+Main.convertY((
 y * World.tilesi
@@ -1053,24 +1053,44 @@
 y - cameray)
+ + World.tilesizey))
 ;%0D%0A%09%09%09%7D else
@@ -1097,23 +1097,16 @@
  %7B%0D%0A%09%09%09%09
-drawAt(
 main.bat
@@ -1099,34 +1099,38 @@
 %0D%0A%09%09%09%09main.batch
-, 
+.draw(
 main.manager.get
@@ -1261,32 +1261,47 @@
 izex - camerax, 
+Main.convertY((
 y * World.tilesi
@@ -1314,16 +1314,36 @@
 cameray)
+ + World.tilesizey))
 ;%0D%0A%09%09%09%7D%0D
@@ -1362,15 +1362,8 @@
 %0A%09%09%09
-drawAt(
 main
@@ -1368,18 +1368,22 @@
 in.batch
-, 
+.draw(
 main.man
@@ -1457,32 +1457,47 @@
 izex - camerax, 
+Main.convertY((
 y * World.tilesi
@@ -1510,16 +1510,36 @@
 cameray)
+ + World.tilesizey))
 ;%0D%0A%0D%0A%09%09%7D

Fix non-existant drawAt