Main.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. package me.hammerle.snuviengine;
  2. import java.lang.reflect.Field;
  3. import me.hammerle.snuviengine.game.Game;
  4. public class Main
  5. {
  6. public static void main(String[] args)
  7. {
  8. /*try(FileOutputStream out = new FileOutputStream(new File("./testworld")))
  9. {
  10. WrappedOutputStream o = new WrappedOutputStream(out);
  11. o.writeInt(48);
  12. o.writeInt(32);
  13. for(int l = 0; l < 24; l++)
  14. {
  15. for(int i = 0; i < 64; i++)
  16. {
  17. o.writeShort(1);
  18. }
  19. for(int i = 0; i < 64; i++)
  20. {
  21. o.writeShort(0);
  22. }
  23. for(int i = 0; i < 64; i++)
  24. {
  25. o.writeShort(14);
  26. }
  27. for(int i = 0; i < 64; i++)
  28. {
  29. o.writeShort(15);
  30. }
  31. }
  32. out.flush();
  33. }
  34. catch(Exception ex)
  35. {
  36. ex.printStackTrace();
  37. }*/
  38. Game game = new Game();
  39. game.run();
  40. /*World w = new World();
  41. try(FileOutputStream out = new FileOutputStream(new File("./testworld")))
  42. {
  43. WrappedOutputStream o = new WrappedOutputStream(out);
  44. o.writeInt(16);
  45. o.writeInt(16);
  46. for(int i = 0; i < 256; i++)
  47. {
  48. o.writeShort(i);
  49. }
  50. out.flush();
  51. }
  52. catch(Exception ex)
  53. {
  54. ex.printStackTrace();
  55. }*/
  56. //for(int i = 0; i < 736; i++)
  57. //{
  58. // System.out.println("public static final TexturedTile OUT_" + i + " = register(" + i + ", new TexturedTile(\"out" + i + ".png\"));");
  59. //}
  60. /*
  61. try
  62. {
  63. BufferedImage image = ImageIO.read(new File("tileset-blackvolution.png"));
  64. int w = image.getWidth();
  65. int h = image.getHeight();
  66. int counter = 0;
  67. for(int iy = 0; iy < h; iy += 16)
  68. {
  69. for(int ix = 0; ix < w; ix += 16)
  70. {
  71. BufferedImage out = new BufferedImage(16, 16, 2);
  72. for(int x = 0; x < 16; x++)
  73. {
  74. for(int y = 0; y < 16; y++)
  75. {
  76. out.setRGB(x, y, image.getRGB(x + ix, y + iy));
  77. }
  78. }
  79. ImageIO.write(out, "png", new File("images/out" + counter + ".png"));
  80. counter++;
  81. }
  82. }
  83. }
  84. catch(Exception ex)
  85. {
  86. ex.printStackTrace();
  87. }*/
  88. }
  89. }