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,13 +28,18 @@ public class DrawLoop {
|
|||||||
if (index<0||index>=p.length||p[index]==sprite.getBi_array()[Y*sprite.getWidth()+X]) {
|
if (index<0||index>=p.length||p[index]==sprite.getBi_array()[Y*sprite.getWidth()+X]) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} 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) {
|
public static void Draw(int[] canvas,int index, int col,boolean transparency) {
|
||||||
|
if (!transparency) {
|
||||||
|
canvas[index]=col;
|
||||||
|
return;
|
||||||
|
}
|
||||||
int alpha = col>>>24;
|
int alpha = col>>>24;
|
||||||
if (alpha==0) {
|
if (alpha==0) {
|
||||||
return;}
|
return;}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user