Mercurial > mm7
diff mm7_2.cpp @ 496:0e20e886365d
guilds ....
author | Gloval |
---|---|
date | Fri, 01 Mar 2013 02:11:57 +0400 |
parents | 90fdb47bfcba |
children | cb0ad52d6a26 d2a55c0a8dda |
line wrap: on
line diff
--- a/mm7_2.cpp Thu Feb 28 21:45:39 2013 +0400 +++ b/mm7_2.cpp Fri Mar 01 02:11:57 2013 +0400 @@ -1404,7 +1404,7 @@ return result; } } - pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); + pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); v3 = 0; if ( dword_F8B19C == 2 ) { @@ -1944,7 +1944,7 @@ return (POINT *)v104.DrawTitleText(pFontArrus, v3, (174 - v40) / 2 + 138, v88, v90, v92); } } - pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); + pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); v3 = 0; v114 = 0; if ( dword_F8B19C == 2 ) @@ -2378,7 +2378,7 @@ break; case 2: //buy standart { - pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); + pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); v55 = 0; v153 = 0; for(int i=0; i<8; ++i) @@ -2580,7 +2580,7 @@ break; case 6: { - pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); + pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[195], 0); if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) return; @@ -2709,7 +2709,7 @@ case 95: //buy spesial { - pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); + pRenderer->DrawTextureIndexed(8u, 8u, ShopTexture); v11 = 0; v61 = 0; @@ -3608,10 +3608,10 @@ //----- (004BC8D5) -------------------------------------------------------- -void sub_4BC8D5() +void SpellBookGenerator() { int v0; // esi@1 - char *v1; // ebx@1 + int v1; // ebx@1 signed int v2; // edi@1 signed int v3; // eax@2 int v4; // esi@7 @@ -3620,12 +3620,12 @@ int v7; // [sp+10h] [bp-4h]@0 // v0 = v7; - v1 = (char *)window_SpeakInHouse->ptr_1C - 139; + v1 = window_SpeakInHouse->par1C - 139; v2 = 0; - do + for(int i=0; i<12; ++i) { //v3 = p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C]; - v3 = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType; + v3 = p2DEvents[window_SpeakInHouse->par1C - 1].uType; if ( v3 < 5 ) goto LABEL_12; if ( v3 <= 13 ) @@ -3664,13 +3664,14 @@ } v5 = window_SpeakInHouse; - auto _u = (ItemGen *)&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + v2 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C; + ItemGen * _u = &pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i]; _u->Reset(); - *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v2 + 12 * (unsigned int)v5->ptr_1C)) = v0; - *(&pParty->pPlayers[1].pInstalledBeacons[1].field_10 + 9 * (v2++ + 12 * (unsigned int)v5->ptr_1C)) = 1; - *(&dword_F8B164 + v2) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pItemsTable->pItems[v0].pIconName, TEXTURE_16BIT_PALETTE)]; - } - while ( v2 < 12 ); + pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i].uItemID= v0; + pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i].Identified(); + + ItemsInShopTexture[i] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pItemsTable->pItems[v0].pIconName, TEXTURE_16BIT_PALETTE)]; + } + return; } @@ -3804,7 +3805,7 @@ { v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_building_type], TEXTURE_16BIT_PALETTE); //v3 = dword_F8B198; - dword_F8B164 = &pIcons_LOD->pTextures[v9]; + ShopTexture = &pIcons_LOD->pTextures[v9]; LABEL_13: v8 = window_SpeakInHouse; } @@ -3836,7 +3837,8 @@ v32 = 0; do { - v33 = *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v32 + 12 * (unsigned int)v8->ptr_1C)); + //v33 = *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v32 + 12 * (unsigned int)v8->ptr_1C)); + v33 = pParty->SpellBooksInGuilds[v8->par1C-139][v32].uItemID; if ( v33 ) { v34 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v33].pIconName, TEXTURE_16BIT_PALETTE); @@ -3849,7 +3851,7 @@ } else { - sub_4BC8D5(); + SpellBookGenerator(); v30 = window_SpeakInHouse->ptr_1C; v31 = pParty->uTimePlayed + (signed __int64)((double)(0xA8C000 @@ -4312,11 +4314,11 @@ && dword_F8B19C != 97 && dword_F8B19C != 5 && dword_F8B19C != 4 - && dword_F8B164 ) - { - dword_F8B164->Release(); + && ShopTexture ) + { + ShopTexture->Release(); v0 = dword_F8B19C; - dword_F8B164 = 0; + ShopTexture = 0; } if ( v0 && v0 != 1 ) {