Mercurial > mm7
comparison mm7_1.cpp @ 17:fe0d9a98213f
17.01.13 (fix Hint error)
author | Ritor1 |
---|---|
date | Thu, 17 Jan 2013 16:24:25 +0600 |
parents | 0ea5768a2f0d |
children | 5c9930cc1959 |
comparison
equal
deleted
inserted
replaced
16:e1afcd54fddd | 17:fe0d9a98213f |
---|---|
1235 //----- (0041ABFD) -------------------------------------------------------- | 1235 //----- (0041ABFD) -------------------------------------------------------- |
1236 void __thiscall CharacterUI_CharacterScreen_Draw(unsigned int uPlayerIdx) | 1236 void __thiscall CharacterUI_CharacterScreen_Draw(unsigned int uPlayerIdx) |
1237 { | 1237 { |
1238 unsigned int v1; // edi@1 | 1238 unsigned int v1; // edi@1 |
1239 unsigned int v2; // eax@6 | 1239 unsigned int v2; // eax@6 |
1240 Texture *v3; // ecx@6 | 1240 Texture *pTexture; // ecx@6 |
1241 GUIButton *v4; // eax@6 | 1241 GUIButton *pButton; // eax@6 |
1242 unsigned int v5; // eax@7 | 1242 unsigned int v5; // eax@7 |
1243 unsigned int v6; // eax@10 | 1243 unsigned int v6; // eax@10 |
1244 unsigned int v7; // eax@11 | 1244 unsigned int v7; // eax@11 |
1245 | 1245 |
1246 v1 = uPlayerIdx; | 1246 v1 = uPlayerIdx; |
1247 if ( uPlayerIdx ) | 1247 if ( uPlayerIdx ) |
1248 { | 1248 { |
1249 pRenderer->ClearZBuffer(0, 479); | 1249 pRenderer->ClearZBuffer(0, 479); |
1250 switch ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] ) | 1250 switch ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] ) |
1251 { | 1251 { |
1252 case 0x64: // stats | 1252 case WINDOW_CharacterWindow_Stats: // stats |
1253 sub_4196A0(); | 1253 sub_4196A0(); |
1254 sub_419379(); | 1254 sub_419379(); |
1255 CharacterUI_StatsTab_Draw(v1); | 1255 CharacterUI_StatsTab_Draw(v1); |
1256 v7 = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); | 1256 v7 = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); |
1257 v3 = (Texture *)(v7 != -1 ? (int)&pIcons_LOD->pTextures[v7] : 0); | 1257 pTexture = (Texture *)(v7 != -1 ? (int)&pIcons_LOD->pTextures[v7] : 0); |
1258 v4 = pCharacterScreen_StatsBtn; | 1258 pButton = pCharacterScreen_StatsBtn; |
1259 break; | 1259 break; |
1260 case 0x65: // skills | 1260 case WINDOW_CharacterWindow_Skills: // skills |
1261 if ( dword_507CC0 != uActiveCharacter ) | 1261 if ( dword_507CC0 != uActiveCharacter ) |
1262 { | 1262 { |
1263 sub_4196A0(); | 1263 sub_4196A0(); |
1264 sub_419401(); | 1264 sub_419401(); |
1265 } | 1265 } |
1266 sub_419379(); | 1266 sub_419379(); |
1267 CharacterUI_SkillsTab_Draw(v1); | 1267 CharacterUI_SkillsTab_Draw(v1); |
1268 v6 = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); | 1268 v6 = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); |
1269 v3 = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); | 1269 pTexture = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); |
1270 v4 = pCharacterScreen_SkillsBtn; | 1270 pButton = pCharacterScreen_SkillsBtn; |
1271 break; | 1271 break; |
1272 case 0x66: // awards | 1272 case WINDOW_CharacterWindow_Awards: // awards |
1273 sub_4196A0(); | 1273 sub_4196A0(); |
1274 sub_419379(); | 1274 sub_419379(); |
1275 sub_419220(); | 1275 sub_419220(); |
1276 CharacterUI_AwardsTab_Draw(v1); | 1276 CharacterUI_AwardsTab_Draw(v1); |
1277 v5 = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); | 1277 v5 = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); |
1278 v3 = (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0); | 1278 pTexture = (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0); |
1279 v4 = pCharacterScreen_AwardsBtn; | 1279 pButton = pCharacterScreen_AwardsBtn; |
1280 break; | 1280 break; |
1281 default: | 1281 default: // inventory and other |
1282 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] != 103 ) | 1282 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] != 103 ) |
1283 goto LABEL_13; | 1283 goto LABEL_13; |
1284 sub_4196A0(); | 1284 sub_4196A0(); |
1285 sub_419379(); | 1285 sub_419379(); |
1286 CharacterUI_InventoryTab_Draw(v1, 0); | 1286 CharacterUI_InventoryTab_Draw(v1, 0); |
1287 v2 = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); | 1287 v2 = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); |
1288 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); | 1288 pTexture = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); |
1289 v4 = pCharacterScreen_InventoryBtn; | 1289 pButton = pCharacterScreen_InventoryBtn; |
1290 break; | 1290 break; |
1291 } | 1291 } |
1292 pRenderer->DrawTextureIndexed(v4->uX, v4->uY, v3); | 1292 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); |
1293 LABEL_13: | 1293 LABEL_13: |
1294 if ( bRingsShownInCharScreen ) | 1294 if ( bRingsShownInCharScreen ) |
1295 CharacterUI_DrawPaperdollWithRingOverlay(v1); | 1295 CharacterUI_DrawPaperdollWithRingOverlay(v1); |
1296 else | 1296 else |
1297 CharacterUI_DrawPaperdoll(v1); | 1297 CharacterUI_DrawPaperdoll(v1); |
1702 const char *v16; // ST5C_4@1 | 1702 const char *v16; // ST5C_4@1 |
1703 unsigned __int8 v17; // al@1 | 1703 unsigned __int8 v17; // al@1 |
1704 //Texture *v18; // ST60_4@1 | 1704 //Texture *v18; // ST60_4@1 |
1705 unsigned int uTextureID_ib_td4_A; // eax@1 | 1705 unsigned int uTextureID_ib_td4_A; // eax@1 |
1706 Texture *v20; // ST78_4@1 | 1706 Texture *v20; // ST78_4@1 |
1707 const char *v21; // ST5C_4@1 | |
1708 unsigned __int8 v22; // al@1 | 1707 unsigned __int8 v22; // al@1 |
1709 //Texture *v23; // ST60_4@1 | 1708 //Texture *v23; // ST60_4@1 |
1710 Texture *v24; // eax@1 | 1709 Texture *v24; // eax@1 |
1711 Texture *v25; // esi@1 | 1710 Texture *v25; // esi@1 |
1712 Texture *v26; // ST60_4@1 | 1711 Texture *v26; // ST60_4@1 |
1771 pPrimaryWindow->CreateButton(0xD4u, 0x194u, 5u, 0x31u, 1, 93, 0, 2u, 0, "", 0); | 1770 pPrimaryWindow->CreateButton(0xD4u, 0x194u, 5u, 0x31u, 1, 93, 0, 2u, 0, "", 0); |
1772 pPrimaryWindow->CreateButton(0x148u, 0x194u, 5u, 0x31u, 1, 93, 0, 3u, 0, "", 0); | 1771 pPrimaryWindow->CreateButton(0x148u, 0x194u, 5u, 0x31u, 1, 93, 0, 3u, 0, "", 0); |
1773 pPrimaryWindow->CreateButton(0x1BBu, 0x194u, 5u, 0x31u, 1, 93, 0, 4u, 0, "", 0); | 1772 pPrimaryWindow->CreateButton(0x1BBu, 0x194u, 5u, 0x31u, 1, 93, 0, 4u, 0, "", 0); |
1774 uTextureID_ib_td1_A = pIcons_LOD->LoadTexture("ib-td1-A", TEXTURE_16BIT_PALETTE); | 1773 uTextureID_ib_td1_A = pIcons_LOD->LoadTexture("ib-td1-A", TEXTURE_16BIT_PALETTE); |
1775 v6 = (Texture *)(uTextureID_ib_td1_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0); | 1774 v6 = (Texture *)(uTextureID_ib_td1_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0); |
1776 v7 = pGlobalTXT_LocalizationStrings[174]; | 1775 v7 = pGlobalTXT_LocalizationStrings[174];//Quests |
1777 v8 = pKeyActionMap->GetActionVKey(INPUT_Quest); | 1776 v8 = pKeyActionMap->GetActionVKey(INPUT_Quest); |
1778 pBtn_Quests = pPrimaryWindow->CreateButton( | 1777 pBtn_Quests = pPrimaryWindow->CreateButton(0x1EBu, 0x161u, v6->uTextureWidth, v6->uTextureHeight, 1, 0, 0xC8u, 0, v8, v7, v6, 0); |
1779 0x1EBu, | |
1780 0x161u, | |
1781 v6->uTextureWidth, | |
1782 v6->uTextureHeight, | |
1783 1, | |
1784 0, | |
1785 0xC8u, | |
1786 0, | |
1787 v8, | |
1788 v7, | |
1789 v6, 0); | |
1790 uTextureID_ib_td2_A = pIcons_LOD->LoadTexture("ib-td2-A", TEXTURE_16BIT_PALETTE); | 1778 uTextureID_ib_td2_A = pIcons_LOD->LoadTexture("ib-td2-A", TEXTURE_16BIT_PALETTE); |
1791 v10 = (Texture *)(uTextureID_ib_td2_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0); | 1779 v10 = (Texture *)(uTextureID_ib_td2_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0); |
1792 v11 = pGlobalTXT_LocalizationStrings[154]; | 1780 v11 = pGlobalTXT_LocalizationStrings[154];//Autonotes |
1793 v12 = pKeyActionMap->GetActionVKey(INPUT_Autonotes); | 1781 v12 = pKeyActionMap->GetActionVKey(INPUT_Autonotes); |
1794 pBtn_Autonotes = pPrimaryWindow->CreateButton( | 1782 pBtn_Autonotes = pPrimaryWindow->CreateButton(0x20Fu, 0x161u, v10->uTextureWidth, v10->uTextureHeight, 1, 0, 0xC9u, 0, v12, v11, v10, 0); |
1795 0x20Fu, | |
1796 0x161u, | |
1797 v10->uTextureWidth, | |
1798 v10->uTextureHeight, | |
1799 1, | |
1800 0, | |
1801 0xC9u, | |
1802 0, | |
1803 v12, | |
1804 v11, | |
1805 v10); | |
1806 v14 = pIcons_LOD->LoadTexture("ib-td3-A", TEXTURE_16BIT_PALETTE); | 1783 v14 = pIcons_LOD->LoadTexture("ib-td3-A", TEXTURE_16BIT_PALETTE); |
1807 v15 = (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0); | 1784 v15 = (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0); |
1808 v16 = pGlobalTXT_LocalizationStrings[139]; | 1785 v16 = pGlobalTXT_LocalizationStrings[139];//Maps |
1809 v17 = pKeyActionMap->GetActionVKey(INPUT_Mapbook); | 1786 v17 = pKeyActionMap->GetActionVKey(INPUT_Mapbook); |
1810 pBtn_Maps = pPrimaryWindow->CreateButton( | 1787 pBtn_Maps = pPrimaryWindow->CreateButton(0x222u, 0x161u, v15->uTextureWidth, v15->uTextureHeight, 1, 0, 0xCAu, 0, v17, v16, v15, 0); |
1811 0x222u, | |
1812 0x161u, | |
1813 v15->uTextureWidth, | |
1814 v15->uTextureHeight, | |
1815 1, | |
1816 0, | |
1817 0xCAu, | |
1818 0, | |
1819 v17, | |
1820 v16, | |
1821 v15); | |
1822 uTextureID_ib_td4_A = pIcons_LOD->LoadTexture("ib-td4-A", TEXTURE_16BIT_PALETTE); | 1788 uTextureID_ib_td4_A = pIcons_LOD->LoadTexture("ib-td4-A", TEXTURE_16BIT_PALETTE); |
1823 v20 = (Texture *)(uTextureID_ib_td4_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td4_A] : 0); | 1789 v20 = (Texture *)(uTextureID_ib_td4_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td4_A] : 0); |
1824 v21 = pGlobalTXT_LocalizationStrings[78]; | |
1825 v22 = pKeyActionMap->GetActionVKey(INPUT_TimeCal); | 1790 v22 = pKeyActionMap->GetActionVKey(INPUT_TimeCal); |
1826 pBtn_Calendar = pPrimaryWindow->CreateButton( | 1791 pBtn_Calendar = pPrimaryWindow->CreateButton(0x23Au, 0x161u, v20->uTextureWidth, v20->uTextureHeight, 1, 0, 0xCBu, 0, v22, |
1827 0x23Au, | 1792 pGlobalTXT_LocalizationStrings[78],//Calendar |
1828 0x161u, | 1793 v20, 0); |
1829 v20->uTextureWidth, | |
1830 v20->uTextureHeight, | |
1831 1, | |
1832 0, | |
1833 0xCBu, | |
1834 0, | |
1835 v22, | |
1836 v21, | |
1837 v20); | |
1838 uTextureID_ib_td5_A = pIcons_LOD->LoadTexture("ib-td5-A", TEXTURE_16BIT_PALETTE); | 1794 uTextureID_ib_td5_A = pIcons_LOD->LoadTexture("ib-td5-A", TEXTURE_16BIT_PALETTE); |
1839 pBtn_History = pPrimaryWindow->CreateButton( | 1795 pBtn_History = pPrimaryWindow->CreateButton(0x258u, 0x169u, |
1840 0x258u, | |
1841 0x169u, | |
1842 (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureWidth : 24), | 1796 (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureWidth : 24), |
1843 (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureHeight : 26), | 1797 (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureHeight : 26), |
1844 1, | 1798 1, 0, 0xE0u, 0, 0x48u, pGlobalTXT_LocalizationStrings[602],//History |
1845 0, | 1799 (Texture *)(uTextureID_ib_td5_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0), 0); |
1846 0xE0u, | |
1847 0, | |
1848 0x48u, | |
1849 pGlobalTXT_LocalizationStrings[602], | |
1850 (Texture *)(uTextureID_ib_td5_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0), | |
1851 0); | |
1852 v24 = &pIcons_LOD->pTextures[uTextureID_507980]; | 1800 v24 = &pIcons_LOD->pTextures[uTextureID_507980]; |
1853 v25 = (Texture *)(uTextureID_507980 != -1 ? (int)v24 : 0); | 1801 v25 = (Texture *)(uTextureID_507980 != -1 ? (int)v24 : 0); |
1854 bFlashHistoryBook = 0; | 1802 bFlashHistoryBook = 0; |
1855 v26 = (Texture *)(uTextureID_507980 != -1 ? (int)v24 : 0); | 1803 v26 = (Texture *)(uTextureID_507980 != -1 ? (int)v24 : 0); |
1856 bFlashAutonotesBook = 0; | 1804 bFlashAutonotesBook = 0; |
5309 } | 5257 } |
5310 v1 = uNumVisibleWindows; | 5258 v1 = uNumVisibleWindows; |
5311 if ( uNumVisibleWindows <= 0 ) | 5259 if ( uNumVisibleWindows <= 0 ) |
5312 { | 5260 { |
5313 LABEL_38: | 5261 LABEL_38: |
5314 if ( pCurrentScreen == 10 ) | 5262 if ( pCurrentScreen == 10 ) // ChestScreen |
5315 { | 5263 { |
5316 sub_42038D(); | 5264 sub_42038D(); |
5317 //goto _return; | 5265 //goto _return; |
5318 if ( pMouse->uPointingObjectID == 0 ) | 5266 if ( pMouse->uPointingObjectID == 0 ) |
5319 { | 5267 { |
5324 } | 5272 } |
5325 } | 5273 } |
5326 uLastPointedObjectID = pMouse->uPointingObjectID; | 5274 uLastPointedObjectID = pMouse->uPointingObjectID; |
5327 return; | 5275 return; |
5328 } | 5276 } |
5329 if ( pCurrentScreen == 13 ) | 5277 if ( pCurrentScreen == 13 ) // HouseScreen |
5330 { | 5278 { |
5331 if ( dword_F8B19C != 2 | 5279 if ( dword_F8B19C != 2 |
5332 || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0) | 5280 || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0) |
5333 || v16 == -65536 ) | 5281 || v16 == -65536 ) |
5334 //goto _return; | 5282 //goto _return; |
5409 && (signed int)pX <= (signed int)pButton->uZ | 5357 && (signed int)pX <= (signed int)pButton->uZ |
5410 && (signed int)pY >= (signed int)pButton->uY | 5358 && (signed int)pY >= (signed int)pButton->uY |
5411 && (signed int)pY <= (signed int)pButton->uW ) | 5359 && (signed int)pY <= (signed int)pButton->uW ) |
5412 { | 5360 { |
5413 pMessageType3 = (UIMessageType)pButton->field_1C; | 5361 pMessageType3 = (UIMessageType)pButton->field_1C; |
5414 if ( pMessageType3 == 0 ) | 5362 if ( pMessageType3 == 0 ) // For books |
5415 //goto LABEL_28; | 5363 //goto LABEL_28; |
5416 { | 5364 { |
5417 v13 = pButton->pButtonName; | 5365 v13 = pButton->pButtonName; |
5418 sub_41C0B8_set_status_string(v13); | 5366 sub_41C0B8_set_status_string(v13); |
5419 uLastPointedObjectID = 1; | 5367 uLastPointedObjectID = 1; |