|
@@ -1,104 +1,12 @@
|
|
|
package me.hammerle.snuviengine;
|
|
|
|
|
|
-import java.lang.reflect.Field;
|
|
|
import me.hammerle.snuviengine.game.Game;
|
|
|
|
|
|
public class Main
|
|
|
{
|
|
|
public static void main(String[] args)
|
|
|
{
|
|
|
-
|
|
|
- {
|
|
|
- WrappedOutputStream o = new WrappedOutputStream(out);
|
|
|
-
|
|
|
- o.writeInt(48);
|
|
|
- o.writeInt(32);
|
|
|
-
|
|
|
- for(int l = 0; l < 24; l++)
|
|
|
- {
|
|
|
- for(int i = 0; i < 64; i++)
|
|
|
- {
|
|
|
- o.writeShort(1);
|
|
|
- }
|
|
|
- for(int i = 0; i < 64; i++)
|
|
|
- {
|
|
|
- o.writeShort(0);
|
|
|
- }
|
|
|
-
|
|
|
- for(int i = 0; i < 64; i++)
|
|
|
- {
|
|
|
- o.writeShort(14);
|
|
|
- }
|
|
|
- for(int i = 0; i < 64; i++)
|
|
|
- {
|
|
|
- o.writeShort(15);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- out.flush();
|
|
|
- }
|
|
|
- catch(Exception ex)
|
|
|
- {
|
|
|
- ex.printStackTrace();
|
|
|
- }*/
|
|
|
-
|
|
|
Game game = new Game();
|
|
|
game.run();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- try(FileOutputStream out = new FileOutputStream(new File("./testworld")))
|
|
|
- {
|
|
|
- WrappedOutputStream o = new WrappedOutputStream(out);
|
|
|
-
|
|
|
- o.writeInt(16);
|
|
|
- o.writeInt(16);
|
|
|
-
|
|
|
- for(int i = 0; i < 256; i++)
|
|
|
- {
|
|
|
- o.writeShort(i);
|
|
|
- }
|
|
|
-
|
|
|
- out.flush();
|
|
|
- }
|
|
|
- catch(Exception ex)
|
|
|
- {
|
|
|
- ex.printStackTrace();
|
|
|
- }*/
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- try
|
|
|
- {
|
|
|
- BufferedImage image = ImageIO.read(new File("tileset-blackvolution.png"));
|
|
|
- int w = image.getWidth();
|
|
|
- int h = image.getHeight();
|
|
|
- int counter = 0;
|
|
|
-
|
|
|
- for(int iy = 0; iy < h; iy += 16)
|
|
|
- {
|
|
|
- for(int ix = 0; ix < w; ix += 16)
|
|
|
- {
|
|
|
- BufferedImage out = new BufferedImage(16, 16, 2);
|
|
|
- for(int x = 0; x < 16; x++)
|
|
|
- {
|
|
|
- for(int y = 0; y < 16; y++)
|
|
|
- {
|
|
|
- out.setRGB(x, y, image.getRGB(x + ix, y + iy));
|
|
|
- }
|
|
|
- }
|
|
|
- ImageIO.write(out, "png", new File("images/out" + counter + ".png"));
|
|
|
- counter++;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- catch(Exception ex)
|
|
|
- {
|
|
|
- ex.printStackTrace();
|
|
|
- }*/
|
|
|
}
|
|
|
}
|