Mercurial > mm7
comparison UI/UIShops.cpp @ 2233:a9fa57fda3ae
sub_4B1523_showSpellbookInfo moved to UIShops
author | Grumpy7 |
---|---|
date | Sat, 22 Feb 2014 19:55:54 +0100 |
parents | 8673f3aedfb9 |
children | 0be4f17b7986 |
comparison
equal
deleted
inserted
replaced
2232:829760bc6ca6 | 2233:a9fa57fda3ae |
---|---|
1793 unsigned int guildId = (unsigned int)window_SpeakInHouse->ptr_1C - 139; | 1793 unsigned int guildId = (unsigned int)window_SpeakInHouse->ptr_1C - 139; |
1794 sub_4B1523_showSpellbookInfo(pParty->SpellBooksInGuilds[guildId][v3].uItemID); | 1794 sub_4B1523_showSpellbookInfo(pParty->SpellBooksInGuilds[guildId][v3].uItemID); |
1795 } | 1795 } |
1796 } | 1796 } |
1797 } | 1797 } |
1798 | |
1799 //----- (004B1523) -------------------------------------------------------- | |
1800 void sub_4B1523_showSpellbookInfo(int spellItemId) | |
1801 { | |
1802 int spellId; // esi@1 | |
1803 int spellLevel; // edx@1 | |
1804 unsigned int v3; // eax@2 | |
1805 int v4; // eax@4 | |
1806 LONG v5; // ecx@4 | |
1807 int v6; // eax@10 | |
1808 char *v7; // ST44_4@12 | |
1809 unsigned __int16 v8; // ax@12 | |
1810 GUIWindow a1; // [sp+Ch] [bp-68h]@4 | |
1811 unsigned int spellSchool; // [sp+60h] [bp-14h]@1 | |
1812 POINT a2; // [sp+64h] [bp-10h]@1 | |
1813 int v13; // [sp+6Ch] [bp-8h]@4 | |
1814 int v14; // [sp+70h] [bp-4h]@4 | |
1815 | |
1816 spellId = spellItemId - 399; | |
1817 spellLevel = (spellItemId - 400) % 11 + 1; | |
1818 spellSchool = 4 * (spellItemId - 400) / 11; | |
1819 // sprintf(pTmpBuf.data(), "%s%03d", spellbook_texture_filename_suffices[v11 / 4], v2); not used | |
1820 if ( pMouse->GetCursorPos(&a2)->y <= 320 ) | |
1821 v3 = pMouse->GetCursorPos(&a2)->y + 30; | |
1822 else | |
1823 v3 = 30; | |
1824 a1.Hint = 0; | |
1825 a1.uFrameY = v3; | |
1826 a1.uFrameWidth = 328; | |
1827 a1.uFrameHeight = 68; | |
1828 a1.uFrameX = 90; | |
1829 a1.uFrameZ = 417; | |
1830 a1.uFrameW = v3 + 67; | |
1831 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]); | |
1832 v14 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]); | |
1833 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]); | |
1834 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]); | |
1835 v5 = a2.y; | |
1836 if ( v14 > a2.y ) | |
1837 v5 = v14; | |
1838 if ( v13 > v5 ) | |
1839 v5 = v13; | |
1840 if ( v4 > v5 ) | |
1841 v5 = v4; | |
1842 sprintf(pTmpBuf2.data(), "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s", | |
1843 pSpellStats->pInfos[spellId].pDescription, pGlobalTXT_LocalizationStrings[431], // "Normal" | |
1844 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pBasicSkillDesc, pGlobalTXT_LocalizationStrings[433], // "Expert" | |
1845 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pExpertSkillDesc, pGlobalTXT_LocalizationStrings[432], // "Master" | |
1846 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pMasterSkillDesc, pGlobalTXT_LocalizationStrings[96], // "Grand" | |
1847 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pGrandmasterSkillDesc); | |
1848 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2.data(), &a1, 0, 0); | |
1849 a1.uFrameHeight += v6; | |
1850 if ( (signed int)a1.uFrameHeight < 150 ) | |
1851 a1.uFrameHeight = 150; | |
1852 a1.uFrameWidth = game_viewport_width; | |
1853 a1.DrawMessageBox(0); | |
1854 a1.uFrameWidth -= 12; | |
1855 a1.uFrameHeight -= 12; | |
1856 v7 = pSpellStats->pInfos[spellId].pName; | |
1857 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | |
1858 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; | |
1859 v8 = Color16(0xFFu, 0xFFu, 0x9Bu); | |
1860 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); | |
1861 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0); | |
1862 a1.uFrameZ = a1.uFrameX + 107; | |
1863 a1.uFrameWidth = 108; | |
1864 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[spellSchool / 4 + 12], 3u); | |
1865 sprintfex(pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * spellId)); | |
1866 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf.data(), 3); | |
1867 } | |
1798 //----- (004B1D27) -------------------------------------------------------- | 1868 //----- (004B1D27) -------------------------------------------------------- |
1799 void GetHouseGoodbyeSpeech() | 1869 void GetHouseGoodbyeSpeech() |
1800 { | 1870 { |
1801 signed int v2; // edi@10 | 1871 signed int v2; // edi@10 |
1802 signed int v5; // edi@20 | 1872 signed int v5; // edi@20 |