mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
use FormatMoney everywhere
This commit is contained in:
committed by
majcosta
parent
0dd32c4670
commit
3d29eff4d8
@@ -1398,7 +1398,6 @@ BOOLEAN DisplaySaveGameEntry( INT32 bEntryID )
|
||||
CHAR16 zDateString[128];
|
||||
CHAR16 zLocationString[128];
|
||||
CHAR16 zNumMercsString[128];
|
||||
CHAR16 zBalanceString[128];
|
||||
SAVED_GAME_HEADER SaveGameHeader;
|
||||
HVOBJECT hPixHandle;
|
||||
UINT16 usPosX=SLG_FIRST_SAVED_SPOT_X;
|
||||
@@ -1669,11 +1668,6 @@ BOOLEAN DisplaySaveGameEntry( INT32 bEntryID )
|
||||
}
|
||||
}
|
||||
|
||||
//Get the current balance
|
||||
swprintf( zBalanceString, L"%d", SaveGameHeader.iCurrentBalance);
|
||||
InsertCommasForDollarFigure( zBalanceString );
|
||||
InsertDollarSignInToString( zBalanceString );
|
||||
|
||||
//
|
||||
// Display the Saved game information
|
||||
//
|
||||
@@ -1692,7 +1686,7 @@ BOOLEAN DisplaySaveGameEntry( INT32 bEntryID )
|
||||
|
||||
//The balance
|
||||
if(!is_networked)
|
||||
DrawTextToScreen( zBalanceString, (UINT16)(usPosX+SLG_BALANCE_OFFSET_X), (UINT16)(usPosY+SLG_BALANCE_OFFSET_Y), 0, uiFont, ubFontColor, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(FormatMoney(SaveGameHeader.iCurrentBalance).data(), (UINT16)(usPosX + SLG_BALANCE_OFFSET_X), (UINT16)(usPosY + SLG_BALANCE_OFFSET_Y), 0, uiFont, ubFontColor, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
if( gbSaveGameArray[ VAL_SLOT_START + bEntryID ] || ( gfSaveGame && !gfUserInTextInputMode && ( gbSelectedSaveLocation == bEntryID ) ) )
|
||||
{
|
||||
|
||||
+11
-35
@@ -1099,7 +1099,6 @@ BOOLEAN RenderAIMMembers()
|
||||
HVOBJECT hPriceHandle;
|
||||
HVOBJECT hWeaponBoxHandle;
|
||||
UINT16 x, uiPosX;
|
||||
CHAR16 wTemp[50];
|
||||
|
||||
DrawAimDefaults();
|
||||
|
||||
@@ -1144,11 +1143,8 @@ BOOLEAN RenderAIMMembers()
|
||||
//Display Option Gear Cost text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_MEMBER_OPTIONAL_GEAR_X_NSGI, EXPLOSIVE_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
swprintf(wTemp, L"%d", gMercProfiles[gbCurrentSoldier].usOptionalGearCost);
|
||||
InsertCommasForDollarFigure( wTemp );
|
||||
InsertDollarSignInToString( wTemp );
|
||||
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X_NSGI + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_M_FONT_STATIC_TEXT) + 5;
|
||||
DrawTextToScreen(wTemp, AIM_MEMBER_OPTIONAL_GEAR_COST_X_NSGI, EXPLOSIVE_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].usOptionalGearCost).data(), AIM_MEMBER_OPTIONAL_GEAR_COST_X_NSGI, EXPLOSIVE_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
#endif // JA2UB
|
||||
}
|
||||
else
|
||||
@@ -1191,11 +1187,8 @@ BOOLEAN RenderAIMMembers()
|
||||
//Display Option Gear Cost text
|
||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_MEMBER_OPTIONAL_GEAR_X, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
swprintf(wTemp, L"%d", gMercProfiles[gbCurrentSoldier].usOptionalGearCost);
|
||||
InsertCommasForDollarFigure( wTemp );
|
||||
InsertDollarSignInToString( wTemp );
|
||||
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_M_FONT_STATIC_TEXT) + 5;
|
||||
DrawTextToScreen(wTemp, uiPosX, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].usOptionalGearCost).data(), uiPosX, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1337,15 +1330,10 @@ BOOLEAN UpdateMercInfo(void)
|
||||
//if medical deposit is required
|
||||
if( gMercProfiles[gbCurrentSoldier].bMedicalDeposit )
|
||||
{
|
||||
CHAR16 zTemp[40];
|
||||
CHAR16 sMedicalString[40];
|
||||
|
||||
// Display the medical cost
|
||||
swprintf( zTemp, L"%d", gMercProfiles[ gbCurrentSoldier ].sMedicalDepositAmount );
|
||||
InsertCommasForDollarFigure( zTemp );
|
||||
InsertDollarSignInToString( zTemp );
|
||||
|
||||
swprintf( sMedicalString, L"%s %s", zTemp, CharacterInfo[AIM_MEMBER_MEDICAL_DEPOSIT_REQ] );
|
||||
swprintf( sMedicalString, L"%s %s", FormatMoney(gMercProfiles[gbCurrentSoldier].sMedicalDepositAmount).data(), CharacterInfo[AIM_MEMBER_MEDICAL_DEPOSIT_REQ] );
|
||||
|
||||
// If the string will be displayed in more then 2 lines, recenter the string
|
||||
if( ( DisplayWrappedString( 0, 0, AIM_MEDICAL_DEPOSIT_WIDTH_NSGI, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( AIM_FONT12ARIAL ) ) > 2 )
|
||||
@@ -1403,11 +1391,7 @@ BOOLEAN UpdateMercInfo(void)
|
||||
CHAR16 sMedicalString[40];
|
||||
|
||||
// Display the medical cost
|
||||
swprintf( zTemp, L"%d", gMercProfiles[ gbCurrentSoldier ].sMedicalDepositAmount );
|
||||
InsertCommasForDollarFigure( zTemp );
|
||||
InsertDollarSignInToString( zTemp );
|
||||
|
||||
swprintf( sMedicalString, L"%s %s", zTemp, CharacterInfo[AIM_MEMBER_MEDICAL_DEPOSIT_REQ] );
|
||||
swprintf( sMedicalString, L"%s %s", FormatMoney(gMercProfiles[gbCurrentSoldier].sMedicalDepositAmount).data(), CharacterInfo[AIM_MEMBER_MEDICAL_DEPOSIT_REQ] );
|
||||
|
||||
// If the string will be displayed in more then 2 lines, recenter the string
|
||||
if( ( DisplayWrappedString( 0, 0, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( AIM_FONT12ARIAL ) ) > 2 )
|
||||
@@ -2686,7 +2670,6 @@ void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
||||
UINT32 DisplayMercChargeAmount()
|
||||
{
|
||||
CHAR16 wTemp[50];
|
||||
CHAR16 wDollarTemp[50];
|
||||
HVOBJECT hImageHandle;
|
||||
|
||||
|
||||
@@ -2732,24 +2715,17 @@ UINT32 DisplayMercChargeAmount()
|
||||
}
|
||||
|
||||
|
||||
swprintf( wDollarTemp, L"%d", giContractAmount);
|
||||
InsertCommasForDollarFigure( wDollarTemp );
|
||||
InsertDollarSignInToString( wDollarTemp );
|
||||
|
||||
//if the merc hasnt just been hired
|
||||
// if( FindSoldierByProfileID( gbCurrentSoldier, TRUE ) == NULL )
|
||||
{
|
||||
#ifdef JA2UB
|
||||
// Don't even have to pay for medical insurance! What a DEAL!
|
||||
swprintf(wTemp, L"%s", wDollarTemp);
|
||||
#else
|
||||
if( gMercProfiles[ gbCurrentSoldier ].bMedicalDeposit )
|
||||
swprintf(wTemp, L"%s %s", wDollarTemp, VideoConfercingText[AIM_MEMBER_WITH_MEDICAL] );
|
||||
else
|
||||
swprintf(wTemp, L"%s", wDollarTemp );
|
||||
#endif // JA2UB
|
||||
auto contractAmount{ FormatMoney(giContractAmount) };
|
||||
#ifndef JA2UB
|
||||
if (gMercProfiles[gbCurrentSoldier].bMedicalDeposit)
|
||||
contractAmount += L" ";
|
||||
contractAmount += VideoConfercingText[AIM_MEMBER_WITH_MEDICAL];
|
||||
#endif
|
||||
|
||||
DrawTextToScreen(wTemp, AIM_CONTRACT_CHARGE_AMOUNNT_X+1, AIM_CONTRACT_CHARGE_AMOUNNT_Y+3, 0, AIM_M_VIDEO_CONTRACT_AMOUNT_FONT, AIM_M_VIDEO_CONTRACT_AMOUNT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
DrawTextToScreen(contractAmount.data(), AIM_CONTRACT_CHARGE_AMOUNNT_X + 1, AIM_CONTRACT_CHARGE_AMOUNNT_Y + 3, 0, AIM_M_VIDEO_CONTRACT_AMOUNT_FONT, AIM_M_VIDEO_CONTRACT_AMOUNT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
}
|
||||
|
||||
return(giContractAmount);
|
||||
|
||||
+3
-12
@@ -1424,8 +1424,6 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter, INT32 iSubFilter)
|
||||
UINT8 ubCount=0;
|
||||
UINT16 PosY, usTextPosY;
|
||||
UINT16 usItemIndex;
|
||||
CHAR16 sDollarTemp[60];
|
||||
CHAR16 sTemp[60];
|
||||
CHAR16 sPage[60];
|
||||
INT16 pItemNumbers[ BOBBYR_NUM_WEAPONS_ON_PAGE ];
|
||||
BOOLEAN bAddItem = FALSE;
|
||||
@@ -1434,11 +1432,8 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter, INT32 iSubFilter)
|
||||
usTextPosY = BOBBYR_ITEM_DESC_START_Y;
|
||||
|
||||
//Display the subtotal at the bottom of the screen
|
||||
swprintf( sDollarTemp, L"%d", CalculateTotalPurchasePrice() );
|
||||
InsertCommasForDollarFigure( sDollarTemp );
|
||||
InsertDollarSignInToString( sDollarTemp );
|
||||
swprintf( sTemp, L"%s %s", BobbyRText[BOBBYR_GUNS_SUB_TOTAL], sDollarTemp );
|
||||
DrawTextToScreen(sTemp, BOBBYR_ORDER_SUBTOTAL_X, BOBBYR_ORDER_SUBTOTAL_Y, 0, BOBBYR_ORDER_TITLE_FONT, BOBBYR_ORDER_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED | TEXT_SHADOWED);
|
||||
auto subtotal{ std::wstring(BobbyRText[BOBBYR_GUNS_SUB_TOTAL]) + std::wstring(L" ") + FormatMoney(CalculateTotalPurchasePrice()) };
|
||||
DrawTextToScreen(subtotal.data(), BOBBYR_ORDER_SUBTOTAL_X, BOBBYR_ORDER_SUBTOTAL_Y, 0, BOBBYR_ORDER_TITLE_FONT, BOBBYR_ORDER_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED | TEXT_SHADOWED);
|
||||
|
||||
//Buggler: Display the current page & total pages at the bottom of the screen
|
||||
swprintf( sPage, L"%d / %d", gubCurPage + 1, gubNumPages );
|
||||
@@ -2059,11 +2054,7 @@ UINT16 DisplayCostAndQty(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight, UIN
|
||||
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_COST], BOBBYR_ITEM_COST_TEXT_X, (UINT16)usPosY, BOBBYR_ITEM_COST_TEXT_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
usPosY += usFontHeight + 2;
|
||||
|
||||
swprintf(sTemp, L"%d", CalcBobbyRayCost( usIndex, usBobbyIndex, fUsed ));
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
|
||||
DrawTextToScreen(sTemp, BOBBYR_ITEM_COST_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_COST_TEXT_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
DrawTextToScreen(FormatMoney(CalcBobbyRayCost(usIndex, usBobbyIndex, fUsed)).data(), BOBBYR_ITEM_COST_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_COST_TEXT_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
usPosY += usFontHeight + 2;
|
||||
|
||||
|
||||
|
||||
+12
-43
@@ -1127,19 +1127,11 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
||||
DrawTextToScreen(sText, (UINT16)(usGridX+BOBBYR_GRID_THIRD_COLUMN_X+2), usPosY, BOBBYR_GRID_THIRD_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||
|
||||
//unit price
|
||||
swprintf(sTemp, L"%d", CalcBobbyRayCost( pBobbyRayPurchase[i].usItemIndex, pBobbyRayPurchase[i].usBobbyItemIndex, pBobbyRayPurchase[i].fUsed ));
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
|
||||
DrawTextToScreen(sTemp, (UINT16)(usGridX+BOBBYR_GRID_FOURTH_COLUMN_X-2), usPosY, BOBBYR_GRID_FOURTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
DrawTextToScreen(FormatMoney(CalcBobbyRayCost(pBobbyRayPurchase[i].usItemIndex, pBobbyRayPurchase[i].usBobbyItemIndex, pBobbyRayPurchase[i].fUsed)).data(), (UINT16)(usGridX+BOBBYR_GRID_FOURTH_COLUMN_X-2), usPosY, BOBBYR_GRID_FOURTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
uiTotal += CalcBobbyRayCost( pBobbyRayPurchase[i].usItemIndex, pBobbyRayPurchase[i].usBobbyItemIndex, pBobbyRayPurchase[i].fUsed ) * pBobbyRayPurchase[i].ubNumberPurchased;
|
||||
|
||||
swprintf(sTemp, L"%d", uiTotal );
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
|
||||
DrawTextToScreen(sTemp, (UINT16)(usGridX+BOBBYR_GRID_FIFTH_COLUMN_X-2), usPosY, BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
DrawTextToScreen(FormatMoney(uiTotal).data(), (UINT16)(usGridX+BOBBYR_GRID_FIFTH_COLUMN_X-2), usPosY, BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
usPosY += BOBBYR_GRID_ROW_OFFSET;
|
||||
}
|
||||
@@ -1259,7 +1251,6 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
||||
|
||||
void DisplayShippingCosts( BOOLEAN fCalledFromOrderPage, INT32 iSubTotal, UINT16 usGridX, UINT16 usGridY, INT32 iOrderNum )
|
||||
{
|
||||
CHAR16 sTemp[20];
|
||||
HVOBJECT hPixHandle;
|
||||
INT32 iShippingCost = 0;
|
||||
// INT32 iTotal;
|
||||
@@ -1331,27 +1322,15 @@ void DisplayShippingCosts( BOOLEAN fCalledFromOrderPage, INT32 iSubTotal, UINT16
|
||||
if( iSubTotal )
|
||||
{
|
||||
//Display the subtotal
|
||||
swprintf(sTemp, L"%d", iSubTotal );
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
|
||||
DrawTextToScreen(sTemp, (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X-2), (UINT16)(usGridY + BOBBYR_SUBTOTAL_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
DrawTextToScreen(FormatMoney(iSubTotal).data(), (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X - 2), (UINT16)(usGridY + BOBBYR_SUBTOTAL_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
//Display the shipping and handling charge
|
||||
swprintf(sTemp, L"%d", iShippingCost );
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
|
||||
DrawTextToScreen(sTemp, (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X-2), (UINT16)(usGridY + BOBBYR_SHIPPING_N_HANDLE_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
DrawTextToScreen(FormatMoney(iShippingCost).data(), (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X - 2), (UINT16)(usGridY + BOBBYR_SHIPPING_N_HANDLE_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
|
||||
//Display the grand total
|
||||
giGrandTotal = iSubTotal + iShippingCost;
|
||||
swprintf(sTemp, L"%d", giGrandTotal );
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
|
||||
DrawTextToScreen(sTemp, (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X-2), (UINT16)(usGridY + BOBBYR_GRAND_TOTAL_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
DrawTextToScreen(FormatMoney(giGrandTotal).data(), (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X - 2), (UINT16)(usGridY + BOBBYR_GRAND_TOTAL_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
}
|
||||
|
||||
InvalidateRegion(iScreenWidthOffset + 333,iScreenHeightOffset + 326,iScreenWidthOffset + 374,iScreenHeightOffset + 400);
|
||||
@@ -1830,7 +1809,7 @@ void DrawSelectedCity( UINT8 ubCityNumber )
|
||||
|
||||
void DisplayShippingLocationCity()
|
||||
{
|
||||
CHAR16 sTemp[40];
|
||||
std::wstring sTemp{ L"$0" };
|
||||
UINT16 usPosY;
|
||||
|
||||
//display the name on the title bar
|
||||
@@ -1853,39 +1832,29 @@ void DisplayShippingLocationCity()
|
||||
//Display the shipping cost
|
||||
usPosY = BOBBYR_OVERNIGHT_EXPRESS_Y;
|
||||
|
||||
wcscpy(sTemp, L"$0");
|
||||
|
||||
if( gbSelectedCity != -1 )
|
||||
{
|
||||
// swprintf( sTemp, L"%d", ( INT32 )(BobbyROrderLocations[gbSelectedCity].usOverNightExpress/GetWeightBasedOnMetricOption( 1 ) ) );
|
||||
swprintf( sTemp, L"%d", ( INT32 )(gPostalService.GetDestinationFee(0, gDestinationTable[gbSelectedCity]->usID) / GetWeightBasedOnMetricOption( 1 ) ) );
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
sTemp = FormatMoney(static_cast<INT32>(gPostalService.GetDestinationFee(0, gDestinationTable[gbSelectedCity]->usID) / GetWeightBasedOnMetricOption(1)));
|
||||
}
|
||||
|
||||
DrawTextToScreen(sTemp, BOBBYR_SHIPPING_SPEED_NUMBER_X, usPosY, BOBBYR_SHIPPING_SPEED_NUMBER_WIDTH, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen(sTemp.data(), BOBBYR_SHIPPING_SPEED_NUMBER_X, usPosY, BOBBYR_SHIPPING_SPEED_NUMBER_WIDTH, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
usPosY +=BOBBYR_GRID_ROW_OFFSET;
|
||||
|
||||
if( gbSelectedCity != -1 )
|
||||
{
|
||||
// swprintf( sTemp, L"%d", ( INT32 )( BobbyROrderLocations[gbSelectedCity].us2DaysService / GetWeightBasedOnMetricOption( 1 ) ) );
|
||||
swprintf( sTemp, L"%d", ( INT32 )(gPostalService.GetDestinationFee(1, gDestinationTable[gbSelectedCity]->usID) / GetWeightBasedOnMetricOption( 1 ) ) );
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
sTemp = FormatMoney(static_cast<INT32>(gPostalService.GetDestinationFee(1, gDestinationTable[gbSelectedCity]->usID) / GetWeightBasedOnMetricOption(1)));
|
||||
}
|
||||
|
||||
DrawTextToScreen(sTemp, BOBBYR_SHIPPING_SPEED_NUMBER_X, usPosY, BOBBYR_SHIPPING_SPEED_NUMBER_WIDTH, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen(sTemp.data(), BOBBYR_SHIPPING_SPEED_NUMBER_X, usPosY, BOBBYR_SHIPPING_SPEED_NUMBER_WIDTH, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
usPosY +=BOBBYR_GRID_ROW_OFFSET;
|
||||
|
||||
if( gbSelectedCity != -1 )
|
||||
{
|
||||
// swprintf( sTemp, L"%d", (INT32 )( BobbyROrderLocations[gbSelectedCity].usStandardService / GetWeightBasedOnMetricOption( 1 ) ) );
|
||||
swprintf( sTemp, L"%d", ( INT32 )(gPostalService.GetDestinationFee(2, gDestinationTable[gbSelectedCity]->usID) / GetWeightBasedOnMetricOption( 1 ) ) );
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
sTemp = FormatMoney(static_cast<INT32>(gPostalService.GetDestinationFee(2, gDestinationTable[gbSelectedCity]->usID) / GetWeightBasedOnMetricOption(1)));
|
||||
}
|
||||
|
||||
DrawTextToScreen(sTemp, BOBBYR_SHIPPING_SPEED_NUMBER_X, usPosY, BOBBYR_SHIPPING_SPEED_NUMBER_WIDTH, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen(sTemp.data(), BOBBYR_SHIPPING_SPEED_NUMBER_X, usPosY, BOBBYR_SHIPPING_SPEED_NUMBER_WIDTH, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
}
|
||||
|
||||
void SelectCloseDroDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
+1
-8
@@ -6165,15 +6165,8 @@ BOOLEAN ReplaceMercNameAndAmountWithProperData( CHAR16 *pFinishedString, EmailPt
|
||||
}
|
||||
else
|
||||
{
|
||||
CHAR16 sDollarAmount[64];
|
||||
|
||||
swprintf( sDollarAmount, L"%d", pMail->iFirstData );
|
||||
|
||||
InsertCommasForDollarFigure( sDollarAmount );
|
||||
InsertDollarSignInToString( sDollarAmount );
|
||||
|
||||
//add the mercs name to the string
|
||||
wcscat( pFinishedString, sDollarAmount );
|
||||
wcscat( pFinishedString, FormatMoney(pMail->iFirstData).data() );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
+34
-114
@@ -808,31 +808,15 @@ void DrawRecordsText( void )
|
||||
if(pCurFinance->iAmount >=0)
|
||||
{
|
||||
// increase in asset - debit
|
||||
swprintf(sString, L"%d", pCurFinance->iAmount);
|
||||
// insert commas
|
||||
InsertCommasForDollarFigure( sString );
|
||||
// insert dollar sight for first record in the list
|
||||
//DEF: 3/19/99: removed cause we want to see the dollar sign on ALL entries
|
||||
// if( iCounter == 0 )
|
||||
{
|
||||
InsertDollarSignInToString( sString );
|
||||
}
|
||||
|
||||
swprintf(sString, L"%s", FormatMoney(pCurFinance->iAmount).data());
|
||||
FindFontCenterCoordinates(RECORD_DEBIT_X,0,RECORD_DEBIT_WIDTH,0, sString, FINANCE_TEXT_FONT,&usX, &usY);
|
||||
mprintf(usX, 12+RECORD_Y + (iCounter * ( GetFontHeight( FINANCE_TEXT_FONT ) + 6 ) ), sString);
|
||||
}
|
||||
else
|
||||
{
|
||||
// decrease in asset - credit
|
||||
swprintf(sString, L"%d", pCurFinance->iAmount * (-1));
|
||||
swprintf(sString, L"%s", FormatMoney(pCurFinance->iAmount * (-1)).data());
|
||||
SetFontForeground(FONT_RED);
|
||||
InsertCommasForDollarFigure( sString );
|
||||
// insert dollar sight for first record in the list
|
||||
//DEF: 3/19/99: removed cause we want to see the dollar sign on ALL entries
|
||||
// if( iCounter == 0 )
|
||||
{
|
||||
InsertDollarSignInToString( sString );
|
||||
}
|
||||
|
||||
FindFontCenterCoordinates(RECORD_CREDIT_X ,0 , RECORD_CREDIT_WIDTH,0, sString, FINANCE_TEXT_FONT,&usX, &usY);
|
||||
mprintf(usX, 12+RECORD_Y + (iCounter * ( GetFontHeight( FINANCE_TEXT_FONT ) + 6 ) ), sString);
|
||||
@@ -860,15 +844,7 @@ void DrawRecordsText( void )
|
||||
|
||||
|
||||
// print the balance string
|
||||
swprintf(sString, L"%d", iBalance);
|
||||
InsertCommasForDollarFigure( sString );
|
||||
// insert dollar sight for first record in the list
|
||||
//DEF: 3/19/99: removed cause we want to see the dollar sign on ALL entries
|
||||
// if( iCounter == 0 )
|
||||
{
|
||||
InsertDollarSignInToString( sString );
|
||||
}
|
||||
|
||||
swprintf(sString, L"%s", FormatMoney(iBalance).data());
|
||||
FindFontCenterCoordinates(RECORD_BALANCE_X,0,RECORD_BALANCE_WIDTH,0, sString, FINANCE_TEXT_FONT,&usX, &usY);
|
||||
mprintf(usX, 12+RECORD_Y + (iCounter * ( GetFontHeight( FINANCE_TEXT_FONT ) + 6 ) ), sString);
|
||||
|
||||
@@ -921,7 +897,7 @@ void InvalidateLapTopScreen( void )
|
||||
void DrawSummaryText( void )
|
||||
{
|
||||
INT16 usX, usY;
|
||||
CHAR16 pString[100];
|
||||
std::wstring tmp{};
|
||||
INT32 iBalance = 0;
|
||||
|
||||
|
||||
@@ -949,98 +925,68 @@ void DrawSummaryText( void )
|
||||
|
||||
// yesterdays income
|
||||
iBalance = GetPreviousDaysIncome( );
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
tmp = FormatMoney(iBalance);
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0, tmp.data(), FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,YESTERDAYS_INCOME,pString);
|
||||
mprintf(usX,YESTERDAYS_INCOME,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
// yesterdays other
|
||||
iBalance = GetYesterdaysOtherDeposits( );
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
tmp = FormatMoney(iBalance);
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0, tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,YESTERDAYS_OTHER,pString);
|
||||
mprintf(usX,YESTERDAYS_OTHER,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_RED );
|
||||
|
||||
// yesterdays debits
|
||||
iBalance = GetYesterdaysDebits( );
|
||||
if( iBalance < 0 )
|
||||
{
|
||||
SetFontForeground( FONT_RED );
|
||||
iBalance *= -1;
|
||||
}
|
||||
tmp = FormatMoney(iBalance);
|
||||
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0, tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,YESTERDAYS_DEBITS,pString);
|
||||
mprintf(usX,YESTERDAYS_DEBITS,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
// yesterdays balance..ending balance..so todays balance then
|
||||
iBalance = GetTodaysBalance( );
|
||||
|
||||
if( iBalance < 0 )
|
||||
{
|
||||
SetFontForeground( FONT_RED );
|
||||
iBalance *= -1;
|
||||
}
|
||||
tmp = FormatMoney(iBalance);
|
||||
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0, tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,YESTERDAYS_BALANCE,pString);
|
||||
mprintf(usX,YESTERDAYS_BALANCE,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
// todays income
|
||||
iBalance = GetTodaysDaysIncome( );
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
tmp = FormatMoney(iBalance);
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,TODAYS_INCOME,pString);
|
||||
mprintf(usX,TODAYS_INCOME,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
// todays other
|
||||
iBalance = GetTodaysOtherDeposits( );
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
tmp = FormatMoney(iBalance);
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,TODAYS_OTHER,pString);
|
||||
mprintf(usX,TODAYS_OTHER,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_RED );
|
||||
|
||||
@@ -1053,15 +999,11 @@ void DrawSummaryText( void )
|
||||
iBalance *= ( -1 );
|
||||
}
|
||||
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
tmp = FormatMoney(iBalance);
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,TODAYS_DEBITS,pString);
|
||||
mprintf(usX,TODAYS_DEBITS,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
@@ -1069,36 +1011,23 @@ void DrawSummaryText( void )
|
||||
iBalance = GetCurrentBalance( );
|
||||
if( iBalance < 0 )
|
||||
{
|
||||
iBalance *= -1;
|
||||
SetFontForeground( FONT_RED );
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
iBalance *= -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
}
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
mprintf(usX,TODAYS_CURRENT_BALANCE,pString);
|
||||
tmp = FormatMoney(iBalance);
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
mprintf(usX,TODAYS_CURRENT_BALANCE,tmp.data());
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
|
||||
// todays forcast income
|
||||
iBalance = GetProjectedTotalDailyIncome( );
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
tmp = FormatMoney(iBalance);
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
|
||||
mprintf(usX,TODAYS_CURRENT_FORCAST_INCOME,pString);
|
||||
mprintf(usX,TODAYS_CURRENT_FORCAST_INCOME,tmp.data());
|
||||
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
@@ -1107,22 +1036,13 @@ void DrawSummaryText( void )
|
||||
iBalance = GetCurrentBalance( ) + GetProjectedTotalDailyIncome( );
|
||||
if( iBalance < 0 )
|
||||
{
|
||||
iBalance *= -1;
|
||||
SetFontForeground( FONT_RED );
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
iBalance *= -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf(pString, L"%d", iBalance );
|
||||
}
|
||||
|
||||
InsertCommasForDollarFigure( pString );
|
||||
if( iBalance != 0 )
|
||||
InsertDollarSignInToString( pString );
|
||||
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,pString,FINANCE_TEXT_FONT, &usX, &usY);
|
||||
mprintf(usX,TODAYS_CURRENT_FORCAST_BALANCE,pString);
|
||||
tmp = FormatMoney(iBalance);
|
||||
FindFontRightCoordinates(0,0,iScreenWidthOffset + 580,0,tmp.data(),FINANCE_TEXT_FONT, &usX, &usY);
|
||||
mprintf(usX,TODAYS_CURRENT_FORCAST_BALANCE,tmp.data());
|
||||
SetFontForeground( FONT_BLACK );
|
||||
|
||||
|
||||
|
||||
@@ -700,6 +700,7 @@ BOOLEAN DisplayOrderGrid( UINT8 ubGridNumber, UINT8 ubMercID )
|
||||
iCostOfContract = 0;
|
||||
}
|
||||
|
||||
std::wstring amountRefund{};
|
||||
if( iCostOfContract < 0 )
|
||||
{
|
||||
//shouldnt get in here now since we can longer give refunds
|
||||
@@ -712,19 +713,16 @@ BOOLEAN DisplayOrderGrid( UINT8 ubGridNumber, UINT8 ubMercID )
|
||||
DrawTextToScreen( sText, (UINT16)(usPosX+INS_CTRCT_EMPLYMNT_CNTRCT_TEXT_OFFSET_X), INS_CTRCT_ORDER_GRID1_Y+INS_CTRCT_PREMIUM_OWING_OFFSET_Y, INS_CTRCT_ORDER_GRID_WIDTH, INS_FONT_MED, INS_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
//display the amount of refund
|
||||
swprintf( sText, L"%d", iCostOfContract );
|
||||
InsertCommasForDollarFigure( sText );
|
||||
InsertDollarSignInToString( sText );
|
||||
amountRefund = FormatMoney(iCostOfContract);
|
||||
}
|
||||
|
||||
|
||||
if( IsMercDead( ubMercID ) )
|
||||
{
|
||||
swprintf( sText, L"0");
|
||||
InsertDollarSignInToString( sText );
|
||||
amountRefund = L"$0";
|
||||
}
|
||||
//display the amount owing
|
||||
DrawTextToScreen( sText, (UINT16)(usPosX+32), INS_CTRCT_ORDER_GRID1_Y+179, 72, INS_FONT_MED, INS_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
DrawTextToScreen( amountRefund.data(), (UINT16)(usPosX + 32), INS_CTRCT_ORDER_GRID1_Y + 179, 72, INS_FONT_MED, INS_FONT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
|
||||
|
||||
|
||||
+7
-18
@@ -5084,36 +5084,28 @@ void ShouldNewMailBeDisplayed()
|
||||
void DisplayPlayersBalanceToDate( void )
|
||||
{
|
||||
// print players balance to date
|
||||
CHAR16 sString[ 100 ];
|
||||
INT16 sX, sY;
|
||||
|
||||
// initialize string
|
||||
memset( sString, 0, sizeof( sString ) );
|
||||
|
||||
// font stuff
|
||||
SetFont( FONT10ARIAL);
|
||||
SetFontForeground( 142 );
|
||||
SetFontShadow(NO_SHADOW);
|
||||
|
||||
// parse straigth number
|
||||
swprintf( sString, L"%d", LaptopSaveInfo.iCurrentBalance );
|
||||
|
||||
// put in commas, then dollar sign
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
std::wstring sString{FormatMoney(LaptopSaveInfo.iCurrentBalance)};
|
||||
|
||||
// get center
|
||||
FindFontCenterCoordinates( (INT16)LAPTOP_ICON_TEXT_X, iScreenHeightOffset, (INT16)(LAPTOP_ICON_TEXT_WIDTH) ,(INT16)(LAPTOP_ICON_TEXT_HEIGHT), sString, LAPTOPICONFONT, &sX, &sY );
|
||||
FindFontCenterCoordinates( (INT16)LAPTOP_ICON_TEXT_X, iScreenHeightOffset, (INT16)(LAPTOP_ICON_TEXT_WIDTH) ,(INT16)(LAPTOP_ICON_TEXT_HEIGHT), sString.data(), LAPTOPICONFONT, &sX, &sY);
|
||||
|
||||
// gprintfdirty( sX , LAPTOP_ICON_TEXT_FINANCIAL_Y + 10, sString );
|
||||
// printf it!
|
||||
if( ButtonList[ gLaptopButton[ 5 ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||
{
|
||||
mprintf( sX + 5, LAPTOP_ICON_TEXT_FINANCIAL_Y + 10 + 5, sString);
|
||||
mprintf( sX + 5, LAPTOP_ICON_TEXT_FINANCIAL_Y + 10 + 5, sString.data());
|
||||
}
|
||||
else
|
||||
{
|
||||
mprintf( sX, LAPTOP_ICON_TEXT_FINANCIAL_Y + 10, sString);
|
||||
mprintf( sX, LAPTOP_ICON_TEXT_FINANCIAL_Y + 10, sString.data());
|
||||
}
|
||||
|
||||
// reset shadow
|
||||
@@ -6207,7 +6199,6 @@ void DeleteDesktopBackground( void )
|
||||
|
||||
void PrintBalance( void )
|
||||
{
|
||||
CHAR16 pString[ 32 ];
|
||||
// UINT16 usX, usY;
|
||||
|
||||
SetFont( FONT10ARIAL );
|
||||
@@ -6215,17 +6206,15 @@ void PrintBalance( void )
|
||||
SetFontBackground( FONT_BLACK );
|
||||
SetFontShadow( NO_SHADOW );
|
||||
|
||||
swprintf(pString, L"%d", LaptopSaveInfo.iCurrentBalance);
|
||||
InsertCommasForDollarFigure( pString );
|
||||
InsertDollarSignInToString( pString );
|
||||
std::wstring pString{ FormatMoney(LaptopSaveInfo.iCurrentBalance) };
|
||||
|
||||
if( ButtonList[ gLaptopButton[ 5 ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||
{
|
||||
mprintf(iScreenWidthOffset + 48, iScreenHeightOffset + 273,pString);
|
||||
mprintf(iScreenWidthOffset + 48, iScreenHeightOffset + 273,pString.data());
|
||||
}
|
||||
else
|
||||
{
|
||||
mprintf(iScreenWidthOffset + 47, iScreenHeightOffset + 272,pString);
|
||||
mprintf(iScreenWidthOffset + 47, iScreenHeightOffset + 272,pString.data());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -446,13 +446,8 @@ void BtnMercAuthorizeButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
swprintf( wzDollarAmount, L"%d", giMercTotalContractCharge );
|
||||
|
||||
InsertCommasForDollarFigure( wzDollarAmount );
|
||||
InsertDollarSignInToString( wzDollarAmount );
|
||||
|
||||
//create the string to show to the user
|
||||
swprintf( wzAuthorizeString, MercAccountText[MERC_ACCOUNT_AUTHORIZE_CONFIRMATION], wzDollarAmount );
|
||||
swprintf( wzAuthorizeString, MercAccountText[MERC_ACCOUNT_AUTHORIZE_CONFIRMATION], FormatMoney(giMercTotalContractCharge).data());
|
||||
|
||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, wzAuthorizeString, LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercAuthorizePaymentMessageBoxCallBack );
|
||||
|
||||
|
||||
+9
-20
@@ -977,8 +977,7 @@ void DisplayMercsStats( UINT8 ubMercID )
|
||||
{
|
||||
UINT16 usPosY, usPosX;
|
||||
CHAR16 sPage[60];
|
||||
CHAR16 sTemp[128];
|
||||
CHAR16 sString[128];
|
||||
std::wstring sString{};
|
||||
CHAR16 NsString[128];
|
||||
CHAR16 N2sString[128];
|
||||
UINT8 ubColor;
|
||||
@@ -1058,21 +1057,15 @@ void DisplayMercsStats( UINT8 ubMercID )
|
||||
DrawTextToScreen( CharacterInfo[AIM_MEMBER_FEE], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( CharacterInfo[AIM_MEMBER_FEE], MERC_NAME_FONT );
|
||||
swprintf( sString, L"%d", gMercProfiles[ubMercID].uiWeeklySalary );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
sString = FormatMoney(gMercProfiles[ubMercID].uiWeeklySalary);
|
||||
#else
|
||||
DrawTextToScreen( MercInfo[MERC_FILES_SALARY], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( MercInfo[MERC_FILES_SALARY], MERC_NAME_FONT );
|
||||
swprintf( sString, L"%d", gMercProfiles[ubMercID].sSalary );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
swprintf( sTemp, L" %s", MercInfo[MERC_FILES_PER_DAY] );
|
||||
sString = FormatMoney(gMercProfiles[ubMercID].sSalary) + L" " + std::wstring(MercInfo[MERC_FILES_PER_DAY]);
|
||||
#endif // JA2UB
|
||||
|
||||
wcscat( sString, sTemp );
|
||||
DrawTextToScreen( sString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
DrawTextToScreen( sString.data(), usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
|
||||
// Buggler: Display current MERC index & total MERC members at the bottom of the screen
|
||||
swprintf( sPage, L"%d / %d", gubCurMercIndex + 1, LaptopSaveInfo.gubLastMercIndex + 1 );
|
||||
@@ -1103,10 +1096,8 @@ void DisplayMercsStats( UINT8 ubMercID )
|
||||
#endif // JA2UB
|
||||
|
||||
swprintf( NsString, L"+ " );
|
||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost);
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
wcscat( NsString, sTemp );
|
||||
sString = FormatMoney(gMercProfiles[ ubMercID ].usOptionalGearCost);
|
||||
wcscat( NsString, sString.data() );
|
||||
DrawTextToScreen( NsString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
usPosY += MERC_SPACE_BN_LINES;
|
||||
|
||||
@@ -1115,13 +1106,11 @@ void DisplayMercsStats( UINT8 ubMercID )
|
||||
|
||||
swprintf(N2sString, L"= ");
|
||||
#ifdef JA2UB
|
||||
swprintf( sTemp, L"%d", gMercProfiles[ubMercID].usOptionalGearCost + gMercProfiles[ubMercID].uiWeeklySalary );
|
||||
sString = FormatMoney(gMercProfiles[ubMercID].usOptionalGearCost + gMercProfiles[ubMercID].uiWeeklySalary);
|
||||
#else
|
||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary);
|
||||
sString = FormatMoney(gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary);
|
||||
#endif
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
wcscat( N2sString, sTemp );
|
||||
wcscat( N2sString, sString.data() );
|
||||
DrawTextToScreen( N2sString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||
}
|
||||
}
|
||||
|
||||
+21
-58
@@ -3298,7 +3298,6 @@ INT32 GetHighestDailyCostOfCurrentTeam( void )
|
||||
void DisplayCostOfCurrentTeam( void )
|
||||
{
|
||||
// display number on team
|
||||
CHAR16 sString[ 32 ];
|
||||
INT16 sX, sY;
|
||||
|
||||
// font stuff
|
||||
@@ -3307,38 +3306,30 @@ void DisplayCostOfCurrentTeam( void )
|
||||
SetFontForeground( PERS_TEXT_FONT_COLOR );
|
||||
|
||||
if (fCurrentTeamMode) {
|
||||
std::wstring sString{};
|
||||
// daily cost
|
||||
mprintf( PERS_CURR_TEAM_COST_X, PERS_CURR_TEAM_COST_Y, pPersonelTeamStrings[ 2 ] );
|
||||
|
||||
swprintf( sString, L"%d", GetTotalDailyCostOfCurrentTeam( ) );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
sString = FormatMoney( GetTotalDailyCostOfCurrentTeam( ) );
|
||||
FindFontRightCoordinates((INT16)(PERS_CURR_TEAM_COST_X),0,PERS_CURR_TEAM_WIDTH,0,sString.data(), PERS_FONT, &sX, &sY);
|
||||
|
||||
FindFontRightCoordinates((INT16)(PERS_CURR_TEAM_COST_X),0,PERS_CURR_TEAM_WIDTH,0,sString, PERS_FONT, &sX, &sY);
|
||||
|
||||
mprintf( sX ,PERS_CURR_TEAM_COST_Y, sString );
|
||||
mprintf( sX ,PERS_CURR_TEAM_COST_Y, sString.data() );
|
||||
|
||||
// highest cost
|
||||
mprintf( PERS_CURR_TEAM_COST_X, PERS_CURR_TEAM_HIGHEST_Y, pPersonelTeamStrings[ 3 ] );
|
||||
|
||||
swprintf( sString, L"%d", GetHighestDailyCostOfCurrentTeam( ) );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
sString = FormatMoney( GetHighestDailyCostOfCurrentTeam( ) );
|
||||
FindFontRightCoordinates((INT16)(PERS_CURR_TEAM_COST_X),0,PERS_CURR_TEAM_WIDTH,0,sString.data(), PERS_FONT, &sX, &sY);
|
||||
|
||||
FindFontRightCoordinates((INT16)(PERS_CURR_TEAM_COST_X),0,PERS_CURR_TEAM_WIDTH,0,sString, PERS_FONT, &sX, &sY);
|
||||
|
||||
mprintf( sX ,PERS_CURR_TEAM_HIGHEST_Y, sString );
|
||||
mprintf( sX ,PERS_CURR_TEAM_HIGHEST_Y, sString.data() );
|
||||
|
||||
// the lowest cost
|
||||
mprintf( PERS_CURR_TEAM_COST_X, PERS_CURR_TEAM_LOWEST_Y, pPersonelTeamStrings[ 4 ] );
|
||||
|
||||
swprintf( sString, L"%d", GetLowestDailyCostOfCurrentTeam( ) );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
sString = FormatMoney( GetLowestDailyCostOfCurrentTeam( ) );
|
||||
FindFontRightCoordinates((INT16)(PERS_CURR_TEAM_COST_X),0,PERS_CURR_TEAM_WIDTH,0,sString.data(), PERS_FONT, &sX, &sY);
|
||||
|
||||
FindFontRightCoordinates((INT16)(PERS_CURR_TEAM_COST_X),0,PERS_CURR_TEAM_WIDTH,0,sString, PERS_FONT, &sX, &sY);
|
||||
|
||||
mprintf( sX ,PERS_CURR_TEAM_LOWEST_Y, sString );
|
||||
mprintf( sX ,PERS_CURR_TEAM_LOWEST_Y, sString.data() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5931,7 +5922,7 @@ void DisplayAmountOnCurrentMerc( void )
|
||||
{
|
||||
// will display the amount that the merc is carrying on him or herself
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
CHAR16 sString[ 64 ];
|
||||
std::wstring sString{};
|
||||
INT16 sX, sY;
|
||||
|
||||
if (currentTeamIndex == -1) {
|
||||
@@ -5941,13 +5932,7 @@ void DisplayAmountOnCurrentMerc( void )
|
||||
pSoldier = currentTeamList[currentTeamIndex];
|
||||
}
|
||||
|
||||
INT32 iFunds = GetFundsOnMerc( pSoldier );
|
||||
|
||||
swprintf( sString, L"%d", iFunds );
|
||||
|
||||
// insert commas and dollar sign
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
sString = FormatMoney( GetFundsOnMerc( pSoldier ) );
|
||||
|
||||
// set font
|
||||
SetFont( ATM_FONT );
|
||||
@@ -5957,10 +5942,10 @@ void DisplayAmountOnCurrentMerc( void )
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
// right justify
|
||||
FindFontRightCoordinates( ATM_DISPLAY_X, ATM_DISPLAY_Y, ATM_DISPLAY_WIDTH, ATM_DISPLAY_HEIGHT, sString, ATM_FONT, &sX, &sY );
|
||||
FindFontRightCoordinates( ATM_DISPLAY_X, ATM_DISPLAY_Y, ATM_DISPLAY_WIDTH, ATM_DISPLAY_HEIGHT, sString.data(), ATM_FONT, &sX, &sY);
|
||||
|
||||
// print string
|
||||
mprintf( sX, sY, sString );
|
||||
mprintf( sX, sY, sString.data() );
|
||||
}
|
||||
|
||||
void HandlePersonnelKeyboard( void )
|
||||
@@ -6292,11 +6277,7 @@ void DisplayEmploymentinformation( SoldierID iId, INT32 iSlot )
|
||||
swprintf( sString, L"%d", gMercProfiles[ Menptr[ iId ].ubProfile ].uiTotalCostToDate );
|
||||
}
|
||||
*/
|
||||
swprintf( sString, L"%d", pMercProfile->uiTotalCostToDate );
|
||||
|
||||
// insert commas and dollar sign
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
swprintf( sString, L"%s", FormatMoney(pMercProfile->uiTotalCostToDate).data() );
|
||||
|
||||
/*
|
||||
DEF:3/19/99:
|
||||
@@ -6321,34 +6302,22 @@ DEF:3/19/99:
|
||||
if( pSoldier->bTypeOfLastContract == CONTRACT_EXTEND_2_WEEK )
|
||||
{
|
||||
// 2 week contract
|
||||
swprintf( sStringA, L"%d", pMercProfile->uiBiWeeklySalary / 14 );
|
||||
InsertCommasForDollarFigure( sStringA );
|
||||
InsertDollarSignInToString( sStringA );
|
||||
swprintf( sString, L"%s", sStringA );
|
||||
swprintf( sString, L"%s", FormatMoney( pMercProfile->uiBiWeeklySalary / 14 ).data() );
|
||||
}
|
||||
else if( pSoldier->bTypeOfLastContract == CONTRACT_EXTEND_1_WEEK )
|
||||
{
|
||||
// 1 week contract
|
||||
swprintf( sStringA, L"%d", pMercProfile->uiWeeklySalary / 7 );
|
||||
InsertCommasForDollarFigure( sStringA );
|
||||
InsertDollarSignInToString( sStringA );
|
||||
swprintf( sString, L"%s", sStringA );
|
||||
swprintf( sString, L"%s", FormatMoney( pMercProfile->uiWeeklySalary / 7 ).data() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// daily rate
|
||||
swprintf( sStringA, L"%d", pMercProfile->sSalary );
|
||||
InsertCommasForDollarFigure( sStringA );
|
||||
InsertDollarSignInToString( sStringA );
|
||||
swprintf( sString, L"%s", sStringA );
|
||||
swprintf( sString, L"%s", FormatMoney( pMercProfile->sSalary ).data() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sStringA, L"%d", pMercProfile->sSalary );
|
||||
InsertCommasForDollarFigure( sStringA );
|
||||
InsertDollarSignInToString( sStringA );
|
||||
swprintf( sString, L"%s", sStringA );
|
||||
swprintf( sString, L"%s", FormatMoney( pMercProfile->sSalary ).data() );
|
||||
}
|
||||
|
||||
FindFontRightCoordinates( (INT16)(x + Prsnl_DATA_OffSetX), 0, TEXT_BOX_WIDTH - 20, 0, sString, PERS_FONT, &sX, &sY );
|
||||
@@ -6369,9 +6338,7 @@ DEF:3/19/99:
|
||||
{
|
||||
mprintf((INT16)(pPersonnelScreenPoints[iCounter-1].x+(iSlot*TEXT_BOX_WIDTH)),pPersonnelScreenPoints[iCounter-1].y,pPersonnelScreenStrings[PRSNL_TXT_UNPAID_AMOUNT]);
|
||||
|
||||
swprintf( sString, L"%d", pMercProfile->sSalary * pMercProfile->iMercMercContractLength );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
swprintf( sString, L"%s", FormatMoney( pMercProfile->sSalary * pMercProfile->iMercMercContractLength ).data() );
|
||||
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[iCounter-1].x+(iSlot*TEXT_BOX_WIDTH)+Prsnl_DATA_OffSetX),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX,pPersonnelScreenPoints[iCounter-1].y,sString);
|
||||
@@ -6380,11 +6347,7 @@ DEF:3/19/99:
|
||||
{
|
||||
mprintf((INT16)(pPersonnelScreenPoints[iCounter-1].x+(iSlot*TEXT_BOX_WIDTH)),pPersonnelScreenPoints[iCounter-1].y,pPersonnelScreenStrings[PRSNL_TXT_MED_DEPOSIT]);
|
||||
|
||||
swprintf(sString, L"%d",pMercProfile->sMedicalDepositAmount);
|
||||
|
||||
// insert commas and dollar sign
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
swprintf(sString, L"%s", FormatMoney(pMercProfile->sMedicalDepositAmount).data());
|
||||
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[iCounter-1].x+(iSlot*TEXT_BOX_WIDTH)+Prsnl_DATA_OffSetX),0,TEXT_BOX_WIDTH-20,0,sString, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX,pPersonnelScreenPoints[iCounter-1].y,sString);
|
||||
|
||||
@@ -15169,14 +15169,12 @@ void CreateContractBox( SOLDIERTYPE *pCharacter )
|
||||
|
||||
if( pCharacter->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
{
|
||||
swprintf( sDollarString, L"%d", 0 );
|
||||
swprintf( sDollarString, L"%s", FormatMoney(0).data() );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sDollarString, L"%d", gMercProfiles[ pCharacter->ubProfile ].sSalary );
|
||||
swprintf( sDollarString, L"%s", FormatMoney(gMercProfiles[ pCharacter->ubProfile ].sSalary).data() );
|
||||
}
|
||||
InsertCommasForDollarFigure( sDollarString );
|
||||
InsertDollarSignInToString( sDollarString );
|
||||
swprintf( sString, L"%s ( %s )", pContractStrings[uiCounter], sDollarString);
|
||||
AddMonoString(&hStringHandle, sString);
|
||||
break;
|
||||
@@ -15184,15 +15182,13 @@ void CreateContractBox( SOLDIERTYPE *pCharacter )
|
||||
|
||||
if( pCharacter->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
{
|
||||
swprintf( sDollarString, L"%d", 0 );
|
||||
swprintf( sDollarString, L"%s", FormatMoney(0).data() );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sDollarString, L"%d", gMercProfiles[ pCharacter->ubProfile ].uiWeeklySalary );
|
||||
swprintf( sDollarString, L"%s", FormatMoney(gMercProfiles[ pCharacter->ubProfile ].uiWeeklySalary).data() );
|
||||
}
|
||||
|
||||
InsertCommasForDollarFigure( sDollarString );
|
||||
InsertDollarSignInToString( sDollarString );
|
||||
swprintf( sString, L"%s ( %s )", pContractStrings[uiCounter], sDollarString );
|
||||
AddMonoString(&hStringHandle, sString);
|
||||
break;
|
||||
@@ -15200,16 +15196,14 @@ void CreateContractBox( SOLDIERTYPE *pCharacter )
|
||||
|
||||
if( pCharacter->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
{
|
||||
swprintf( sDollarString, L"%d", 0 );
|
||||
swprintf( sDollarString, L"%s", FormatMoney(0).data() );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( sDollarString, L"%d", gMercProfiles[ pCharacter->ubProfile ].uiBiWeeklySalary );
|
||||
swprintf( sDollarString, L"%s", FormatMoney(gMercProfiles[ pCharacter->ubProfile ].uiBiWeeklySalary).data() );
|
||||
}
|
||||
|
||||
|
||||
InsertCommasForDollarFigure( sDollarString );
|
||||
InsertDollarSignInToString( sDollarString );
|
||||
swprintf( sString, L"%s ( %s )", pContractStrings[uiCounter], sDollarString);
|
||||
AddMonoString(&hStringHandle, sString);
|
||||
break;
|
||||
@@ -15299,10 +15293,8 @@ void CreateContractBoxMultiSelect(INT32 DailySalaries, INT32 WeeklySalaries, INT
|
||||
//}
|
||||
//else
|
||||
{
|
||||
swprintf(sDollarString, L"%d", DailySalaries);
|
||||
swprintf(sDollarString, L"%s", FormatMoney(DailySalaries).data() );
|
||||
}
|
||||
InsertCommasForDollarFigure(sDollarString);
|
||||
InsertDollarSignInToString(sDollarString);
|
||||
swprintf(sString, L"%s ( %s )", pContractStrings[uiCounter], sDollarString);
|
||||
AddMonoString(&hStringHandle, sString);
|
||||
break;
|
||||
@@ -15314,11 +15306,9 @@ void CreateContractBoxMultiSelect(INT32 DailySalaries, INT32 WeeklySalaries, INT
|
||||
//}
|
||||
//else
|
||||
{
|
||||
swprintf(sDollarString, L"%d", WeeklySalaries);
|
||||
swprintf(sDollarString, L"%s", FormatMoney(WeeklySalaries).data());
|
||||
}
|
||||
|
||||
InsertCommasForDollarFigure(sDollarString);
|
||||
InsertDollarSignInToString(sDollarString);
|
||||
swprintf(sString, L"%s ( %s )", pContractStrings[uiCounter], sDollarString);
|
||||
AddMonoString(&hStringHandle, sString);
|
||||
break;
|
||||
@@ -15330,12 +15320,10 @@ void CreateContractBoxMultiSelect(INT32 DailySalaries, INT32 WeeklySalaries, INT
|
||||
//}
|
||||
//else
|
||||
{
|
||||
swprintf(sDollarString, L"%d", BiweeklySalaries);
|
||||
swprintf(sDollarString, L"%s", FormatMoney(BiweeklySalaries).data());
|
||||
}
|
||||
|
||||
|
||||
InsertCommasForDollarFigure(sDollarString);
|
||||
InsertDollarSignInToString(sDollarString);
|
||||
swprintf(sString, L"%s ( %s )", pContractStrings[uiCounter], sDollarString);
|
||||
AddMonoString(&hStringHandle, sString);
|
||||
break;
|
||||
|
||||
@@ -1562,7 +1562,7 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
|
||||
void DisplayCurrentBalanceForMapBottom( void )
|
||||
{
|
||||
// show the current balance for the player on the map panel bottom
|
||||
CHAR16 sString[ 128 ];
|
||||
std::wstring sString;
|
||||
INT16 sFontX, sFontY;
|
||||
|
||||
// ste the font buffer
|
||||
@@ -1573,22 +1573,18 @@ void DisplayCurrentBalanceForMapBottom( void )
|
||||
SetFontForeground( 183 );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
swprintf( sString, L"%d", LaptopSaveInfo.iCurrentBalance );
|
||||
|
||||
// insert
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
sString = FormatMoney( LaptopSaveInfo.iCurrentBalance );
|
||||
|
||||
VarFindFontCenterCoordinates(
|
||||
UI_BOTTOM.Text.CurrentBalance.x,
|
||||
UI_BOTTOM.Text.CurrentBalance.y,
|
||||
UI_BOTTOM.Text.CurrentBalance.width,
|
||||
UI_BOTTOM.Text.CurrentBalance.height,
|
||||
COMPFONT, &sFontX, &sFontY, sString
|
||||
COMPFONT, &sFontX, &sFontY, sString.data()
|
||||
);
|
||||
|
||||
// print it
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
mprintf( sFontX, sFontY, L"%s", sString.data() );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1667,7 +1663,7 @@ void DisplayProjectedDailyMineIncome( void )
|
||||
{
|
||||
INT32 iRate = 0;
|
||||
static INT32 iOldRate = -1;
|
||||
CHAR16 sString[ 128 ];
|
||||
std::wstring sString;
|
||||
INT16 sFontX, sFontY;
|
||||
|
||||
// grab the rate from the financial system
|
||||
@@ -1692,22 +1688,18 @@ void DisplayProjectedDailyMineIncome( void )
|
||||
SetFontForeground( 183 );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
swprintf( sString, L"%d", iRate );
|
||||
|
||||
// insert
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
sString = FormatMoney( iRate );
|
||||
|
||||
VarFindFontCenterCoordinates(
|
||||
UI_BOTTOM.Text.CurrentIncome.x,
|
||||
UI_BOTTOM.Text.CurrentIncome.y,
|
||||
UI_BOTTOM.Text.CurrentIncome.width,
|
||||
UI_BOTTOM.Text.CurrentIncome.height,
|
||||
COMPFONT, &sFontX, &sFontY, sString
|
||||
COMPFONT, &sFontX, &sFontY, sString.data()
|
||||
);
|
||||
|
||||
// print it
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
mprintf( sFontX, sFontY, L"%s", sString.data() );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1716,7 +1708,6 @@ void DisplayProjectedDailyExpenses( void )
|
||||
{
|
||||
INT32 iRate = 0;
|
||||
static INT32 iOldExpensesRate = -1;
|
||||
CHAR16 sString[ 128 ];
|
||||
INT16 sFontX, sFontY;
|
||||
|
||||
// grab the rate from the financial system
|
||||
@@ -1749,22 +1740,18 @@ void DisplayProjectedDailyExpenses( void )
|
||||
}
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
swprintf( sString, L"%d", iRate );
|
||||
|
||||
// insert extra characters
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
auto rate{FormatMoney(iRate)};
|
||||
|
||||
VarFindFontCenterCoordinates(
|
||||
UI_BOTTOM.Text.CurrentExpenses.x,
|
||||
UI_BOTTOM.Text.CurrentExpenses.y,
|
||||
UI_BOTTOM.Text.CurrentExpenses.width,
|
||||
UI_BOTTOM.Text.CurrentExpenses.height,
|
||||
COMPFONT, &sFontX, &sFontY, sString
|
||||
COMPFONT, &sFontX, &sFontY, rate.data()
|
||||
);
|
||||
|
||||
// print it
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
mprintf( sFontX, sFontY, L"%s", rate.data());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4378,9 +4378,7 @@ void DisplayDistancesForHelicopter( void )
|
||||
if( (INT32)uiTripCost > LaptopSaveInfo.iCurrentBalance )
|
||||
SetFontForeground( FONT_LTRED );
|
||||
|
||||
swprintf( sString, L"%d", uiTripCost );
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
swprintf( sString, L"%s", FormatMoney(uiTripCost).data());
|
||||
FindFontRightCoordinates(UI_MAP.HeliETA.PopupBox.x + 5, ( INT16 ) (UI_MAP.HeliETA.PopupBox.y + 5 + 3 * GetFontHeight( MAP_FONT ) ), UI_MAP.HeliETA.PopupBox.width, 0, sString, MAP_FONT, &sX, &sY );
|
||||
mprintf( sX, ( INT16 ) ( sYPosition + 5 + 3 * GetFontHeight( MAP_FONT ) ), sString );
|
||||
|
||||
@@ -4857,9 +4855,7 @@ void BlitMineText( INT16 sMapX, INT16 sMapY )
|
||||
if (PlayerControlsMine(ubMineIndex) && !gMineStatus[ ubMineIndex ].fEmpty)
|
||||
{
|
||||
// show current production
|
||||
swprintf( wSubString, L"%d", PredictDailyIncomeFromAMine(ubMineIndex, TRUE) );
|
||||
InsertCommasForDollarFigure( wSubString );
|
||||
InsertDollarSignInToString( wSubString );
|
||||
swprintf( wSubString, L"%s", FormatMoney(PredictDailyIncomeFromAMine(ubMineIndex, TRUE)).data());
|
||||
wcscpy( wString, wSubString );
|
||||
|
||||
/*
|
||||
|
||||
@@ -549,20 +549,14 @@ void AddTextToMineBox( void )
|
||||
swprintf( wString, L"%s:", pwMineStrings[ 3 ]);
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
|
||||
swprintf( wString, L"%d", PredictDailyIncomeFromAMine( ubMineIndex, TRUE ) );
|
||||
InsertCommasForDollarFigure( wString );
|
||||
InsertDollarSignInToString( wString );
|
||||
AddSecondColumnMonoString( &hStringHandle, wString );
|
||||
AddSecondColumnMonoString( &hStringHandle, FormatMoney(PredictDailyIncomeFromAMine(ubMineIndex, TRUE)).data() );
|
||||
|
||||
|
||||
// potential production
|
||||
swprintf( wString, L"%s:", pwMineStrings[ 4 ]);
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
|
||||
swprintf( wString, L"%d", GetMaxDailyRemovalFromMine( ubMineIndex ) );
|
||||
InsertCommasForDollarFigure( wString );
|
||||
InsertDollarSignInToString( wString );
|
||||
AddSecondColumnMonoString( &hStringHandle, wString );
|
||||
AddSecondColumnMonoString( &hStringHandle, FormatMoney(GetMaxDailyRemovalFromMine(ubMineIndex)).data());
|
||||
|
||||
|
||||
// if potential is not nil
|
||||
@@ -616,9 +610,7 @@ void AddTextToMineBox( void )
|
||||
wcscpy( wString, L"Remaining (DEBUG):");
|
||||
AddMonoString( &hStringHandle, wString );
|
||||
|
||||
swprintf( wString, L"%d", GetTotalLeftInMine( ubMineIndex ) );
|
||||
InsertCommasForDollarFigure( wString );
|
||||
InsertDollarSignInToString( wString );
|
||||
swprintf( wString, L"%s", FormatMoney( GetTotalLeftInMine( ubMineIndex ) ).data() );
|
||||
AddSecondColumnMonoString( &hStringHandle, wString );
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6261,11 +6261,7 @@ BOOLEAN NotifyPlayerWhenEnemyTakesControlOfImportantSector( INT16 sSectorX, INT1
|
||||
iValue = GetProjectedTotalDailyIncome( );
|
||||
|
||||
// parse the string
|
||||
swprintf( sStringC, L"%d", iValue );
|
||||
|
||||
// insert
|
||||
InsertCommasForDollarFigure( sStringC );
|
||||
InsertDollarSignInToString( sStringC );
|
||||
swprintf( sStringC, L"%s", FormatMoney(iValue).data());
|
||||
|
||||
swprintf( sStringB, pMapErrorString[ 16 ], sString, sStringC );
|
||||
|
||||
|
||||
@@ -1518,16 +1518,8 @@ void HandleNotifyPlayerCantAffordInsurance( void )
|
||||
void HandleNotifyPlayerCanAffordInsurance( SOLDIERTYPE *pSoldier, UINT8 ubLength, INT32 iCost )
|
||||
{
|
||||
CHAR16 sString[ 128 ];
|
||||
CHAR16 sStringA[ 32 ];
|
||||
|
||||
//parse the cost
|
||||
swprintf( sStringA, L"%d",iCost );
|
||||
|
||||
// insert the commans and dollar sign
|
||||
InsertCommasForDollarFigure( sStringA );
|
||||
InsertDollarSignInToString( sStringA );
|
||||
|
||||
swprintf( sString, zMarksMapScreenText[ 10 ], pSoldier->GetName(), sStringA, ubLength );
|
||||
swprintf( sString, zMarksMapScreenText[ 10 ], pSoldier->GetName(), FormatMoney(iCost).data(), ubLength );
|
||||
|
||||
//Set the length to the global variable ( so we know how long the contract is in the callback )
|
||||
gubContractLength = ubLength;
|
||||
|
||||
@@ -318,15 +318,8 @@ void MercDailyUpdate()
|
||||
}
|
||||
else
|
||||
{
|
||||
CHAR16 zMoney[128];
|
||||
|
||||
//create a string for the salary owed to the npc
|
||||
swprintf( zMoney, L"%d", sSalary );
|
||||
InsertCommasForDollarFigure( zMoney );
|
||||
InsertDollarSignInToString( zMoney );
|
||||
|
||||
//Display a screen msg indicating that the npc was NOT paid
|
||||
ScreenMsg( FONT_MCOLOR_WHITE, MSG_INTERFACE, pMessageStrings[ MSG_CANT_AFFORD_TO_PAY_NPC_DAILY_SALARY_MSG ], gMercProfiles[ pSoldier->ubProfile ].zNickname, zMoney );
|
||||
ScreenMsg( FONT_MCOLOR_WHITE, MSG_INTERFACE, pMessageStrings[ MSG_CANT_AFFORD_TO_PAY_NPC_DAILY_SALARY_MSG ], gMercProfiles[ pSoldier->ubProfile ].zNickname, FormatMoney(sSalary).data() );
|
||||
|
||||
//if the merc hasnt been paid for NUM_DAYS_TILL_UNPAID_RPC_QUITS days, the merc will quit
|
||||
if( ( gMercProfiles[ pSoldier->ubProfile ].iBalance - sSalary ) <= -( sSalary * NUM_DAYS_TILL_UNPAID_RPC_QUITS ) )
|
||||
|
||||
+6
-12
@@ -3228,35 +3228,29 @@ void DrawCharacterInfo(INT16 sCharNumber)
|
||||
iDailyCost = gMercProfiles[ pSoldier->ubProfile ].sSalary;
|
||||
}
|
||||
|
||||
swprintf(sString, L"%d", iDailyCost );
|
||||
|
||||
// insert commas and dollar sign
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
{
|
||||
auto tmpMoney{ FormatMoney(iDailyCost) };
|
||||
const auto x = UI_CHARPANEL.Text.Salary.x;
|
||||
const auto y = UI_CHARPANEL.Text.Salary.y;
|
||||
const auto w = UI_CHARPANEL.Text.Salary.width;
|
||||
const auto h = UI_CHARPANEL.Text.Salary.height;
|
||||
FindFontRightCoordinates(x, y, w, h, sString, CHAR_FONT, &usX, &usY);
|
||||
DrawString(sString, usX, usY, CHAR_FONT);
|
||||
FindFontRightCoordinates(x, y, w, h, tmpMoney.data(), CHAR_FONT, &usX, &usY);
|
||||
DrawString(tmpMoney.data(), usX, usY, CHAR_FONT);
|
||||
}
|
||||
|
||||
// medical deposit
|
||||
if( gMercProfiles[ gCharactersList[ sCharNumber ].usSolID->ubProfile ].sMedicalDepositAmount > 0 )
|
||||
{
|
||||
swprintf(sString, L"%d", gMercProfiles[ gCharactersList[ sCharNumber ].usSolID->ubProfile ].sMedicalDepositAmount );
|
||||
auto tmpMoney{ FormatMoney(gMercProfiles[gCharactersList[sCharNumber].usSolID->ubProfile].sMedicalDepositAmount) };
|
||||
|
||||
// insert commas and dollar sign
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
{
|
||||
const auto x = UI_CHARPANEL.Text.Medical.x;
|
||||
const auto y = UI_CHARPANEL.Text.Medical.y;
|
||||
const auto w = UI_CHARPANEL.Text.Medical.width;
|
||||
const auto h = UI_CHARPANEL.Text.Medical.height;
|
||||
FindFontRightCoordinates(x, y, w, h, sString, CHAR_FONT, &usX, &usY);
|
||||
DrawString(sString, usX, y, CHAR_FONT);
|
||||
FindFontRightCoordinates(x, y, w, h, tmpMoney.data(), CHAR_FONT, &usX, &usY);
|
||||
DrawString(tmpMoney.data(), usX, y, CHAR_FONT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -474,7 +474,6 @@ void HandleDialogue( )
|
||||
BOOLEAN fDoneTalking = FALSE;
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
CHAR16 zText[ 512 ];
|
||||
CHAR16 zMoney[128];
|
||||
|
||||
// we don't want to just delay action of some events, we want to pause the whole queue, regardless of the event
|
||||
if( gfDialogueQueuePaused )
|
||||
@@ -1055,18 +1054,16 @@ void HandleDialogue( )
|
||||
|
||||
if ( QItem.uiSpecialEventFlag & DIALOGUE_SPECIAL_EVENT_SHOPKEEPER )
|
||||
{
|
||||
std::wstring zMoney{};
|
||||
if( QItem.uiSpecialEventData < 3 )
|
||||
{
|
||||
// post a notice if the player wants to withdraw money from thier account to cover the difference?
|
||||
swprintf( zMoney, L"%d", QItem.uiSpecialEventData2 );
|
||||
InsertCommasForDollarFigure( zMoney );
|
||||
InsertDollarSignInToString( zMoney );
|
||||
zMoney = FormatMoney(QItem.uiSpecialEventData2);
|
||||
}
|
||||
else if ( QItem.uiSpecialEventData > 7 )
|
||||
{
|
||||
// post a notice if the player wants to withdraw money from thier account to cover the difference?
|
||||
swprintf( zMoney, L"%d", QItem.uiSpecialEventData2 );
|
||||
InsertCommasForDollarFigure( zMoney );
|
||||
zMoney = FormatMoney(QItem.uiSpecialEventData2);
|
||||
}
|
||||
|
||||
switch( QItem.uiSpecialEventData )
|
||||
|
||||
@@ -4634,8 +4634,7 @@ void StartDialogueMessageBox( UINT8 ubProfileID, UINT16 usMessageBoxType )
|
||||
case NPC_ACTION_ASK_ABOUT_PAYING_RPC:
|
||||
case NPC_ACTION_ASK_ABOUT_PAYING_RPC_WITH_DAILY_SALARY:
|
||||
case NPC_ACTION_REDUCE_CONRAD_SALARY_CONDITIONS:
|
||||
swprintf( zTemp2, L"%d", gMercProfiles[ubProfileID].sSalary );
|
||||
InsertDollarSignInToString( zTemp2 );
|
||||
swprintf( zTemp2, L"%s", FormatMoney(gMercProfiles[ubProfileID].sSalary).data());
|
||||
swprintf( zTemp, TacticalStr[ HIRE_PROMPT ], gMercProfiles[ubProfileID].zNickname, zTemp2 );
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zTemp, GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, DialogueMessageBoxCallBack, NULL );
|
||||
break;
|
||||
@@ -4644,8 +4643,7 @@ void StartDialogueMessageBox( UINT8 ubProfileID, UINT16 usMessageBoxType )
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, TacticalStr[ BOXING_PROMPT ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, DialogueMessageBoxCallBack, NULL );
|
||||
break;
|
||||
case NPC_ACTION_BUY_LEATHER_KEVLAR_VEST:
|
||||
swprintf( zTemp2, L"%d", Item[LEATHER_JACKET_W_KEVLAR].usPrice );
|
||||
InsertDollarSignInToString( zTemp2 );
|
||||
swprintf( zTemp2, L"%s", FormatMoney(Item[LEATHER_JACKET_W_KEVLAR].usPrice).data());
|
||||
swprintf( zTemp, TacticalStr[ BUY_VEST_PROMPT ], ItemNames[LEATHER_JACKET_W_KEVLAR], zTemp2 );
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zTemp, GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, DialogueMessageBoxCallBack, NULL );
|
||||
break;
|
||||
@@ -4666,15 +4664,13 @@ void StartDialogueMessageBox( UINT8 ubProfileID, UINT16 usMessageBoxType )
|
||||
{
|
||||
iTemp -= giHospitalRefund;
|
||||
}
|
||||
swprintf( zTemp2, L"%ld", iTemp );
|
||||
InsertDollarSignInToString( zTemp2 );
|
||||
swprintf( zTemp2, L"%s", FormatMoney(iTemp).data());
|
||||
swprintf( zTemp, TacticalStr[ PAY_MONEY_PROMPT ], zTemp2 );
|
||||
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zTemp, GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, DialogueMessageBoxCallBack, NULL );
|
||||
break;
|
||||
case NPC_ACTION_BUY_VEHICLE_REQUESTOR:
|
||||
swprintf( zTemp2, L"%ld", 10000 );
|
||||
InsertDollarSignInToString( zTemp2 );
|
||||
swprintf( zTemp2, L"%s", FormatMoney(10000).data());
|
||||
swprintf( zTemp, TacticalStr[ PAY_MONEY_PROMPT ], zTemp2 );
|
||||
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zTemp, GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, DialogueMessageBoxCallBack, NULL );
|
||||
|
||||
@@ -7931,9 +7931,7 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
//Display the total amount of money remaining
|
||||
SetFontForeground( 5 );
|
||||
swprintf( pStr, L"%ld", gRemoveMoney.uiMoneyRemaining );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
swprintf( pStr, L"%s", FormatMoney(gRemoveMoney.uiMoneyRemaining).data() );
|
||||
if (UsingNewInventorySystem() == true)
|
||||
FindFontRightCoordinates( gMoneyStats[ 4 ].sX + 50, gMoneyStats[ 4 ].sY, ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
else
|
||||
@@ -7942,9 +7940,7 @@ void RenderItemDescriptionBox( )
|
||||
|
||||
//Display the total amount of money removing
|
||||
SetFontForeground( 5 );
|
||||
swprintf( pStr, L"%ld", gRemoveMoney.uiMoneyRemoving );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
swprintf( pStr, L"%s", FormatMoney(gRemoveMoney.uiMoneyRemoving).data() );
|
||||
if (UsingNewInventorySystem() == true)
|
||||
FindFontRightCoordinates( gMoneyStats[ 5 ].sX + 50, gMoneyStats[ 5 ].sY, ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
else
|
||||
@@ -7973,9 +7969,7 @@ void RenderItemDescriptionBox( )
|
||||
// {
|
||||
SetFontForeground( FONT_FCOLOR_WHITE );
|
||||
SetFontShadow( DEFAULT_SHADOW );
|
||||
swprintf( pStr, L"%ld", (*gpItemDescObject)[gubItemDescStatusIndex]->data.money.uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
swprintf( pStr, L"%s", FormatMoney((*gpItemDescObject)[gubItemDescStatusIndex]->data.money.uiMoneyAmount).data() );
|
||||
if( guiCurrentItemDescriptionScreen == MAP_SCREEN )
|
||||
FindFontRightCoordinates( (INT16)(ITEMDESC_NAME_X), (INT16)(ITEMDESC_NAME_Y ), 245, ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY);
|
||||
else if ( UsingEDBSystem() > 0 )
|
||||
@@ -11470,9 +11464,7 @@ void RenderItemPickupMenu( )
|
||||
if ( Item[ pObject->usItem ].usItemClass == IC_MONEY )
|
||||
{
|
||||
CHAR16 pStr2[20];
|
||||
swprintf( pStr2, L"%ld", (*pObject)[0]->data.money.uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr2 );
|
||||
InsertDollarSignInToString( pStr2 );
|
||||
swprintf( pStr2, L"%s", FormatMoney((*pObject)[0]->data.money.uiMoneyAmount ).data());
|
||||
|
||||
swprintf( pStr, L"%s (%ls)", ItemNames[ pObject->usItem ], pStr2 );
|
||||
}
|
||||
@@ -12216,9 +12208,7 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
case MONEY:
|
||||
//Money
|
||||
{
|
||||
swprintf( pStr, L"%ld", (*pObject)[subObject]->data.money.uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr );
|
||||
InsertDollarSignInToString( pStr );
|
||||
swprintf( pStr, L"%s", FormatMoney((*pObject)[subObject]->data.money.uiMoneyAmount ).data());
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -12227,9 +12217,7 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
//if ( Item[ usItem ].usItemClass == IC_MONEY )
|
||||
{
|
||||
CHAR16 pStr2[20];
|
||||
swprintf( pStr2, L"%ld", (*pObject)[subObject]->data.money.uiMoneyAmount );
|
||||
InsertCommasForDollarFigure( pStr2 );
|
||||
InsertDollarSignInToString( pStr2 );
|
||||
swprintf( pStr2, L"%s", FormatMoney((*pObject)[subObject]->data.money.uiMoneyAmount ).data());
|
||||
|
||||
swprintf( pStr, L"%s (%ls)", ItemNames[ usItem ], pStr2 );
|
||||
}
|
||||
|
||||
@@ -7783,10 +7783,7 @@ void SMInvMoneyButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
guiPendingOverrideEvent = A_CHANGE_TO_MOVE;
|
||||
HandleTacticalUI( );
|
||||
|
||||
swprintf( zMoney, L"%d", (*gpItemPointer)[0]->data.money.uiMoneyAmount );
|
||||
|
||||
InsertCommasForDollarFigure( zMoney );
|
||||
InsertDollarSignInToString( zMoney );
|
||||
swprintf( zMoney, L"%s", FormatMoney((*gpItemPointer)[0]->data.money.uiMoneyAmount ).data());
|
||||
|
||||
//ask the user if they are sure they want to deposit the money
|
||||
swprintf( zText, gzMoneyWithdrawMessageText[ CONFIRMATION_TO_DEPOSIT_MONEY_TO_ACCOUNT ], zMoney );
|
||||
|
||||
@@ -1524,9 +1524,7 @@ BOOLEAN RenderShopKeeperInterface()
|
||||
// display shopkeeper budget
|
||||
DisplayWrappedString( SKI_BUDGET_X, SKI_BUDGET_Y, SKI_BUDGET_WIDTH, 2, SKI_LABEL_FONT, SKI_TITLE_COLOR, SKI_Text[SKI_TEXT_BUDGET], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
swprintf( zMoney, L"%d", gArmsDealerStatus[gbSelectedArmsDealerID].uiArmsDealersCash );
|
||||
|
||||
InsertCommasForDollarFigure( zMoney );
|
||||
swprintf( zMoney, L"%s", FormatMoney(gArmsDealerStatus[gbSelectedArmsDealerID].uiArmsDealersCash).data() );
|
||||
|
||||
CHAR16 zTemp2[64];
|
||||
if ( armsDealerInfo[gbSelectedArmsDealerID].uiFlags & ARMS_DEALER_DEALWITHINTEL )
|
||||
@@ -1554,14 +1552,12 @@ BOOLEAN RenderShopKeeperInterface()
|
||||
//Display the players current balance value
|
||||
if ( armsDealerInfo[gbSelectedArmsDealerID].uiFlags & ARMS_DEALER_DEALWITHINTEL )
|
||||
{
|
||||
swprintf( zMoney, L"%d", (int)(GetIntel()) );
|
||||
InsertCommasForDollarFigure( zMoney );
|
||||
swprintf( zMoney, L"%s", FormatMoney((int)(GetIntel()) ).data());
|
||||
swprintf( zTemp2, L"%s Intel", zMoney );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( zMoney, L"%d", LaptopSaveInfo.iCurrentBalance );
|
||||
InsertCommasForDollarFigure( zMoney );
|
||||
swprintf( zMoney, L"%s", FormatMoney(LaptopSaveInfo.iCurrentBalance ).data());
|
||||
swprintf( zTemp2, L"$%s", zMoney );
|
||||
}
|
||||
|
||||
@@ -1732,9 +1728,7 @@ void DisplayAllDealersCash()
|
||||
DrawTextToScreen( gMercProfiles[ armsDealerInfo[ bArmsDealer ].ubShopKeeperID ].zNickname, SCREEN_X_OFFSET + 540, SCREEN_Y_OFFSET + usPosY, 0, FONT10ARIAL, SKI_TITLE_COLOR, FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED );
|
||||
|
||||
//Display the arms dealer cash on hand
|
||||
swprintf( zTemp, L"%d", gArmsDealerStatus[ bArmsDealer ].uiArmsDealersCash );
|
||||
|
||||
InsertCommasForDollarFigure( zTemp );
|
||||
swprintf( zTemp, L"%s", FormatMoney(gArmsDealerStatus[ bArmsDealer ].uiArmsDealersCash ).data());
|
||||
|
||||
if ( armsDealerInfo[gbSelectedArmsDealerID].uiFlags & ARMS_DEALER_DEALWITHINTEL )
|
||||
swprintf( zTemp2, L"%s Intel", zTemp );
|
||||
@@ -2789,8 +2783,7 @@ UINT32 DisplayInvSlot( UINT16 ubSlotNum, UINT16 usItemIndex, UINT16 usPosX, UINT
|
||||
//if the item has a price, display it
|
||||
if( uiItemCost != 0 )
|
||||
{
|
||||
swprintf( zTemp, L"%d", uiItemCost );
|
||||
InsertCommasForDollarFigure( zTemp );
|
||||
swprintf( zTemp, L"%s", FormatMoney(uiItemCost).data() );
|
||||
|
||||
CHAR16 zTemp2[64];
|
||||
if ( armsDealerInfo[gbSelectedArmsDealerID].uiFlags & ARMS_DEALER_DEALWITHINTEL )
|
||||
@@ -3462,8 +3455,7 @@ void DisplayArmsDealerOfferArea()
|
||||
if( gubSkiDirtyLevel == SKI_DIRTY_LEVEL2 )
|
||||
{
|
||||
//Display the total cost text
|
||||
swprintf( zTemp, L"%d", uiTotalCost );
|
||||
InsertCommasForDollarFigure( zTemp );
|
||||
swprintf( zTemp, L"%s", FormatMoney(uiTotalCost).data() );
|
||||
|
||||
CHAR16 zTemp2[64];
|
||||
if ( armsDealerInfo[gbSelectedArmsDealerID].uiFlags & ARMS_DEALER_DEALWITHINTEL )
|
||||
@@ -3727,8 +3719,7 @@ void DisplayPlayersOfferArea()
|
||||
if( gubSkiDirtyLevel == SKI_DIRTY_LEVEL2 )
|
||||
{
|
||||
//Display the total cost text
|
||||
swprintf( zTemp, L"%d", uiTotalCost );
|
||||
InsertCommasForDollarFigure( zTemp );
|
||||
swprintf( zTemp, L"%s", FormatMoney(uiTotalCost).data() );
|
||||
|
||||
CHAR16 zTemp2[64];
|
||||
if ( armsDealerInfo[gbSelectedArmsDealerID].uiFlags & ARMS_DEALER_DEALWITHINTEL )
|
||||
|
||||
+1
-2
@@ -1546,8 +1546,7 @@ BOOLEAN HandleNPCBeingGivenMoneyByPlayer( UINT8 ubNPC, UINT32 uiMoneyAmount, UIN
|
||||
{
|
||||
CHAR16 sTempString[ 100 ];
|
||||
|
||||
swprintf( sTempString, L"%ld", iCost - uiMoneyAmount - giHospitalTempBalance );
|
||||
InsertDollarSignInToString( sTempString );
|
||||
swprintf( sTempString, L"%s", FormatMoney(iCost - uiMoneyAmount - giHospitalTempBalance).data());
|
||||
|
||||
// not enough cash
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW,
|
||||
|
||||
Reference in New Issue
Block a user