diff --git a/src/sig/DrawLoop.java b/src/sig/DrawLoop.java index 2f948ca..6b3dded 100644 --- a/src/sig/DrawLoop.java +++ b/src/sig/DrawLoop.java @@ -28,14 +28,19 @@ public class DrawLoop { if (index<0||index>=p.length||p[index]==sprite.getBi_array()[Y*sprite.getWidth()+X]) { continue; } else { - Draw(p,index,sprite.getBi_array()[Y*sprite.getWidth()+X]); + Draw(p,index,sprite.getBi_array()[Y*sprite.getWidth()+X],true); + //Draw(p,index,sprite.getBi_array()[Y*sprite.getWidth()+X],false); } } } } - public static void Draw(int[] canvas,int index, int col) { - int alpha = col>>>24; + public static void Draw(int[] canvas,int index, int col,boolean transparency) { + if (!transparency) { + canvas[index]=col; + return; + } + int alpha = col>>>24; if (alpha==0) { return;} else diff --git a/src/sig/RabiClone.java b/src/sig/RabiClone.java index 459fee6..dd1a123 100644 --- a/src/sig/RabiClone.java +++ b/src/sig/RabiClone.java @@ -44,7 +44,7 @@ public class RabiClone{ p.render(); for (int i=0;i<10;i++) { - OBJ.add(new Player(p)); + OBJ.add(new Player(p)); } long lastGameTime = System.nanoTime();