fix PHOT/BIZ* transparency

This commit is contained in:
mniip 2013-12-13 04:51:00 +04:00 committed by jacob1
parent 12d98dada1
commit 5fc07b4c3c

View File

@ -2145,7 +2145,7 @@ void GameView::OnDraw()
{ {
int i, cr, cg, cb, j, h = 3, x = XRES-19-textWidth, y = 10; int i, cr, cg, cb, j, h = 3, x = XRES-19-textWidth, y = 10;
int tmp; int tmp;
g->fillrect(x, y, 30, h, 64, 64, 64, 255); // coords -1 size +1 to work around bug in fillrect - TODO: fix fillrect g->fillrect(x, y, 30, h, 64, 64, 64, alpha); // coords -1 size +1 to work around bug in fillrect - TODO: fix fillrect
for (i = 0; i < 30; i++) for (i = 0; i < 30; i++)
{ {
if ((wavelengthGfx >> i)&1) if ((wavelengthGfx >> i)&1)
@ -2171,7 +2171,7 @@ void GameView::OnDraw()
cg *= tmp; cg *= tmp;
cb *= tmp; cb *= tmp;
for (j=0; j<h; j++) for (j=0; j<h; j++)
g->blendpixel(x+29-i,y+j,cr>255?255:cr,cg>255?255:cg,cb>255?255:cb,255); g->blendpixel(x+29-i, y+j, cr>255?255:cr, cg>255?255:cg, cb>255?255:cb, alpha);
} }
} }
} }
@ -2190,7 +2190,7 @@ void GameView::OnDraw()
sampleInfo << " GX: " << sample.GravityVelocityX << " GY: " << sample.GravityVelocityY; sampleInfo << " GX: " << sample.GravityVelocityX << " GY: " << sample.GravityVelocityY;
textWidth = Graphics::textwidth((char*)sampleInfo.str().c_str()); textWidth = Graphics::textwidth((char*)sampleInfo.str().c_str());
g->fillrect(XRES-20-textWidth, 26, textWidth+8, 15, 0, 0, 0, alpha*0.5f); g->fillrect(XRES-20-textWidth, 27, textWidth+8, 14, 0, 0, 0, alpha*0.5f);
g->drawtext(XRES-16-textWidth, 30, (const char*)sampleInfo.str().c_str(), 255, 255, 255, alpha*0.75f); g->drawtext(XRES-16-textWidth, 30, (const char*)sampleInfo.str().c_str(), 255, 255, 255, alpha*0.75f);
} }
} }