Mercurial > might-and-magic-trilogy
comparison mm7_4.cpp @ 162:8ff698000225
Слияние
author | Ritor1 |
---|---|
date | Fri, 30 Nov 2012 18:14:09 +0600 |
parents | 3ee6e30b7943 062e8a8e09bc |
children | 62585ad07024 |
comparison
equal
deleted
inserted
replaced
161:3ee6e30b7943 | 162:8ff698000225 |
---|---|
5364 int pOrder; // [sp+168h] [bp-8h]@14 | 5364 int pOrder; // [sp+168h] [bp-8h]@14 |
5365 char *Str; // [sp+16Ch] [bp-4h]@18 | 5365 char *Str; // [sp+16Ch] [bp-4h]@18 |
5366 Player *pPlayer; | 5366 Player *pPlayer; |
5367 const char *pSkillName; | 5367 const char *pSkillName; |
5368 | 5368 |
5369 uColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xD1u, 0xBBu, 0x61u); | 5369 uColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xD1, 0xBB, 0x61); |
5370 uColorTeal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xF7u, 0xF7u); | 5370 uColorTeal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xF7, 0xF7); |
5371 uColorGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); | 5371 uColorGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFF, 0); |
5372 uColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 5372 uColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0xFF); |
5373 pRenderer->BeginScene(); | 5373 pRenderer->BeginScene(); |
5374 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); | 5374 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); |
5375 uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20; | 5375 uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20; |
5376 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY); | 5376 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY); |
5377 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - 640, 2, pTexture_MAKESKY); | 5377 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - 640, 2, pTexture_MAKESKY); |
5447 //do | 5447 //do |
5448 for ( pPlayer = pParty->pPlayers; (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges; pPlayer++) | 5448 for ( pPlayer = pParty->pPlayers; (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges; pPlayer++) |
5449 { | 5449 { |
5450 Str = pPlayer->pName; | 5450 Str = pPlayer->pName; |
5451 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pOrder + 73, 100, 0, pClassNames[(unsigned __int8)pPlayer->uClass], 0, 0, 0); | 5451 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pOrder + 73, 100, 0, pClassNames[(unsigned __int8)pPlayer->uClass], 0, 0, 0); |
5452 pRenderer->DrawTextureTransparent(pOrder + 77, 50u, pTexture_IC_KNIGHT[pPlayer->uClass/4]); | 5452 pRenderer->DrawTextureTransparent(pOrder + 77, 50, pTexture_IC_KNIGHT[pPlayer->uClass/4]); |
5453 v11 = pGUIWindow_CurrentMenu->field_40; | 5453 v11 = pGUIWindow_CurrentMenu->field_40; |
5454 if ( v11 && (v12 = pGUIWindow_CurrentMenu->ptr_1C, v12 == v124) ) | 5454 if ( v11 && (v12 = pGUIWindow_CurrentMenu->ptr_1C, v12 == v124) ) |
5455 { | 5455 { |
5456 v13 = v11 - 1; | 5456 v13 = v11 - 1; |
5457 if ( v13 ) | 5457 if ( v13 ) |
5483 } | 5483 } |
5484 while ( v133 < v16 ); | 5484 while ( v133 < v16 ); |
5485 } | 5485 } |
5486 if ( v120 && v126 != v120 ) | 5486 if ( v120 && v126 != v120 ) |
5487 strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer); | 5487 strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer); |
5488 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7Cu, 0, Str, 130, 0); | 5488 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, Str, 130, 0); |
5489 *((short *)pPlayer->pName + 3323) = 1; | 5489 *((short *)pPlayer->pName + 3323) = 1; |
5490 } | 5490 } |
5491 } | 5491 } |
5492 else | 5492 else |
5493 { | 5493 { |
5870 int v9; // edx@31 | 5870 int v9; // edx@31 |
5871 char *v10; // ebx@37 | 5871 char *v10; // ebx@37 |
5872 Player *v11; // esi@38 | 5872 Player *v11; // esi@38 |
5873 signed int uSpellBookPageCount; // ecx@40 | 5873 signed int uSpellBookPageCount; // ecx@40 |
5874 int v13; // eax@40 | 5874 int v13; // eax@40 |
5875 signed int v14; // eax@45 | 5875 signed int uSkillIdx; // eax@45 |
5876 int v15; // eax@70 | 5876 int v15; // eax@70 |
5877 signed int v16; // ecx@70 | 5877 signed int v16; // ecx@70 |
5878 unsigned int v18; // [sp-4h] [bp-84h]@48 | 5878 unsigned int v18; // [sp-4h] [bp-84h]@48 |
5879 ItemGen item; // [sp+Ch] [bp-74h]@37 | 5879 ItemGen item; // [sp+Ch] [bp-74h]@37 |
5880 char v20[32]; // [sp+30h] [bp-50h]@29 | 5880 char v20[32]; // [sp+30h] [bp-50h]@29 |
5992 pParty->field_854[v1++] = v9; | 5992 pParty->field_854[v1++] = v9; |
5993 v20[v9] = 1; | 5993 v20[v9] = 1; |
5994 } | 5994 } |
5995 while ( (signed int)v1 < 32 ); | 5995 while ( (signed int)v1 < 32 ); |
5996 item.Reset(); | 5996 item.Reset(); |
5997 v10 = (char *)&pParty->pPlayers[0].sResMagicBase; | 5997 //v10 = (char *)&pParty->pPlayers[0].sResMagicBase; |
5998 for ( pPlayer = &pParty->pPlayers[0]; (signed int)v10 < (signed int)((char *)&pParty->field_871C[455] + 2); pPlayer++) | 5998 for ( pPlayer = &pParty->pPlayers[0]; pPlayer < &pParty->pPlayers[4]; pPlayer++) |
5999 { | 5999 { |
6000 v11 = pPlayer; | 6000 //v11 = pPlayer; |
6001 if ( !pPlayer->uClass ) | 6001 if ( !pPlayer->uClass ) |
6002 pPlayer->sResMagicBase = 10; | 6002 pPlayer->sResMagicBase = 10; |
6003 *((short *)v10 + 400) = 0; | 6003 //*((short *)v10 + 400) = 0; |
6004 pPlayer->pPlayerBuffs[22].uExpireTime = 0; | |
6004 uSpellBookPageCount = 0; | 6005 uSpellBookPageCount = 0; |
6005 for ( int i = 0; i < 9; i++) | 6006 for ( int i = 0; i < 9; i++) |
6006 { | 6007 { |
6007 if ( pPlayer->pActiveSkills[12+i] ) | 6008 if ( pPlayer->pActiveSkills[12+i] ) |
6008 ++uSpellBookPageCount; | 6009 ++uSpellBookPageCount; |
6009 } | 6010 } |
6010 pPlayer->pNumSpellBookPage = uSpellBookPageCount; | 6011 pPlayer->pNumSpellBookPage = uSpellBookPageCount; |
6011 pItemsTable->GenerateItem(2, 40, &item); | 6012 pItemsTable->GenerateItem(2, 40, &item); |
6012 pPlayer->AddItem2(0xFFFFFFFFu, &item); | 6013 pPlayer->AddItem2(-1, &item); |
6013 v14 = 0; | 6014 uSkillIdx = 0; |
6014 v24.y = 0; | 6015 v24.y = 0; |
6015 do | 6016 do |
6016 { | 6017 { |
6017 if ( pPlayer->pActiveSkills[v14] ) | 6018 if ( pPlayer->pActiveSkills[uSkillIdx] ) |
6018 { | 6019 { |
6019 switch ( v14 ) | 6020 switch ( uSkillIdx ) |
6020 { | 6021 { |
6021 case 0: | 6022 case 0: |
6022 v18 = 61; | 6023 v18 = 61; |
6023 goto LABEL_69; | 6024 goto LABEL_69; |
6024 case 1: | 6025 case 1: |
6104 if ( &pPlayer->pInventoryItems[i] ) | 6105 if ( &pPlayer->pInventoryItems[i] ) |
6105 pPlayer->pInventoryItems[i].uAttributes |= 1; | 6106 pPlayer->pInventoryItems[i].uAttributes |= 1; |
6106 } | 6107 } |
6107 pPlayer->sHealth = pPlayer->GetMaxHealth(); | 6108 pPlayer->sHealth = pPlayer->GetMaxHealth(); |
6108 pPlayer->sMana = pPlayer->GetMaxMana(); | 6109 pPlayer->sMana = pPlayer->GetMaxMana(); |
6109 v14 = v24.y; | 6110 uSkillIdx = v24.y; |
6110 } | 6111 } |
6111 ++v14; | 6112 ++uSkillIdx; |
6112 v24.y = v14; | 6113 v24.y = uSkillIdx; |
6113 } | 6114 } |
6114 while ( v14 < 37 ); | 6115 while ( uSkillIdx < 37 ); |
6115 v10 += 6972; | 6116 //v10 += 6972; |
6116 //pPlayer++; | 6117 //pPlayer++; |
6117 } | 6118 } |
6118 //while ( (signed int)v10 < (signed int)((char *)&pParty->field_871C[455] + 2) ); | 6119 //while ( (signed int)v10 < (signed int)((char *)&pParty->field_871C[455] + 2) ); |
6119 pAudioPlayer->StopChannels(-1, -1); | 6120 pAudioPlayer->StopChannels(-1, -1); |
6120 if (pAsyncMouse) | 6121 if (pAsyncMouse) |