mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Rdio sets no longer need a battery.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7974 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3981,19 +3981,6 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
|
||||
DrawItemUIBarEx( pObject, DRAW_ITEM_TEMPERATURE, sX, sY + sHeight-1, ITEMDESC_ITEM_STATUS_WIDTH, (INT16)((sHeight-1)*(1-condition)), colour, colour, TRUE, guiSAVEBUFFER);
|
||||
}
|
||||
// Flugente: display energy level of power packs
|
||||
else if ( HasItemFlag(pObject->usItem, POWER_PACK) )
|
||||
{
|
||||
FLOAT energylevel = (*pObject)[0]->data.bTemperature / (FLOAT)OVERHEATING_MAX_TEMPERATURE;
|
||||
|
||||
UINT32 red = (UINT32) ( 255 * ( 1.0 - max(0, 2*energylevel - 1.0) ) );
|
||||
UINT32 green = (UINT32) ( 255 * ( min(1.0, 2*energylevel) ) );
|
||||
UINT32 blue = 0;
|
||||
|
||||
UINT16 colour = Get16BPPColor( FROMRGB( red, green, blue ) );
|
||||
|
||||
DrawItemUIBarEx( pObject, DRAW_ITEM_TEMPERATURE, sX, sY + sHeight-1, ITEMDESC_ITEM_STATUS_WIDTH, sHeight-1, colour, colour, TRUE, guiSAVEBUFFER);
|
||||
}
|
||||
}
|
||||
|
||||
// display symbol if we are leaning our weapon on something
|
||||
@@ -6975,22 +6962,6 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
DrawItemUIBarEx( &(*iter), DRAW_ITEM_TEMPERATURE, sCenX+4, sCenY, ITEM_BAR_WIDTH, ITEM_BAR_HEIGHT, colour, colour, TRUE, guiSAVEBUFFER );
|
||||
}
|
||||
// Flugente: display energy level of power packs
|
||||
else if ( HasItemFlag(iter->usItem, POWER_PACK) )
|
||||
{
|
||||
if ( OVERHEATING_MAX_TEMPERATURE > 0 )
|
||||
{
|
||||
FLOAT energylevel = (*iter)[0]->data.bTemperature / (FLOAT)OVERHEATING_MAX_TEMPERATURE;
|
||||
|
||||
UINT32 red = (UINT32) ( 255 * ( 1.0 - max(0, 2*energylevel - 1.0) ) );
|
||||
UINT32 green = (UINT32) ( 255 * ( min(1.0, 2*energylevel) ) );
|
||||
UINT32 blue = 0;
|
||||
|
||||
UINT16 colour = Get16BPPColor( FROMRGB( red, green, blue ) );
|
||||
|
||||
DrawItemUIBarEx( &(*iter), DRAW_ITEM_TEMPERATURE, sCenX+4, sCenY, ITEM_BAR_WIDTH, ITEM_BAR_HEIGHT, colour, colour, TRUE, guiSAVEBUFFER );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7279,54 +7250,6 @@ void RenderItemDescriptionBox( )
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
}
|
||||
else if ( HasItemFlag(gpItemDescObject->usItem, POWER_PACK) )
|
||||
{
|
||||
if ( OVERHEATING_MAX_TEMPERATURE > 0 )
|
||||
{
|
||||
FLOAT energylevel = (*gpItemDescObject)[0]->data.bTemperature / (FLOAT)OVERHEATING_MAX_TEMPERATURE;
|
||||
|
||||
UINT32 red = (UINT32) ( 255 * ( 1.0 - max(0, 2*energylevel - 1.0) ) );
|
||||
UINT32 green = (UINT32) ( 255 * ( min(1.0, 2*energylevel) ) );
|
||||
UINT32 blue = 0;
|
||||
|
||||
UINT8 stringNum = 5;
|
||||
if ( energylevel > 0.8f )
|
||||
stringNum = 1;
|
||||
else if ( energylevel > 0.6f )
|
||||
stringNum = 2;
|
||||
else if ( energylevel > 0.4f )
|
||||
stringNum = 3;
|
||||
else if ( energylevel > 0.2f )
|
||||
stringNum = 4;
|
||||
|
||||
// UDB system displays a string with colored condition text.
|
||||
int regionindex = 7;
|
||||
SetFontForeground( ForegroundColor );
|
||||
swprintf( pStr, L"%s", gPowerPackDesc[STR_POWERPACK_BEGIN] ); // "Temperature is "
|
||||
mprintf( gItemDescTextRegions[regionindex].sLeft, gItemDescTextRegions[regionindex].sTop, pStr );
|
||||
// Record length
|
||||
INT16 indent = StringPixLength( gPowerPackDesc[STR_POWERPACK_BEGIN], ITEMDESC_FONT );
|
||||
|
||||
swprintf( pStr, L"%s", gPowerPackDesc[stringNum] );
|
||||
|
||||
SetRGBFontForeground( red, green, blue );
|
||||
|
||||
mprintf( gItemDescTextRegions[regionindex].sLeft+indent+2, gItemDescTextRegions[regionindex].sTop, pStr );
|
||||
// Record length
|
||||
indent += StringPixLength( gPowerPackDesc[stringNum], ITEMDESC_FONT );
|
||||
|
||||
SetFontForeground( ForegroundColor );
|
||||
swprintf( pStr, L"%s", gPowerPackDesc[STR_POWERPACK_END] ); // "."
|
||||
mprintf( gItemDescTextRegions[regionindex].sLeft + indent + 2, gItemDescTextRegions[regionindex].sTop, pStr );
|
||||
|
||||
// to get the text to the left side...
|
||||
swprintf( pStr, L"");
|
||||
|
||||
FindFontRightCoordinates( gItemDescTextRegions[regionindex].sLeft, gItemDescTextRegions[regionindex].sTop, gItemDescTextRegions[regionindex].sRight - gItemDescTextRegions[regionindex].sLeft ,gItemDescTextRegions[regionindex].sBottom - gItemDescTextRegions[regionindex].sTop ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
}
|
||||
|
||||
// UDB system displays a string with colored condition text.
|
||||
SetFontForeground( ForegroundColor );
|
||||
|
||||
Reference in New Issue
Block a user