Mercurial > might-and-magic-trilogy
diff mm7_4.cpp @ 206:c38d2f00e3ad
9.01.13
author | Ritor1 |
---|---|
date | Wed, 09 Jan 2013 17:32:10 +0600 |
parents | 6d982dfab925 |
children |
line wrap: on
line diff
--- a/mm7_4.cpp Tue Jan 08 17:29:13 2013 +0600 +++ b/mm7_4.cpp Wed Jan 09 17:32:10 2013 +0600 @@ -3108,9 +3108,7 @@ { sprintf(pContainer, "NPC%03d", pNPCStats->pNPCData[(unsigned __int8)v7 + 499].uPortraitID); v15 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed( - pHiredNPCsIconsOffsetsX[v23], - pHiredNPCsIconsOffsetsY[v23], + pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], (Texture *)(v15 != -1 ? &pIcons_LOD->pTextures[v15] : 0)); } else @@ -5848,14 +5846,14 @@ //----- (00497526) -------------------------------------------------------- bool __cdecl PlayerCreationUI_Loop() { - RGBTexture *v0; // ebx@1 + RGBTexture *pTexture; // ebx@1 UINT v1; // esi@1 unsigned int v2; // ecx@3 LONG uMouseX; // edi@6 LONG uMouseY; // eax@6 GUIButton *pControlsHead; // edx@6 - unsigned int v6; // ecx@7 - int v7; // esi@12 + unsigned int pNumMessage; // ecx@7 + int pControlParam; // esi@12 signed int v8; // edi@30 int v9; // edx@31 char *v10; // ebx@37 @@ -5877,7 +5875,7 @@ POINT v24; // [sp+78h] [bp-8h]@6 Player *pPlayer; - v0 = &pTexture_PCX; + pTexture = &pTexture_PCX; v1 = 0; v26 = 0; pTexture_PCX.Release(); @@ -5897,19 +5895,20 @@ pControlsHead = pGUIWindow_CurrentMenu->pControlsHead; if ( pControlsHead != (GUIButton *)v1 ) { - v6 = pMessageQueue_50CBD0->uNumMessages; + pNumMessage = pMessageQueue_50CBD0->uNumMessages; do { - if ( uMouseX >= (signed int)pControlsHead->uX && uMouseX <= (signed int)pControlsHead->uZ && uMouseY >= (signed int)pControlsHead->uY && uMouseY <= (signed int)pControlsHead->uW )//mouse movement - { - v7 = pControlsHead->uControlParam; - if ( (signed int)v6 < 40 ) - { - pMessageQueue_50CBD0->pMessages[v6].eType = (UIMessageType)pControlsHead->field_1C; - v0 = &pTexture_PCX; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v7; + if ( uMouseX >= (signed int)pControlsHead->uX && uMouseX <= (signed int)pControlsHead->uZ + && uMouseY >= (signed int)pControlsHead->uY && uMouseY <= (signed int)pControlsHead->uW )//mouse movement + { + pControlParam = pControlsHead->uControlParam; + if ( (signed int)pNumMessage < 40 ) + { + pMessageQueue_50CBD0->pMessages[pNumMessage].eType = (UIMessageType)pControlsHead->field_1C; + pTexture = &pTexture_PCX; + pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = pControlParam; *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - v6 = pMessageQueue_50CBD0->uNumMessages + 1; + pNumMessage = pMessageQueue_50CBD0->uNumMessages + 1; ++pMessageQueue_50CBD0->uNumMessages; } v1 = 0; @@ -5951,7 +5950,7 @@ } } } - v0->Release(); + pTexture->Release(); pGUIWindow_CurrentMenu->Release(); pIcons_LOD->_4114F2(); v20[0] = 0; @@ -6011,37 +6010,48 @@ { case 0: v18 = 61; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 1: v18 = 1; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 2: v18 = 15; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 3: v18 = 23; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 4: v18 = 31; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 5: v18 = 47; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 6: v18 = 50; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 8: v18 = 84; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 9: v18 = 66; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 10: v18 = 71; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 11: v18 = 76; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 12: pPlayer->AddItem(-1, 0x191); pPlayer->spellbook.pFireSpellbook.bIsSpellbookAvailable = 1; @@ -6078,13 +6088,14 @@ case 36: pPlayer->AddItem(-1, 0xDC); v18 = 5 * (rand() % 3 + 40); - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 30: v18 = 115; - goto LABEL_69; + pPlayer->AddItem(-1, v18); + break; case 31: v18 = 110; -LABEL_69: pPlayer->AddItem(-1, v18); break; default: