comparison mm7_4.cpp @ 205:6d982dfab925

8.01.13
author Ritor1
date Tue, 08 Jan 2013 17:29:13 +0600
parents 11a199790ce0
children c38d2f00e3ad
comparison
equal deleted inserted replaced
204:22730e77fa32 205:6d982dfab925
3160 3160
3161 3161
3162 //----- (004921C1) -------------------------------------------------------- 3162 //----- (004921C1) --------------------------------------------------------
3163 void GameUI_DrawPortraits(unsigned int _this) 3163 void GameUI_DrawPortraits(unsigned int _this)
3164 { 3164 {
3165 Texture *v4; // eax@10 3165 Texture *pFace; // eax@10
3166 unsigned int v7; // eax@17 3166 unsigned int v7; // eax@17
3167 PlayerFrame *v8; // eax@21 3167 PlayerFrame *pFrame; // eax@21
3168 unsigned int v9; // eax@27 3168 unsigned int v9; // eax@27
3169 bool v10; // eax@33 3169 bool v10; // eax@33
3170 bool v11; // edi@40 3170 bool v11; // edi@40
3171 bool v12; // edx@43 3171 bool v12; // edx@43
3172 bool v13; // ecx@46 3172 bool v13; // ecx@46
3173 int v16; // eax@57 3173 int v16; // eax@57
3174 int v19; // eax@62 3174 int v19; // eax@62
3175 Texture *v20; // [sp-4h] [bp-1Ch]@27 3175 Texture *pPortrait; // [sp-4h] [bp-1Ch]@27
3176 unsigned int v22; // [sp+14h] [bp-4h]@1 3176 unsigned int v22; // [sp+14h] [bp-4h]@1
3177 3177
3178 v22 = _this; 3178 v22 = _this;
3179 if ( qword_A750D8 ) 3179 if ( qword_A750D8 )
3180 { 3180 {
3191 { 3191 {
3192 auto pPlayer = pParty->pPlayers + i; 3192 auto pPlayer = pParty->pPlayers + i;
3193 3193
3194 if (pPlayer->Eradicated()) 3194 if (pPlayer->Eradicated())
3195 { 3195 {
3196 v4 = pTexture_PlayerFaceEradicated; 3196 pFace = pTexture_PlayerFaceEradicated;
3197 LABEL_27: 3197 LABEL_27:
3198 v20 = v4; 3198 pPortrait = pFace;
3199 v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i]; 3199 v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i];
3200 if ( pParty->pPartyBuffs[11].uExpireTime ) 3200 if ( pParty->pPartyBuffs[11].uExpireTime )
3201 pRenderer->_4A6E7E(v9, 0x183u, v20); 3201 pRenderer->_4A6E7E(v9, 0x183u, pPortrait);
3202 else 3202 else
3203 pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, v20); 3203 pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, pPortrait);
3204 auto _v1 = 0; 3204 auto _v1 = 0;
3205 v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0; 3205 v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0;
3206 if (pPlayer->pPlayerBuffs[1].uExpireTime > 0) 3206 if (pPlayer->pPlayerBuffs[1].uExpireTime > 0)
3207 _v1 = 1; 3207 _v1 = 1;
3208 v11 = pPlayer->pPlayerBuffs[8].uExpireTime > 0; 3208 v11 = pPlayer->pPlayerBuffs[8].uExpireTime > 0;
3212 sub_441A4E(i); 3212 sub_441A4E(i);
3213 goto LABEL_50; 3213 goto LABEL_50;
3214 } 3214 }
3215 if (pPlayer->Dead()) 3215 if (pPlayer->Dead())
3216 { 3216 {
3217 v4 = pTexture_PlayerFaceDead; 3217 pFace = pTexture_PlayerFaceDead;
3218 goto LABEL_27; 3218 goto LABEL_27;
3219 } 3219 }
3220
3221 v7 = 0; 3220 v7 = 0;
3222 for (uint j = 0; j < pPlayerFrameTable->uNumFrames; ++j) 3221 for (uint j = 0; j < pPlayerFrameTable->uNumFrames; ++j)
3223 if (pPlayerFrameTable->pFrames[j].uSequenceID == pPlayer->uExpressionID) 3222 if (pPlayerFrameTable->pFrames[j].uSequenceID == pPlayer->uExpressionID)
3224 { 3223 {
3225 v7 = j; 3224 v7 = j;
3226 break; 3225 break;
3227 } 3226 }
3228
3229 if ( v7 == 0 ) 3227 if ( v7 == 0 )
3230 v7 = 1; 3228 v7 = 1;
3231 if (pPlayer->uExpressionID == 21 ) 3229 if (pPlayer->uExpressionID == 21 )
3232 v8 = pPlayerFrameTable->GetFrameBy_y( 3230 pFrame = pPlayerFrameTable->GetFrameBy_y(&pPlayer->field_1AA8, &pPlayer->field_1AA4, pMiscTimer->uTimeElapsed);
3233 &pPlayer->field_1AA8,
3234 &pPlayer->field_1AA4,
3235 pMiscTimer->uTimeElapsed);
3236 else 3231 else
3237 v8 = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed); 3232 pFrame = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed);
3238 if (pPlayer->field_1AA2 != v8->uTextureID - 1 || v22 ) 3233 if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 )
3239 { 3234 {
3240 pPlayer->field_1AA2 = v8->uTextureID - 1; 3235 pPlayer->field_1AA2 = pFrame->uTextureID - 1;
3241 v4 = (Texture *)pTextures_PlayerFaces[i][v8->uTextureID]; 3236 pFace = (Texture *)pTextures_PlayerFaces[i][pFrame->uTextureID];
3242 goto LABEL_27; 3237 goto LABEL_27;
3243 } 3238 }
3244 LABEL_50: 3239 LABEL_50:
3245 ; 3240 ;
3246 } 3241 }
3247
3248 if ( pParty->bTurnBasedModeOn == 1 ) 3242 if ( pParty->bTurnBasedModeOn == 1 )
3249 { 3243 {
3250 if ( pTurnEngine->field_4 != 1 ) 3244 if ( pTurnEngine->field_4 != 1 )
3251 { 3245 {
3252 if ( (pTurnEngine->pQueue[0].uPackedID & 7) == 4 ) 3246 if ( (pTurnEngine->pQueue[0].uPackedID & 7) == 4 )
3269 else 3263 else
3270 { 3264 {
3271 if ( pParty->uFlags & 0x20 ) 3265 if ( pParty->uFlags & 0x20 )
3272 v16 = dword_5079C8; 3266 v16 = dword_5079C8;
3273 } 3267 }
3274 pRenderer->DrawTextureTransparent( 3268 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[pElem->uPackedID >> 3] - 4,
3275 pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[pElem->uPackedID >> 3] - 4, 3269 0x181u, (Texture *)(v16 != -1 ? &pIcons_LOD->pTextures[v16] : 0));
3276 0x181u,
3277 (Texture *)(v16 != -1 ? &pIcons_LOD->pTextures[v16] : 0));
3278 } 3270 }
3279 } 3271 }
3280 } 3272 }
3281 } 3273 }
3282 } 3274 }
3295 else 3287 else
3296 { 3288 {
3297 if ( pParty->uFlags & 0x20 ) 3289 if ( pParty->uFlags & 0x20 )
3298 v19 = dword_5079C8; 3290 v19 = dword_5079C8;
3299 } 3291 }
3300 pRenderer->DrawTextureTransparent( 3292 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] - 4,
3301 pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] - 4, 3293 0x181u, (Texture *)(v19 != -1 ? &pIcons_LOD->pTextures[v19] : 0));
3302 0x181u,
3303 (Texture *)(v19 != -1 ? &pIcons_LOD->pTextures[v19] : 0));
3304 } 3294 }
3305 } 3295 }
3306 } 3296 }
3307 } 3297 }
3308 3298
5485 while ( v133 < v16 ); 5475 while ( v133 < v16 );
5486 } 5476 }
5487 if ( v120 && v126 != v120 ) 5477 if ( v120 && v126 != v120 )
5488 strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer); 5478 strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer);
5489 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, Str, 130, 0); 5479 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, Str, 130, 0);
5490 *((short *)pPlayer->pName + 3323) = 1; 5480 *((short *)pPlayer->pName + 3323) = 1; //
5491 } 5481 }
5492 } 5482 }
5493 else 5483 else
5494 { 5484 {
5495 v17 = pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, 159 * (int)v12 + 18, 0x7Cu, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 120, 1); 5485 v17 = pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, 159 * (int)v12 + 18, 0x7Cu, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 120, 1);
5713 unsigned int uXc; // [sp+14h] [bp-8h]@13 5703 unsigned int uXc; // [sp+14h] [bp-8h]@13
5714 signed int uXd; // [sp+14h] [bp-8h]@16 5704 signed int uXd; // [sp+14h] [bp-8h]@16
5715 5705
5716 if ( pMessageQueue_50CBD0->uNumMessages ) 5706 if ( pMessageQueue_50CBD0->uNumMessages )
5717 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 5707 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
5718 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0));// ?? 5708 pAudioPlayer->SetMusicVolume((pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0));
5719 ++pIcons_LOD->uTexturePacksCount; 5709 ++pIcons_LOD->uTexturePacksCount;
5720 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 5710 if ( !pIcons_LOD->uNumPrevLoadedFiles )
5721 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 5711 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
5722 pCurrentScreen = 21; 5712 pCurrentScreen = 21;//окно Создания группы
5723 uPlayerCreationUI_ArrowAnim = 0; 5713 uPlayerCreationUI_ArrowAnim = 0;
5724 uPlayerCreationUI_SkySliderPos = 0; 5714 uPlayerCreationUI_SkySliderPos = 0;
5725 uPlayerCreationUI_SelectedCharacter = 0; 5715 uPlayerCreationUI_SelectedCharacter = 0;
5726 v0 = LOBYTE(pFontCreate->uFontHeight) - 2; 5716 v0 = LOBYTE(pFontCreate->uFontHeight) - 2;
5727 pTexture_IC_KNIGHT[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_KNIGHT", TEXTURE_16BIT_PALETTE)]; 5717 pTexture_IC_KNIGHT[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("IC_KNIGHT", TEXTURE_16BIT_PALETTE)];