diff --git a/GameInitOptionsScreen.cpp b/GameInitOptionsScreen.cpp index 76e00ee3..a462778d 100644 --- a/GameInitOptionsScreen.cpp +++ b/GameInitOptionsScreen.cpp @@ -2456,22 +2456,6 @@ void HandleGIOScreen() } } -STR16 BRSettingText(INT8 currentSetting, BOOLEAN quantity) -{ - CHAR16 text[256]; - - if (currentSetting < BR_GREAT) - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_GOOD_TEXT], currentSetting, quantity ? "x" : ""); - else if (currentSetting >= BR_GREAT && currentSetting < BR_EXCELLENT ) - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_GREAT_TEXT], currentSetting, quantity ? "x" : ""); - else if (currentSetting >= BR_EXCELLENT && currentSetting < BR_AWESOME ) - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_EXCELLENT_TEXT], currentSetting, quantity ? "x" : ""); - else - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_AWESOME_TEXT], currentSetting, quantity ? "x" : ""); - - return text; -} - BOOLEAN RenderGIOScreen() { HVOBJECT hPixHandle; @@ -2515,13 +2499,33 @@ BOOLEAN RenderGIOScreen() } // Display BR Setting texts + CHAR16 qualityText[256], quantityText[256]; + + if (iCurrentBRQualitySetting < BR_GREAT) + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_GOOD_TEXT], iCurrentBRQualitySetting); + else if (iCurrentBRQualitySetting >= BR_GREAT && iCurrentBRQualitySetting < BR_EXCELLENT ) + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_GREAT_TEXT], iCurrentBRQualitySetting); + else if (iCurrentBRQualitySetting >= BR_EXCELLENT && iCurrentBRQualitySetting < BR_AWESOME ) + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_EXCELLENT_TEXT], iCurrentBRQualitySetting); + else + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_AWESOME_TEXT], iCurrentBRQualitySetting); + + if (iCurrentBRQuantitySetting < BR_GREAT) + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_GOOD_TEXT], iCurrentBRQuantitySetting); + else if (iCurrentBRQuantitySetting >= BR_GREAT && iCurrentBRQuantitySetting < BR_EXCELLENT ) + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_GREAT_TEXT], iCurrentBRQuantitySetting); + else if (iCurrentBRQuantitySetting >= BR_EXCELLENT && iCurrentBRQuantitySetting < BR_AWESOME ) + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_EXCELLENT_TEXT], iCurrentBRQuantitySetting); + else + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_AWESOME_TEXT], iCurrentBRQuantitySetting); + RenderGIOSmallSelectionFrame( (GIO_BR_QUALITY_SETTING_X + 36), (GIO_BR_QUALITY_SETTING_Y - 3) ); DisplayWrappedString( (UINT16)(GIO_BR_QUALITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (UINT16)(GIO_BR_QUALITY_SETTING_Y-GIO_GAP_BN_SETTINGS + GIO_TITLE_DISTANCE - 12), GIO_BR_QUALITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_QUALITY_TEXT ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); - DisplayWrappedString( (UINT16)(GIO_BR_QUALITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUALITY_SETTING_Y+6), GIO_BR_QUALITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, BRSettingText(iCurrentBRQualitySetting, FALSE), FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); + DisplayWrappedString( (UINT16)(GIO_BR_QUALITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUALITY_SETTING_Y+6), GIO_BR_QUALITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, qualityText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); RenderGIOSmallSelectionFrame( (GIO_BR_QUANTITY_SETTING_X + 36), (GIO_BR_QUANTITY_SETTING_Y - 3) ); DisplayWrappedString( (UINT16)(GIO_BR_QUANTITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (UINT16)(GIO_BR_QUANTITY_SETTING_Y-GIO_GAP_BN_SETTINGS + GIO_TITLE_DISTANCE - 12), GIO_BR_QUANTITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_QUANTITY_TEXT ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); - DisplayWrappedString( (UINT16)(GIO_BR_QUANTITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUANTITY_SETTING_Y+6), GIO_BR_QUANTITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, BRSettingText(iCurrentBRQuantitySetting, TRUE), FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); + DisplayWrappedString( (UINT16)(GIO_BR_QUANTITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUANTITY_SETTING_Y+6), GIO_BR_QUANTITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, quantityText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); // Display Progress Setting texts RenderGIOSmallSelectionFrame( (GIO_PROGRESS_SETTING_X + 36), (GIO_PROGRESS_SETTING_Y - 3) ); @@ -5271,22 +5275,6 @@ void HandleGIOScreen() } } -STR16 BRSettingText(INT8 currentSetting, BOOLEAN quantity) -{ - CHAR16 text[256]; - - if (currentSetting < BR_GREAT) - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_GOOD_TEXT], currentSetting, quantity ? "x" : ""); - else if (currentSetting >= BR_GREAT && currentSetting < BR_EXCELLENT ) - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_GREAT_TEXT], currentSetting, quantity ? "x" : ""); - else if (currentSetting >= BR_EXCELLENT && currentSetting < BR_AWESOME ) - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_EXCELLENT_TEXT], currentSetting, quantity ? "x" : ""); - else - swprintf(text, L"%s (%d%s)", gzGIOScreenText[GIO_BR_AWESOME_TEXT], currentSetting, quantity ? "x" : ""); - - return text; -} - BOOLEAN RenderGIOScreen() { HVOBJECT hPixHandle; @@ -5330,13 +5318,33 @@ BOOLEAN RenderGIOScreen() } // Display BR Setting texts + CHAR16 qualityText[256], quantityText[256]; + + if (iCurrentBRQualitySetting < BR_GREAT) + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_GOOD_TEXT], iCurrentBRQualitySetting); + else if (iCurrentBRQualitySetting >= BR_GREAT && iCurrentBRQualitySetting < BR_EXCELLENT ) + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_GREAT_TEXT], iCurrentBRQualitySetting); + else if (iCurrentBRQualitySetting >= BR_EXCELLENT && iCurrentBRQualitySetting < BR_AWESOME ) + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_EXCELLENT_TEXT], iCurrentBRQualitySetting); + else + swprintf(qualityText, L"%s (%d)", gzGIOScreenText[GIO_BR_AWESOME_TEXT], iCurrentBRQualitySetting); + + if (iCurrentBRQuantitySetting < BR_GREAT) + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_GOOD_TEXT], iCurrentBRQuantitySetting); + else if (iCurrentBRQuantitySetting >= BR_GREAT && iCurrentBRQuantitySetting < BR_EXCELLENT ) + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_GREAT_TEXT], iCurrentBRQuantitySetting); + else if (iCurrentBRQuantitySetting >= BR_EXCELLENT && iCurrentBRQuantitySetting < BR_AWESOME ) + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_EXCELLENT_TEXT], iCurrentBRQuantitySetting); + else + swprintf(quantityText, L"%s (%dx)", gzGIOScreenText[GIO_BR_AWESOME_TEXT], iCurrentBRQuantitySetting); + RenderGIOSmallSelectionFrame( (GIO_BR_QUALITY_SETTING_X + 36), (GIO_BR_QUALITY_SETTING_Y - 3) ); DisplayWrappedString( (UINT16)(GIO_BR_QUALITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (UINT16)(GIO_BR_QUALITY_SETTING_Y-GIO_GAP_BN_SETTINGS + GIO_TITLE_DISTANCE - 12), GIO_BR_QUALITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_QUALITY_TEXT ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); - DisplayWrappedString( (UINT16)(GIO_BR_QUALITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUALITY_SETTING_Y+6), GIO_BR_QUALITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, BRSettingText(iCurrentBRQualitySetting, FALSE), FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); + DisplayWrappedString( (UINT16)(GIO_BR_QUALITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUALITY_SETTING_Y+6), GIO_BR_QUALITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, qualityText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); RenderGIOSmallSelectionFrame( (GIO_BR_QUANTITY_SETTING_X + 36), (GIO_BR_QUANTITY_SETTING_Y - 3) ); DisplayWrappedString( (UINT16)(GIO_BR_QUANTITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (UINT16)(GIO_BR_QUANTITY_SETTING_Y-GIO_GAP_BN_SETTINGS + GIO_TITLE_DISTANCE - 12), GIO_BR_QUANTITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_QUANTITY_TEXT ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); - DisplayWrappedString( (UINT16)(GIO_BR_QUANTITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUANTITY_SETTING_Y+6), GIO_BR_QUANTITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, BRSettingText(iCurrentBRQuantitySetting, TRUE), FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); + DisplayWrappedString( (UINT16)(GIO_BR_QUANTITY_SETTING_X+GIO_OFFSET_TO_TEXT + 1), (GIO_BR_QUANTITY_SETTING_Y+6), GIO_BR_QUANTITY_SETTING_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, quantityText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); // Display Progress Setting texts RenderGIOSmallSelectionFrame( (GIO_PROGRESS_SETTING_X + 36), (GIO_PROGRESS_SETTING_Y - 3) );