Mercurial > might-and-magic-trilogy
diff Render.cpp @ 43:484492a6dd28
Прорисовка окна создания персонажа готова, но не решена проблема кликабельности доступных навыков
author | Ritor1 |
---|---|
date | Sun, 21 Oct 2012 23:26:23 +0600 |
parents | e19e48280ca0 |
children | 916bec351934 bcc051713d20 |
line wrap: on
line diff
--- a/Render.cpp Fri Oct 19 23:29:04 2012 +0600 +++ b/Render.cpp Sun Oct 21 23:26:23 2012 +0600 @@ -10440,8 +10440,8 @@ //----- (004A6274) -------------------------------------------------------- void Render::DrawTextureTransparent(unsigned int uX, unsigned int uY, Texture *pTexture) { - Texture *v4; // edi@2 - unsigned int v5; // ebx@4 + Texture *pCurrentTexture; // edi@2 + int uHeight; // ebx@4 unsigned __int16 *v6; // eax@4 unsigned int v7; // edx@5 unsigned int v8; // edx@6 @@ -10453,25 +10453,25 @@ unsigned int v14; // edx@17 unsigned int v15; // esi@18 unsigned __int8 *v16; // ebx@22 - char v17; // zf@28 + char uFlag; // zf@28 int v18; // [sp+10h] [bp-10h]@4 unsigned __int8 *v19; // [sp+18h] [bp-8h]@4 - int v20; // [sp+1Ch] [bp-4h]@4 + int uWidth; // [sp+1Ch] [bp-4h]@4 int uXa; // [sp+28h] [bp+8h]@24 unsigned int uYa; // [sp+2Ch] [bp+Ch]@22 unsigned int pTexturea; // [sp+30h] [bp+10h]@11 if ( this->uNumSceneBegins ) { - v4 = pTexture; + pCurrentTexture = pTexture; if ( pTexture ) { if ( pTexture->pPalette16 ) { - v5 = pTexture->uTextureHeight; + uHeight = pTexture->uTextureHeight; v6 = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; v19 = pTexture->pLevelOfDetail0; - v20 = pTexture->uTextureWidth; + uWidth = pTexture->uTextureWidth; v18 = pTexture->uTextureWidth; if ( this->bClip ) { @@ -10480,66 +10480,65 @@ { v8 = v7 - uX; v19 += v8; - v20 += uX - this->uClipX; + uWidth += uX - this->uClipX; v6 += v8; } v9 = this->uClipY; - v5 = pTexture->uTextureHeight; + uHeight = pTexture->uTextureHeight; if ( (signed int)uY < (signed int)v9 ) { v10 = v9 - uY; v19 += v18 * v10; - v5 = uY - this->uClipY + pTexture->uTextureHeight; - v4 = pTexture; + uHeight = uY - this->uClipY + pTexture->uTextureHeight; + pCurrentTexture = pTexture; v6 += this->uTargetSurfacePitch * v10; } v11 = this->uClipX; if ( (signed int)v11 < (signed int)uX ) v11 = uX; pTexturea = this->uClipZ; - if ( (signed int)(v11 + v20) > (signed int)pTexturea ) + if ( (signed int)(v11 + uWidth) > (signed int)pTexturea ) { v12 = this->uClipX; if ( (signed int)v12 < (signed int)uX ) v12 = uX; - v20 = pTexturea - v12; + uWidth = pTexturea - v12; } v13 = this->uClipY; if ( (signed int)v13 < (signed int)uY ) v13 = uY; v14 = this->uClipW; - if ( (signed int)(v5 + v13) > (signed int)v14 ) + if ( (signed int)(uHeight + v13) > (signed int)v14 ) { v15 = this->uClipY; if ( (signed int)v15 < (signed int)uY ) v15 = uY; - v5 = v14 - v15; - } - } - if ( (signed int)v5 > 0 ) - { - uYa = v5; + uHeight = v14 - v15; + } + } + if ( (signed int)uHeight > 0 ) + { + uYa = uHeight; v16 = v19; do { - if ( v20 > 0 ) + if ( uWidth > 0 ) { - uXa = v20; + uXa = uWidth; do { if ( *v16 ) - *v6 = v4->pPalette16[*v16]; + *v6 = pCurrentTexture->pPalette16[*v16]; ++v6; ++v16; - --uXa; } - while ( uXa ); + while ( uXa-- !=1 ); } - v16 += v18 - v20; - v17 = uYa-- == 1; - v6 += this->uTargetSurfacePitch - v20; - } - while ( !v17 ); + v16 += v18 - uWidth; + uFlag = uYa-- == 1; + v6 += this->uTargetSurfacePitch - uWidth; + } + while ( !uFlag ); } } }