Mercurial > mm7
comparison UI/UIHouses.cpp @ 2069:259df09dfb50
32bits almost there
author | Nomad |
---|---|
date | Tue, 03 Dec 2013 20:18:17 +0200 |
parents | b2a434d65344 |
children | 7f403ebf619f |
comparison
equal
deleted
inserted
replaced
2061:b2a434d65344 | 2069:259df09dfb50 |
---|---|
1457 if (schedule_id != 255 && v25 && (!transport_schedule[schedule_id].uQuestBit | 1457 if (schedule_id != 255 && v25 && (!transport_schedule[schedule_id].uQuestBit |
1458 || _449B57_test_bit(pParty->_quest_bits, transport_schedule[schedule_id].uQuestBit)) )//ошибка: рисуется несколько строчек одного направления путешествия | 1458 || _449B57_test_bit(pParty->_quest_bits, transport_schedule[schedule_id].uQuestBit)) )//ошибка: рисуется несколько строчек одного направления путешествия |
1459 { | 1459 { |
1460 //get color for current string(определение цвета текущей строки)---------- | 1460 //get color for current string(определение цвета текущей строки)---------- |
1461 if ( pDialogueWindow->pCurrentPosActiveItem == pCurrentButton ) | 1461 if ( pDialogueWindow->pCurrentPosActiveItem == pCurrentButton ) |
1462 sprintf(pTopicArray[index], "\f%05d", TargetColor(255, 255, 155)); | 1462 sprintf(pTopicArray[index], "\f%05d", Color16(255, 255, 155)); |
1463 else | 1463 else |
1464 sprintf(pTopicArray[index], "\f%05d", TargetColor(255, 255, 255)); | 1464 sprintf(pTopicArray[index], "\f%05d", Color16(255, 255, 255)); |
1465 //hired NPC premium(премия наёмного НПС)---------------------------------- | 1465 //hired NPC premium(премия наёмного НПС)---------------------------------- |
1466 travel_time = transport_schedule[schedule_id].uTravelTime; | 1466 travel_time = transport_schedule[schedule_id].uTravelTime; |
1467 if ( (unsigned int)window_SpeakInHouse->ptr_1C >= HOUSE_BOATS_EMERALD_ISLE ) | 1467 if ( (unsigned int)window_SpeakInHouse->ptr_1C >= HOUSE_BOATS_EMERALD_ISLE ) |
1468 { | 1468 { |
1469 if ( CheckHiredNPCSpeciality(Sailor) ) | 1469 if ( CheckHiredNPCSpeciality(Sailor) ) |
1515 travel_window.DrawTitleText(pFontArrus, 0, 146, 0, pTmpBuf.data(), 3); | 1515 travel_window.DrawTitleText(pFontArrus, 0, 146, 0, pTmpBuf.data(), 3); |
1516 } | 1516 } |
1517 else | 1517 else |
1518 { | 1518 { |
1519 travel_window.DrawTitleText(pFontArrus, 0, (174 - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[561], &travel_window, 0, 0)) / 2 + 138,//"Извините, приходите в другой день" | 1519 travel_window.DrawTitleText(pFontArrus, 0, (174 - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[561], &travel_window, 0, 0)) / 2 + 138,//"Извините, приходите в другой день" |
1520 TargetColor(255, 255, 255), pGlobalTXT_LocalizationStrings[561], 3); | 1520 Color16(255, 255, 255), pGlobalTXT_LocalizationStrings[561], 3); |
1521 pAudioPlayer->StopChannels(-1, -1); | 1521 pAudioPlayer->StopChannels(-1, -1); |
1522 } | 1522 } |
1523 } | 1523 } |
1524 } | 1524 } |
1525 else//после нажатия топика | 1525 else//после нажатия топика |
1645 memcpy(&townHall_window, window_SpeakInHouse, sizeof(townHall_window)); | 1645 memcpy(&townHall_window, window_SpeakInHouse, sizeof(townHall_window)); |
1646 townHall_window.uFrameX = 483; | 1646 townHall_window.uFrameX = 483; |
1647 townHall_window.uFrameWidth = 148; | 1647 townHall_window.uFrameWidth = 148; |
1648 townHall_window.uFrameZ = 334; | 1648 townHall_window.uFrameZ = 334; |
1649 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[605], pParty->uFine);//Текущий штраф | 1649 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[605], pParty->uFine);//Текущий штраф |
1650 townHall_window.DrawTitleText(pFontArrus, 0, 260, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 1650 townHall_window.DrawTitleText(pFontArrus, 0, 260, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
1651 switch(dialog_menu_id) | 1651 switch(dialog_menu_id) |
1652 { | 1652 { |
1653 case HOUSE_DIALOGUE_MAIN: | 1653 case HOUSE_DIALOGUE_MAIN: |
1654 { | 1654 { |
1655 pStringSum = 1; | 1655 pStringSum = 1; |
1676 pButton->uY = v29 + v17; | 1676 pButton->uY = v29 + v17; |
1677 pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[j], &townHall_window, 0, 0); | 1677 pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[j], &townHall_window, 0, 0); |
1678 pButton->uHeight = pTextHeight; | 1678 pButton->uHeight = pTextHeight; |
1679 v17 = pButton->uY + pTextHeight - 1; | 1679 v17 = pButton->uY + pTextHeight - 1; |
1680 pButton->uW = v17; | 1680 pButton->uW = v17; |
1681 pTextColor = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 1681 pTextColor = Color16(0xFFu, 0xFFu, 0x9Bu); |
1682 if ( pDialogueWindow->pCurrentPosActiveItem != v31 ) | 1682 if ( pDialogueWindow->pCurrentPosActiveItem != v31 ) |
1683 pTextColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 1683 pTextColor = Color16(0xFFu, 0xFFu, 0xFFu); |
1684 townHall_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[j], 3); | 1684 townHall_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[j], 3); |
1685 ++v31; | 1685 ++v31; |
1686 ++j; | 1686 ++j; |
1687 } | 1687 } |
1688 } | 1688 } |
1689 break; | 1689 break; |
1690 } | 1690 } |
1691 case HOUSE_DIALOGUE_TOWNHALL_MESSAGE: | 1691 case HOUSE_DIALOGUE_TOWNHALL_MESSAGE: |
1692 { | 1692 { |
1693 sprintf(pTmpBuf.data(), "\f%05d%s\f%05d", TargetColor(0xFFu, 0xFFu, 0x9Bu), | 1693 sprintf(pTmpBuf.data(), "\f%05d%s\f%05d", Color16(0xFFu, 0xFFu, 0x9Bu), |
1694 pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName, TargetColor(0xFFu, 0xFFu, 0xFFu)); | 1694 pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName, Color16(0xFFu, 0xFFu, 0xFFu)); |
1695 sprintf(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].uLevel); | 1695 sprintf(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].uLevel); |
1696 current_npc_text = pTmpBuf2.data(); | 1696 current_npc_text = pTmpBuf2.data(); |
1697 memcpy(&window, pDialogueWindow, sizeof(window)); | 1697 memcpy(&window, pDialogueWindow, sizeof(window)); |
1698 window.uFrameWidth = 458; | 1698 window.uFrameWidth = 458; |
1699 window.uFrameZ = 457; | 1699 window.uFrameZ = 457; |
1712 case HOUSE_DIALOGUE_TOWNHALL_PAY_FINE: | 1712 case HOUSE_DIALOGUE_TOWNHALL_PAY_FINE: |
1713 { | 1713 { |
1714 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) | 1714 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) |
1715 { | 1715 { |
1716 sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]); // "Pay" "How Much?" | 1716 sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]); // "Pay" "How Much?" |
1717 townHall_window.DrawTitleText(pFontArrus, 0, 146, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 1717 townHall_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
1718 townHall_window.DrawTitleText(pFontArrus, 0, 186, TargetColor(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); | 1718 townHall_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); |
1719 townHall_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); | 1719 townHall_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); |
1720 return; | 1720 return; |
1721 } | 1721 } |
1722 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) | 1722 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) |
1723 { | 1723 { |
1766 memcpy(&bank_window, window_SpeakInHouse, sizeof(bank_window)); | 1766 memcpy(&bank_window, window_SpeakInHouse, sizeof(bank_window)); |
1767 bank_window.uFrameX = 483; | 1767 bank_window.uFrameX = 483; |
1768 bank_window.uFrameWidth = 148; | 1768 bank_window.uFrameWidth = 148; |
1769 bank_window.uFrameZ = 334; | 1769 bank_window.uFrameZ = 334; |
1770 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[25], pParty->uNumGoldInBank);//Баланс | 1770 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[25], pParty->uNumGoldInBank);//Баланс |
1771 bank_window.DrawTitleText(pFontArrus, 0, 220, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 1771 bank_window.DrawTitleText(pFontArrus, 0, 220, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
1772 switch(dialog_menu_id) | 1772 switch(dialog_menu_id) |
1773 { | 1773 { |
1774 case HOUSE_DIALOGUE_MAIN: | 1774 case HOUSE_DIALOGUE_MAIN: |
1775 { | 1775 { |
1776 pColorText = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 1776 pColorText = Color16(0xFFu, 0xFFu, 0x9Bu); |
1777 if ( pDialogueWindow->pCurrentPosActiveItem != 2 ) | 1777 if ( pDialogueWindow->pCurrentPosActiveItem != 2 ) |
1778 pColorText = TargetColor(0xFFu, 0xFFu, 0xFFu); | 1778 pColorText = Color16(0xFFu, 0xFFu, 0xFFu); |
1779 bank_window.DrawTitleText(pFontArrus, 0, 146, pColorText, pGlobalTXT_LocalizationStrings[60], 3); | 1779 bank_window.DrawTitleText(pFontArrus, 0, 146, pColorText, pGlobalTXT_LocalizationStrings[60], 3); |
1780 pColorText = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 1780 pColorText = Color16(0xFFu, 0xFFu, 0x9Bu); |
1781 if ( pDialogueWindow->pCurrentPosActiveItem != 3 ) | 1781 if ( pDialogueWindow->pCurrentPosActiveItem != 3 ) |
1782 pColorText = TargetColor(0xFFu, 0xFFu, 0xFFu); | 1782 pColorText = Color16(0xFFu, 0xFFu, 0xFFu); |
1783 bank_window.DrawTitleText(pFontArrus, 0, 176, pColorText, pGlobalTXT_LocalizationStrings[244], 3); | 1783 bank_window.DrawTitleText(pFontArrus, 0, 176, pColorText, pGlobalTXT_LocalizationStrings[244], 3); |
1784 break; | 1784 break; |
1785 } | 1785 } |
1786 case HOUSE_DIALOGUE_BANK_PUT_GOLD: | 1786 case HOUSE_DIALOGUE_BANK_PUT_GOLD: |
1787 { | 1787 { |
1788 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) | 1788 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) |
1789 { | 1789 { |
1790 sprintf(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[60], pGlobalTXT_LocalizationStrings[112]);//"Положить" "Сколько?" | 1790 sprintf(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[60], pGlobalTXT_LocalizationStrings[112]);//"Положить" "Сколько?" |
1791 bank_window.DrawTitleText(pFontArrus, 0, 146, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 1791 bank_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
1792 bank_window.DrawTitleText(pFontArrus, 0, 186, TargetColor(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); | 1792 bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); |
1793 bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); | 1793 bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); |
1794 return; | 1794 return; |
1795 } | 1795 } |
1796 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) | 1796 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) |
1797 { | 1797 { |
1828 case HOUSE_DIALOGUE_BANK_GET_GOLD: | 1828 case HOUSE_DIALOGUE_BANK_GET_GOLD: |
1829 { | 1829 { |
1830 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) | 1830 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) |
1831 { | 1831 { |
1832 sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[244], pGlobalTXT_LocalizationStrings[112]);//"Снять" "Сколько?" | 1832 sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[244], pGlobalTXT_LocalizationStrings[112]);//"Снять" "Сколько?" |
1833 bank_window.DrawTitleText(pFontArrus, 0, 146, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 1833 bank_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
1834 bank_window.DrawTitleText(pFontArrus, 0, 186, TargetColor(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); | 1834 bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); |
1835 bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); | 1835 bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); |
1836 return; | 1836 return; |
1837 } | 1837 } |
1838 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) | 1838 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) |
1839 { | 1839 { |
1928 case HOUSE_DIALOGUE_MAIN: | 1928 case HOUSE_DIALOGUE_MAIN: |
1929 { | 1929 { |
1930 if ( !HouseUI_CheckIfPlayerCanInteract() ) | 1930 if ( !HouseUI_CheckIfPlayerCanInteract() ) |
1931 return; | 1931 return; |
1932 | 1932 |
1933 sprintf(pTopic1, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 2 ? TargetColor(0xFFu, 0xFFu, 0x9Bu) : TargetColor(0xFFu, 0xFFu, 0xFFu)); | 1933 sprintf(pTopic1, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 2 ? Color16(0xFFu, 0xFFu, 0x9Bu) : Color16(0xFFu, 0xFFu, 0xFFu)); |
1934 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[178], pPriceRoom); // Rent room for %d gold | 1934 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[178], pPriceRoom); // Rent room for %d gold |
1935 strcat(pTopic1, pTmpBuf2.data()); | 1935 strcat(pTopic1, pTmpBuf2.data()); |
1936 pTopic1Height = pFontArrus->CalcTextHeight(pTopic1, &dialog_window, 0, 0); | 1936 pTopic1Height = pFontArrus->CalcTextHeight(pTopic1, &dialog_window, 0, 0); |
1937 strcat(pTopic1, "\n \n"); | 1937 strcat(pTopic1, "\n \n"); |
1938 | 1938 |
1939 sprintf(pTopic2, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 3 ? TargetColor(0xFFu, 0xFFu, 0x9Bu) : TargetColor(0xFFu, 0xFFu, 0xFFu)); | 1939 sprintf(pTopic2, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 3 ? Color16(0xFFu, 0xFFu, 0x9Bu) : Color16(0xFFu, 0xFFu, 0xFFu)); |
1940 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[86], // Buy food for %d days for %d gold | 1940 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[86], // Buy food for %d days for %d gold |
1941 (unsigned int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier, pPriceFood); | 1941 (unsigned int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier, pPriceFood); |
1942 strcat(pTopic2, pTmpBuf2.data()); | 1942 strcat(pTopic2, pTmpBuf2.data()); |
1943 pTopic2Height = pFontArrus->CalcTextHeight(pTopic2, &dialog_window, 0, 0); | 1943 pTopic2Height = pFontArrus->CalcTextHeight(pTopic2, &dialog_window, 0, 0); |
1944 strcat(pTopic2, "\n \n"); | 1944 strcat(pTopic2, "\n \n"); |
1945 | 1945 |
1946 sprintf(pTopic3, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 4 ? TargetColor(0xFFu, 0xFFu, 0x9Bu) : TargetColor(0xFFu, 0xFFu, 0xFFu)); | 1946 sprintf(pTopic3, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 4 ? Color16(0xFFu, 0xFFu, 0x9Bu) : Color16(0xFFu, 0xFFu, 0xFFu)); |
1947 strcat(pTopic3, pGlobalTXT_LocalizationStrings[160]); // Learn Skills | 1947 strcat(pTopic3, pGlobalTXT_LocalizationStrings[160]); // Learn Skills |
1948 pTopic3Height = pFontArrus->CalcTextHeight(pTopic3, &dialog_window, 0, 0); | 1948 pTopic3Height = pFontArrus->CalcTextHeight(pTopic3, &dialog_window, 0, 0); |
1949 strcat(pTopic3, "\n \n"); | 1949 strcat(pTopic3, "\n \n"); |
1950 pTopic4[0] = 0; | 1950 pTopic4[0] = 0; |
1951 if ( (signed int)window_SpeakInHouse->par1C >= 108 && (signed int)window_SpeakInHouse->par1C <= 120 ) | 1951 if ( (signed int)window_SpeakInHouse->par1C >= 108 && (signed int)window_SpeakInHouse->par1C <= 120 ) |
1952 { | 1952 { |
1953 sprintf(pTopic4, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 5 ? TargetColor(0xFFu, 0xFFu, 0x9Bu) : TargetColor(0xFFu, 0xFFu, 0xFFu)); | 1953 sprintf(pTopic4, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 5 ? Color16(0xFFu, 0xFFu, 0x9Bu) : Color16(0xFFu, 0xFFu, 0xFFu)); |
1954 strcat(pTopic4, pGlobalTXT_LocalizationStrings[611]); // Play Arcomage | 1954 strcat(pTopic4, pGlobalTXT_LocalizationStrings[611]); // Play Arcomage |
1955 pTopic4Height = pFontArrus->CalcTextHeight(pTopic4, &dialog_window, 0, 0); | 1955 pTopic4Height = pFontArrus->CalcTextHeight(pTopic4, &dialog_window, 0, 0); |
1956 } | 1956 } |
1957 | 1957 |
1958 if ( pDialogueWindow->pNumPresenceButton ) | 1958 if ( pDialogueWindow->pNumPresenceButton ) |
2035 { | 2035 { |
2036 pText = pGlobalTXT_LocalizationStrings[639];// A tie! | 2036 pText = pGlobalTXT_LocalizationStrings[639];// A tie! |
2037 } | 2037 } |
2038 strcpy(pTmpBuf.data(), pText); | 2038 strcpy(pTmpBuf.data(), pText); |
2039 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &dialog_window, 0, 0)) / 2 + 138, | 2039 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &dialog_window, 0, 0)) / 2 + 138, |
2040 TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 2040 Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
2041 break; | 2041 break; |
2042 } | 2042 } |
2043 case HOUSE_DIALOGUE_TAVERN_REST: | 2043 case HOUSE_DIALOGUE_TAVERN_REST: |
2044 { | 2044 { |
2045 if ( pParty->uNumGold >= pPriceRoom ) | 2045 if ( pParty->uNumGold >= pPriceRoom ) |
2111 pButton->uY = v91 + v54; | 2111 pButton->uY = v91 + v54; |
2112 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &dialog_window, 0, 0); | 2112 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &dialog_window, 0, 0); |
2113 pButton->uHeight = pTextHeight; | 2113 pButton->uHeight = pTextHeight; |
2114 v54 = pTextHeight + pButton->uY - 1; | 2114 v54 = pTextHeight + pButton->uY - 1; |
2115 pButton->uW = v54; | 2115 pButton->uW = v54; |
2116 pColorText = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 2116 pColorText = Color16(0xFFu, 0xFFu, 0x9Bu); |
2117 if ( pDialogueWindow->pCurrentPosActiveItem != i ) | 2117 if ( pDialogueWindow->pCurrentPosActiveItem != i ) |
2118 pColorText = TargetColor(0xFFu, 0xFFu, 0xFFu); | 2118 pColorText = Color16(0xFFu, 0xFFu, 0xFFu); |
2119 dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pSkillNames[pButton->msg_param - 36], 3); | 2119 dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pSkillNames[pButton->msg_param - 36], 3); |
2120 } | 2120 } |
2121 } | 2121 } |
2122 return; | 2122 return; |
2123 } | 2123 } |
2124 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName,//Советую вам %s %s поискать знания еще где-нибудь | 2124 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName,//Советую вам %s %s поискать знания еще где-нибудь |
2125 pClassNames[pPlayers[uActiveCharacter]->classType]); | 2125 pClassNames[pPlayers[uActiveCharacter]->classType]); |
2126 strcat(pTmpBuf.data(), "\n \n"); | 2126 strcat(pTmpBuf.data(), "\n \n"); |
2127 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);//Больше ничего не могу предложить. | 2127 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);//Больше ничего не могу предложить. |
2128 pTextHeight = (174 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &dialog_window, 0, 0)) / 2 + 138; | 2128 pTextHeight = (174 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &dialog_window, 0, 0)) / 2 + 138; |
2129 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 2129 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
2130 return; | 2130 return; |
2131 } | 2131 } |
2132 | 2132 |
2133 case HOUSE_DIALOGUE_TAVERN_BUY_FOOD: | 2133 case HOUSE_DIALOGUE_TAVERN_BUY_FOOD: |
2134 { | 2134 { |
2179 pButton->uY = all_text_height + v54; | 2179 pButton->uY = all_text_height + v54; |
2180 pTextHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0); | 2180 pTextHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0); |
2181 pButton->uHeight = pTextHeight; | 2181 pButton->uHeight = pTextHeight; |
2182 v54 = pButton->uY + pTextHeight - 1; | 2182 v54 = pButton->uY + pTextHeight - 1; |
2183 pButton->uW = v54; | 2183 pButton->uW = v54; |
2184 pColorText = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 2184 pColorText = Color16(0xFFu, 0xFFu, 0x9Bu); |
2185 if ( pDialogueWindow->pCurrentPosActiveItem != pItemNum ) | 2185 if ( pDialogueWindow->pCurrentPosActiveItem != pItemNum ) |
2186 pColorText = TargetColor(0xFFu, 0xFFu, 0xFFu); | 2186 pColorText = Color16(0xFFu, 0xFFu, 0xFFu); |
2187 dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3); | 2187 dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3); |
2188 ++pNumString; | 2188 ++pNumString; |
2189 } | 2189 } |
2190 } | 2190 } |
2191 break; | 2191 break; |
2257 pButton->uY = v64 + all_text_height; | 2257 pButton->uY = v64 + all_text_height; |
2258 pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[1 * i], &tample_window, 0, 0); | 2258 pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[1 * i], &tample_window, 0, 0); |
2259 pButton->uHeight = pTextHeight; | 2259 pButton->uHeight = pTextHeight; |
2260 pButton->uW = pButton->uY + pTextHeight - 1; | 2260 pButton->uW = pButton->uY + pTextHeight - 1; |
2261 all_text_height = pButton->uW; | 2261 all_text_height = pButton->uW; |
2262 pTextColor = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 2262 pTextColor = Color16(0xFFu, 0xFFu, 0x9Bu); |
2263 if ( pDialogueWindow->pCurrentPosActiveItem != index + 2 ) | 2263 if ( pDialogueWindow->pCurrentPosActiveItem != index + 2 ) |
2264 pTextColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 2264 pTextColor = Color16(0xFFu, 0xFFu, 0xFFu); |
2265 tample_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[1 * i], 3); | 2265 tample_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[1 * i], 3); |
2266 i++; | 2266 i++; |
2267 index++; | 2267 index++; |
2268 } | 2268 } |
2269 } | 2269 } |
2439 pButton->uY = v64 + all_text_height; | 2439 pButton->uY = v64 + all_text_height; |
2440 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &tample_window, 0, 0); | 2440 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &tample_window, 0, 0); |
2441 pButton->uHeight = pTextHeight; | 2441 pButton->uHeight = pTextHeight; |
2442 pButton->uW = pButton->uY + pTextHeight - 1; | 2442 pButton->uW = pButton->uY + pTextHeight - 1; |
2443 all_text_height = pButton->uW; | 2443 all_text_height = pButton->uW; |
2444 pTextColor = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 2444 pTextColor = Color16(0xFFu, 0xFFu, 0x9Bu); |
2445 if ( pDialogueWindow->pCurrentPosActiveItem != pCurrentItem ) | 2445 if ( pDialogueWindow->pCurrentPosActiveItem != pCurrentItem ) |
2446 pTextColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 2446 pTextColor = Color16(0xFFu, 0xFFu, 0xFFu); |
2447 tample_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); | 2447 tample_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); |
2448 } | 2448 } |
2449 pCurrentItem++; | 2449 pCurrentItem++; |
2450 } | 2450 } |
2451 } | 2451 } |
2454 { | 2454 { |
2455 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]);//"Советую вам %s %s поискать знания еще где-нибудь" | 2455 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]);//"Советую вам %s %s поискать знания еще где-нибудь" |
2456 strcat(pTmpBuf.data(), "\n \n"); | 2456 strcat(pTmpBuf.data(), "\n \n"); |
2457 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);//"Больше ничего не могу предложить." | 2457 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);//"Больше ничего не могу предложить." |
2458 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &tample_window, 0, 0); | 2458 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &tample_window, 0, 0); |
2459 tample_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 2459 tample_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
2460 } | 2460 } |
2461 } | 2461 } |
2462 } | 2462 } |
2463 return; | 2463 return; |
2464 } | 2464 } |
2548 pButton->uY = (174 - all_text_height) / 2 + v49; | 2548 pButton->uY = (174 - all_text_height) / 2 + v49; |
2549 pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[index], &training_dialog_window, 0, 0); | 2549 pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[index], &training_dialog_window, 0, 0); |
2550 pButton->uHeight = pTextHeight; | 2550 pButton->uHeight = pTextHeight; |
2551 pButton->uW = pTextHeight + pButton->uY - 1; | 2551 pButton->uW = pTextHeight + pButton->uY - 1; |
2552 v49 = pButton->uW; | 2552 v49 = pButton->uW; |
2553 pTextColor = TargetColor(0xE1u, 0xCDu, 0x23u); | 2553 pTextColor = Color16(0xE1u, 0xCDu, 0x23u); |
2554 if ( pDialogueWindow->pCurrentPosActiveItem != i ) | 2554 if ( pDialogueWindow->pCurrentPosActiveItem != i ) |
2555 pTextColor = TargetColor(255, 255, 255); | 2555 pTextColor = Color16(255, 255, 255); |
2556 training_dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[index], 3); | 2556 training_dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[index], 3); |
2557 ++index; | 2557 ++index; |
2558 } | 2558 } |
2559 } | 2559 } |
2560 } | 2560 } |
2563 if ( dialog_menu_id == HOUSE_DIALOGUE_TRAININGHALL_TRAIN ) | 2563 if ( dialog_menu_id == HOUSE_DIALOGUE_TRAININGHALL_TRAIN ) |
2564 { | 2564 { |
2565 if ( !HouseUI_CheckIfPlayerCanInteract() ) | 2565 if ( !HouseUI_CheckIfPlayerCanInteract() ) |
2566 { | 2566 { |
2567 v33 = pFontArrus->CalcTextHeight(pNPCTopics[122].pText, &training_dialog_window, 0, 0); | 2567 v33 = pFontArrus->CalcTextHeight(pNPCTopics[122].pText, &training_dialog_window, 0, 0); |
2568 training_dialog_window.DrawTitleText(pFontArrus, 0, (212 - v33) / 2 + 101, TargetColor(0xE1u, 0xCDu, 0x23u), pNPCTopics[122].pText, 3); | 2568 training_dialog_window.DrawTitleText(pFontArrus, 0, (212 - v33) / 2 + 101, Color16(0xE1u, 0xCDu, 0x23u), pNPCTopics[122].pText, 3); |
2569 pDialogueWindow->pNumPresenceButton = 0; | 2569 pDialogueWindow->pNumPresenceButton = 0; |
2570 return; | 2570 return; |
2571 } | 2571 } |
2572 if ( pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_TRAINING_HALL_EMERALD_ISLE] ) | 2572 if ( pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_TRAINING_HALL_EMERALD_ISLE] ) |
2573 { | 2573 { |
2620 sprintf(pTmpBuf.data(), "%s\n \n%s", pGlobalTXT_LocalizationStrings[536], pGlobalTXT_LocalizationStrings[529]);// | 2620 sprintf(pTmpBuf.data(), "%s\n \n%s", pGlobalTXT_LocalizationStrings[536], pGlobalTXT_LocalizationStrings[529]);// |
2621 // ""With your skills, you should be working here as a teacher."" | 2621 // ""With your skills, you should be working here as a teacher."" |
2622 // ""Sorry, but we are unable to train you."" | 2622 // ""Sorry, but we are unable to train you."" |
2623 v36 = (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0)) / 2 + 101; | 2623 v36 = (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0)) / 2 + 101; |
2624 } | 2624 } |
2625 training_dialog_window.DrawTitleText(pFontArrus, 0, v36, TargetColor(0xE1u, 0xCDu, 0x23u), pTmpBuf.data(), 3); | 2625 training_dialog_window.DrawTitleText(pFontArrus, 0, v36, Color16(0xE1u, 0xCDu, 0x23u), pTmpBuf.data(), 3); |
2626 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)3); | 2626 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)3); |
2627 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2627 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); |
2628 return; | 2628 return; |
2629 } | 2629 } |
2630 } | 2630 } |
2672 pButton->uY = v73 + v19; | 2672 pButton->uY = v73 + v19; |
2673 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &training_dialog_window, 0, 0); | 2673 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &training_dialog_window, 0, 0); |
2674 pButton->uHeight = pTextHeight; | 2674 pButton->uHeight = pTextHeight; |
2675 pButton->uW = pButton->uY + pTextHeight - 1; | 2675 pButton->uW = pButton->uY + pTextHeight - 1; |
2676 v19 = pButton->uY + pTextHeight - 1; | 2676 v19 = pButton->uY + pTextHeight - 1; |
2677 pTextColor = TargetColor(0xE1u, 0xCDu, 0x23u); | 2677 pTextColor = Color16(0xE1u, 0xCDu, 0x23u); |
2678 if ( pDialogueWindow->pCurrentPosActiveItem != i ) | 2678 if ( pDialogueWindow->pCurrentPosActiveItem != i ) |
2679 pTextColor = TargetColor(255, 255, 255); | 2679 pTextColor = Color16(255, 255, 255); |
2680 training_dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); | 2680 training_dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); |
2681 } | 2681 } |
2682 } | 2682 } |
2683 } | 2683 } |
2684 else | 2684 else |
2686 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]);// | 2686 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]);// |
2687 // "Seek knowledge elsewhere %s the %s" | 2687 // "Seek knowledge elsewhere %s the %s" |
2688 strcat(pTmpBuf.data(), "\n \n"); | 2688 strcat(pTmpBuf.data(), "\n \n"); |
2689 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);// "I can offer you nothing further." | 2689 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);// "I can offer you nothing further." |
2690 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0); | 2690 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0); |
2691 training_dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, TargetColor(0xE1u, 0xCDu, 0x23u), pTmpBuf.data(), 3); | 2691 training_dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, Color16(0xE1u, 0xCDu, 0x23u), pTmpBuf.data(), 3); |
2692 } | 2692 } |
2693 } | 2693 } |
2694 } | 2694 } |
2695 return; | 2695 return; |
2696 } | 2696 } |
2729 if ( dialog_menu_id == HOUSE_DIALOGUE_MAIN) | 2729 if ( dialog_menu_id == HOUSE_DIALOGUE_MAIN) |
2730 { | 2730 { |
2731 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)pPlayers[uActiveCharacter]->_achieved_awards_bits, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) ) | 2731 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)pPlayers[uActiveCharacter]->_achieved_awards_bits, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) ) |
2732 { | 2732 { |
2733 pTextHeight = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &dialog_window, 0, 0);// | 2733 pTextHeight = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &dialog_window, 0, 0);// |
2734 dialog_window.DrawTitleText(pFontArrus, 0, (212 - pTextHeight) / 2 + 101, TargetColor(0xFFu, 0xFFu, 0x9Bu), pNPCTopics[171].pText, 3); | 2734 dialog_window.DrawTitleText(pFontArrus, 0, (212 - pTextHeight) / 2 + 101, Color16(0xFFu, 0xFFu, 0x9Bu), pNPCTopics[171].pText, 3); |
2735 pDialogueWindow->pNumPresenceButton = 0; | 2735 pDialogueWindow->pNumPresenceButton = 0; |
2736 return; | 2736 return; |
2737 } | 2737 } |
2738 if ( !HouseUI_CheckIfPlayerCanInteract() ) | 2738 if ( !HouseUI_CheckIfPlayerCanInteract() ) |
2739 return; | 2739 return; |
2753 { | 2753 { |
2754 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]); | 2754 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]); |
2755 strcat(pTmpBuf.data(), "\n \n"); | 2755 strcat(pTmpBuf.data(), "\n \n"); |
2756 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);//Больше ничего не могу предложить. | 2756 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]);//Больше ничего не могу предложить. |
2757 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &dialog_window, 0, 0); | 2757 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &dialog_window, 0, 0); |
2758 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 2758 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
2759 return; | 2759 return; |
2760 } | 2760 } |
2761 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[401], pPrice);//Стоимость навыка: %lu | 2761 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[401], pPrice);//Стоимость навыка: %lu |
2762 dialog_window.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf.data(), 3); | 2762 dialog_window.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf.data(), 3); |
2763 v32 = (149 - all_text_height) / index; | 2763 v32 = (149 - all_text_height) / index; |
2777 pButton->uY = v32 + index; | 2777 pButton->uY = v32 + index; |
2778 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &dialog_window, 0, 0); | 2778 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &dialog_window, 0, 0); |
2779 pButton->uHeight = pTextHeight; | 2779 pButton->uHeight = pTextHeight; |
2780 pButton->uW = pButton->uY + pTextHeight - 1; | 2780 pButton->uW = pButton->uY + pTextHeight - 1; |
2781 index = pButton->uY + pTextHeight - 1; | 2781 index = pButton->uY + pTextHeight - 1; |
2782 pTextColor = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 2782 pTextColor = Color16(0xFFu, 0xFFu, 0x9Bu); |
2783 if ( pDialogueWindow->pCurrentPosActiveItem != i ) | 2783 if ( pDialogueWindow->pCurrentPosActiveItem != i ) |
2784 pTextColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 2784 pTextColor = Color16(0xFFu, 0xFFu, 0xFFu); |
2785 dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); | 2785 dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); |
2786 } | 2786 } |
2787 } | 2787 } |
2788 else | 2788 else |
2789 { | 2789 { |
2881 pNPC = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 | 2881 pNPC = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 |
2882 if ( pNPC->uProfession ) | 2882 if ( pNPC->uProfession ) |
2883 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s | 2883 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s |
2884 else | 2884 else |
2885 strcpy(pTmpBuf.data(), pNPC->pName); | 2885 strcpy(pTmpBuf.data(), pNPC->pName); |
2886 house_window.DrawTitleText(pFontCreate, 483, 113, TargetColor(0x15u, 0x99u, 0xE9u), pTmpBuf.data(), 3); | 2886 house_window.DrawTitleText(pFontCreate, 483, 113, Color16(0x15u, 0x99u, 0xE9u), pTmpBuf.data(), 3); |
2887 if ( !dword_591080 ) | 2887 if ( !dword_591080 ) |
2888 { | 2888 { |
2889 if ( !uDialogueType ) | 2889 if ( !uDialogueType ) |
2890 { | 2890 { |
2891 if ( pNPC->greet ) | 2891 if ( pNPC->greet ) |
2933 if ( uDialogueType != 84 ) | 2933 if ( uDialogueType != 84 ) |
2934 { | 2934 { |
2935 strcpy(pButton->pButtonName, v15); | 2935 strcpy(pButton->pButtonName, v15); |
2936 continue; | 2936 continue; |
2937 } | 2937 } |
2938 sprintf(pTmpBuf.data(), format_4E2D80, TargetColor(0xE1u, 0xCDu, 0x23u), pItemsTable->pItems[contract_approved].pUnidentifiedName); | 2938 sprintf(pTmpBuf.data(), format_4E2D80, Color16(0xE1u, 0xCDu, 0x23u), pItemsTable->pItems[contract_approved].pUnidentifiedName); |
2939 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data()); | 2939 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data()); |
2940 current_npc_text = pTmpBuf2.data(); | 2940 current_npc_text = pTmpBuf2.data(); |
2941 strcpy(pButton->pButtonName, v15); | 2941 strcpy(pButton->pButtonName, v15); |
2942 continue; | 2942 continue; |
2943 case 21://evt_C | 2943 case 21://evt_C |
2989 strcpy(pButton->pButtonName, ContractSelectText((int)right_panel_window.ptr_1C)); | 2989 strcpy(pButton->pButtonName, ContractSelectText((int)right_panel_window.ptr_1C)); |
2990 continue; | 2990 continue; |
2991 case 83: | 2991 case 83: |
2992 v29 = pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName; | 2992 v29 = pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName; |
2993 v31 = *(int *)v29; | 2993 v31 = *(int *)v29; |
2994 sprintfex(pTmpBuf.data(), "\f%05d%s\f%05d", TargetColor(0xFFu, 0xFFu, 0x9Bu), v31, TargetColor(0xFFu, 0xFFu, 0xFFu)); | 2994 sprintfex(pTmpBuf.data(), "\f%05d%s\f%05d", Color16(0xFFu, 0xFFu, 0x9Bu), v31, Color16(0xFFu, 0xFFu, 0xFFu)); |
2995 sprintfex(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * (unsigned __int8)v29[8]); | 2995 sprintfex(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * (unsigned __int8)v29[8]); |
2996 current_npc_text = pTmpBuf2.data(); | 2996 current_npc_text = pTmpBuf2.data(); |
2997 strcpy(pButton->pButtonName, ""); | 2997 strcpy(pButton->pButtonName, ""); |
2998 continue; | 2998 continue; |
2999 } | 2999 } |
3034 pButton->uY = v36 + v40; | 3034 pButton->uY = v36 + v40; |
3035 pTextHeight = pFontArrus->CalcTextHeight(pButton->pButtonName, &right_panel_window, 0, 0); | 3035 pTextHeight = pFontArrus->CalcTextHeight(pButton->pButtonName, &right_panel_window, 0, 0); |
3036 pButton->uHeight = pTextHeight; | 3036 pButton->uHeight = pTextHeight; |
3037 v40 = pButton->uY + pTextHeight - 1; | 3037 v40 = pButton->uY + pTextHeight - 1; |
3038 pButton->uW = v40; | 3038 pButton->uW = v40; |
3039 pTextColor = TargetColor(0xE1u, 0xCDu, 0x23u); | 3039 pTextColor = Color16(0xE1u, 0xCDu, 0x23u); |
3040 if ( pDialogueWindow->pCurrentPosActiveItem != i ) | 3040 if ( pDialogueWindow->pCurrentPosActiveItem != i ) |
3041 pTextColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 3041 pTextColor = Color16(0xFFu, 0xFFu, 0xFFu); |
3042 right_panel_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pButton->pButtonName, 3); | 3042 right_panel_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pButton->pButtonName, 3); |
3043 } | 3043 } |
3044 } | 3044 } |
3045 if ( current_npc_text ) | 3045 if ( current_npc_text ) |
3046 { | 3046 { |
3067 memcpy(&jail_dialogue_window, window_SpeakInHouse, sizeof(jail_dialogue_window)); | 3067 memcpy(&jail_dialogue_window, window_SpeakInHouse, sizeof(jail_dialogue_window)); |
3068 jail_dialogue_window.uFrameX = 483; | 3068 jail_dialogue_window.uFrameX = 483; |
3069 jail_dialogue_window.uFrameWidth = 148; | 3069 jail_dialogue_window.uFrameWidth = 148; |
3070 jail_dialogue_window.uFrameZ = 334; | 3070 jail_dialogue_window.uFrameZ = 334; |
3071 jail_dialogue_window.DrawTitleText(pFontArrus, 0, (310 - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[672], &jail_dialogue_window, 0, 0)) / 2 + 18, | 3071 jail_dialogue_window.DrawTitleText(pFontArrus, 0, (310 - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[672], &jail_dialogue_window, 0, 0)) / 2 + 18, |
3072 TargetColor(0xFFu, 0xFFu, 0x9Bu), pGlobalTXT_LocalizationStrings[672], 3);//"За многочисленные преступления и злодеяния вы были приговорены к одному году заключения." | 3072 Color16(0xFFu, 0xFFu, 0x9Bu), pGlobalTXT_LocalizationStrings[672], 3);//"За многочисленные преступления и злодеяния вы были приговорены к одному году заключения." |
3073 } | 3073 } |