void drawGUI()
{
int i,j;
setLucent(entity.y[player]*50/451);
TBlit(189,420,gui_img,screen);//draw the gui BG
line(260,465,379,465,RGB(255,0,0),screen);//a line to keep track of some form of TBA stuff (maybe a super attack)
if(specialEventCounter>0) printCenter(320,422,screen,fnt,str(specialEventCounter));//a timer/counter area for when one is needed to be shown to the player
//draw equpied items
Tblit(196,421,itemImage[itemEquiped[0]],screen);
if(itemInventory[itemEquiped[0]]>0) printRight(246,457,screen,fnt,str(itemInventory[itemEquiped[0]]));
Tblit(394,421,itemImage[itemEquiped[1]],screen);
if(itemInventory[itemEquiped[1]]>0) printRight(444,457,screen,fnt,str(itemInventory[itemEquiped[1]]));
PrintString(246,425,screen,0,buttonName[1]);//action 1 key text
PrintRight(393,425,screen,0,buttonName[2]);//action 2 key text
if(allEntities[player].currentLife>18) //draw the life
{
setLucent(entity.y[player]*50/451+25);
for(i=0;i<18;i++) printString(i>>1*14+259,438,screen,fnt,"~");
setLucent(entity.y[player]*50/451-25);
if(allEntities[player].currentLife%2==0) for(i=0;i<allEntities[player].currentLife-18;i++) printString(i>>1*14+256,439,screen,fnt,"~");
else
{
for(i=0;i<(allEntities[player].currentLife-19);i++) printString(i>>1*14+256,439,screen,fnt,"~");
printString(i>>1*14+256,439,screen,fnt,"|");
}
}
else
{
if(allEntities[player].currentLife%2==0) for(i=0;i<allEntities[player].currentLife;i++) printString(i>>1*14+259,438,screen,fnt,"~");
else
{
for(i=0;i<(allEntities[player].currentLife-1);i++) printString(i>>1*14+259,438,screen,fnt,"~");
printString(i>>1*14+259,438,screen,fnt,"|");
}
}
setLucent(0);
}
here's the code, I've already solved it however, I removed the additional setlucent values other than the first and the problem vanished. Thing is now those hearts (EDIT: the ~ and | are displayed as hearts from the font) do not appear 25 more (or 25 less for the other setlucent) transparent then the background image when the player is under it. Any solutions to that, I know it's simple I'm just sleepy.