Mercurial > mm7
comparison UIBooks.cpp @ 1174:05247ad19710
Слияние
author | Ritor1 |
---|---|
date | Fri, 31 May 2013 09:54:44 +0600 |
parents | aa706cde7fda |
children | 502b8b2e36b4 |
comparison
equal
deleted
inserted
replaced
1173:0158f383b492 | 1174:05247ad19710 |
---|---|
318 //v0 = 1; | 318 //v0 = 1; |
319 | 319 |
320 static const char *texNames[9] = // 004E24EC | 320 static const char *texNames[9] = // 004E24EC |
321 { | 321 { |
322 "SBFB00", "SBAB00", "SBWB00", "SBEB00", | 322 "SBFB00", "SBAB00", "SBWB00", "SBEB00", |
323 "SBSB00", "SBMB00", "SBBB00", "SBLB00", | 323 "SBSB00", "SBMB00", "SBBB00", "SBLB00", "SBDB00" |
324 }; | 324 }; |
325 | 325 |
326 pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); | 326 pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); |
327 for (uint i = 0; i < 8; ++i) | 327 for (uint i = 0; i < 9; ++i) |
328 { | 328 { |
329 pSpellBookPagesTextr[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE); | 329 pSpellBookPagesTextr[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE); |
330 | 330 |
331 sprintf(pTmpBuf, "tab%da", i+1); | 331 sprintf(pTmpBuf, "tab%da", i+1); |
332 pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); | 332 pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); |
430 void sub_411473() | 430 void sub_411473() |
431 { | 431 { |
432 pTexture_pagemask->Release(); | 432 pTexture_pagemask->Release(); |
433 pTexture_506448->Release(); | 433 pTexture_506448->Release(); |
434 pTexture_50643C->Release(); | 434 pTexture_50643C->Release(); |
435 for (uint i = 0; i < 8; ++i) | 435 for (uint i = 0; i < 9; ++i) |
436 { | 436 { |
437 pSpellBookPagesTextr[i]->Release(); | 437 pSpellBookPagesTextr[i]->Release(); |
438 pTextures_tabs[i][0]->Release(); | 438 pTextures_tabs[i][0]->Release(); |
439 pTextures_tabs[i][1]->Release(); | 439 pTextures_tabs[i][1]->Release(); |
440 } | 440 } |
1660 Texture *v23; // [sp+10h] [bp-10h]@5 | 1660 Texture *v23; // [sp+10h] [bp-10h]@5 |
1661 POINT a2; // [sp+18h] [bp-8h]@13 | 1661 POINT a2; // [sp+18h] [bp-8h]@13 |
1662 POINT v24; | 1662 POINT v24; |
1663 int v25; | 1663 int v25; |
1664 | 1664 |
1665 static unsigned int texture_tab_coord1[9][2]= | |
1666 {{406, 9}, {406, 46}, {406, 84}, {406,121}, {407,158}, {405, 196}, {405, 234}, {405, 272}, {405,309} }; | |
1667 | |
1668 static unsigned int texture_tab_coord0[9][2]= | |
1669 {{415, 10}, {415, 46}, {415, 83}, {415,121}, {415,158}, {416, 196}, {416, 234}, {416, 271}, {416,307} }; | |
1670 | |
1665 BookUI_Spellbook_DrawCurrentSchoolBackground(); | 1671 BookUI_Spellbook_DrawCurrentSchoolBackground(); |
1666 | 1672 |
1667 //v0 = pPlayers[uActiveCharacter]; | 1673 //v0 = pPlayers[uActiveCharacter]; |
1668 v1 = 11 * player->lastOpenedSpellbookPage; | 1674 v1 = 11 * player->lastOpenedSpellbookPage; |
1669 //v2 = pIcons_LOD->FindTextureByName("Pending"); | 1675 //v2 = pIcons_LOD->FindTextureByName("Pending"); |
1704 } | 1710 } |
1705 } | 1711 } |
1706 } | 1712 } |
1707 ++v4; | 1713 ++v4; |
1708 } | 1714 } |
1709 while ( v4 + v1 - 1 < v1 + 11 ); | 1715 while ( v4 - 1 < 11 ); |
1710 } | 1716 } |
1711 | 1717 |
1712 | 1718 |
1713 v9 = pMouse->GetCursorPos(&a2); | 1719 v9 = pMouse->GetCursorPos(&a2); |
1714 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; | 1720 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF; |
1738 if ( *(short *)a2.x ) | 1744 if ( *(short *)a2.x ) |
1739 { | 1745 { |
1740 if ( player->lastOpenedSpellbookPage == v13 ) | 1746 if ( player->lastOpenedSpellbookPage == v13 ) |
1741 { | 1747 { |
1742 pPageTexture = pTextures_tabs[v13][1]; | 1748 pPageTexture = pTextures_tabs[v13][1]; |
1743 switch ( v13 ) | 1749 v14=texture_tab_coord1[v13][0]; |
1744 { | 1750 v15=texture_tab_coord1[v13][1]; |
1745 case 0: | |
1746 v14 = 406; | |
1747 v22 = 9; | |
1748 goto LABEL_27; | |
1749 case 1: | |
1750 v14 = 406; | |
1751 goto LABEL_38; | |
1752 case 2: | |
1753 v14 = 406; | |
1754 v22 = 84; | |
1755 goto LABEL_27; | |
1756 case 3: | |
1757 v14 = 406; | |
1758 goto LABEL_26; | |
1759 case 4: | |
1760 v14 = 407; | |
1761 goto LABEL_29; | |
1762 case 5: | |
1763 v15 = 196; | |
1764 goto LABEL_34; | |
1765 case 6: | |
1766 v15 = 234; | |
1767 goto LABEL_34; | |
1768 case 7: | |
1769 v15 = 272; | |
1770 goto LABEL_34; | |
1771 case 8: | |
1772 v15 = 309; | |
1773 LABEL_34: | |
1774 v14 = 405; | |
1775 break; | |
1776 default: | |
1777 break; | |
1778 } | |
1779 } | 1751 } |
1780 else | 1752 else |
1781 { | 1753 { |
1782 pPageTexture = pTextures_tabs[v13][0]; | 1754 pPageTexture = pTextures_tabs[v13][0]; |
1783 switch ( v13 ) | 1755 v14=texture_tab_coord0[v13][0]; |
1784 { | 1756 v15=texture_tab_coord0[v13][1]; |
1785 case 0: | |
1786 v14 = 415; | |
1787 v22 = 10; | |
1788 goto LABEL_27; | |
1789 case 1: | |
1790 v14 = 415; | |
1791 LABEL_38: | |
1792 v22 = 46; | |
1793 goto LABEL_27; | |
1794 case 2: | |
1795 v14 = 415; | |
1796 v22 = 83; | |
1797 goto LABEL_27; | |
1798 case 3: | |
1799 v14 = 415; | |
1800 LABEL_26: | |
1801 v22 = 121; | |
1802 LABEL_27: | |
1803 v15 = v22; | |
1804 break; | |
1805 case 4: | |
1806 v14 = 415; | |
1807 LABEL_29: | |
1808 v15 = 158; | |
1809 break; | |
1810 case 5: | |
1811 v15 = 196; | |
1812 goto LABEL_46; | |
1813 case 6: | |
1814 v15 = 234; | |
1815 goto LABEL_46; | |
1816 case 7: | |
1817 v15 = 271; | |
1818 goto LABEL_46; | |
1819 case 8: | |
1820 v15 = 307; | |
1821 LABEL_46: | |
1822 v14 = 416; | |
1823 break; | |
1824 default: | |
1825 break; | |
1826 } | |
1827 } | 1757 } |
1828 pRenderer->DrawTextureTransparent(v14, v15, pPageTexture); | 1758 pRenderer->DrawTextureTransparent(v14, v15, pPageTexture); |
1829 v13 = v25; | 1759 v13 = v25; |
1830 } | 1760 } |
1831 a2.x += 2; | 1761 a2.x += 2; |