include non-transparent drawing code
Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
8bee6dd30c
commit
9ba0af090e
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user