comparison UI/UIShops.cpp @ 1458:934074e7fcc1

ModalWindow __thiscall and __cdecl removed Some random renames & refactors
author Nomad
date Wed, 21 Aug 2013 14:26:36 +0200
parents c7489dd19f88
children ec79ee6d44ce
comparison
equal deleted inserted replaced
1457:9dc33590f93e 1458:934074e7fcc1
12 #include "..\AudioPlayer.h" 12 #include "..\AudioPlayer.h"
13 #include "..\MapInfo.h" 13 #include "..\MapInfo.h"
14 #include "..\Viewport.h" 14 #include "..\Viewport.h"
15 15
16 //----- (004B910F) -------------------------------------------------------- 16 //----- (004B910F) --------------------------------------------------------
17 void __cdecl WeaponShopDialog() 17 void WeaponShopDialog()
18 { 18 {
19 int v0; // ebx@1 19 int v0; // ebx@1
20 int pNumActiveItem; // eax@6 20 int pNumActiveItem; // eax@6
21 signed int v2; // esi@8 21 signed int v2; // esi@8
22 ItemGen *v4; // eax@11 22 ItemGen *v4; // eax@11
181 v49 = word_F8B158[(signed int)v48]; 181 v49 = word_F8B158[(signed int)v48];
182 v50 = ItemsInShopTexture[(signed int)v48]; 182 v50 = ItemsInShopTexture[(signed int)v48];
183 v49 += 30; 183 v49 += 30;
184 v51 = 60 - ((signed int)v50->uTextureWidth >> 1); 184 v51 = 60 - ((signed int)v50->uTextureWidth >> 1);
185 pRenderer->DrawTextureTransparent(v51 + pItemNum, v49, v50); 185 pRenderer->DrawTextureTransparent(v51 + pItemNum, v49, v50);
186 sub_40F92A(&pRenderer->pActiveZBuffer[v51 + pItemNum + 640 * v49], ItemsInShopTexture[(signed int)v109], (int)((char *)v109 + 1)); 186 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v51 + pItemNum + 640 * v49], ItemsInShopTexture[(signed int)v109], (int)((char *)v109 + 1));
187 v48 = v109; 187 v48 = v109;
188 } 188 }
189 pItemNum += 70; 189 pItemNum += 70;
190 v48 = (const char **)((char *)v48 + 1); 190 v48 = (const char **)((char *)v48 + 1);
191 v109 = v48; 191 v109 = v48;
374 { 374 {
375 v52 = word_F8B158[(signed int)v109] + 30; 375 v52 = word_F8B158[(signed int)v109] + 30;
376 v53 = ItemsInShopTexture[(signed int)v109]; 376 v53 = ItemsInShopTexture[(signed int)v109];
377 v54 = 60 - ((signed int)v53->uTextureWidth >> 1); 377 v54 = 60 - ((signed int)v53->uTextureWidth >> 1);
378 pRenderer->DrawTextureTransparent(v54 + pItemNum, word_F8B158[(signed int)v109] + 30, v53); 378 pRenderer->DrawTextureTransparent(v54 + pItemNum, word_F8B158[(signed int)v109] + 30, v53);
379 sub_40F92A(&pRenderer->pActiveZBuffer[v54 + pItemNum + 640 * v52], ItemsInShopTexture[(signed int)v109], (int)((char *)v109 + 1)); 379 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v54 + pItemNum + 640 * v52], ItemsInShopTexture[(signed int)v109], (int)((char *)v109 + 1));
380 } 380 }
381 v109 = (const char **)((char *)v109 + 1); 381 v109 = (const char **)((char *)v109 + 1);
382 pItemNum += 70; 382 pItemNum += 70;
383 } 383 }
384 while ( (signed int)v109 < 6 ); 384 while ( (signed int)v109 < 6 );
536 } 536 }
537 } 537 }
538 } 538 }
539 539
540 //----- (004BA928) -------------------------------------------------------- 540 //----- (004BA928) --------------------------------------------------------
541 void __cdecl ArmorShopDialog() 541 void ArmorShopDialog()
542 { 542 {
543 signed int v1; // esi@8 543 signed int v1; // esi@8
544 unsigned int v2; // eax@10 544 unsigned int v2; // eax@10
545 ItemGen *v3; // eax@11 545 ItemGen *v3; // eax@11
546 char *v5; // ecx@12 546 char *v5; // ecx@12
1104 } 1104 }
1105 break; 1105 break;
1106 } 1106 }
1107 } 1107 }
1108 //----- (004B9CC6) -------------------------------------------------------- 1108 //----- (004B9CC6) --------------------------------------------------------
1109 void __cdecl AlchemistDialog() 1109 void AlchemistDialog()
1110 { 1110 {
1111 int v0; 1111 int v0;
1112 int pNumActiveItem; // eax@7 1112 int pNumActiveItem; // eax@7
1113 signed int v5; // esi@9 1113 signed int v5; // esi@9
1114 unsigned int v6; // esi@11 1114 unsigned int v6; // esi@11
1285 } 1285 }
1286 } 1286 }
1287 else if ( (signed int)v48 < 18 ) 1287 else if ( (signed int)v48 < 18 )
1288 v48 = 18; 1288 v48 = 18;
1289 pRenderer->DrawTextureTransparent(v48, v47, v46); 1289 pRenderer->DrawTextureTransparent(v48, v47, v46);
1290 sub_40F92A(&pRenderer->pActiveZBuffer[v48 + 640 * v47], ItemsInShopTexture[v114], v114 + 1); 1290 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v48 + 640 * v47], ItemsInShopTexture[v114], v114 + 1);
1291 } 1291 }
1292 ++v114; 1292 ++v114;
1293 } 1293 }
1294 while ( v114 < 6 ); 1294 while ( v114 < 6 );
1295 v114 = 0; 1295 v114 = 0;
1315 { 1315 {
1316 if ( (signed int)v52 < 18 ) 1316 if ( (signed int)v52 < 18 )
1317 v52 = 18; 1317 v52 = 18;
1318 } 1318 }
1319 pRenderer->DrawTextureTransparent(v52, v51, v50); 1319 pRenderer->DrawTextureTransparent(v52, v51, v50);
1320 sub_40F92A(&pRenderer->pActiveZBuffer[v52 + 640 * v51], ItemsInShopTexture[v114 + 6], v114 + 7); 1320 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v52 + 640 * v51], ItemsInShopTexture[v114 + 6], v114 + 7);
1321 } 1321 }
1322 ++v114; 1322 ++v114;
1323 } 1323 }
1324 while ( v114 < 6 ); 1324 while ( v114 < 6 );
1325 if ( HouseUI_CheckIfPlayerCanInteract() ) 1325 if ( HouseUI_CheckIfPlayerCanInteract() )
1487 { 1487 {
1488 if ( (signed int)v56 < 18 ) 1488 if ( (signed int)v56 < 18 )
1489 v56 = 18; 1489 v56 = 18;
1490 } 1490 }
1491 pRenderer->DrawTextureTransparent(v56, v55, v54); 1491 pRenderer->DrawTextureTransparent(v56, v55, v54);
1492 sub_40F92A(&pRenderer->pActiveZBuffer[v56 + 640 * v55], ItemsInShopTexture[v114], v114 + 1); 1492 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v56 + 640 * v55], ItemsInShopTexture[v114], v114 + 1);
1493 } 1493 }
1494 ++v114; 1494 ++v114;
1495 } 1495 }
1496 while ( v114 < 6 ); 1496 while ( v114 < 6 );
1497 v114 = 0; 1497 v114 = 0;
1517 { 1517 {
1518 if ( (signed int)v60 < 18 ) 1518 if ( (signed int)v60 < 18 )
1519 v60 = 18; 1519 v60 = 18;
1520 } 1520 }
1521 pRenderer->DrawTextureTransparent(v60, v59, v58); 1521 pRenderer->DrawTextureTransparent(v60, v59, v58);
1522 sub_40F92A(&pRenderer->pActiveZBuffer[v60 + 640 * v59], ItemsInShopTexture[v114 + 6], v114 + 7); 1522 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v60 + 640 * v59], ItemsInShopTexture[v114 + 6], v114 + 7);
1523 } 1523 }
1524 ++v114; 1524 ++v114;
1525 } 1525 }
1526 while ( v114 < 6 ); 1526 while ( v114 < 6 );
1527 if ( HouseUI_CheckIfPlayerCanInteract() ) 1527 if ( HouseUI_CheckIfPlayerCanInteract() )
1855 { 1855 {
1856 if ( (signed int)v52 < 18 ) 1856 if ( (signed int)v52 < 18 )
1857 v52 = 18; 1857 v52 = 18;
1858 } 1858 }
1859 pRenderer->DrawTextureTransparent(v52, v51, v50); 1859 pRenderer->DrawTextureTransparent(v52, v51, v50);
1860 sub_40F92A(&pRenderer->pActiveZBuffer[v52 + 640 * v51], ItemsInShopTexture[v122], v122 + 1); 1860 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v52 + 640 * v51], ItemsInShopTexture[v122], v122 + 1);
1861 v49 = v122; 1861 v49 = v122;
1862 } 1862 }
1863 ++v49; 1863 ++v49;
1864 v122 = v49; 1864 v122 = v49;
1865 } 1865 }
1885 { 1885 {
1886 if ( (signed int)v56 < 18 ) 1886 if ( (signed int)v56 < 18 )
1887 v56 = 18; 1887 v56 = 18;
1888 } 1888 }
1889 pRenderer->DrawTextureTransparent(v56, v55, v54); 1889 pRenderer->DrawTextureTransparent(v56, v55, v54);
1890 sub_40F92A(&pRenderer->pActiveZBuffer[v56 + 640 * v55], ItemsInShopTexture[v122 + 6], v122 + 7); 1890 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v56 + 640 * v55], ItemsInShopTexture[v122 + 6], v122 + 7);
1891 } 1891 }
1892 ++v122; 1892 ++v122;
1893 } 1893 }
1894 while ( v122 < 6 ); 1894 while ( v122 < 6 );
1895 if ( HouseUI_CheckIfPlayerCanInteract() ) 1895 if ( HouseUI_CheckIfPlayerCanInteract() )
1985 { 1985 {
1986 if ( (signed int)v60 < 18 ) 1986 if ( (signed int)v60 < 18 )
1987 v60 = 18; 1987 v60 = 18;
1988 } 1988 }
1989 pRenderer->DrawTextureTransparent(v60, v59, ItemsInShopTexture[v49]); 1989 pRenderer->DrawTextureTransparent(v60, v59, ItemsInShopTexture[v49]);
1990 sub_40F92A(&pRenderer->pActiveZBuffer[v60 + 640 * v59], ItemsInShopTexture[v122], v122 + 1); 1990 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v60 + 640 * v59], ItemsInShopTexture[v122], v122 + 1);
1991 v49 = v122; 1991 v49 = v122;
1992 } 1992 }
1993 ++v49; 1993 ++v49;
1994 v122 = v49; 1994 v122 = v49;
1995 } 1995 }
2016 { 2016 {
2017 if ( (signed int)v64 < 18 ) 2017 if ( (signed int)v64 < 18 )
2018 v64 = 18; 2018 v64 = 18;
2019 } 2019 }
2020 pRenderer->DrawTextureTransparent(v64, v63, ItemsInShopTexture[v122 + 6]); 2020 pRenderer->DrawTextureTransparent(v64, v63, ItemsInShopTexture[v122 + 6]);
2021 sub_40F92A(&pRenderer->pActiveZBuffer[v64 + 640 * v63], ItemsInShopTexture[v122 + 6], v122 + 7); 2021 ZBuffer_DoFill2(&pRenderer->pActiveZBuffer[v64 + 640 * v63], ItemsInShopTexture[v122 + 6], v122 + 7);
2022 } 2022 }
2023 ++v122; 2023 ++v122;
2024 } 2024 }
2025 while ( v122 < 6 ); 2025 while ( v122 < 6 );
2026 if ( HouseUI_CheckIfPlayerCanInteract() ) 2026 if ( HouseUI_CheckIfPlayerCanInteract() )
2291 return; 2291 return;
2292 } 2292 }
2293 return; 2293 return;
2294 } 2294 }
2295 //----- (004BDB56) -------------------------------------------------------- 2295 //----- (004BDB56) --------------------------------------------------------
2296 void __cdecl UIShop_Buy_Identify_Repair() 2296 void UIShop_Buy_Identify_Repair()
2297 { 2297 {
2298 int v8; // eax@15 2298 int v8; // eax@15
2299 unsigned int pItemID; // esi@20 2299 unsigned int pItemID; // esi@20
2300 ItemGen *item; // esi@21 2300 ItemGen *item; // esi@21
2301 unsigned int v15; // eax@33 2301 unsigned int v15; // eax@33
2580 break; 2580 break;
2581 } 2581 }
2582 } 2582 }
2583 } 2583 }
2584 //----- (004B1A2D) -------------------------------------------------------- 2584 //----- (004B1A2D) --------------------------------------------------------
2585 void __cdecl ShowPopupShopItem() 2585 void ShowPopupShopItem()
2586 { 2586 {
2587 POINT *v1; // esi@5 2587 POINT *v1; // esi@5
2588 unsigned int v2; // eax@5 2588 unsigned int v2; // eax@5
2589 int v3; // ecx@5 2589 int v3; // ecx@5
2590 POINT *v4; // esi@12 2590 POINT *v4; // esi@12
2644 if ( v5 ) 2644 if ( v5 )
2645 sub_4B1523((int *)&pParty->pPlayers[1].uExpressionTimeLength + 9 * (v3 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)); 2645 sub_4B1523((int *)&pParty->pPlayers[1].uExpressionTimeLength + 9 * (v3 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C));
2646 } 2646 }
2647 } 2647 }
2648 //----- (004B1D27) -------------------------------------------------------- 2648 //----- (004B1D27) --------------------------------------------------------
2649 void __cdecl GetHouseGoodbyeSpeech() 2649 void GetHouseGoodbyeSpeech()
2650 { 2650 {
2651 signed int v2; // edi@10 2651 signed int v2; // edi@10
2652 signed int v5; // edi@20 2652 signed int v5; // edi@20
2653 int v7[4]; // [sp+Ch] [bp-10h]@12 2653 int v7[4]; // [sp+Ch] [bp-10h]@12
2654 2654