Mercurial > mm7
diff mm7_3.cpp @ 674:c508daac2c07
A bit of minimap cleaning
author | Nomad |
---|---|
date | Thu, 14 Mar 2013 23:26:01 +0200 |
parents | 1ff57450f090 |
children | 92c1e1250e7c |
line wrap: on
line diff
--- a/mm7_3.cpp Wed Mar 13 01:30:53 2013 +0200 +++ b/mm7_3.cpp Thu Mar 14 23:26:01 2013 +0200 @@ -11883,10 +11883,10 @@ signed int v27; // eax@37 unsigned __int16 *v28; // ecx@37 signed int v29; // edi@40 - signed int v33; // ebx@50 - unsigned int v34; // eax@50 - signed int v35; // ecx@50 - unsigned __int16 v36; // di@66 + //signed int v33; // ebx@50 + //unsigned int v34; // eax@50 + //signed int v35; // ecx@50 + //unsigned __int16 v36; // di@66 int v37; // edi@72 int v38; // ebx@72 __int16 v39; // ax@87 @@ -11906,7 +11906,7 @@ unsigned int v54; // [sp-Ch] [bp-60h]@100 unsigned int v55; // [sp-8h] [bp-5Ch]@77 unsigned int v56; // [sp-8h] [bp-5Ch]@100 - signed int v57; // [sp-4h] [bp-58h]@54 + //signed int v57; // [sp-4h] [bp-58h]@54 unsigned __int16 v58; // [sp-4h] [bp-58h]@77 unsigned __int16 v59; // [sp-4h] [bp-58h]@100 unsigned __int16 v60; // [sp+10h] [bp-44h]@66 @@ -12115,63 +12115,16 @@ } -//_draw_party_arrow: - v33 = 0; - v34 = pParty->sRotationY & stru_5C6E00->uDoublePiMask; - v35 = 0; - if ( (signed int)(pParty->sRotationY & stru_5C6E00->uDoublePiMask) < 128 ) - goto LABEL_66; - if ( (signed int)v34 <= 384 ) - { - v35 = 1; - goto LABEL_66; - } - if ( (signed int)v34 >= 640 ) - { - if ( (signed int)v34 > 896 ) - { - if ( (signed int)v34 >= 1152 ) - { - if ( (signed int)v34 > 1408 ) - { - if ( (signed int)v34 >= 1664 ) - { - if ( (signed int)v34 > 1920 ) - goto LABEL_66; - v57 = 7; - } - else - { - v57 = 6; - } - } - else - { - v57 = 5; - } - } - else - { - v57 = 4; - } - } - else - { - v57 = 3; - } - } - else - { - v57 = 2; - } - v35 = v57; -LABEL_66: - pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, - (Texture *)(pTextureIDs_pMapDirs[v35] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v35]] : 0)); - v36 = 255; + assert(pParty->sRotationY >= 0); + float angle = (pParty->sRotationY % 2048) / 2048.0f; + const float two_pi = 2.0f * 3.14159f; + + uint arrow_idx = floorf(0.5f + 7 * angle); + pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[arrow_idx])); + flagsb = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0xFFu); v60 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); - if ( bWizardEyeActive = true) + if (bWizardEyeActive) { uZe = 0; //for (uint i = 0; i < uNumSpriteObjects; ++i) @@ -12217,8 +12170,6 @@ a2c += 112; if ( uZe >= (signed int)uNumSpriteObjects ) { - v36 = 255; - v33 = 0; goto LABEL_85; } } @@ -12230,11 +12181,11 @@ goto LABEL_82; } LABEL_85: - v63 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v36, 0, v33); - v61 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, v36, v33); - v65 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v36, v36, v33); - uZf = v33; - if ( (signed int)uNumActors > v33 ) + v63 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 0, 0); + v61 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 255, 0); + v65 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 0); + uZf = 0; + if ( (signed int)uNumActors > 0 ) { flagsc = pActors;//[0].uAIState; do @@ -12288,13 +12239,11 @@ ++flagsc; } while ( uZf < (signed int)uNumActors ); - v36 = 255; - v33 = 0; - } - } - flagsd = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v36, v36, v36); - uZg = v33; - if ( (signed int)uNumLevelDecorations > v33 ) + } + } + flagsd = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 255); + uZg = 0; + if ( (signed int)uNumLevelDecorations > 0 ) { v45 = (char *)&pLevelDecorations[0].vPosition; lPitchb = (char *)&pLevelDecorations[0].vPosition; @@ -12331,13 +12280,12 @@ lPitchb = v45; } while ( uZg < (signed int)uNumLevelDecorations ); - v33 = 0; - } - pRenderer->DrawTextureTransparent(0x1D4u, v33, (Texture *)(dword_5079D8 != -1 ? &pIcons_LOD->pTextures[dword_5079D8] : 0)); + } + pRenderer->DrawTextureTransparent(0x1D4u, 0, (Texture *)(dword_5079D8 != -1 ? &pIcons_LOD->pTextures[dword_5079D8] : 0)); uZooma = (double)pParty->sRotationY * 0.1171875; //v50 = uZooma + 6.7553994e15; - pRenderer->Clip(0x21Du, v33, 0x237u, 0x1E0u); - pRenderer->DrawTextureIndexed(floorf(uZooma + 0.5f) + 285, 0x88u, (Texture *)(dword_5079B4 != -1 ? &pIcons_LOD->pTextures[dword_5079B4] : 0)); + pRenderer->Clip(541, 0, 567, 480); + pRenderer->DrawTextureIndexed(floorf(uZooma + 0.5f) + 285, 136, (Texture *)(dword_5079B4 != -1 ? &pIcons_LOD->pTextures[dword_5079B4] : 0)); pRenderer->ResetClip(); }