comparison mm7_4.cpp @ 2233:a9fa57fda3ae

sub_4B1523_showSpellbookInfo moved to UIShops
author Grumpy7
date Sat, 22 Feb 2014 19:55:54 +0100
parents 8673f3aedfb9
children 6ab7d7c112bb
comparison
equal deleted inserted replaced
2232:829760bc6ca6 2233:a9fa57fda3ae
1728 _449B7E_toggle_bit(pPlayers[i]->_achieved_awards_bits, 1, 1); 1728 _449B7E_toggle_bit(pPlayers[i]->_achieved_awards_bits, 1, 1);
1729 } 1729 }
1730 } 1730 }
1731 } 1731 }
1732 1732
1733 //----- (004B1523) --------------------------------------------------------
1734 void sub_4B1523_showSpellbookInfo(int spellItemId)
1735 {
1736 int spellId; // esi@1
1737 int spellLevel; // edx@1
1738 unsigned int v3; // eax@2
1739 int v4; // eax@4
1740 LONG v5; // ecx@4
1741 int v6; // eax@10
1742 char *v7; // ST44_4@12
1743 unsigned __int16 v8; // ax@12
1744 GUIWindow a1; // [sp+Ch] [bp-68h]@4
1745 unsigned int spellSchool; // [sp+60h] [bp-14h]@1
1746 POINT a2; // [sp+64h] [bp-10h]@1
1747 int v13; // [sp+6Ch] [bp-8h]@4
1748 int v14; // [sp+70h] [bp-4h]@4
1749
1750 spellId = spellItemId - 399;
1751 spellLevel = (spellItemId - 400) % 11 + 1;
1752 spellSchool = 4 * (spellItemId - 400) / 11;
1753 // sprintf(pTmpBuf.data(), "%s%03d", spellbook_texture_filename_suffices[v11 / 4], v2); not used
1754 if ( pMouse->GetCursorPos(&a2)->y <= 320 )
1755 v3 = pMouse->GetCursorPos(&a2)->y + 30;
1756 else
1757 v3 = 30;
1758 a1.Hint = 0;
1759 a1.uFrameY = v3;
1760 a1.uFrameWidth = 328;
1761 a1.uFrameHeight = 68;
1762 a1.uFrameX = 90;
1763 a1.uFrameZ = 417;
1764 a1.uFrameW = v3 + 67;
1765 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);
1766 v14 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);
1767 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);
1768 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);
1769 v5 = a2.y;
1770 if ( v14 > a2.y )
1771 v5 = v14;
1772 if ( v13 > v5 )
1773 v5 = v13;
1774 if ( v4 > v5 )
1775 v5 = v4;
1776 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",
1777 pSpellStats->pInfos[spellId].pDescription, pGlobalTXT_LocalizationStrings[431], // "Normal"
1778 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pBasicSkillDesc, pGlobalTXT_LocalizationStrings[433], // "Expert"
1779 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pExpertSkillDesc, pGlobalTXT_LocalizationStrings[432], // "Master"
1780 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pMasterSkillDesc, pGlobalTXT_LocalizationStrings[96], // "Grand"
1781 v5 + 3, v5 + 10, pSpellStats->pInfos[spellId].pGrandmasterSkillDesc);
1782 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2.data(), &a1, 0, 0);
1783 a1.uFrameHeight += v6;
1784 if ( (signed int)a1.uFrameHeight < 150 )
1785 a1.uFrameHeight = 150;
1786 a1.uFrameWidth = game_viewport_width;
1787 a1.DrawMessageBox(0);
1788 a1.uFrameWidth -= 12;
1789 a1.uFrameHeight -= 12;
1790 v7 = pSpellStats->pInfos[spellId].pName;
1791 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
1792 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
1793 v8 = Color16(0xFFu, 0xFFu, 0x9Bu);
1794 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u);
1795 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0);
1796 a1.uFrameZ = a1.uFrameX + 107;
1797 a1.uFrameWidth = 108;
1798 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[spellSchool / 4 + 12], 3u);
1799 sprintfex(pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * spellId));
1800 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf.data(), 3);
1801 }
1802 1733
1803 //----- (004B1ECE) -------------------------------------------------------- 1734 //----- (004B1ECE) --------------------------------------------------------
1804 void OracleDialogue() 1735 void OracleDialogue()
1805 { 1736 {
1806 __int16 *v0; // edi@1 1737 __int16 *v0; // edi@1