Mercurial > mm7
comparison mm7_2.cpp @ 502:dd5124185551
Слияние
author | Ritor1 |
---|---|
date | Fri, 01 Mar 2013 17:38:04 +0600 |
parents | 0e20e886365d |
children | cb0ad52d6a26 d2a55c0a8dda |
comparison
equal
deleted
inserted
replaced
501:6fa3ff8ef729 | 502:dd5124185551 |
---|---|
1402 } | 1402 } |
1403 } | 1403 } |
1404 return result; | 1404 return result; |
1405 } | 1405 } |
1406 } | 1406 } |
1407 pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); | 1407 pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); |
1408 v3 = 0; | 1408 v3 = 0; |
1409 if ( dword_F8B19C == 2 ) | 1409 if ( dword_F8B19C == 2 ) |
1410 { | 1410 { |
1411 v48 = 0; | 1411 v48 = 0; |
1412 v108 = 0; | 1412 v108 = 0; |
1942 LABEL_46: | 1942 LABEL_46: |
1943 v40 = pFontArrus->CalcTextHeight(v21, v84, v85, v86); | 1943 v40 = pFontArrus->CalcTextHeight(v21, v84, v85, v86); |
1944 return (POINT *)v104.DrawTitleText(pFontArrus, v3, (174 - v40) / 2 + 138, v88, v90, v92); | 1944 return (POINT *)v104.DrawTitleText(pFontArrus, v3, (174 - v40) / 2 + 138, v88, v90, v92); |
1945 } | 1945 } |
1946 } | 1946 } |
1947 pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); | 1947 pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); |
1948 v3 = 0; | 1948 v3 = 0; |
1949 v114 = 0; | 1949 v114 = 0; |
1950 if ( dword_F8B19C == 2 ) | 1950 if ( dword_F8B19C == 2 ) |
1951 { | 1951 { |
1952 do | 1952 do |
2376 } | 2376 } |
2377 } | 2377 } |
2378 break; | 2378 break; |
2379 case 2: //buy standart | 2379 case 2: //buy standart |
2380 { | 2380 { |
2381 pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); | 2381 pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); |
2382 v55 = 0; | 2382 v55 = 0; |
2383 v153 = 0; | 2383 v153 = 0; |
2384 for(int i=0; i<8; ++i) | 2384 for(int i=0; i<8; ++i) |
2385 { | 2385 { |
2386 // if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) | 2386 // if ( pParty->field_777C[9 * (v55 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) |
2578 return; | 2578 return; |
2579 } | 2579 } |
2580 break; | 2580 break; |
2581 case 6: | 2581 case 6: |
2582 { | 2582 { |
2583 pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); | 2583 pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); |
2584 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[195], 0); | 2584 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[195], 0); |
2585 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 2585 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
2586 return; | 2586 return; |
2587 v149 = 0; | 2587 v149 = 0; |
2588 v93 = 0; | 2588 v93 = 0; |
2707 } | 2707 } |
2708 break; | 2708 break; |
2709 case 95: //buy spesial | 2709 case 95: //buy spesial |
2710 { | 2710 { |
2711 | 2711 |
2712 pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); | 2712 pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); |
2713 | 2713 |
2714 v11 = 0; | 2714 v11 = 0; |
2715 v61 = 0; | 2715 v61 = 0; |
2716 v153 = 0; | 2716 v153 = 0; |
2717 do | 2717 do |
3606 | 3606 |
3607 | 3607 |
3608 | 3608 |
3609 | 3609 |
3610 //----- (004BC8D5) -------------------------------------------------------- | 3610 //----- (004BC8D5) -------------------------------------------------------- |
3611 Texture *__cdecl sub_4BC8D5() | 3611 void SpellBookGenerator() |
3612 { | 3612 { |
3613 int v0; // esi@1 | 3613 int v0; // esi@1 |
3614 char *v1; // ebx@1 | 3614 int v1; // ebx@1 |
3615 signed int v2; // edi@1 | 3615 signed int v2; // edi@1 |
3616 signed int v3; // eax@2 | 3616 signed int v3; // eax@2 |
3617 int v4; // esi@7 | 3617 int v4; // esi@7 |
3618 GUIWindow *v5; // ebp@15 | 3618 GUIWindow *v5; // ebp@15 |
3619 Texture *result; // eax@15 | 3619 Texture *result; // eax@15 |
3620 int v7; // [sp+10h] [bp-4h]@0 | 3620 int v7; // [sp+10h] [bp-4h]@0 |
3621 | 3621 |
3622 v0 = v7; | 3622 // v0 = v7; |
3623 v1 = (char *)window_SpeakInHouse->ptr_1C - 139; | 3623 v1 = window_SpeakInHouse->par1C - 139; |
3624 v2 = 0; | 3624 v2 = 0; |
3625 do | 3625 for(int i=0; i<12; ++i) |
3626 { | 3626 { |
3627 //v3 = p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C]; | 3627 //v3 = p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C]; |
3628 v3 = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType; | 3628 v3 = p2DEvents[window_SpeakInHouse->par1C - 1].uType; |
3629 if ( v3 < 5 ) | 3629 if ( v3 < 5 ) |
3630 goto LABEL_12; | 3630 goto LABEL_12; |
3631 if ( v3 <= 13 ) | 3631 if ( v3 <= 13 ) |
3632 { | 3632 { |
3633 v0 = rand() % word_4F0F30[(signed int)v1] | 3633 v0 = rand() % word_4F0F30[(signed int)v1] |
3662 if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 239) ) | 3662 if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 239) ) |
3663 v0 = 486; | 3663 v0 = 486; |
3664 } | 3664 } |
3665 v5 = window_SpeakInHouse; | 3665 v5 = window_SpeakInHouse; |
3666 | 3666 |
3667 auto _u = (ItemGen *)&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + v2 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C; | 3667 ItemGen * _u = &pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i]; |
3668 _u->Reset(); | 3668 _u->Reset(); |
3669 *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v2 + 12 * (unsigned int)v5->ptr_1C)) = v0; | 3669 pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i].uItemID= v0; |
3670 *(&pParty->pPlayers[1].pInstalledBeacons[1].field_10 + 9 * (v2++ + 12 * (unsigned int)v5->ptr_1C)) = 1; | 3670 pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i].Identified(); |
3671 result = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pItemsTable->pItems[v0].pIconName, TEXTURE_16BIT_PALETTE)]; | 3671 |
3672 *(&dword_F8B164 + v2) = result; | 3672 ItemsInShopTexture[i] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pItemsTable->pItems[v0].pIconName, TEXTURE_16BIT_PALETTE)]; |
3673 } | 3673 } |
3674 while ( v2 < 12 ); | 3674 |
3675 return result; | 3675 return; |
3676 } | 3676 } |
3677 | 3677 |
3678 | 3678 |
3679 //----- (004BCA33) -------------------------------------------------------- | 3679 //----- (004BCA33) -------------------------------------------------------- |
3680 GUIButton *__cdecl UI_CreateEndConversationButton() | 3680 GUIButton *__cdecl UI_CreateEndConversationButton() |
3803 dword_F8B19C = uMessageParam; | 3803 dword_F8B19C = uMessageParam; |
3804 if ( in_current_building_type < BildingType_19 ) | 3804 if ( in_current_building_type < BildingType_19 ) |
3805 { | 3805 { |
3806 v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_building_type], TEXTURE_16BIT_PALETTE); | 3806 v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_building_type], TEXTURE_16BIT_PALETTE); |
3807 //v3 = dword_F8B198; | 3807 //v3 = dword_F8B198; |
3808 dword_F8B164 = &pIcons_LOD->pTextures[v9]; | 3808 ShopTexture = &pIcons_LOD->pTextures[v9]; |
3809 LABEL_13: | 3809 LABEL_13: |
3810 v8 = window_SpeakInHouse; | 3810 v8 = window_SpeakInHouse; |
3811 } | 3811 } |
3812 if ( in_current_building_type > BildingType_Tavern ) | 3812 if ( in_current_building_type > BildingType_Tavern ) |
3813 { | 3813 { |
3835 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44468]) >= (signed __int64)pParty->uTimePlayed ) | 3835 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44468]) >= (signed __int64)pParty->uTimePlayed ) |
3836 { | 3836 { |
3837 v32 = 0; | 3837 v32 = 0; |
3838 do | 3838 do |
3839 { | 3839 { |
3840 v33 = *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v32 + 12 * (unsigned int)v8->ptr_1C)); | 3840 //v33 = *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v32 + 12 * (unsigned int)v8->ptr_1C)); |
3841 v33 = pParty->SpellBooksInGuilds[v8->par1C-139][v32].uItemID; | |
3841 if ( v33 ) | 3842 if ( v33 ) |
3842 { | 3843 { |
3843 v34 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v33].pIconName, TEXTURE_16BIT_PALETTE); | 3844 v34 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v33].pIconName, TEXTURE_16BIT_PALETTE); |
3844 v8 = window_SpeakInHouse; | 3845 v8 = window_SpeakInHouse; |
3845 ItemsInShopTexture[v32] = &pIcons_LOD->pTextures[v34]; | 3846 ItemsInShopTexture[v32] = &pIcons_LOD->pTextures[v34]; |
3848 } | 3849 } |
3849 while ( v32 < 12 ); | 3850 while ( v32 < 12 ); |
3850 } | 3851 } |
3851 else | 3852 else |
3852 { | 3853 { |
3853 sub_4BC8D5(); | 3854 SpellBookGenerator(); |
3854 v30 = window_SpeakInHouse->ptr_1C; | 3855 v30 = window_SpeakInHouse->ptr_1C; |
3855 v31 = pParty->uTimePlayed | 3856 v31 = pParty->uTimePlayed |
3856 + (signed __int64)((double)(0xA8C000 | 3857 + (signed __int64)((double)(0xA8C000 |
3857 //* (signed int)p2DEvents_minus1[26 * (unsigned int)ptr_507BC0->ptr_1C]) | 3858 //* (signed int)p2DEvents_minus1[26 * (unsigned int)ptr_507BC0->ptr_1C]) |
3858 * (signed int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].field_1C) | 3859 * (signed int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].field_1C) |
4311 if ( dword_F8B19C != 2 | 4312 if ( dword_F8B19C != 2 |
4312 && dword_F8B19C != 3 | 4313 && dword_F8B19C != 3 |
4313 && dword_F8B19C != 97 | 4314 && dword_F8B19C != 97 |
4314 && dword_F8B19C != 5 | 4315 && dword_F8B19C != 5 |
4315 && dword_F8B19C != 4 | 4316 && dword_F8B19C != 4 |
4316 && dword_F8B164 ) | 4317 && ShopTexture ) |
4317 { | 4318 { |
4318 dword_F8B164->Release(); | 4319 ShopTexture->Release(); |
4319 v0 = dword_F8B19C; | 4320 v0 = dword_F8B19C; |
4320 dword_F8B164 = 0; | 4321 ShopTexture = 0; |
4321 } | 4322 } |
4322 if ( v0 && v0 != 1 ) | 4323 if ( v0 && v0 != 1 ) |
4323 { | 4324 { |
4324 if ( v0 == -1 ) | 4325 if ( v0 == -1 ) |
4325 { | 4326 { |