Mercurial > mm7
diff UiGame.cpp @ 836:b66abf8b7d50
Слияние
author | Ritor1 |
---|---|
date | Wed, 27 Mar 2013 23:20:27 +0600 |
parents | dfd683c4f538 |
children | ceef50611567 710cf848ad24 |
line wrap: on
line diff
--- a/UiGame.cpp Wed Mar 27 23:20:14 2013 +0600 +++ b/UiGame.cpp Wed Mar 27 23:20:27 2013 +0600 @@ -6,7 +6,6 @@ #include "Game.h" #include "GUIWindow.h" #include "GUIFont.h" -#include "GUIButton.h" #include "GUIProgressBar.h" #include "Party.h" #include "AudioPlayer.h" @@ -292,7 +291,7 @@ char v3; // dl@1 GUIWindow *v4; // ecx@2 GUIButton *result; // eax@2 - int v6; // edx@12 + //int v6; // edx@12 v1 = toupper(uHotkey); v2 = uNumVisibleWindows; @@ -306,8 +305,7 @@ { if ( result->uHotkey == v3 ) { - v6 = result->uControlParam; - pMessageQueue_50CBD0->AddMessage((UIMessageType)result->uControlID, v6, 0); + pMessageQueue_50CBD0->AddMessage(result->msg, result->msg_param, 0); /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) { pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)result->uControlID; @@ -511,7 +509,7 @@ unsigned __int8 v9; // c0@23 unsigned __int8 v10; // c3@23 enum UIMessageType pMessageType1; // esi@24 - int v12; // edx@25 + //int v12; // edx@25 char *v13; // ecx@28 int v14; // eax@41 ItemGen *pItemGen; // ecx@44 @@ -535,9 +533,9 @@ //unsigned __int8 v33; // c0@109 //unsigned __int8 v34; // c3@109 enum UIMessageType pMessageType2; // esi@110 - int v36; // edx@111 + //int v36; // edx@111 enum UIMessageType pMessageType3; // edx@117 - int v38; // ecx@118 + //int v38; // ecx@118 const char *v39; // [sp-8h] [bp-E8h]@20 char *v40; // [sp-8h] [bp-E8h]@83 int v41; // [sp-4h] [bp-E4h]@20 @@ -858,16 +856,7 @@ pMessageType1 = (UIMessageType)pButton->field_1C; if ( pMessageType1 ) { - v12 = pButton->uControlParam; - pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0); - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - //LABEL_27: - ++pMessageQueue_50CBD0->uNumMessages; - }*/ + pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0); } //LABEL_28: v13 = pButton->pButtonName; @@ -888,22 +877,10 @@ { if ( (double)(signed int)pButton->uHeight != 0.0 ) { - //UNDEF(v8); - //if ( v9 | v10 ) - //goto LABEL_24; - //{ pMessageType1 = (UIMessageType)pButton->field_1C; if ( pMessageType1 ) { - v12 = pButton->uControlParam; - pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0); - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ + pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0); } v13 = pButton->pButtonName; sub_41C0B8_set_status_string(v13); @@ -923,7 +900,7 @@ { //LABEL_19: pPlayer = pPlayers[uActiveCharacter]; - v5 = LOBYTE(pPlayer->pActiveSkills[pButton->uControlParam]); + v5 = LOBYTE(pPlayer->pActiveSkills[pButton->msg_param]); v6 = pPlayer->uSkillPoints; v7 = (v5 & 0x3F) + 1; if ( v6 < v7 ) @@ -1066,15 +1043,8 @@ uLastPointedObjectID = 1; return; } - v38 = pButton->uControlParam; - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType3; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v38; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ - pMessageQueue_50CBD0->AddMessage(pMessageType3, v38, 0); + + pMessageQueue_50CBD0->AddMessage(pMessageType3, pButton->msg_param, 0); //goto LABEL_131; uLastPointedObjectID = 1; return; @@ -1098,22 +1068,8 @@ //{ pMessageType2 = (UIMessageType)pButton->field_1C; if ( pMessageType2 != 0 ) - { - v36 = pButton->uControlParam; - if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->AddMessage(pMessageType2, v36, 0); - /*pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType2; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v36; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - //goto LABEL_27; - ++pMessageQueue_50CBD0->uNumMessages;*/ - v13 = pButton->pButtonName; - sub_41C0B8_set_status_string(v13); - uLastPointedObjectID = 1; - return; - } - } + pMessageQueue_50CBD0->AddMessage(pMessageType2, pButton->msg_param, 0); + //goto LABEL_28; v13 = pButton->pButtonName; sub_41C0B8_set_status_string(v13); @@ -1133,7 +1089,7 @@ //goto LABEL_19; { pPlayer = pPlayers[uActiveCharacter]; - v5 = LOBYTE(pPlayer->pActiveSkills[pButton->uControlParam]); + v5 = LOBYTE(pPlayer->pActiveSkills[pButton->msg_param]); v6 = pPlayer->uSkillPoints; v7 = (v5 & 0x3F) + 1; if ( v6 < v7 ) @@ -1291,41 +1247,41 @@ pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308, (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureWidth : 24), (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureHeight : 26), - 1, 0, 0x73u, 0, 0x53u, pGlobalTXT_LocalizationStrings[216],// Stats + 1, 0, UIMSG_73, 0, 0x53u, pGlobalTXT_LocalizationStrings[216],// Stats (Texture *)(papredoll_dbrds[10] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[10]] : 0), papredoll_dbrds[9] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[9]] : 0, 0); pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308, (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureWidth : 24), (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureHeight : 26), - 1, 0, 0x72u, 0, 0x4Bu, pGlobalTXT_LocalizationStrings[205],//Skills + 1, 0, UIMSG_72, 0, 0x4Bu, pGlobalTXT_LocalizationStrings[205],//Skills (Texture *)(papredoll_dbrds[8] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[8]] : 0), papredoll_dbrds[7] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[7]] : 0, 0); pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308, (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureWidth : 24), (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureHeight : 26), - 1, 0, 0x74u, 0, 0x49u, pGlobalTXT_LocalizationStrings[120], //Inventory + 1, 0, UIMSG_74, 0, 0x49u, pGlobalTXT_LocalizationStrings[120], //Inventory (Texture *)(papredoll_dbrds[6] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[6]] : 0), papredoll_dbrds[5] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[5]] : 0, 0); pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308, (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureWidth : 24), (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureHeight : 26), - 1, 0, 0x75u, 0, 0x41u, pGlobalTXT_LocalizationStrings[22], //Awards + 1, 0, UIMSG_75, 0, 0x41u, pGlobalTXT_LocalizationStrings[22], //Awards (Texture *)(papredoll_dbrds[4] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[4]] : 0), papredoll_dbrds[3] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[3]] : 0, 0); pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308, (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureWidth : 24), (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureHeight : 26), - 1, 0, 0xA8u, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit + 1, 0, UIMSG_A8, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0), papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0, 0); - pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, 0x78u, 0, 0, "", 0); - pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 0x1Eu, 0x1Eu, 1, 0, 0x55u, 0, 0, pGlobalTXT_LocalizationStrings[64], 0); - pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, 0x85u, 0, 0, "", 0); - pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0); - pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0); - pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0); - pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0); - pWindow->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0); + pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); + pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 0x1Eu, 0x1Eu, 1, 0, UIMSG_MainMenu_ShowLoadWindow, 0, 0, pGlobalTXT_LocalizationStrings[64], 0); + pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_85, 0, 0, "", 0); + pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); + pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); + pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); + pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); + pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9u, "", 0); FillAwardsData(); return pWindow; } @@ -1333,7 +1289,7 @@ //----- (004921C1) -------------------------------------------------------- void GameUI_DrawPortraits(unsigned int _this) - { +{ Texture *pFace; // eax@10 unsigned int v7; // eax@17 PlayerFrame *pFrame; // eax@21