Mercurial > mm7
diff mm7_5.cpp @ 1296:c423f946dc99
moving files continue
author | Ritor1 |
---|---|
date | Tue, 18 Jun 2013 17:28:11 +0600 |
parents | fbb7428fa58c |
children | 5450af4f57ef |
line wrap: on
line diff
--- a/mm7_5.cpp Mon Jun 17 17:34:01 2013 +0600 +++ b/mm7_5.cpp Tue Jun 18 17:28:11 2013 +0600 @@ -10377,166 +10377,6 @@ } } - - - - -//----- (004175C0) -------------------------------------------------------- -void UI_OnMouseLeftClick(int *pXY) -{ - int *pXY_; // esi@1 - signed int y; // eax@7 - signed int x; // ecx@7 - unsigned int v4; // eax@11 - signed int v5; // eax@17 - signed int v6; // esi@19 - int v7; // esi@30 - GUIWindow *v8; // edx@31 - GUIButton *i; // esi@37 - signed int v10; // eax@50 - int v11; // ecx@52 - unsigned int pX; // [sp+14h] [bp-8h]@7 - unsigned int pY; // [sp+18h] [bp-4h]@7 - - pXY_ = pXY; - if ( pCurrentScreen == SCREEN_VIDEO - || sub_4637E0_is_there_popup_onscreen() ) - return; - if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 ) - { - sub_4452BB(); - return; - } - if ( pXY_ ) - { - x = *pXY_; - y = pXY_[1]; - pX = *pXY_; - pY = y; - } - else - { - pMouse->GetClickPos(&pX, &pY); - y = pY; - x = pX; - } - if ( pCurrentScreen != SCREEN_GAME || !dword_507B98_ctrl_pressed ) - goto LABEL_30; - v4 = GetCurrentMenuID(); - x = pX; - if ( (v4 & 0x80000000u) == 0 - || (signed int)pX < (signed int)pViewport->uViewportTL_X - || (signed int)pX > (signed int)pViewport->uViewportBR_X ) - { - y = pY; -LABEL_30: - v7 = uNumVisibleWindows; - if ( uNumVisibleWindows < 0 ) - return; - while ( 1 ) - { - //v8 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[v7]]; - v8 = &pWindowList[pVisibleWindowsIdxs[v7] - 1]; - if ( x >= (signed int)v8->uFrameX ) - { - if ( x <= (signed int)v8->uFrameZ && y >= (signed int)v8->uFrameY && y <= (signed int)v8->uFrameW ) - break; - } - --v7; - if ( v7 < 0 ) - return; - } - for ( i = v8->pControlsHead; ; i = i->pNext ) - { - if ( !i ) - return; - if ( i->uButtonType == 1 ) - goto LABEL_41; - if ( i->uButtonType != 2 ) - break; - if ( (signed int)(signed __int64)sqrt((double)((x - i->uX) * (x - i->uX) + (y - i->uY) * (y - i->uY))) < (signed int)i->uWidth ) - goto LABEL_50; - y = pY; - x = pX; -LABEL_45: - ; - } - if ( i->uButtonType != 3 ) - goto LABEL_45; -LABEL_41: - if ( x >= (signed int)i->uX && x <= (signed int)i->uZ && y >= (signed int)i->uY && y <= (signed int)i->uW ) - { -LABEL_50: - i->field_2C_is_pushed = 1; - v10 = pMessageQueue_50CBD0->uNumMessages; - if ( pMessageQueue_50CBD0->uNumMessages ) - { - v10 = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - } - //v11 = i->uControlParam; - pMessageQueue_50CBD0->AddMessage(i->msg, i->msg_param, 0); - return; - } - goto LABEL_45; - } - y = pY; - if ( (signed int)pY < (signed int)pViewport->uViewportTL_Y || (signed int)pY > (signed int)pViewport->uViewportBR_Y ) - goto LABEL_30; - if ( pRenderer->pRenderD3D ) - v5 = pGame->pVisInstance->get_picked_object_zbuf_val(); - else - v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; - v6 = (unsigned __int16)v5; - if (PID_TYPE(v5) == OBJECT_Actor - && uActiveCharacter - && v5 < 0x2000000 - && pPlayers[uActiveCharacter]->CanAct() - && pPlayers[uActiveCharacter]->CanSteal() ) - { - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_1B; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6 >> 3; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ - pMessageQueue_50CBD0->AddMessage(UIMSG_1B, PID_ID(v6), 0); - - if ( pParty->bTurnBasedModeOn == 1 ) - { - if ( pTurnEngine->field_4 == 3 ) - pTurnEngine->field_18 |= 8u; - } - } -} - - - -//----- (00417871) -------------------------------------------------------- -void __thiscall sub_417871(int *pXY) -{ - POINT v1; // [sp+0h] [bp-18h]@5 - POINT a2; // [sp+8h] [bp-10h]@5 - unsigned int pY; // [sp+10h] [bp-8h]@3 - unsigned int pX; // [sp+14h] [bp-4h]@3 - - if ( !pRenderer->pRenderD3D ) - { - if ( pXY ) - { - pX = *pXY; - pY = pXY[1]; - } - else - { - pMouse->GetClickPos(&pX, &pY); - } - pMouse->GetCursorPos(&a2); - pMouse->GetCursorPos(&v1); - } -} - //----- (004178FE) -------------------------------------------------------- unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2) { @@ -10691,74 +10531,4 @@ return red; } return white; -} - - -//----- (00419220) -------------------------------------------------------- -void __cdecl sub_419220() -{ - GUIButton *i; // eax@2 - - if ( !dword_507CBC ) - { - dword_507CBC = 1; - for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext ) - { - if ( i->msg == UIMSG_InventoryLeftClick ) - { - dword_50698C_uX = i->uX; - dword_506988_uY = i->uY; - dword_506984_uZ = i->uZ; - dword_506980_uW = i->uW; - i->uW = 0; - i->uZ = 0; - i->uY = 0; - i->uX = 0; - } - } - pBtn_Up = pGUIWindow_CurrentMenu->CreateButton(438, 46, - pIcons_LOD->GetTexture(uTextureID_ar_up_up)->uTextureWidth, - pIcons_LOD->GetTexture(uTextureID_ar_up_up)->uTextureHeight, - 1, 0, UIMSG_ClickAwardsUpBtn, 0, 0, "", - pIcons_LOD->GetTexture(uTextureID_ar_up_up), - pIcons_LOD->GetTexture(uTextureID_ar_up_dn), 0); - pBtn_Down = pGUIWindow_CurrentMenu->CreateButton(438, 292, - pIcons_LOD->GetTexture(uTextureID_ar_dn_up)->uTextureWidth, - pIcons_LOD->GetTexture(uTextureID_ar_dn_up)->uTextureHeight, - 1, 0, UIMSG_ClickAwardsDownBtn, 0, 0, "", - pIcons_LOD->GetTexture(uTextureID_ar_dn_up), - pIcons_LOD->GetTexture(uTextureID_ar_dn_dn), 0); - ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton(440, 62, 16, 232, 1, 0, UIMSG_ClickAwardScrollBar, 0, 0, "", 0); - } -} - - - -//----- (00419379) -------------------------------------------------------- -void __cdecl sub_419379() -{ - GUIButton *pButton; // esi@2 - - if ( dword_507CBC ) - { - dword_507CBC = 0; - ptr_507BA4->Release(); - pBtn_Up->Release(); - pBtn_Down->Release(); - pBtn_Down = 0; - pBtn_Up = 0; - for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext ) - { - if ( pButton->msg == UIMSG_InventoryLeftClick ) - { - pButton->uX = dword_50698C_uX; - pButton->uY = dword_506988_uY; - pButton->uZ = dword_506984_uZ; - pButton->uW = dword_506980_uW; - pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(1, 0, 0, 0); - } - } - } -} - - +} \ No newline at end of file