comparison UI/UIHouses.cpp @ 1838:211dfe2d8db1

changing global char* vars to const char* vars
author Grumpy7
date Fri, 11 Oct 2013 09:19:40 +0200
parents e4e27261d84e
children 2e6d3cd052e0
comparison
equal deleted inserted replaced
1829:e4e27261d84e 1838:211dfe2d8db1
1652 { 1652 {
1653 case HOUSE_DIALOGUE_MAIN: 1653 case HOUSE_DIALOGUE_MAIN:
1654 { 1654 {
1655 pStringSum = 1; 1655 pStringSum = 1;
1656 pTextHeight = 0; 1656 pTextHeight = 0;
1657 pShopOptions[0] = pGlobalTXT_LocalizationStrings[604];//Охота за вознаграждение 1657 pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[604];//Охота за вознаграждение
1658 if ( pParty->uFine > 0 ) 1658 if ( pParty->uFine > 0 )
1659 { 1659 {
1660 pShopOptions[1] = pGlobalTXT_LocalizationStrings[603];//Заплатить штраф 1660 pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[603];//Заплатить штраф
1661 pStringSum = 2; 1661 pStringSum = 2;
1662 } 1662 }
1663 for ( uint i = 0; i < pStringSum; ++i ) 1663 for ( uint i = 0; i < pStringSum; ++i )
1664 pTextHeight += pFontArrus->CalcTextHeight(pShopOptions[i], &townHall_window, 0, 0); 1664 pTextHeight += pFontArrus->CalcTextHeight(pShopOptions[i], &townHall_window, 0, 0);
1665 v29 = (100 - pTextHeight) / pStringSum; 1665 v29 = (100 - pTextHeight) / pStringSum;
2156 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN: 2156 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN:
2157 { 2157 {
2158 if ( HouseUI_CheckIfPlayerCanInteract() ) 2158 if ( HouseUI_CheckIfPlayerCanInteract() )
2159 { 2159 {
2160 pOptionsCount = 2; 2160 pOptionsCount = 2;
2161 pShopOptions[0] = pGlobalTXT_LocalizationStrings[620];//Правила 2161 pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[620];//Правила
2162 pShopOptions[1] = pGlobalTXT_LocalizationStrings[622];//Условия победы 2162 pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[622];//Условия победы
2163 if ( pParty->HasItem(651) )//651 - Колода для игры в АркоМэйдж в Items.txt 2163 if ( pParty->HasItem(651) )//651 - Колода для игры в АркоМэйдж в Items.txt
2164 { 2164 {
2165 pShopOptions[2] = pGlobalTXT_LocalizationStrings[621];//Играть 2165 pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[621];//Играть
2166 pOptionsCount = 3; 2166 pOptionsCount = 3;
2167 } 2167 }
2168 for ( i = 0; i < pOptionsCount; ++i ) 2168 for ( i = 0; i < pOptionsCount; ++i )
2169 all_text_height = pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0); 2169 all_text_height = pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
2170 all_text_height = (174 - all_text_height) / pOptionsCount; 2170 all_text_height = (174 - all_text_height) / pOptionsCount;
2228 { 2228 {
2229 sprintfex(pTmpBuf.data(), "%s %d %s", pGlobalTXT_LocalizationStrings[104], pPrice, pGlobalTXT_LocalizationStrings[97]);//"Лечить" "Золото" 2229 sprintfex(pTmpBuf.data(), "%s %d %s", pGlobalTXT_LocalizationStrings[104], pPrice, pGlobalTXT_LocalizationStrings[97]);//"Лечить" "Золото"
2230 pShopOptions[0] = pTmpBuf.data(); 2230 pShopOptions[0] = pTmpBuf.data();
2231 index = 0; 2231 index = 0;
2232 } 2232 }
2233 pShopOptions[1] = pGlobalTXT_LocalizationStrings[68];//"Пожертвовать" 2233 pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[68];//"Пожертвовать"
2234 pShopOptions[2] = pGlobalTXT_LocalizationStrings[160];//"Обучиться навыкам" 2234 pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[160];//"Обучиться навыкам"
2235 all_text_height = 0; 2235 all_text_height = 0;
2236 if ( index < pDialogueWindow->pNumPresenceButton ) 2236 if ( index < pDialogueWindow->pNumPresenceButton )
2237 { 2237 {
2238 uint i = index; 2238 uint i = index;
2239 for ( uint j = index; j < pDialogueWindow->pNumPresenceButton; ++j ) 2239 for ( uint j = index; j < pDialogueWindow->pNumPresenceButton; ++j )
2512 { 2512 {
2513 if (HouseUI_CheckIfPlayerCanInteract()) 2513 if (HouseUI_CheckIfPlayerCanInteract())
2514 { 2514 {
2515 index = 0; 2515 index = 0;
2516 pShopOptions[0] = pTmpBuf.data(); 2516 pShopOptions[0] = pTmpBuf.data();
2517 pShopOptions[1] = pGlobalTXT_LocalizationStrings[160];// "Learn Skills" 2517 pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[160];// "Learn Skills"
2518 if ( pDialogueWindow->pStartingPosActiveItem < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton ) 2518 if ( pDialogueWindow->pStartingPosActiveItem < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton )
2519 { 2519 {
2520 for ( int i = pDialogueWindow->pStartingPosActiveItem; 2520 for ( int i = pDialogueWindow->pStartingPosActiveItem;
2521 i < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem; ++i ) 2521 i < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem; ++i )
2522 { 2522 {