mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-22 10:39:18 +01:00
fix transparency issue in metroid fusion
This commit is contained in:
parent
09bdc46135
commit
b0cbed213c
@ -324,45 +324,27 @@ void mode0RenderLineNoWindow()
|
|||||||
} else {
|
} else {
|
||||||
// semi-transparent OBJ
|
// semi-transparent OBJ
|
||||||
u32 back = backdrop;
|
u32 back = backdrop;
|
||||||
u8 top2 = 0x20;
|
u8 top2 = 0x20;
|
||||||
|
|
||||||
//--DCN
|
if(line0[x] < back) {
|
||||||
// This is pretty much the exact same result:
|
back = line0[x];
|
||||||
// line1[x] < (back & 0xFF000000)
|
top2 = 0x01;
|
||||||
//
|
}
|
||||||
// (u8)(line0[x]>>24) < (u8)(back >> 24)
|
|
||||||
//
|
if(line1[x] < (back & 0xFF000000)) {
|
||||||
// The only difference is that the first is stored in a u32,
|
back = line1[x];
|
||||||
// and the second is stored in a u8
|
top2 = 0x02;
|
||||||
//*
|
}
|
||||||
u8 li0 = (u8)(line0[x]>>24);
|
|
||||||
u8 li1 = (u8)(line1[x]>>24);
|
if(line2[x] < (back & 0xFF000000)) {
|
||||||
u8 li2 = (u8)(line2[x]>>24);
|
back = line2[x];
|
||||||
u8 li3 = (u8)(line3[x]>>24);
|
top2 = 0x04;
|
||||||
|
}
|
||||||
u8 r = (li1 < li0) ? (li1) : (li0);
|
|
||||||
|
if(line3[x] < (back & 0xFF000000)) {
|
||||||
if(li2 < r) {
|
back = line3[x];
|
||||||
r = (li3 < li2) ? (li3) : (li2);
|
top2 = 0x08;
|
||||||
}else if(li3 < r){
|
}
|
||||||
r = (li3);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(r < (u8)(color >> 24)) {
|
|
||||||
if(r == li0){
|
|
||||||
back = line0[x];
|
|
||||||
top2 = 0x01;
|
|
||||||
}else if(r == li1){
|
|
||||||
back = line1[x];
|
|
||||||
top2 = 0x02;
|
|
||||||
}else if(r == li2){
|
|
||||||
back = line2[x];
|
|
||||||
top2 = 0x04;
|
|
||||||
}else if(r == li3){
|
|
||||||
back = line3[x];
|
|
||||||
top2 = 0x08;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(top2 & (BLDMOD>>8))
|
if(top2 & (BLDMOD>>8))
|
||||||
color = gfxAlphaBlend(color, back,
|
color = gfxAlphaBlend(color, back,
|
||||||
|
Loading…
Reference in New Issue
Block a user