mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
bug fixes from Overhaul:
- Data type changes - Templates removed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+125
-125
@@ -257,13 +257,13 @@ BOOLEAN gfInItemDescBox = FALSE;
|
||||
UINT32 guiCurrentItemDescriptionScreen=0;
|
||||
OBJECTTYPE *gpItemDescObject = NULL;
|
||||
BOOLEAN gfItemDescObjectIsAttachment = FALSE;
|
||||
wchar_t gzItemName[ SIZE_ITEM_NAME ];
|
||||
wchar_t gzItemDesc[ SIZE_ITEM_INFO ];
|
||||
wchar_t gzItemPros[ SIZE_ITEM_PROS ];
|
||||
wchar_t gzItemCons[ SIZE_ITEM_CONS ];
|
||||
wchar_t gzFullItemPros[ SIZE_ITEM_PROS ];
|
||||
wchar_t gzFullItemCons[ SIZE_ITEM_PROS ];
|
||||
wchar_t gzFullItemTemp[ SIZE_ITEM_PROS ]; // necessary, unfortunately
|
||||
CHAR16 gzItemName[ SIZE_ITEM_NAME ];
|
||||
CHAR16 gzItemDesc[ SIZE_ITEM_INFO ];
|
||||
CHAR16 gzItemPros[ SIZE_ITEM_PROS ];
|
||||
CHAR16 gzItemCons[ SIZE_ITEM_CONS ];
|
||||
CHAR16 gzFullItemPros[ SIZE_ITEM_PROS ];
|
||||
CHAR16 gzFullItemCons[ SIZE_ITEM_PROS ];
|
||||
CHAR16 gzFullItemTemp[ SIZE_ITEM_PROS ]; // necessary, unfortunately
|
||||
void ItemDescCallback( MOUSE_REGION * pRegion, INT32 iReason );
|
||||
INT16 gsInvDescX;
|
||||
INT16 gsInvDescY;
|
||||
@@ -590,10 +590,10 @@ BOOLEAN AttemptToAddSubstring( STR16 zDest, STR16 zTemp, UINT32 * puiStringLengt
|
||||
}
|
||||
}
|
||||
|
||||
void GenerateProsString( wchar_t * zItemPros, OBJECTTYPE * pObject, UINT32 uiPixLimit )
|
||||
void GenerateProsString( STR16 zItemPros, OBJECTTYPE * pObject, UINT32 uiPixLimit )
|
||||
{
|
||||
UINT32 uiStringLength = 0;
|
||||
wchar_t * zTemp;
|
||||
STR16 zTemp;
|
||||
UINT16 usItem = pObject->usItem;
|
||||
UINT8 ubWeight;
|
||||
|
||||
@@ -714,10 +714,10 @@ void GenerateProsString( wchar_t * zItemPros, OBJECTTYPE * pObject, UINT32 uiPix
|
||||
}
|
||||
}
|
||||
|
||||
void GenerateConsString( wchar_t * zItemCons, OBJECTTYPE * pObject, UINT32 uiPixLimit )
|
||||
void GenerateConsString( STR16 zItemCons, OBJECTTYPE * pObject, UINT32 uiPixLimit )
|
||||
{
|
||||
UINT32 uiStringLength = 0;
|
||||
wchar_t * zTemp;
|
||||
STR16 zTemp;
|
||||
UINT8 ubWeight;
|
||||
UINT16 usItem = pObject->usItem;
|
||||
|
||||
@@ -1058,7 +1058,7 @@ void RenderInvBodyPanel( SOLDIERTYPE *pSoldier, INT16 sX, INT16 sY )
|
||||
void HandleRenderInvSlots( SOLDIERTYPE *pSoldier, UINT8 fDirtyLevel )
|
||||
{
|
||||
INT32 cnt;
|
||||
static wchar_t pStr[ 150 ];
|
||||
static CHAR16 pStr[ 150 ];
|
||||
|
||||
if ( InItemDescriptionBox( ) || InItemStackPopup( ) || InKeyRingPopup( ) )
|
||||
{
|
||||
@@ -1999,7 +1999,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
INT16 sFontX2, sFontY2;
|
||||
INT16 sFontX, sFontY;
|
||||
|
||||
static wchar_t pStr[ 100 ], pStr2[ 100 ];
|
||||
static CHAR16 pStr[ 100 ], pStr2[ 100 ];
|
||||
|
||||
if ( pObject->usItem == NOTHING )
|
||||
{
|
||||
@@ -2107,11 +2107,11 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
|
||||
if ( sWidth >= ( BIG_INV_SLOT_WIDTH - 10 ) )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, TacticalStr[ JAMMED_ITEM_STR ] );
|
||||
swprintf( pStr, TacticalStr[ JAMMED_ITEM_STR ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, TacticalStr[ SHORT_JAMMED_GUN ] );
|
||||
swprintf( pStr, TacticalStr[ SHORT_JAMMED_GUN ] );
|
||||
}
|
||||
|
||||
VarFindFontCenterCoordinates( sX, sY, sWidth, sHeight , ITEM_FONT, &sNewX, &sNewY, pStr );
|
||||
@@ -2130,7 +2130,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
SetFontForeground( FONT_GRAY4 );
|
||||
|
||||
sNewY = sY + sHeight - 10;
|
||||
swprintf( (wchar_t *)pStr, L"%d", pObject->ubNumberOfObjects );
|
||||
swprintf( pStr, L"%d", pObject->ubNumberOfObjects );
|
||||
|
||||
// Get length of string
|
||||
uiStringLength=StringPixLength(pStr, ITEM_FONT );
|
||||
@@ -2160,7 +2160,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
}
|
||||
|
||||
sNewY = sY;
|
||||
swprintf( (wchar_t *)pStr, L"*" );
|
||||
swprintf( pStr, L"*" );
|
||||
|
||||
// Get length of string
|
||||
uiStringLength=StringPixLength(pStr, ITEM_FONT );
|
||||
@@ -2181,27 +2181,27 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
sNewY = sY + 13; // rather arbitrary
|
||||
if ( pSoldier->bWeaponMode == WM_BURST )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"BRST" );
|
||||
swprintf( pStr, L"BRST" );
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
else if(pSoldier->bWeaponMode == WM_AUTOFIRE)
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"AUTO" );
|
||||
swprintf( pStr, L"AUTO" );
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
else if(pSoldier->bWeaponMode == WM_ATTACHED_GL)
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"GL" );
|
||||
swprintf( pStr, L"GL" );
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
}
|
||||
else if(pSoldier->bWeaponMode == WM_ATTACHED_GL_BURST)
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"GL BRST" );
|
||||
swprintf( pStr, L"GL BRST" );
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
}
|
||||
else if(pSoldier->bWeaponMode == WM_ATTACHED_GL_AUTO)
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"GL AUTO" );
|
||||
swprintf( pStr, L"GL AUTO" );
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
}
|
||||
|
||||
@@ -2235,11 +2235,11 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
// Set string
|
||||
if ( ubStatusIndex < RENDER_ITEM_ATTACHMENT1 )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s", ShortItemNames[ pObject->usItem ] );
|
||||
swprintf( pStr, L"%s", ShortItemNames[ pObject->usItem ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s", ShortItemNames[ pObject->usAttachItem[ ubStatusIndex - RENDER_ITEM_ATTACHMENT1 ] ] );
|
||||
swprintf( pStr, L"%s", ShortItemNames[ pObject->usAttachItem[ ubStatusIndex - RENDER_ITEM_ATTACHMENT1 ] ] );
|
||||
}
|
||||
|
||||
fLineSplit = WrapString( pStr, pStr2, WORD_WRAP_INV_WIDTH, ITEM_FONT );
|
||||
@@ -2362,10 +2362,10 @@ BOOLEAN InitKeyItemDescriptionBox( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT1
|
||||
BOOLEAN InternalInitItemDescriptionBox( OBJECTTYPE *pObject, INT16 sX, INT16 sY, UINT8 ubStatusIndex, SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT8 ubString[48];
|
||||
CHAR8 ubString[48];
|
||||
INT32 cnt;
|
||||
INT16 pStr[10];
|
||||
UINT16 usX, usY;
|
||||
CHAR16 pStr[10];
|
||||
INT16 usX, usY;
|
||||
INT16 sForeColour;
|
||||
INT16 sProsConsIndent;
|
||||
|
||||
@@ -2415,11 +2415,11 @@ BOOLEAN InternalInitItemDescriptionBox( OBJECTTYPE *pObject, INT16 sX, INT16 sY,
|
||||
// if( guiCurrentScreen != MAP_SCREEN )
|
||||
//if( guiCurrentItemDescriptionScreen != MAP_SCREEN )
|
||||
if ( GetMagSize(gpItemDescObject) <= 99 )
|
||||
swprintf( (wchar_t *)pStr, L"%d/%d", gpItemDescObject->ubGunShotsLeft, GetMagSize(gpItemDescObject));
|
||||
swprintf( pStr, L"%d/%d", gpItemDescObject->ubGunShotsLeft, GetMagSize(gpItemDescObject));
|
||||
else
|
||||
swprintf( (wchar_t *)pStr, L"%d", gpItemDescObject->ubGunShotsLeft );
|
||||
swprintf( pStr, L"%d", gpItemDescObject->ubGunShotsLeft );
|
||||
|
||||
FilenameForBPP("INTERFACE\\infobox.sti", (STR)ubString);
|
||||
FilenameForBPP("INTERFACE\\infobox.sti", ubString);
|
||||
sForeColour = ITEMDESC_AMMO_FORE;
|
||||
|
||||
// TODO: WANNE: Make own sti for the ammo types and an own for the interface
|
||||
@@ -2799,7 +2799,7 @@ BOOLEAN ReloadItemDesc( )
|
||||
void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
static BOOLEAN fRightDown = FALSE;
|
||||
wchar_t pStr[10];
|
||||
CHAR16 pStr[10];
|
||||
|
||||
/* region gets disabled in SKI for shopkeeper boxes. It now works normally for merc's inventory boxes!
|
||||
//if we are currently in the shopkeeper interface, return;
|
||||
@@ -2831,7 +2831,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
gpItemPointer = &gItemPointer;
|
||||
gpItemPointerSoldier = gpItemDescSoldier;
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"0" );
|
||||
swprintf( pStr, L"0" );
|
||||
SpecifyButtonText( giItemDescAmmoButton, pStr );
|
||||
|
||||
// Set mouse
|
||||
@@ -2863,7 +2863,7 @@ void ItemDescAmmoCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
//fItemDescDelete = TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"0" );
|
||||
swprintf( pStr, L"0" );
|
||||
SpecifyButtonText( giItemDescAmmoButton, pStr );
|
||||
|
||||
fItemDescDelete = TRUE;
|
||||
@@ -3061,10 +3061,10 @@ void RenderItemDescriptionBox( )
|
||||
CHAR16 sTempString[ 128 ];
|
||||
|
||||
UINT16 uiStringLength, uiRightLength;
|
||||
static INT16 pStr[ 100 ];
|
||||
static CHAR16 pStr[ 100 ];
|
||||
INT32 cnt;
|
||||
FLOAT fWeight;
|
||||
UINT16 usX, usY;
|
||||
INT16 usX, usY;
|
||||
UINT8 ubAttackAPs;
|
||||
BOOLEAN fHatchOutAttachments = gfItemDescObjectIsAttachment; // if examining attachment, always hatch out attachment slots
|
||||
INT16 sProsConsIndent;
|
||||
@@ -3203,11 +3203,11 @@ void RenderItemDescriptionBox( )
|
||||
if ( (Item[gpItemDescObject->usItem].fingerprintid ) && gpItemDescObject->ubImprintID < NO_PROFILE )
|
||||
{
|
||||
// add name noting imprint
|
||||
swprintf( (wchar_t *)pStr, L"%s %s (%s)", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ], gMercProfiles[ gpItemDescObject->ubImprintID ].zNickname );
|
||||
swprintf( pStr, L"%s %s (%s)", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ], gMercProfiles[ gpItemDescObject->ubImprintID ].zNickname );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s %s", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ] );
|
||||
swprintf( pStr, L"%s %s", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ] );
|
||||
}
|
||||
|
||||
FindFontRightCoordinates( (INT16) MAP_ITEMDESC_CALIBER_X, (INT16) MAP_ITEMDESC_CALIBER_Y, MAP_ITEMDESC_CALIBER_WIDTH, ITEM_STATS_HEIGHT, pStr, ITEMDESC_FONT, &usX, &usY);
|
||||
@@ -3301,7 +3301,7 @@ void RenderItemDescriptionBox( )
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
|
||||
//LABELS
|
||||
swprintf( sTempString, (wchar_t *)gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
swprintf( sTempString, gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
mprintf( gMapWeaponStats[ 0 ].sX + gsInvDescX, gMapWeaponStats[ 0 ].sY + gsInvDescY, L"%s", sTempString );
|
||||
//mprintf( gMapWeaponStats[ 2 ].sX + gsInvDescX, gMapWeaponStats[ 2 ].sY + gsInvDescY, L"%s", gMapWeaponStats[ 2 ].zDesc );
|
||||
if ( Item[ gpItemDescObject->usItem ].usItemClass & (IC_GUN | IC_LAUNCHER ) )
|
||||
@@ -3330,7 +3330,7 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 5 );
|
||||
//Status
|
||||
// This is gross, but to get the % to work out right...
|
||||
swprintf( (wchar_t *)pStr, L"%2d%%", gpItemDescObject->bStatus[ gubItemDescStatusIndex ] );
|
||||
swprintf( pStr, L"%2d%%", gpItemDescObject->bStatus[ gubItemDescStatusIndex ] );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 1 ].sX + gsInvDescX + gMapWeaponStats[ 1 ].sValDx + 6), (INT16)(gMapWeaponStats[ 1 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
wcscat( pStr, L"%%" );
|
||||
mprintf( usX, usY, pStr );
|
||||
@@ -3345,7 +3345,7 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 5 );
|
||||
}
|
||||
//Weight
|
||||
swprintf( (wchar_t *)pStr, L"%1.1f", fWeight );
|
||||
swprintf( pStr, L"%1.1f", fWeight );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 0 ].sX + gsInvDescX + gMapWeaponStats[ 0 ].sValDx+6), (INT16)(gMapWeaponStats[ 0 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
|
||||
@@ -3362,7 +3362,7 @@ void RenderItemDescriptionBox( )
|
||||
}
|
||||
|
||||
//Range
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ( GunRange( gpItemDescObject ) ) / 10 );
|
||||
swprintf( pStr, L"%2d", ( GunRange( gpItemDescObject ) ) / 10 );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 3 ].sX + gsInvDescX + gMapWeaponStats[ 3 ].sValDx), (INT16)(gMapWeaponStats[ 3 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3381,7 +3381,7 @@ void RenderItemDescriptionBox( )
|
||||
}
|
||||
|
||||
//Damage
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubImpact );
|
||||
swprintf( pStr, L"%2d", ubImpact );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 4 ].sX + gsInvDescX + gMapWeaponStats[ 4 ].sValDx), (INT16)(gMapWeaponStats[ 4 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3400,7 +3400,7 @@ void RenderItemDescriptionBox( )
|
||||
//Ap's
|
||||
if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs );
|
||||
swprintf( pStr, L"%2d", ubAttackAPs );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 5 ].sX + gsInvDescX + gMapWeaponStats[ 5 ].sValDx), (INT16)(gMapWeaponStats[ 5 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3417,7 +3417,7 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 5 );
|
||||
}
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, gpItemDescObject ) );
|
||||
swprintf( pStr, L"%2d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, gpItemDescObject ) );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 6 ].sX + gsInvDescX + gMapWeaponStats[ 6 ].sValDx), (INT16)(gMapWeaponStats[ 6 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3426,7 +3426,7 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
SetFontForeground( 5 );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, gpItemDescObject, 3 ) );
|
||||
swprintf( pStr, L"%2d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, gpItemDescObject, 3 ) );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 6 ].sX + gsInvDescX + gMapWeaponStats[ 6 ].sValDx), (INT16)(gMapWeaponStats[ 6 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3443,9 +3443,9 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
// if the player is taking money from their account
|
||||
if( gfAddingMoneyToMercFromPlayersAccount )
|
||||
swprintf( (wchar_t *)pStr, L"%ld", LaptopSaveInfo.iCurrentBalance );
|
||||
swprintf( pStr, L"%ld", LaptopSaveInfo.iCurrentBalance );
|
||||
else
|
||||
swprintf( (wchar_t *)pStr, L"%ld", gRemoveMoney.uiTotalAmount );
|
||||
swprintf( pStr, L"%ld", gRemoveMoney.uiTotalAmount );
|
||||
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
@@ -3474,7 +3474,7 @@ void RenderItemDescriptionBox( )
|
||||
mprintf( (UINT16)(gMapMoneyButtonLoc.x + gMoneyButtonOffsets[cnt].x), (UINT16)(gMapMoneyButtonLoc.y + gMoneyButtonOffsets[cnt].y ), gzMoneyAmounts[4] );
|
||||
|
||||
// The Money Remaining
|
||||
swprintf( (wchar_t *)pStr, L"%ld", gRemoveMoney.uiMoneyRemaining );
|
||||
swprintf( pStr, L"%ld", gRemoveMoney.uiMoneyRemaining );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
uiStringLength=StringPixLength(pStr, ITEMDESC_FONT );
|
||||
@@ -3484,7 +3484,7 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
// The money removing
|
||||
SetFontForeground( 5 );
|
||||
swprintf( (wchar_t *)pStr, L"%ld", gRemoveMoney.uiMoneyRemoving );
|
||||
swprintf( pStr, L"%ld", gRemoveMoney.uiMoneyRemoving );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
uiStringLength=StringPixLength(pStr, ITEMDESC_FONT );
|
||||
@@ -3502,7 +3502,7 @@ void RenderItemDescriptionBox( )
|
||||
{
|
||||
SetFontForeground( FONT_FCOLOR_WHITE );
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
swprintf( (wchar_t *)pStr, L"%ld", gpItemDescObject->uiMoneyAmount );
|
||||
swprintf( pStr, L"%ld", gpItemDescObject->uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
uiStringLength=StringPixLength(pStr, ITEMDESC_FONT );
|
||||
@@ -3525,7 +3525,7 @@ void RenderItemDescriptionBox( )
|
||||
{
|
||||
mprintf( gMapWeaponStats[ 1 ].sX + gsInvDescX, gMapWeaponStats[ 1 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 1 ] );
|
||||
}
|
||||
swprintf( sTempString, (wchar_t *)gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
swprintf( sTempString, gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
mprintf( gMapWeaponStats[ 0 ].sX + gsInvDescX, gMapWeaponStats[ 0 ].sY + gsInvDescY, sTempString );
|
||||
|
||||
// Values
|
||||
@@ -3535,7 +3535,7 @@ void RenderItemDescriptionBox( )
|
||||
if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_AMMO )
|
||||
{
|
||||
// Ammo
|
||||
swprintf( (wchar_t *)pStr, L"%d/%d", gpItemDescObject->ubShotsLeft[gubItemDescStatusIndex], Magazine[ Item[ gpItemDescObject->usItem ].ubClassIndex ].ubMagSize ); //Pulmu: Correct # of rounds for stacked ammo.
|
||||
swprintf( pStr, L"%d/%d", gpItemDescObject->ubShotsLeft[gubItemDescStatusIndex], Magazine[ Item[ gpItemDescObject->usItem ].ubClassIndex ].ubMagSize ); //Pulmu: Correct # of rounds for stacked ammo.
|
||||
uiStringLength=StringPixLength(pStr, ITEMDESC_FONT );
|
||||
// sStrX = gMapWeaponStats[ 0 ].sX + gsInvDescX + gMapWeaponStats[ 0 ].sValDx + ( uiRightLength - uiStringLength );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 2 ].sX + gsInvDescX + gMapWeaponStats[ 2 ].sValDx+6), (INT16)(gMapWeaponStats[ 2 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &sStrX, &usY);
|
||||
@@ -3544,7 +3544,7 @@ void RenderItemDescriptionBox( )
|
||||
else
|
||||
{
|
||||
//Status
|
||||
swprintf( (wchar_t *)pStr, L"%2d%%", gpItemDescObject->bStatus[ gubItemDescStatusIndex ] );
|
||||
swprintf( pStr, L"%2d%%", gpItemDescObject->bStatus[ gubItemDescStatusIndex ] );
|
||||
uiStringLength=StringPixLength(pStr, ITEMDESC_FONT );
|
||||
// sStrX = gMapWeaponStats[ 1 ].sX + gsInvDescX + gMapWeaponStats[ 1 ].sValDx + ( uiRightLength - uiStringLength );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 1 ].sX + gsInvDescX + gMapWeaponStats[ 1 ].sValDx + 6), (INT16)(gMapWeaponStats[ 1 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &sStrX, &usY);
|
||||
@@ -3553,7 +3553,7 @@ void RenderItemDescriptionBox( )
|
||||
}
|
||||
|
||||
//Weight
|
||||
swprintf( (wchar_t *)pStr, L"%1.1f", fWeight );
|
||||
swprintf( pStr, L"%1.1f", fWeight );
|
||||
uiStringLength=StringPixLength(pStr, ITEMDESC_FONT );
|
||||
// sStrX = gMapWeaponStats[ 0 ].sX + gsInvDescX + gMapWeaponStats[ 0 ].sValDx + ( uiRightLength - uiStringLength );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 0 ].sX + gsInvDescX + gMapWeaponStats[ 0 ].sValDx+6), (INT16)(gMapWeaponStats[ 0 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &sStrX, &usY);
|
||||
@@ -3564,19 +3564,19 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 6 );
|
||||
|
||||
// build description for keys .. the sector found
|
||||
swprintf( (wchar_t *)pStr, L"%s", sKeyDescriptionStrings[ 0 ] );
|
||||
swprintf( pStr, L"%s", sKeyDescriptionStrings[ 0 ] );
|
||||
mprintf( gMapWeaponStats[ 4 ].sX + gsInvDescX, gMapWeaponStats[ 4 ].sY + gsInvDescY, pStr );
|
||||
swprintf( (wchar_t *)pStr, L"%s", sKeyDescriptionStrings[ 1 ] );
|
||||
swprintf( pStr, L"%s", sKeyDescriptionStrings[ 1 ] );
|
||||
mprintf( gMapWeaponStats[ 4 ].sX + gsInvDescX, gMapWeaponStats[ 4 ].sY + gsInvDescY + GetFontHeight( BLOCKFONT ) + 2 , pStr );
|
||||
|
||||
|
||||
SetFontForeground( 5 );
|
||||
GetShortSectorString( ( INT16 ) SECTORX( KeyTable[ gpItemDescObject->ubKeyID ].usSectorFound ), ( INT16 ) SECTORY( KeyTable[ gpItemDescObject->ubKeyID ].usSectorFound ), sTempString );
|
||||
swprintf( (wchar_t *)pStr, L"%s", sTempString );
|
||||
swprintf( pStr, L"%s", sTempString );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 4 ].sX + gsInvDescX ), (INT16)(gMapWeaponStats[ 4 ].sY + gsInvDescY ), 110 ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%d", KeyTable[ gpItemDescObject->ubKeyID ].usDateFound );
|
||||
swprintf( pStr, L"%d", KeyTable[ gpItemDescObject->ubKeyID ].usDateFound );
|
||||
FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 4 ].sX + gsInvDescX ), (INT16)(gMapWeaponStats[ 4 ].sY + gsInvDescY + GetFontHeight( BLOCKFONT ) + 2 ), 110 ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3707,11 +3707,11 @@ void RenderItemDescriptionBox( )
|
||||
if ( ( Item[gpItemDescObject->usItem].fingerprintid ) && gpItemDescObject->ubImprintID < NO_PROFILE )
|
||||
{
|
||||
// add name noting imprint
|
||||
swprintf( (wchar_t *)pStr, L"%s %s (%s)", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ], gMercProfiles[ gpItemDescObject->ubImprintID ].zNickname );
|
||||
swprintf( pStr, L"%s %s (%s)", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ], gMercProfiles[ gpItemDescObject->ubImprintID ].zNickname );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s %s", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ] );
|
||||
swprintf( pStr, L"%s %s", AmmoCaliber[ Weapon[ gpItemDescObject->usItem ].ubCalibre ], WeaponType[ Weapon[ gpItemDescObject->usItem ].ubWeaponType ] );
|
||||
}
|
||||
|
||||
FindFontRightCoordinates( (INT16) ITEMDESC_CALIBER_X, (INT16) ITEMDESC_CALIBER_Y, ITEMDESC_CALIBER_WIDTH, ITEM_STATS_HEIGHT, pStr, ITEMDESC_FONT, &usX, &usY);
|
||||
@@ -3795,7 +3795,7 @@ void RenderItemDescriptionBox( )
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
|
||||
//LABELS
|
||||
swprintf( sTempString, (wchar_t *)gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
swprintf( sTempString, gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
mprintf( gWeaponStats[ 0 ].sX + gsInvDescX, gWeaponStats[ 0 ].sY + gsInvDescY, sTempString );
|
||||
// mprintf( gWeaponStats[ 1 ].sX + gsInvDescX, gWeaponStats[ 1 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 1 ].zDesc );
|
||||
// mprintf( gWeaponStats[ 2 ].sX + gsInvDescX, gWeaponStats[ 2 ].sY + gsInvDescY, L"%s", gWeaponStats[ 2 ].zDesc );
|
||||
@@ -3831,13 +3831,13 @@ void RenderItemDescriptionBox( )
|
||||
}
|
||||
|
||||
//Status
|
||||
swprintf( (wchar_t *)pStr, L"%2d%%", gpItemDescObject->bGunStatus );
|
||||
swprintf( pStr, L"%2d%%", gpItemDescObject->bGunStatus );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 1 ].sX + gsInvDescX + gWeaponStats[ 1 ].sValDx), (INT16)(gWeaponStats[ 1 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
wcscat( pStr, L"%%" );
|
||||
mprintf( usX, usY, pStr );
|
||||
|
||||
//Wieght
|
||||
swprintf( (wchar_t *)pStr, L"%1.1f", fWeight );
|
||||
swprintf( pStr, L"%1.1f", fWeight );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 0 ].sX + gsInvDescX + gWeaponStats[ 0 ].sValDx), (INT16)(gWeaponStats[ 0 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
|
||||
@@ -3852,7 +3852,7 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 5 );
|
||||
}
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ( GunRange( gpItemDescObject ) ) / 10 );
|
||||
swprintf( pStr, L"%2d", ( GunRange( gpItemDescObject ) ) / 10 );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 3 ].sX + gsInvDescX + gWeaponStats[ 3 ].sValDx), (INT16)(gWeaponStats[ 3 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3869,7 +3869,7 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 5 );
|
||||
}
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubImpact );
|
||||
swprintf( pStr, L"%2d", ubImpact );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 4 ].sX + gsInvDescX + gWeaponStats[ 4 ].sValDx), (INT16)(gWeaponStats[ 4 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3887,7 +3887,7 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs );
|
||||
swprintf( pStr, L"%2d", ubAttackAPs );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 5 ].sX + gsInvDescX + gWeaponStats[ 5 ].sValDx), (INT16)(gWeaponStats[ 5 ].sY + gsInvDescY ), ITEM_STATS_WIDTH, ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3903,14 +3903,14 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 5 );
|
||||
}
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, gpItemDescObject ) );
|
||||
swprintf( pStr, L"%2d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, gpItemDescObject ) );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 6 ].sX + gsInvDescX + gWeaponStats[ 6 ].sValDx), (INT16)(gWeaponStats[ 6 ].sY + gsInvDescY ), ITEM_STATS_WIDTH, ITEM_STATS_HEIGHT, pStr, BLOCKFONT2, &usX, &usY );
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
else if (GetAutofireShotsPerFiveAPs(gpItemDescObject)> 0)
|
||||
{
|
||||
SetFontForeground( 5 );
|
||||
swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, gpItemDescObject ) );
|
||||
swprintf( pStr, L"%2d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, gpItemDescObject ) );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 6 ].sX + gsInvDescX + gWeaponStats[ 6 ].sValDx), (INT16)(gWeaponStats[ 6 ].sY + gsInvDescY ), ITEM_STATS_WIDTH, ITEM_STATS_HEIGHT, pStr, BLOCKFONT2, &usX, &usY );
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -3951,7 +3951,7 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
// Total Amount
|
||||
SetFontForeground( FONT_WHITE );
|
||||
swprintf( (wchar_t *)pStr, L"%d", gRemoveMoney.uiTotalAmount );
|
||||
swprintf( pStr, L"%d", gRemoveMoney.uiTotalAmount );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
FindFontRightCoordinates( (INT16)(ITEMDESC_NAME_X), (INT16)(ITEMDESC_NAME_Y ), 295,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
@@ -3981,14 +3981,14 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 5 );
|
||||
|
||||
//Display the total amount of money remaining
|
||||
swprintf( (wchar_t *)pStr, L"%ld", gRemoveMoney.uiMoneyRemaining );
|
||||
swprintf( pStr, L"%ld", gRemoveMoney.uiMoneyRemaining );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
FindFontRightCoordinates( (INT16)(gMoneyStats[ 1 ].sX + gsInvDescX + gMoneyStats[ 1 ].sValDx), (INT16)(gMoneyStats[ 1 ].sY + gsInvDescY ), (UINT16)(ITEM_STATS_WIDTH-3),ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
|
||||
//Display the total amount of money removing
|
||||
swprintf( (wchar_t *)pStr, L"%ld", gRemoveMoney.uiMoneyRemoving );
|
||||
swprintf( pStr, L"%ld", gRemoveMoney.uiMoneyRemoving );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
FindFontRightCoordinates( (INT16)(gMoneyStats[ 3 ].sX + gsInvDescX + gMoneyStats[ 3 ].sValDx), (INT16)(gMoneyStats[ 3 ].sY + gsInvDescY), (UINT16)(ITEM_STATS_WIDTH-3) ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
@@ -3999,7 +3999,7 @@ void RenderItemDescriptionBox( )
|
||||
{
|
||||
SetFontForeground( FONT_FCOLOR_WHITE );
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
swprintf( (wchar_t *)pStr, (wchar_t *)L"%ld", gpItemDescObject->uiMoneyAmount );
|
||||
swprintf( pStr, L"%ld", gpItemDescObject->uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
|
||||
@@ -4025,7 +4025,7 @@ void RenderItemDescriptionBox( )
|
||||
}
|
||||
|
||||
//Weight
|
||||
swprintf( sTempString, (wchar_t *)gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
swprintf( sTempString, gWeaponStatsDesc[ 0 ], GetWeightUnitString() );
|
||||
mprintf( gWeaponStats[ 0 ].sX + gsInvDescX, gWeaponStats[ 0 ].sY + gsInvDescY, sTempString );
|
||||
|
||||
// Values
|
||||
@@ -4035,14 +4035,14 @@ void RenderItemDescriptionBox( )
|
||||
{
|
||||
// Ammo - print amount
|
||||
//Status
|
||||
swprintf( (wchar_t *)pStr, L"%d/%d", gpItemDescObject->ubShotsLeft[gubItemDescStatusIndex], Magazine[ Item[ gpItemDescObject->usItem ].ubClassIndex ].ubMagSize ); //Pulmu: Correct # of rounds for stacked ammo
|
||||
swprintf( pStr, L"%d/%d", gpItemDescObject->ubShotsLeft[gubItemDescStatusIndex], Magazine[ Item[ gpItemDescObject->usItem ].ubClassIndex ].ubMagSize ); //Pulmu: Correct # of rounds for stacked ammo
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 2 ].sX + gsInvDescX + gWeaponStats[ 2 ].sValDx), (INT16)(gWeaponStats[ 2 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
else
|
||||
{
|
||||
//Status
|
||||
swprintf( (wchar_t *)pStr, L"%2d%%", gpItemDescObject->bStatus[ gubItemDescStatusIndex ] );
|
||||
swprintf( pStr, L"%2d%%", gpItemDescObject->bStatus[ gubItemDescStatusIndex ] );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 1 ].sX + gsInvDescX + gWeaponStats[ 1 ].sValDx), (INT16)(gWeaponStats[ 1 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
wcscat( pStr, L"%%" );
|
||||
mprintf( usX, usY, pStr );
|
||||
@@ -4053,19 +4053,19 @@ void RenderItemDescriptionBox( )
|
||||
SetFontForeground( 6 );
|
||||
|
||||
// build description for keys .. the sector found
|
||||
swprintf( (wchar_t *)pStr, L"%s", sKeyDescriptionStrings[ 0 ] );
|
||||
swprintf( pStr, L"%s", sKeyDescriptionStrings[ 0 ] );
|
||||
mprintf( gWeaponStats[ 4 ].sX + gsInvDescX, gWeaponStats[ 4 ].sY + gsInvDescY, pStr );
|
||||
swprintf( (wchar_t *)pStr, L"%s", sKeyDescriptionStrings[ 1 ] );
|
||||
swprintf( pStr, L"%s", sKeyDescriptionStrings[ 1 ] );
|
||||
mprintf( gWeaponStats[ 4 ].sX + gsInvDescX, gWeaponStats[ 4 ].sY + gsInvDescY + GetFontHeight( BLOCKFONT ) + 2 , pStr );
|
||||
|
||||
|
||||
SetFontForeground( 5 );
|
||||
GetShortSectorString( ( INT16 ) SECTORX( KeyTable[ gpItemDescObject->ubKeyID ].usSectorFound ), ( INT16 ) SECTORY( KeyTable[ gpItemDescObject->ubKeyID ].usSectorFound ), sTempString );
|
||||
swprintf( (wchar_t *)pStr, L"%s", sTempString );
|
||||
swprintf( pStr, L"%s", sTempString );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 4 ].sX + gsInvDescX ), (INT16)(gWeaponStats[ 4 ].sY + gsInvDescY ), 110 ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%d", KeyTable[ gpItemDescObject->ubKeyID ].usDateFound );
|
||||
swprintf( pStr, L"%d", KeyTable[ gpItemDescObject->ubKeyID ].usDateFound );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 4 ].sX + gsInvDescX ), (INT16)(gWeaponStats[ 4 ].sY + gsInvDescY + GetFontHeight( BLOCKFONT ) + 2 ), 110 ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -4074,7 +4074,7 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
|
||||
//Weight
|
||||
swprintf( (wchar_t *)pStr, L"%1.1f", fWeight );
|
||||
swprintf( pStr, L"%1.1f", fWeight );
|
||||
FindFontRightCoordinates( (INT16)(gWeaponStats[ 0 ].sX + gsInvDescX + gWeaponStats[ 0 ].sValDx), (INT16)(gWeaponStats[ 0 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -6188,7 +6188,7 @@ void SetItemPickupMenuDirty( BOOLEAN fDirtyLevel )
|
||||
BOOLEAN InitializeItemPickupMenu( SOLDIERTYPE *pSoldier, INT16 sGridNo, ITEM_POOL *pItemPool, INT16 sScreenX, INT16 sScreenY, INT8 bZLevel )
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT8 ubString[48];
|
||||
CHAR8 ubString[48];
|
||||
ITEM_POOL *pTempItemPool;
|
||||
INT32 cnt;
|
||||
INT16 sCenX, sCenY, sX, sY, sCenterYVal;
|
||||
@@ -6314,7 +6314,7 @@ BOOLEAN InitializeItemPickupMenu( SOLDIERTYPE *pSoldier, INT16 sGridNo, ITEM_POO
|
||||
gItemPickupMenu.fAllSelected = FALSE;
|
||||
|
||||
//Load images for buttons
|
||||
FilenameForBPP("INTERFACE\\itembox.sti", (STR)ubString );
|
||||
FilenameForBPP("INTERFACE\\itembox.sti", ubString );
|
||||
gItemPickupMenu.iUpButtonImages = LoadButtonImage( ubString, -1,5,-1,10,-1 );
|
||||
gItemPickupMenu.iDownButtonImages = UseLoadedButtonImage( gItemPickupMenu.iUpButtonImages, -1, 7, -1, 12, -1 );
|
||||
gItemPickupMenu.iAllButtonImages = UseLoadedButtonImage( gItemPickupMenu.iUpButtonImages, -1, 6, -1,11, -1 );
|
||||
@@ -6424,7 +6424,7 @@ void SetupPickupPage( INT8 bPage )
|
||||
ITEM_POOL *pTempItemPool;
|
||||
INT16 sValue;
|
||||
OBJECTTYPE *pObject;
|
||||
static INT16 pStr[ 200 ];
|
||||
static CHAR16 pStr[ 200 ];
|
||||
|
||||
|
||||
// Zero out page slots
|
||||
@@ -6492,11 +6492,11 @@ void SetupPickupPage( INT8 bPage )
|
||||
// Adjust for ammo, other thingys..
|
||||
if( Item[ pObject->usItem ].usItemClass & IC_AMMO || Item[ pObject->usItem ].usItemClass & IC_KEY )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"" );
|
||||
swprintf( pStr, L"" );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%d%%", sValue );
|
||||
swprintf( pStr, L"%d%%", sValue );
|
||||
}
|
||||
|
||||
SetRegionFastHelpText( &(gItemPickupMenu.Regions[ cnt - iStart ]), pStr );
|
||||
@@ -6594,7 +6594,7 @@ void RenderItemPickupMenu( )
|
||||
INT16 sX, sY, sCenX, sCenY, sFontX, sFontY, sNewX, sNewY;
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
INT16 pStr[ 100 ];
|
||||
CHAR16 pStr[ 100 ];
|
||||
UINT16 usSubRegion, usHeight, usWidth;
|
||||
INVTYPE *pItem;
|
||||
OBJECTTYPE *pObject;
|
||||
@@ -6702,7 +6702,7 @@ void RenderItemPickupMenu( )
|
||||
sCenX = sX - 4;
|
||||
sCenY = sY + 14;
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%d", pObject->ubNumberOfObjects );
|
||||
swprintf( pStr, L"%d", pObject->ubNumberOfObjects );
|
||||
|
||||
VarFindFontRightCoordinates( sCenX, sCenY, 42, 1 , ITEM_FONT, &sFontX, &sFontY, pStr );
|
||||
mprintf_buffer( pDestBuf, uiDestPitchBYTES, ITEM_FONT, sFontX, sFontY, pStr );
|
||||
@@ -6717,7 +6717,7 @@ void RenderItemPickupMenu( )
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
|
||||
sNewY = sCenY + 2;
|
||||
swprintf( (wchar_t *)pStr, L"*" );
|
||||
swprintf( pStr, L"*" );
|
||||
|
||||
// Get length of string
|
||||
uiStringLength=StringPixLength( pStr, ITEM_FONT );
|
||||
@@ -6757,16 +6757,16 @@ void RenderItemPickupMenu( )
|
||||
// If we are money...
|
||||
if ( Item[ pObject->usItem ].usItemClass == IC_MONEY )
|
||||
{
|
||||
INT16 pStr2[20];
|
||||
swprintf( (wchar_t *)pStr2, L"%ld", pObject->uiMoneyAmount );
|
||||
CHAR16 pStr2[20];
|
||||
swprintf( pStr2, L"%ld", pObject->uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr2 );
|
||||
InsertDollarSignInToString( pStr2 );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s (%ls)", ItemNames[ pObject->usItem ], pStr2 );
|
||||
swprintf( pStr, L"%s (%ls)", ItemNames[ pObject->usItem ], pStr2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s", ShortItemNames[ pObject->usItem ] );
|
||||
swprintf( pStr, L"%s", ShortItemNames[ pObject->usItem ] );
|
||||
}
|
||||
VarFindFontCenterCoordinates( sCenX, sCenY, ITEMPICK_TEXT_WIDTH, 1 , ITEMDESC_FONT, &sFontX, &sFontY, pStr );
|
||||
mprintf_buffer( pDestBuf, uiDestPitchBYTES, ITEMDESC_FONT, sFontX, sFontY, pStr );
|
||||
@@ -7385,9 +7385,9 @@ BOOLEAN AttemptToApplyCamo( SOLDIERTYPE *pSoldier, UINT16 usItemIndex )
|
||||
|
||||
|
||||
|
||||
void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier )
|
||||
void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT16 pStr[ 250 ];
|
||||
CHAR16 pStr[ 250 ];
|
||||
UINT16 usItem = pObject->usItem;
|
||||
INT32 cnt = 0;
|
||||
INT32 iNumAttachments = 0;
|
||||
@@ -7396,8 +7396,8 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
{
|
||||
if ( pSoldier->uiStatusFlags & SOLDIER_DEAD )
|
||||
{
|
||||
swprintf((wchar_t *) pStr, L"" );
|
||||
swprintf( (wchar_t *)pzStr, L"%s", pStr );
|
||||
swprintf( pStr, L"" );
|
||||
swprintf( pzStr, L"%s", pStr );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -7438,7 +7438,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
case MONEY:
|
||||
//Money
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%ld", pObject->uiMoneyAmount );
|
||||
swprintf( pStr, L"%ld", pObject->uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
}
|
||||
@@ -7448,34 +7448,34 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
// alternate money like silver or gold
|
||||
//if ( Item[ usItem ].usItemClass == IC_MONEY )
|
||||
{
|
||||
INT16 pStr2[20];
|
||||
swprintf( (wchar_t *)pStr2, L"%ld", pObject->uiMoneyAmount );
|
||||
CHAR16 pStr2[20];
|
||||
swprintf( pStr2, L"%ld", pObject->uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr2 );
|
||||
InsertDollarSignInToString( pStr2 );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s (%ls)", ItemNames[ usItem ], pStr2 );
|
||||
swprintf( pStr, L"%s (%ls)", ItemNames[ usItem ], pStr2 );
|
||||
}
|
||||
break;
|
||||
|
||||
case IC_GUN:
|
||||
{
|
||||
//Calculate AP's
|
||||
INT16 apStr[20];
|
||||
INT16 apStr2[20];
|
||||
CHAR16 apStr[20];
|
||||
CHAR16 apStr2[20];
|
||||
UINT8 ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, pObject );
|
||||
|
||||
if ( Weapon[ usItem ].NoSemiAuto )
|
||||
{
|
||||
swprintf( (wchar_t *)apStr, L"-" );
|
||||
swprintf( apStr, L"-" );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)apStr, L"%d", ubAttackAPs );
|
||||
swprintf( apStr, L"%d", ubAttackAPs );
|
||||
}
|
||||
|
||||
if (GetShotsPerBurst(pObject) > 0)
|
||||
{
|
||||
swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
@@ -7485,7 +7485,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
|
||||
if (GetAutofireShotsPerFiveAPs(pObject) > 0)
|
||||
{
|
||||
swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
@@ -7494,7 +7494,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
}
|
||||
|
||||
//Info for weapons
|
||||
swprintf( (wchar_t *)pStr, L"%s (%s) [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s %s\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s (%s) [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s %s\n%s %1.1f %s",
|
||||
ItemNames[ usItem ],
|
||||
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
||||
sValue,
|
||||
@@ -7517,15 +7517,15 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
case IC_LAUNCHER:
|
||||
{
|
||||
//Calculate AP's
|
||||
INT16 apStr[20];
|
||||
INT16 apStr2[20];
|
||||
CHAR16 apStr[20];
|
||||
CHAR16 apStr2[20];
|
||||
UINT8 ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, pObject );
|
||||
|
||||
swprintf( (wchar_t *)apStr, L"%d", ubAttackAPs );
|
||||
swprintf( apStr, L"%d", ubAttackAPs );
|
||||
|
||||
if (GetShotsPerBurst(pObject) > 0)
|
||||
{
|
||||
swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
@@ -7535,7 +7535,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
|
||||
if (GetAutofireShotsPerFiveAPs(pObject) > 0)
|
||||
{
|
||||
swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
swprintf( apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) );
|
||||
wcscat( apStr, apStr2 );
|
||||
}
|
||||
else
|
||||
@@ -7544,7 +7544,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
}
|
||||
|
||||
//Info for weapons
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s %s\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s %s\n%s %1.1f %s",
|
||||
ItemNames[ usItem ],
|
||||
sValue,
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
@@ -7567,7 +7567,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
case IC_THROWING_KNIFE:
|
||||
case IC_PUNCH:
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
ItemNames[ usItem ],
|
||||
sValue,
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
@@ -7584,7 +7584,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
case IC_AMMO:
|
||||
{
|
||||
// The next is for ammunition which gets the measurement 'rnds'
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d rnds]\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s [%d rnds]\n%s %1.1f %s",
|
||||
ItemNames[ usItem ], //Item long name
|
||||
pObject->ubShotsLeft[0], //Shots left
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
@@ -7593,7 +7593,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
);
|
||||
|
||||
//Lal: do not delete, commented out for next version
|
||||
//swprintf( (wchar_t *)pStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s",
|
||||
//swprintf( pStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s",
|
||||
// AmmoCaliber[ Magazine[ Item[usItem].ubClassIndex ].ubCalibre ], //Ammo calibre
|
||||
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
||||
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
||||
@@ -7613,7 +7613,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
UINT16 explDamage = (UINT16)( Explosive[Item[ usItem ].ubClassIndex].ubDamage + ( (double) Explosive[Item[ usItem ].ubClassIndex].ubDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier );
|
||||
UINT16 explStunDamage = (UINT16)( Explosive[Item[ usItem ].ubClassIndex].ubStunDamage + ( (double) Explosive[Item[ usItem ].ubClassIndex].ubStunDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier );
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
ItemNames[ usItem ],
|
||||
sValue,
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
@@ -7651,7 +7651,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
break;
|
||||
}
|
||||
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s",
|
||||
ItemNames[ usItem ], //Item long name
|
||||
sValue, //Item condition
|
||||
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||
@@ -7675,7 +7675,7 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
default:
|
||||
{
|
||||
// The final, and typical case, is that of an item with a percent status
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %1.1f %s",
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %1.1f %s",
|
||||
ItemNames[ usItem ], //Item long name
|
||||
sValue, //Item condition
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
@@ -7690,8 +7690,8 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
// Fingerprint ID (Soldier Name)
|
||||
if ( ( Item[pObject->usItem].fingerprintid ) && pObject->ubImprintID < NO_PROFILE )
|
||||
{
|
||||
INT16 pStr2[20];
|
||||
swprintf( (wchar_t *)pStr2, L" [%s]", gMercProfiles[ pObject->ubImprintID ].zNickname );
|
||||
CHAR16 pStr2[20];
|
||||
swprintf( pStr2, L" [%s]", gMercProfiles[ pObject->ubImprintID ].zNickname );
|
||||
wcscat( pStr, pStr2 );
|
||||
}
|
||||
|
||||
@@ -7724,11 +7724,11 @@ void GetHelpTextForItem( wchar_t * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSol
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"" );
|
||||
swprintf( pStr, L"" );
|
||||
}
|
||||
|
||||
// Copy over...
|
||||
swprintf( (wchar_t *)pzStr, L"%s", pStr );
|
||||
swprintf( pzStr, L"%s", pStr );
|
||||
}
|
||||
|
||||
|
||||
@@ -7922,7 +7922,7 @@ void UpdateItemHatches()
|
||||
BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, ITEM_POOL *pItemPool, UINT8 ubCount)
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
UINT8 ubString[48];
|
||||
CHAR8 ubString[48];
|
||||
INT16 sCenX, sCenY, sX, sY, sCenterYVal;
|
||||
INT8 bZLevel =pOpponent->bLevel;
|
||||
INT16 sGridNo =pOpponent->sGridNo;
|
||||
@@ -8037,7 +8037,7 @@ BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOppo
|
||||
gItemPickupMenu.fAllSelected = FALSE;
|
||||
|
||||
//Load images for buttons
|
||||
FilenameForBPP("INTERFACE\\itembox.sti", (STR)ubString );
|
||||
FilenameForBPP("INTERFACE\\itembox.sti", ubString );
|
||||
gItemPickupMenu.iUpButtonImages = LoadButtonImage( ubString, -1,5,-1,10,-1 );
|
||||
gItemPickupMenu.iDownButtonImages = UseLoadedButtonImage( gItemPickupMenu.iUpButtonImages, -1, 7, -1, 12, -1 );
|
||||
gItemPickupMenu.iAllButtonImages = UseLoadedButtonImage( gItemPickupMenu.iUpButtonImages, -1, 6, -1,11, -1 );
|
||||
|
||||
Reference in New Issue
Block a user