Mercurial > might-and-magic-trilogy
comparison mm7_5.cpp @ 173:8e6ed320a356
Слияние
author | Ritor1 |
---|---|
date | Tue, 11 Dec 2012 21:54:53 +0600 |
parents | 87c503d426e0 |
children | 90a9c828c2a6 6ce54633e7ba |
comparison
equal
deleted
inserted
replaced
172:b4c9e1d2eec8 | 173:8e6ed320a356 |
---|---|
1550 sub_419379(); | 1550 sub_419379(); |
1551 LABEL_321: | 1551 LABEL_321: |
1552 pIcons_LOD->_4114F2(); | 1552 pIcons_LOD->_4114F2(); |
1553 } | 1553 } |
1554 LABEL_322: | 1554 LABEL_322: |
1555 if ( ptr_507BD4 ) | 1555 if ( pGUIWindow_Settings ) |
1556 { | 1556 { |
1557 if ( pCurrentScreen == 7 ) | 1557 if ( pCurrentScreen == 7 ) |
1558 { | 1558 { |
1559 pMouse->SetCursorBitmap("MICON2"); | 1559 pMouse->SetCursorBitmap("MICON2"); |
1560 } | 1560 } |
1561 else | 1561 else |
1562 { | 1562 { |
1563 ptr_507BD4->Release(); | 1563 pGUIWindow_Settings->Release(); |
1564 ptr_507BD4 = 0; | 1564 pGUIWindow_Settings = 0; |
1565 pMouse->SetCursorBitmap("MICON1"); | 1565 pMouse->SetCursorBitmap("MICON1"); |
1566 GameUI_StatusBar_TimedStringTimeLeft = 0; | 1566 GameUI_StatusBar_TimedStringTimeLeft = 0; |
1567 unk_50C9A0 = 0; | 1567 unk_50C9A0 = 0; |
1568 back_to_game(); | 1568 back_to_game(); |
1569 } | 1569 } |
1578 pCurrentScreen = 0; | 1578 pCurrentScreen = 0; |
1579 viewparams->bRedrawGameUI = v0; | 1579 viewparams->bRedrawGameUI = v0; |
1580 pIcons_LOD->_4355F7(); | 1580 pIcons_LOD->_4355F7(); |
1581 goto _continue; | 1581 goto _continue; |
1582 } | 1582 } |
1583 v36 = ptr_507BD4; | 1583 v36 = pGUIWindow_Settings; |
1584 if ( !ptr_507BD4 ) | 1584 if ( !pGUIWindow_Settings ) |
1585 { | 1585 { |
1586 dword_6BE138 = -1; | 1586 dword_6BE138 = -1; |
1587 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0); | 1587 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0); |
1588 pEventTimer->Pause(); | 1588 pEventTimer->Pause(); |
1589 pAudioPlayer->StopChannels(-1, -1); | 1589 pAudioPlayer->StopChannels(-1, -1); |
1944 v48 = pIndoor->pFaceExtras[v49->uFaceExtraID].uEventID == 0; | 1944 v48 = pIndoor->pFaceExtras[v49->uFaceExtraID].uEventID == 0; |
1945 } | 1945 } |
1946 if ( v48 ) | 1946 if ( v48 ) |
1947 goto _continue; | 1947 goto _continue; |
1948 LABEL_415: | 1948 LABEL_415: |
1949 v51 = ptr_507BD4->ptr_1C; | 1949 v51 = pGUIWindow_Settings->ptr_1C; |
1950 *((char *)v51 + 8) &= 0xBFu; | 1950 *((char *)v51 + 8) &= 0xBFu; |
1951 LABEL_416: | 1951 LABEL_416: |
1952 *((short *)v51 + 2) = uMessageParam; | 1952 *((short *)v51 + 2) = uMessageParam; |
1953 *((int *)v51 + 3) = v44; | 1953 *((int *)v51 + 3) = v44; |
1954 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300); | 1954 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300); |
1955 v36 = ptr_507BD4; | 1955 v36 = pGUIWindow_Settings; |
1956 LABEL_333: | 1956 LABEL_333: |
1957 v36->Release(); | 1957 v36->Release(); |
1958 ptr_507BD4 = 0; | 1958 pGUIWindow_Settings = 0; |
1959 pMouse->SetCursorBitmap("MICON1"); | 1959 pMouse->SetCursorBitmap("MICON1"); |
1960 GameUI_StatusBar_TimedStringTimeLeft = 0; | 1960 GameUI_StatusBar_TimedStringTimeLeft = 0; |
1961 unk_50C9A0 = 0; | 1961 unk_50C9A0 = 0; |
1962 back_to_game(); | 1962 back_to_game(); |
1963 goto _continue; | 1963 goto _continue; |
1974 LABEL_422: | 1974 LABEL_422: |
1975 viewparams->bRedrawGameUI = v0; | 1975 viewparams->bRedrawGameUI = v0; |
1976 } | 1976 } |
1977 else | 1977 else |
1978 { | 1978 { |
1979 if ( ptr_507BD4 ) | 1979 if ( pGUIWindow_Settings ) |
1980 { | 1980 { |
1981 v52 = ptr_507BD4->ptr_1C; | 1981 v52 = pGUIWindow_Settings->ptr_1C; |
1982 switch ( uMessage ) | 1982 switch ( uMessage ) |
1983 { | 1983 { |
1984 case 69: | 1984 case 69: |
1985 *((char *)v52 + 8) &= 0xFDu; | 1985 *((char *)v52 + 8) &= 0xFDu; |
1986 break; | 1986 break; |
1991 *((char *)v52 + 9) &= 0xFDu; | 1991 *((char *)v52 + 9) &= 0xFDu; |
1992 break; | 1992 break; |
1993 } | 1993 } |
1994 *((short *)v52 + 2) = uMessageParam; | 1994 *((short *)v52 + 2) = uMessageParam; |
1995 pParty->pPlayers[*((short *)v52 + 1)].SetRecoveryTime(300); | 1995 pParty->pPlayers[*((short *)v52 + 1)].SetRecoveryTime(300); |
1996 ptr_507BD4->Release(); | 1996 pGUIWindow_Settings->Release(); |
1997 ptr_507BD4 = 0; | 1997 pGUIWindow_Settings = 0; |
1998 pEventTimer->Resume(); | 1998 pEventTimer->Resume(); |
1999 pMouse->SetCursorBitmap("MICON1"); | 1999 pMouse->SetCursorBitmap("MICON1"); |
2000 GameUI_StatusBar_TimedStringTimeLeft = 0; | 2000 GameUI_StatusBar_TimedStringTimeLeft = 0; |
2001 unk_50C9A0 = 0; | 2001 unk_50C9A0 = 0; |
2002 } | 2002 } |
2450 v83 = v81; | 2450 v83 = v81; |
2451 v44 = (unsigned __int16)v81; | 2451 v44 = (unsigned __int16)v81; |
2452 v84 = v83 >> 16; | 2452 v84 = v83 >> 16; |
2453 if ( (v44 & 7) != 3 || v84 >= 5120 ) | 2453 if ( (v44 & 7) != 3 || v84 >= 5120 ) |
2454 goto LABEL_90; | 2454 goto LABEL_90; |
2455 v51 = ptr_507BD4->ptr_1C; | 2455 v51 = pGUIWindow_Settings->ptr_1C; |
2456 if ( uMessage == 70 ) | 2456 if ( uMessage == 70 ) |
2457 { | 2457 { |
2458 *((char *)v51 + 8) &= 0xF7u; | 2458 *((char *)v51 + 8) &= 0xF7u; |
2459 } | 2459 } |
2460 else | 2460 else |
3363 dword_4E455C = 1; | 3363 dword_4E455C = 1; |
3364 dword_50CDCC = 0; | 3364 dword_50CDCC = 0; |
3365 if ( ptr_507BC4 ) | 3365 if ( ptr_507BC4 ) |
3366 free_book_subwindow(); | 3366 free_book_subwindow(); |
3367 if ( !pCurrentScreen | 3367 if ( !pCurrentScreen |
3368 && !ptr_507BD4 ) | 3368 && !pGUIWindow_Settings ) |
3369 pEventTimer->Resume(); | 3369 pEventTimer->Resume(); |
3370 viewparams->bRedrawGameUI = 1; | 3370 viewparams->bRedrawGameUI = 1; |
3371 } | 3371 } |
3372 //----- (00435748) -------------------------------------------------------- | 3372 //----- (00435748) -------------------------------------------------------- |
3373 void __cdecl GUI_MainMenuMessageProc() | 3373 void __cdecl GUI_MainMenuMessageProc() |
15773 | 15773 |
15774 | 15774 |
15775 //----- (00416D62) -------------------------------------------------------- | 15775 //----- (00416D62) -------------------------------------------------------- |
15776 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) | 15776 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) |
15777 { | 15777 { |
15778 signed int v1; // eax@12 | 15778 signed int pPlayerNum; // eax@12 |
15779 char *v2; // eax@32 | 15779 char *v2; // eax@32 |
15780 void *v3; // ecx@52 | 15780 void *v3; // ecx@52 |
15781 unsigned int v4; // eax@59 | 15781 unsigned int v4; // eax@59 |
15782 int v5; // esi@62 | 15782 int v5; // esi@62 |
15783 signed int v6; // esi@64 | 15783 signed int v6; // esi@64 |
15784 signed int v7; // esi@69 | 15784 signed int v7; // esi@69 |
15785 ItemGen *v8; // ecx@70 | 15785 ItemGen *v8; // ecx@70 |
15786 unsigned int v9; // eax@72 | 15786 unsigned int v9; // eax@72 |
15787 unsigned int v10; // eax@76 | 15787 unsigned int v10; // eax@76 |
15788 char v11; // zf@83 | 15788 char v11; // zf@83 |
15789 GUIButton *v12; // esi@84 | 15789 GUIButton *pButton; // esi@84 |
15790 unsigned int v13; // ecx@85 | 15790 unsigned int v13; // ecx@85 |
15791 char *v14; // edi@85 | 15791 char *pStr; // edi@85 |
15792 signed int v15; // eax@92 | 15792 signed int pControlID; // eax@92 |
15793 int v16; // eax@95 | 15793 int v16; // eax@95 |
15794 int v17; // eax@96 | 15794 int v17; // eax@96 |
15795 enum PLAYER_SKILL_TYPE v18; // eax@98 | 15795 enum PLAYER_SKILL_TYPE v18; // eax@98 |
15796 char *v19; // eax@99 | 15796 char *pStr2; // eax@99 |
15797 unsigned int v20; // eax@108 | 15797 unsigned int v20; // eax@108 |
15798 unsigned int v21; // eax@109 | 15798 unsigned int v21; // eax@109 |
15799 const char *v22; // eax@111 | 15799 const char *v22; // eax@111 |
15800 char *v23; // ebx@112 | 15800 char *v23; // ebx@112 |
15801 char *v24; // edx@113 | 15801 char *v24; // edx@113 |
15802 unsigned int v25; // eax@113 | 15802 unsigned int v25; // eax@113 |
15803 GUIWindow a1; // [sp+4h] [bp-74h]@32 | 15803 GUIWindow pWindow; // [sp+4h] [bp-74h]@32 |
15804 double v27; // [sp+58h] [bp-20h]@33 | 15804 double v27; // [sp+58h] [bp-20h]@33 |
15805 struct tagPOINT Point; // [sp+60h] [bp-18h]@6 | 15805 struct tagPOINT Point; // [sp+60h] [bp-18h]@6 |
15806 char *v29; // [sp+68h] [bp-10h]@33 | 15806 char *v29; // [sp+68h] [bp-10h]@33 |
15807 float v30; // [sp+6Ch] [bp-Ch]@33 | 15807 float v30; // [sp+6Ch] [bp-Ch]@33 |
15808 unsigned int pX; // [sp+70h] [bp-8h]@3 | 15808 unsigned int pX; // [sp+70h] [bp-8h]@3 |
15809 unsigned int pY; // [sp+74h] [bp-4h]@3 | 15809 unsigned int pY; // [sp+74h] [bp-4h]@3 |
15810 | 15810 |
15811 if ( pCurrentScreen == 16 ) | 15811 if ( pCurrentScreen == 16 )// |
15812 return; | 15812 return; |
15813 if ( _this ) | 15813 if ( _this ) |
15814 { | 15814 { |
15815 pX = _this->x; | 15815 pX = _this->x; |
15816 pY = _this->y; | 15816 pY = _this->y; |
15829 return; | 15829 return; |
15830 } | 15830 } |
15831 } | 15831 } |
15832 if ( pParty->pPickedItem.uItemID ) | 15832 if ( pParty->pPickedItem.uItemID ) |
15833 { | 15833 { |
15834 v1 = 0; | 15834 //v1 = 0; |
15835 do | 15835 //do |
15836 { | 15836 for ( pPlayerNum = 0; pPlayerNum < 4; ++pPlayerNum) |
15837 if ( (signed int)pX > word_4E2930[v1] | 15837 { |
15838 && (signed int)pX < word_4E2938[v1] | 15838 if ( (signed int)pX > RightClickPortraitXmin[pPlayerNum] && (signed int)pX < RightClickPortraitXmax[pPlayerNum] |
15839 && (signed int)pY > 375 | 15839 && (signed int)pY > 375 && (signed int)pY < 466 ) |
15840 && (signed int)pY < 466 ) | |
15841 { | 15840 { |
15842 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(v1 + 1, 1); | 15841 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(pPlayerNum + 1, 1); |
15843 return; | 15842 return; |
15844 } | 15843 } |
15845 ++v1; | 15844 //++v1; |
15846 } | 15845 } |
15847 while ( v1 < 4 ); | 15846 //while ( v1 < 4 ); |
15848 } | 15847 } |
15849 pEventTimer->Pause(); | 15848 pEventTimer->Pause(); |
15850 if ( pCurrentScreen <= 10 ) | 15849 if ( pCurrentScreen <= 10 ) |
15851 { | 15850 { |
15852 if ( pCurrentScreen == 10 ) | 15851 if ( pCurrentScreen == 10 )// |
15853 { | 15852 { |
15854 __debugbreak(); | 15853 __debugbreak(); |
15855 if ( !pPlayers[uActiveCharacter]->CanAct() ) | 15854 if ( !pPlayers[uActiveCharacter]->CanAct() ) |
15856 { | 15855 { |
15857 sprintf( | 15856 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427],//%s %s |
15858 pTmpBuf, | 15857 pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);// |
15859 pGlobalTXT_LocalizationStrings[427], | 15858 pWindow.Hint = pTmpBuf; |
15860 pPlayers[uActiveCharacter]->pName, | 15859 pWindow.uFrameWidth = 384; |
15861 pGlobalTXT_LocalizationStrings[541]); | 15860 pWindow.uFrameHeight = 180; |
15862 a1.Hint = pTmpBuf; | 15861 pWindow.uFrameY = 40; |
15863 a1.uFrameWidth = 384; | |
15864 a1.uFrameHeight = 180; | |
15865 a1.uFrameY = 40; | |
15866 if ( (signed int)pX <= 320 ) | 15862 if ( (signed int)pX <= 320 ) |
15867 v10 = pX + 30; | 15863 v10 = pX + 30; |
15868 else | 15864 else |
15869 v10 = pX - 414; | 15865 v10 = pX - 414; |
15870 a1.uFrameX = v10; | 15866 pWindow.uFrameX = v10; |
15871 goto LABEL_42; | 15867 goto LABEL_42; |
15872 } | 15868 } |
15873 v9 = pX + pSRZBufferLineOffsets[pY]; | 15869 v9 = pX + pSRZBufferLineOffsets[pY]; |
15874 if ( !(pRenderer->pActiveZBuffer[v9] & 0xFFFF) ) | 15870 if ( !(pRenderer->pActiveZBuffer[v9] & 0xFFFF) ) |
15875 goto LABEL_132; | 15871 goto LABEL_132; |
15876 v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 | 15872 v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)ptr_507BB8->ptr_1C + 18* *((short *)&pChests[0].mm7__vector_pItems[139].uExpireTime |
15877 + 2662 * (unsigned int)ptr_507BB8->ptr_1C | 15873 + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)ptr_507BB8->ptr_1C + 3)); |
15878 + 18 | |
15879 * *((short *)&pChests[0].mm7__vector_pItems[139].uExpireTime | |
15880 + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) | |
15881 + 2662 * (unsigned int)ptr_507BB8->ptr_1C | |
15882 + 3)); | |
15883 } | 15874 } |
15884 else | 15875 else |
15885 { | 15876 { |
15886 if ( pCurrentScreen ) | 15877 if ( pCurrentScreen ) |
15887 { | 15878 { |
15888 if ( pCurrentScreen != 3 ) | 15879 if ( pCurrentScreen != 3 ) |
15889 { | 15880 { |
15890 if ( pCurrentScreen != 7 ) | 15881 if ( pCurrentScreen != 7 ) |
15891 { | 15882 { |
15892 if ( pCurrentScreen == 8 ) | 15883 if ( pCurrentScreen == 8 )// |
15893 { | 15884 { |
15894 if ( dword_507B00_spell_info_to_draw_in_popup ) | 15885 if ( dword_507B00_spell_info_to_draw_in_popup ) |
15895 DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1)); | 15886 DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1)); |
15896 } | 15887 } |
15897 goto LABEL_132; | 15888 goto LABEL_132; |
15898 } | 15889 } |
15899 LABEL_119: | 15890 LABEL_119: |
15900 if ( (signed int)pX > 467 | 15891 if ( (signed int)pX > 467 && pCurrentScreen != 14 ) |
15901 && pCurrentScreen != 14 ) | |
15902 { | 15892 { |
15903 LABEL_126: | 15893 LABEL_126: |
15904 identify_item(); | 15894 identify_item(); |
15905 goto LABEL_132; | 15895 goto LABEL_132; |
15906 } | 15896 } |
15925 if ( !dword_506364 | 15915 if ( !dword_506364 |
15926 || (signed int)pX < (signed int)pViewport->uViewportX | 15916 || (signed int)pX < (signed int)pViewport->uViewportX |
15927 || (signed int)pX > (signed int)pViewport->uViewportZ | 15917 || (signed int)pX > (signed int)pViewport->uViewportZ |
15928 || (signed int)pY < (signed int)pViewport->uViewportY | 15918 || (signed int)pY < (signed int)pViewport->uViewportY |
15929 || (signed int)pY > (signed int)pViewport->uViewportW | 15919 || (signed int)pY > (signed int)pViewport->uViewportW |
15930 || (v2 = (char *)sub_444564(), (a1.Hint = v2) == 0) ) | 15920 || (v2 = (char *)sub_444564(), (pWindow.Hint = v2) == 0) ) |
15931 goto LABEL_132; | 15921 goto LABEL_132; |
15932 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32); | 15922 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32); |
15933 v27 = v30 + 6.7553994e15; | 15923 v27 = v30 + 6.7553994e15; |
15934 v29 = (char *)LODWORD(v27); | 15924 v29 = (char *)LODWORD(v27); |
15935 a1.uFrameWidth = LODWORD(v27); | 15925 pWindow.uFrameWidth = LODWORD(v27); |
15936 a1.uFrameX = pX + 5; | 15926 pWindow.uFrameX = pX + 5; |
15937 a1.uFrameY = pY + 5; | 15927 pWindow.uFrameY = pY + 5; |
15938 goto LABEL_41; | 15928 goto LABEL_41; |
15939 } | 15929 } |
15940 if (GetCurrentMenuID() > 0) | 15930 if (GetCurrentMenuID() > 0) |
15941 goto LABEL_132; | 15931 goto LABEL_132; |
15942 | 15932 |
15943 if ( (signed int)pY > (signed int)pViewport->uViewportW ) | 15933 if ( (signed int)pY > (signed int)pViewport->uViewportW ) |
15944 { | 15934 { |
15945 a1.ptr_1C = (void *)((signed int)pX / 118); | 15935 pWindow.ptr_1C = (void *)((signed int)pX / 118); |
15946 if ( (signed int)pX / 118 < 4 ) | 15936 if ( (signed int)pX / 118 < 4 ) |
15947 { | 15937 { |
15948 a1.Hint = 0; | 15938 pWindow.Hint = 0; |
15949 a1.uFrameWidth = 400; | 15939 pWindow.uFrameWidth = 400; |
15950 a1.uFrameHeight = 200; | 15940 pWindow.uFrameHeight = 200; |
15951 a1.uFrameX = 38; | 15941 pWindow.uFrameX = 38; |
15952 a1.uFrameY = 60; | 15942 pWindow.uFrameY = 60; |
15953 pAudioPlayer->StopChannels(-1, -1); | 15943 pAudioPlayer->StopChannels(-1, -1); |
15954 a1.DrawQuickCharRecord(); | 15944 pWindow.DrawQuickCharRecord(); |
15955 } | 15945 } |
15956 goto LABEL_132; | 15946 goto LABEL_132; |
15957 } | 15947 } |
15958 if ( (signed int)pX > (signed int)pViewport->uViewportZ ) | 15948 if ( (signed int)pX > (signed int)pViewport->uViewportZ ) |
15959 { | 15949 { |
15960 if ( (signed int)pY >= 130 ) | 15950 if ( (signed int)pY >= 130 ) |
15961 { | 15951 { |
15962 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 ) | 15952 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 ) |
15963 { | 15953 { |
15964 a1.Hint = 0; | 15954 pWindow.Hint = 0; |
15965 a1.uFrameWidth = 400; | 15955 pWindow.uFrameWidth = 400; |
15966 a1.uFrameHeight = 200; | 15956 pWindow.uFrameHeight = 200; |
15967 a1.uFrameX = 38; | 15957 pWindow.uFrameX = 38; |
15968 a1.uFrameY = 60; | 15958 pWindow.uFrameY = 60; |
15969 pAudioPlayer->StopChannels(-1, -1); | 15959 pAudioPlayer->StopChannels(-1, -1); |
15970 a1._41D73D_draw_buff_tooltip(); | 15960 pWindow._41D73D_draw_buff_tooltip(); |
15971 goto LABEL_132; | 15961 goto LABEL_132; |
15972 } | 15962 } |
15973 if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 ) | 15963 if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 ) |
15974 { | 15964 { |
15975 if ( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 ) | 15965 if ( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 ) |
15983 v3 = 0; | 15973 v3 = 0; |
15984 } | 15974 } |
15985 sub_416B01(v3); | 15975 sub_416B01(v3); |
15986 goto LABEL_132; | 15976 goto LABEL_132; |
15987 } | 15977 } |
15988 a1.Hint = _4443D5_GetMinimapRightClickText(); | 15978 pWindow.Hint = _4443D5_GetMinimapRightClickText(); |
15989 a1.uFrameWidth = 256; | 15979 pWindow.uFrameWidth = 256; |
15990 a1.uFrameX = 130; | 15980 pWindow.uFrameX = 130; |
15991 a1.uFrameY = 140; | 15981 pWindow.uFrameY = 140; |
15992 LABEL_41: | 15982 LABEL_41: |
15993 a1.uFrameHeight = 64; | 15983 pWindow.uFrameHeight = 64; |
15994 pAudioPlayer->StopChannels(-1, -1); | 15984 pAudioPlayer->StopChannels(-1, -1); |
15995 LABEL_42: | 15985 LABEL_42: |
15996 a1.DrawMessageBox(0); | 15986 pWindow.DrawMessageBox(0); |
15997 goto LABEL_132; | 15987 goto LABEL_132; |
15998 } | 15988 } |
15999 a1.Hint = 0; | 15989 pWindow.Hint = 0; |
16000 a1.uFrameWidth = 320; | 15990 pWindow.uFrameWidth = 320; |
16001 a1.uFrameHeight = 320; | 15991 pWindow.uFrameHeight = 320; |
16002 v4 = pX - 350; | 15992 v4 = pX - 350; |
16003 if ( (signed int)pX <= 320 ) | 15993 if ( (signed int)pX <= 320 ) |
16004 v4 = pX + 30; | 15994 v4 = pX + 30; |
16005 a1.uFrameX = v4; | 15995 pWindow.uFrameX = v4; |
16006 a1.uFrameY = 40; | 15996 pWindow.uFrameY = 40; |
16007 if ( pRenderer->pRenderD3D ) | 15997 if ( pRenderer->pRenderD3D ) |
16008 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val(); | 15998 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val(); |
16009 else | 15999 else |
16010 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; | 16000 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; |
16011 v6 = (unsigned __int16)v5; | 16001 v6 = (unsigned __int16)v5; |
16013 { | 16003 { |
16014 if ( (v6 & 7) == 3 ) | 16004 if ( (v6 & 7) == 3 ) |
16015 { | 16005 { |
16016 if ( pRenderer->uNumSceneBegins ) | 16006 if ( pRenderer->uNumSceneBegins ) |
16017 { | 16007 { |
16018 a1.DrawMessageBox(1); | 16008 pWindow.DrawMessageBox(1); |
16019 MonsterPopup_Draw(v6 >> 3, &a1); | 16009 MonsterPopup_Draw(v6 >> 3, &pWindow); |
16020 } | 16010 } |
16021 else | 16011 else |
16022 { | 16012 { |
16023 pRenderer->BeginScene(); | 16013 pRenderer->BeginScene(); |
16024 a1.DrawMessageBox(1); | 16014 pWindow.DrawMessageBox(1); |
16025 MonsterPopup_Draw(v6 >> 3, &a1); | 16015 MonsterPopup_Draw(v6 >> 3, &pWindow); |
16026 pRenderer->EndScene(); | 16016 pRenderer->EndScene(); |
16027 } | 16017 } |
16028 } | 16018 } |
16029 goto LABEL_132; | 16019 goto LABEL_132; |
16030 } | 16020 } |
16034 v8 = &pLayingItems[v7].stru_24; | 16024 v8 = &pLayingItems[v7].stru_24; |
16035 } | 16025 } |
16036 GameUI_DrawItemInfo(v8); | 16026 GameUI_DrawItemInfo(v8); |
16037 goto LABEL_132; | 16027 goto LABEL_132; |
16038 } | 16028 } |
16039 if ( pCurrentScreen == 13 ) | 16029 if ( pCurrentScreen == 13 )// |
16040 { | 16030 { |
16041 if ( (signed int)pY < 345 && (signed int)pX < 469 ) | 16031 if ( (signed int)pY < 345 && (signed int)pX < 469 ) |
16042 sub_4B1A2D(); | 16032 sub_4B1A2D(); |
16043 goto LABEL_132; | 16033 goto LABEL_132; |
16044 } | 16034 } |
16049 if ( pCurrentScreen != 21 ) | 16039 if ( pCurrentScreen != 21 ) |
16050 { | 16040 { |
16051 v11 = pCurrentScreen == 23; | 16041 v11 = pCurrentScreen == 23; |
16052 goto LABEL_125; | 16042 goto LABEL_125; |
16053 } | 16043 } |
16054 a1.Hint = 0; | 16044 pWindow.Hint = 0; |
16055 v12 = pGUIWindow_CurrentMenu->pControlsHead; | 16045 pButton = pGUIWindow_CurrentMenu->pControlsHead; |
16056 if ( !v12 ) | 16046 if ( !pButton ) |
16057 goto LABEL_132; | 16047 goto LABEL_132; |
16058 v13 = pY; | 16048 v13 = pY; |
16059 v14 = v29; | 16049 pStr = v29; |
16060 while ( 1 ) | 16050 while ( 1 ) |
16061 { | 16051 { |
16062 if ( v12->uButtonType != 1 && v12->uButtonType != 3 | 16052 if ( pButton->uButtonType != 1 && pButton->uButtonType != 3 || (signed int)pX < (signed int)pButton->uX || (signed int)pX > (signed int)pButton->uZ |
16063 || (signed int)pX < (signed int)v12->uX | 16053 || (signed int)v13 < (signed int)pButton->uY || (signed int)v13 > (signed int)pButton->uW ) |
16064 || (signed int)pX > (signed int)v12->uZ | |
16065 || (signed int)v13 < (signed int)v12->uY | |
16066 || (signed int)v13 > (signed int)v12->uW ) | |
16067 goto LABEL_117; | 16054 goto LABEL_117; |
16068 v15 = v12->uControlID; | 16055 pControlID = pButton->uControlID; |
16069 if ( v15 <= 65 ) | 16056 if ( pControlID <= 65 ) |
16070 { | 16057 { |
16071 if ( v15 == 65 ) | 16058 if ( pControlID == 65 ) |
16072 { | 16059 { |
16073 a1.Hint = pClassDescriptions[v12->uControlParam]; | 16060 pWindow.Hint = pClassDescriptions[pButton->uControlParam]; |
16074 v14 = pClassNames[v12->uControlParam]; | 16061 pStr = pClassNames[pButton->uControlParam]; |
16075 } | 16062 } |
16076 else | 16063 else |
16077 { | 16064 { |
16078 if ( v15 ) | 16065 if ( pControlID ) |
16079 { | 16066 { |
16080 v16 = v15 - 62; | 16067 v16 = pControlID - 62; |
16081 if ( v16 ) | 16068 if ( v16 ) |
16082 { | 16069 { |
16083 v17 = v16 - 1; | 16070 v17 = v16 - 1; |
16084 if ( v17 ) | 16071 if ( v17 ) |
16085 { | 16072 { |
16086 if ( v17 == 1 ) | 16073 if ( v17 == 1 ) |
16087 { | 16074 { |
16088 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder( | 16075 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->uControlParam + 4); |
16089 v12->uControlParam + 4); | 16076 pStr = pSkillNames[v18]; |
16090 v14 = pSkillNames[v18]; | 16077 pWindow.Hint = pSkillDesc[v18]; |
16091 a1.Hint = pSkillDesc[v18]; | |
16092 v13 = pY; | 16078 v13 = pY; |
16093 } | 16079 } |
16094 goto LABEL_117; | 16080 goto LABEL_117; |
16095 } | 16081 } |
16096 v14 = pGlobalTXT_LocalizationStrings[668]; | 16082 pStr = pGlobalTXT_LocalizationStrings[668];// |
16097 v19 = pGlobalTXT_LocalizationStrings[669]; | 16083 pStr2 = pGlobalTXT_LocalizationStrings[669];//" , " |
16098 } | 16084 } |
16099 else | 16085 else |
16100 { | 16086 { |
16101 v14 = pGlobalTXT_LocalizationStrings[670]; | 16087 pStr = pGlobalTXT_LocalizationStrings[670];// |
16102 v19 = pGlobalTXT_LocalizationStrings[671]; | 16088 pStr2 = pGlobalTXT_LocalizationStrings[671];//" , " |
16103 } | 16089 } |
16104 goto LABEL_116; | 16090 goto LABEL_116; |
16105 } | 16091 } |
16106 a1.Hint = pAttributeDescriptions[(signed int)v12->uControlParam % 7]; | 16092 pWindow.Hint = pAttributeDescriptions[(signed int)pButton->uControlParam % 7]; |
16107 v14 = aAttributeNames[(signed int)v12->uControlParam % 7]; | 16093 pStr = aAttributeNames[(signed int)pButton->uControlParam % 7]; |
16108 } | 16094 } |
16109 goto LABEL_117; | 16095 goto LABEL_117; |
16110 } | 16096 } |
16111 if ( v15 == 66 ) | 16097 if ( pControlID == 66 ) |
16112 { | 16098 { |
16113 v19 = pGlobalTXT_LocalizationStrings[664]; | 16099 pStr2 = pGlobalTXT_LocalizationStrings[664];// . |
16114 v14 = pGlobalTXT_LocalizationStrings[665]; | 16100 pStr = pGlobalTXT_LocalizationStrings[665];// |
16115 goto LABEL_116; | 16101 goto LABEL_116; |
16116 } | 16102 } |
16117 if ( v15 == 67 ) | 16103 if ( pControlID == 67 ) |
16118 { | 16104 { |
16119 v19 = pGlobalTXT_LocalizationStrings[666]; | 16105 pStr2 = pGlobalTXT_LocalizationStrings[666];// . |
16120 v14 = pGlobalTXT_LocalizationStrings[667]; | 16106 pStr = pGlobalTXT_LocalizationStrings[667];// |
16121 goto LABEL_116; | 16107 goto LABEL_116; |
16122 } | 16108 } |
16123 if ( v15 > 71 ) | 16109 if ( pControlID > 71 ) |
16124 break; | 16110 break; |
16125 LABEL_117: | 16111 LABEL_117: |
16126 v12 = v12->pNext; | 16112 pButton = pButton->pNext; |
16127 if ( !v12 ) | 16113 if ( !pButton ) |
16128 goto LABEL_112; | 16114 goto LABEL_112; |
16129 } | 16115 } |
16130 if ( v15 > 75 ) | 16116 if ( pControlID > 75 ) |
16131 { | 16117 { |
16132 if ( v15 == 118 ) | 16118 if ( pControlID == 118 ) |
16133 { | 16119 { |
16134 v20 = v12->uControlParam; | 16120 v20 = pButton->uControlParam; |
16135 v14 = pParty->pPlayers[v20].pName; | 16121 pStr = pParty->pPlayers[v20].pName; |
16136 v19 = pClassDescriptions[pParty->pPlayers[v20].uClass]; | 16122 pStr2 = pClassDescriptions[pParty->pPlayers[v20].uClass]; |
16137 LABEL_116: | 16123 LABEL_116: |
16138 a1.Hint = v19; | 16124 pWindow.Hint = pStr2; |
16139 goto LABEL_117; | 16125 goto LABEL_117; |
16140 } | 16126 } |
16141 goto LABEL_117; | 16127 goto LABEL_117; |
16142 } | 16128 } |
16143 v21 = pParty->pPlayers[v12->uControlParam].GetSkillIdxByOrder(v15 - 72); | 16129 v21 = pParty->pPlayers[pButton->uControlParam].GetSkillIdxByOrder(pControlID - 72); |
16144 v13 = v21; | 16130 v13 = v21; |
16145 pY = v21; | 16131 pY = v21; |
16146 if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 ) | 16132 if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 ) |
16147 goto LABEL_117; | 16133 goto LABEL_117; |
16148 v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21); | 16134 v22 = CharacterUI_GetSkillDescText(pButton->uControlParam, (enum PLAYER_SKILL_TYPE)v21); |
16149 strcpy(pTmpBuf2, v22); | 16135 strcpy(pTmpBuf2, v22); |
16150 a1.Hint = pTmpBuf2; | 16136 pWindow.Hint = pTmpBuf2; |
16151 v14 = pSkillNames[pY]; | 16137 pStr = pSkillNames[pY]; |
16152 LABEL_112: | 16138 LABEL_112: |
16153 v23 = a1.Hint; | 16139 v23 = pWindow.Hint; |
16154 if ( a1.Hint ) | 16140 if ( pWindow.Hint ) |
16155 { | 16141 { |
16156 v24 = a1.Hint; | 16142 v24 = pWindow.Hint; |
16157 a1.Hint = 0; | 16143 pWindow.Hint = 0; |
16158 a1.uFrameWidth = 384; | 16144 pWindow.uFrameWidth = 384; |
16159 a1.uFrameHeight = 256; | 16145 pWindow.uFrameHeight = 256; |
16160 a1.uFrameX = 128; | 16146 pWindow.uFrameX = 128; |
16161 a1.uFrameY = 40; | 16147 pWindow.uFrameY = 40; |
16162 a1.uFrameHeight = pFontSmallnum->CalcTextHeight(v24, &a1, 24, 0) | 16148 pWindow.uFrameHeight = pFontSmallnum->CalcTextHeight(v24, &pWindow, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; |
16163 + 2 * LOBYTE(pFontLucida->uFontHeight) | 16149 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; |
16164 + 24; | 16150 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; |
16165 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | 16151 pWindow.DrawMessageBox(0); |
16166 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1; | 16152 pWindow.uFrameX += 12; |
16167 a1.DrawMessageBox(0); | 16153 pWindow.uFrameWidth -= 24; |
16168 a1.uFrameX += 12; | 16154 pWindow.uFrameY += 12; |
16169 a1.uFrameWidth -= 24; | 16155 pWindow.uFrameHeight -= 12; |
16170 a1.uFrameY += 12; | 16156 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; |
16171 a1.uFrameHeight -= 12; | 16157 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; |
16172 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | 16158 v25 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0x9B); |
16173 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1; | 16159 sprintf(pTmpBuf, format_4E2D80, v25, pStr); |
16174 v25 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 16160 pWindow.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3); |
16175 sprintf(pTmpBuf, format_4E2D80, v25, v14); | 16161 pWindow.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v23, 0, 0, 0); |
16176 a1.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u); | |
16177 a1.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v23, 0, 0, 0); | |
16178 } | 16162 } |
16179 LABEL_132: | 16163 LABEL_132: |
16180 dword_507BF0_is_there_popup_onscreen = 1; | 16164 dword_507BF0_is_there_popup_onscreen = 1; |
16181 viewparams->bRedrawGameUI = 1; | 16165 viewparams->bRedrawGameUI = 1; |
16182 } | 16166 } |