# HG changeset patch # User Ritor1 # Date 1391278240 -21600 # Node ID d9caf2b3d8d59438300d4ebf8bb39a3f270e243f # Parent 42c8807225a2bf9d17e72da2b3a6139c416065bc draw FlyAction and WaterWalk icons diff -r 42c8807225a2 -r d9caf2b3d8d5 Game.cpp --- a/Game.cpp Fri Jan 31 17:30:36 2014 +0600 +++ b/Game.cpp Sun Feb 02 00:10:40 2014 +0600 @@ -3731,53 +3731,50 @@ byte_506550 = 0; continue; case UIMSG_SpellBook_PressTab://перелистывание страниц клавишей Tab + { if ( !uActiveCharacter ) continue; - pNPCData4 = 0; + int skill_count = 0; uAction = 0; for ( uint i = 0; i < 9; i++ ) { if ( pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_FIRE + i] ) { if ( pPlayers[uActiveCharacter]->lastOpenedSpellbookPage == i ) - uAction = (int)pNPCData4; - v102 = (int)pNPCData4; - pNPCData4 = (NPCData *)((char *)pNPCData4 + 1); - v217[v102] = i; + uAction = skill_count; + v217[skill_count++] = i; } } - if ( !pNPCData4 ) - { - v127 = rand() % 2 + 204; - pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); - continue; - } - if ( GetAsyncKeyState(16) ) - { - --uAction; - if ( uAction < 0 ) - uAction = (int)((char *)pNPCData4 - 1); - } + if ( !skill_count )//нет скиллов + pAudioPlayer->PlaySound((SoundID)(rand() % 2 + 204), 0, 0, -1, 0, 0, 0, 0); else { - ++uAction; - if ( uAction >= (signed int)pNPCData4 ) - uAction = 0; + if ( GetAsyncKeyState(16) ) + { + --uAction; + if ( uAction < 0 ) + uAction = skill_count - 1; + } + else + { + ++uAction; + if ( uAction >= skill_count ) + uAction = 0; + } + OnCloseSpellBookPage(); + pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = LOBYTE(v217[uAction]); + pGUIWindow_CurrentMenu->OpenSpellBook(); + pAudioPlayer->PlaySound((SoundID)(rand() % 2 + 204), 0, 0, -1, 0, 0, 0, 0); } - OnCloseSpellBookPage(); - pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = LOBYTE(v217[uAction]); - pGUIWindow_CurrentMenu->OpenSpellBook(); - v127 = rand() % 2 + 204; - pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); continue; + } case UIMSG_OpenSpellbookPage: if ( pTurnEngine->turn_stage == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->lastOpenedSpellbookPage ) continue; OnCloseSpellBookPage(); pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = uMessageParam; pGUIWindow_CurrentMenu->OpenSpellBook(); - v127 = rand() % 2 + 204; - pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); + pAudioPlayer->PlaySound((SoundID)(rand() % 2 + 204), 0, 0, -1, 0, 0, 0, 0); continue; case UIMSG_SelectSpell: { diff -r 42c8807225a2 -r d9caf2b3d8d5 Render.cpp --- a/Render.cpp Fri Jan 31 17:30:36 2014 +0600 +++ b/Render.cpp Sun Feb 02 00:10:40 2014 +0600 @@ -3658,7 +3658,8 @@ //----- (004A0BEE) -------------------------------------------------------- void Render::RasterLine2D(signed int uX, signed int uY, signed int uZ, signed int uW, unsigned __int16 uColor) { - signed int v12; // eax@17 + signed int lower_bound; // eax@17 + signed int left_bound; //signed int v19; // qax@41 //int v20; // edi@41 unsigned int v21; // edi@46 @@ -3674,7 +3675,7 @@ int v31; // edx@61 int v32; // edi@61 __int64 v36; // [sp+14h] [bp-8h]@1 - signed int v37; // [sp+18h] [bp-4h]@28 + signed int upper_bound; // [sp+18h] [bp-4h]@28 unsigned int uXa; // [sp+24h] [bp+8h]@49 //unsigned int uYa; // [sp+28h] [bp+Ch]@28 int uYb; // [sp+28h] [bp+Ch]@47 @@ -3712,7 +3713,7 @@ v21 = pRenderer->uTargetSurfacePitch; if ( pRenderer->uTargetSurfacePitch ) { - v12 = uX + uY * pRenderer->uTargetSurfacePitch; + //v12 = uX + uY * pRenderer->uTargetSurfacePitch; v22 = uW - uY; v23 = v22; uYb = v22; @@ -3744,7 +3745,7 @@ { v31 = 2 * v24; v32 = 2 * v21; - v12 = (int)&v26[v12]; + //v12 = (int)&v26[v12]; int y = 0; int x = 0; for ( v30; v30; --v30 ) @@ -3778,7 +3779,7 @@ v29 = 2 * v24; int y = 0; int x = 0; - v12 = (int)&v26[v12]; + //v12 = (int)&v26[v12]; for ( v27; v27; --v27 ) { v25 += uYb; @@ -3806,7 +3807,7 @@ return; } - if ( (BYTE4(v36) ^ (unsigned __int8)v36) & 8 )//левая и + if ( (BYTE4(v36) ^ (unsigned __int8)v36) & 8 )//for left and right(левая и правая) { if ( BYTE4(v36) & 8 )//left_border = true; { @@ -3829,28 +3830,28 @@ else { uW += ((uY - uW) * (this->raster_clip_z - uZ)) / (uX - uZ); - uY = this->raster_clip_z; - } - } - v37 = 0; + uZ = this->raster_clip_z; + } + } + + upper_bound = 0; if ( uY < this->raster_clip_y ) - v37 = 2; + upper_bound = 2; if ( uY > this->raster_clip_w ) - v37 |= 1; - - if ( uW >= this->raster_clip_y ) - v12 = 0; - else - v12 = 2; + upper_bound |= 1; + + lower_bound = 0; + if ( uW < this->raster_clip_y ) + lower_bound = 2; if ( uW > this->raster_clip_w ) - v12 |= 1; - - if ( !(v12 & v37) ) - { - v12 ^= v37; - if ( v12 & 2 ) - { - if ( v37 & 2 ) + lower_bound |= 1; + + if ( !(lower_bound & upper_bound) )//for up and down(для верха и низа) + { + lower_bound ^= upper_bound; + if ( lower_bound & 2 ) + { + if ( upper_bound & 2 ) { uX += ((uZ - uX) * (this->raster_clip_y - uY)) / (uW - uY); uY = this->raster_clip_y; @@ -3861,9 +3862,9 @@ uW = this->raster_clip_y; } } - if ( v12 & 1 ) - { - if ( v37 & 1 ) + if ( lower_bound & 1 ) + { + if ( upper_bound & 1 ) { uX += ((uZ - uX) * (this->raster_clip_w - uY)) / (uW - uY); uY = this->raster_clip_w; @@ -7485,96 +7486,77 @@ //----- (004A65CC) -------------------------------------------------------- void Render::_4A65CC(unsigned int x, unsigned int y, Texture *a4, Texture *a5, int a6, int a7, int a8) { - //unsigned __int16 *v8; // esi@6 - unsigned int v9; // edi@6 - unsigned int v10; // eax@7 - unsigned int v11; // eax@8 - unsigned int v12; // eax@9 - unsigned int v13; // eax@10 + unsigned int uHeight; // edi@6 unsigned int v14; // edx@11 - unsigned int v15; // eax@13 unsigned int v16; // edx@14 unsigned int v17; // edx@17 - unsigned int v18; // eax@19 unsigned int v19; // edx@20 int v20; // eax@27 int v21; // edx@29 - int v22; // [sp+Ch] [bp-Ch]@6 int v23; // [sp+Ch] [bp-Ch]@24 unsigned __int8 *v24; // [sp+14h] [bp-4h]@6 int xa; // [sp+20h] [bp+8h]@26 unsigned int ya; // [sp+24h] [bp+Ch]@24 - int v27; // [sp+2Ch] [bp+14h]@6 + int Width; // [sp+2Ch] [bp+14h]@6 if ( this->uNumSceneBegins && a4 && a4->pPalette16 && a5 && a5->pPalette16 ) { - //v8 = &this->pTargetSurface[x + y * this->uTargetSurfacePitch]; v24 = a4->pLevelOfDetail0_prolly_alpha_mask; - v27 = a4->uTextureWidth; - v9 = a4->uTextureHeight; - v22 = a4->uTextureWidth; + Width = a4->uTextureWidth; + uHeight = a4->uTextureHeight; int clipped_out_x = x; int clipped_out_y = y; if ( this->bClip ) { - v10 = this->uClipX; - if ( (signed int)x < (signed int)v10 ) - { - v11 = v10 - x; - v24 += v11; - v27 += x - this->uClipX; - //v8 += v11; + if ( (signed int)x < (signed int)this->uClipX ) + { + v24 += this->uClipX - x; + Width += x - this->uClipX; clipped_out_x = uClipX; } - v12 = this->uClipY; - if ( (signed int)y < (signed int)v12 ) - { - v13 = v12 - y; - v24 += v22 * v13; - v9 = y - this->uClipY + a4->uTextureHeight; - //v8 += this->uTargetSurfacePitch * v13; + if ( (signed int)y < (signed int)this->uClipY ) + { + v24 += a4->uTextureWidth * (this->uClipY - y); + uHeight = y - this->uClipY + a4->uTextureHeight; clipped_out_y = uClipY; } v14 = this->uClipX; - if ( (signed int)v14 < (signed int)x ) + if ( (signed int)this->uClipX < (signed int)x ) v14 = x; - v15 = this->uClipZ; - if ( (signed int)(v27 + v14) > (signed int)v15 ) + if ( (signed int)(Width + v14) > (signed int)this->uClipZ ) { v16 = this->uClipX; - if ( (signed int)v16 < (signed int)x ) + if ( (signed int)this->uClipX < (signed int)x ) v16 = x; - v27 = v15 - v16; + Width = this->uClipZ - v16; } v17 = this->uClipY; - if ( (signed int)v17 < (signed int)y ) + if ( (signed int)this->uClipY < (signed int)y ) v17 = y; - v18 = this->uClipW; - if ( (signed int)(v9 + v17) > (signed int)v18 ) + if ( (signed int)(uHeight + v17) > (signed int)this->uClipW ) { v19 = this->uClipY; if ( (signed int)v19 < (signed int)y ) v19 = y; - v9 = v18 - v19; - } - } - - for (int dy = 0; dy < v9; ++dy) - { - for (int dx = 0; dx < v27; ++dx) - { - v20 = *v24; - if ( v20 >= a7 && v20 <= a8 ) - { - v21 = a7 + (a6 + v20) % (2 * (a8 - a7)); - if ( (a6 + v20) % (2 * (a8 - a7)) >= a8 - a7 ) - v21 = 2 * a8 - v21 - a7; - //*v8 = a4->pPalette16[v21]; - WritePixel16(clipped_out_x + dx, clipped_out_y + dy, a4->pPalette16[v21]); - } - ++v24; - } - v24 += v22 - v27; + uHeight = this->uClipW - v19; + } + } + + for (int dy = 0; dy < uHeight; ++dy) + { + for (int dx = 0; dx < Width; ++dx) + { + v20 = *v24; + if ( v20 >= a7 && v20 <= a8 ) + { + v21 = a7 + (a6 + v20) % (2 * (a8 - a7)); + if ( (a6 + v20) % (2 * (a8 - a7)) >= a8 - a7 ) + v21 = 2 * a8 - v21 - a7; + WritePixel16(clipped_out_x + dx, clipped_out_y + dy, a4->pPalette16[v21]); + } + ++v24; + } + v24 += a4->uTextureWidth - Width; } /*if ( (signed int)v9 > 0 ) { @@ -7613,31 +7595,20 @@ //----- (004A63E6) -------------------------------------------------------- void Render::DrawAura(unsigned int a2, unsigned int a3, Texture *a4, Texture *a5, int a6, int a7, int a8) { - Texture *v8; // eax@2 - //Texture *v9; // ebx@4 - //unsigned __int16 *v10; // esi@6 - unsigned int v11; // edi@7 - unsigned int v12; // eax@9 - unsigned int v13; // eax@10 unsigned int v14; // edx@11 - unsigned int v15; // eax@13 unsigned int v16; // edx@14 unsigned int v17; // edx@17 - unsigned int v18; // eax@19 unsigned int v19; // edx@20 int v20; // eax@27 int v21; // edx@29 - int v22; // [sp+Ch] [bp-Ch]@6 int v23; // [sp+Ch] [bp-Ch]@24 - int v24; // [sp+10h] [bp-8h]@6 - int v25; // [sp+14h] [bp-4h]@6 - int i; // [sp+20h] [bp+8h]@25 + int Height; // [sp+10h] [bp-8h]@6 + int Width; // [sp+14h] [bp-4h]@6 int v27; // [sp+24h] [bp+Ch]@23 unsigned __int8 *v28; // [sp+28h] [bp+10h]@6 if ( this->uNumSceneBegins ) { - v8 = a4; if ( a4 ) { if ( a4->pPalette16 ) @@ -7646,61 +7617,54 @@ { if ( a5->pPalette16 ) { - //v10 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; v28 = a4->pLevelOfDetail0_prolly_alpha_mask; - v25 = v8->uTextureWidth; - v24 = v8->uTextureHeight; - v22 = v8->uTextureWidth; - + Width = a4->uTextureWidth; + Height = a4->uTextureHeight; int clipped_out_x = a2; int clipped_out_y = a3; if ( this->bClip ) { - v11 = this->uClipX; - if ( (signed int)a2 < (signed int)v11 ) + if ( (signed int)a2 < (signed int)this->uClipX ) { - v28 += v11 - a2; - v25 += a2 - v11; - //v10 += v11 - a2; + v28 += this->uClipX - a2; + Width += a2 - this->uClipX; clipped_out_x = uClipX; } - v12 = this->uClipY; - if ( (signed int)a3 < (signed int)v12 ) + + if ( (signed int)a3 < (signed int)this->uClipY ) { - v13 = v12 - a3; - v28 += v22 * v13; - v24 += a3 - this->uClipY; - //v10 += this->uTargetSurfacePitch * v13; + v28 += a4->uTextureWidth * (this->uClipY - a3); + Height += a3 - this->uClipY; clipped_out_y = uClipY; } + v14 = this->uClipX; - if ( (signed int)v14 < (signed int)a2 ) + if ( (signed int)this->uClipX < (signed int)a2 ) v14 = a2; - v15 = this->uClipZ; - if ( (signed int)(v25 + v14) > (signed int)v15 ) + if ( (signed int)(Width + v14) > (signed int)this->uClipZ ) { v16 = this->uClipX; - if ( (signed int)v16 < (signed int)a2 ) + if ( (signed int)this->uClipX < (signed int)a2 ) v16 = a2; - v25 = v15 - v16; + Width = this->uClipZ - v16; } + v17 = this->uClipY; - if ( (signed int)v17 < (signed int)a3 ) + if ( (signed int)this->uClipY < (signed int)a3 ) v17 = a3; - v18 = this->uClipW; - if ( (signed int)(v24 + v17) > (signed int)v18 ) + if ( (signed int)(Height + v17) > (signed int)this->uClipW ) { v19 = this->uClipY; - if ( (signed int)v19 < (signed int)a3 ) + if ( (signed int)this->uClipY < (signed int)a3 ) v19 = a3; - v24 = v18 - v19; + Height = this->uClipW - v19; } } v27 = 0; - for (int y = 0; y < v24; ++y) + for (int y = 0; y < Height; ++y) { - for (int x = 0; x < v25; ++x) + for (int x = 0; x < Width; ++x) { if ( *v28 ) { @@ -7720,7 +7684,7 @@ } v28++; } - v28 += v22 - v25; + v28 += a4->uTextureWidth - Width; } /*if ( v24 > 0 ) @@ -7755,8 +7719,6 @@ while ( v27 < v24 ); }*/ - - } } } @@ -7767,98 +7729,75 @@ //----- (004A6274) -------------------------------------------------------- void Render::DrawTextureTransparent(unsigned int uX, unsigned int uY, Texture *pTexture) { - Texture *pCurrentTexture; // edi@2 int uHeight; // ebx@4 - //unsigned __int16 *v6; // eax@4 - unsigned int v7; // edx@5 - unsigned int v8; // edx@6 - unsigned int v9; // edx@7 - unsigned int v10; // edx@8 unsigned int v11; // edx@9 unsigned int v12; // esi@12 unsigned int v13; // esi@15 - unsigned int v14; // edx@17 unsigned int v15; // esi@18 - unsigned __int8 *v16; // ebx@22 - char uFlag; // zf@28 - int v18; // [sp+10h] [bp-10h]@4 unsigned __int8 *v19; // [sp+18h] [bp-8h]@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 ) { - pCurrentTexture = pTexture; if ( pTexture ) { if ( pTexture->pPalette16 ) { uHeight = pTexture->uTextureHeight; - //v6 = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; v19 = pTexture->pLevelOfDetail0_prolly_alpha_mask; uWidth = pTexture->uTextureWidth; - v18 = pTexture->uTextureWidth; int clipped_out_x = uX; int clipped_out_y = uY; if ( this->bClip ) { - v7 = this->uClipX; - if ( (signed int)uX < (signed int)v7 ) + if ( (signed int)uX < (signed int)this->uClipX ) { - v8 = v7 - uX; - v19 += v8; + v19 += this->uClipX - uX; uWidth += uX - this->uClipX; - //v6 += v8; clipped_out_x = uClipX; } - v9 = this->uClipY; + uHeight = pTexture->uTextureHeight; - if ( (signed int)uY < (signed int)v9 ) + if ( (signed int)uY < (signed int)this->uClipY ) { - v10 = v9 - uY; - v19 += v18 * v10; + v19 += pTexture->uTextureWidth * (this->uClipY - uY); uHeight = uY - this->uClipY + pTexture->uTextureHeight; - pCurrentTexture = pTexture; - //v6 += this->uTargetSurfacePitch * v10; clipped_out_y = uClipY; } v11 = this->uClipX; - if ( (signed int)v11 < (signed int)uX ) + if ( (signed int)this->uClipX < (signed int)uX ) v11 = uX; - pTexturea = this->uClipZ; - if ( (signed int)(v11 + uWidth) > (signed int)pTexturea ) + + if ( (signed int)(v11 + uWidth) > (signed int)this->uClipZ ) { v12 = this->uClipX; - if ( (signed int)v12 < (signed int)uX ) + if ( (signed int)this->uClipX < (signed int)uX ) v12 = uX; - uWidth = pTexturea - v12; + uWidth = this->uClipZ - v12; } v13 = this->uClipY; - if ( (signed int)v13 < (signed int)uY ) + if ( (signed int)this->uClipY < (signed int)uY ) v13 = uY; - v14 = this->uClipW; - if ( (signed int)(uHeight + v13) > (signed int)v14 ) + + if ( (signed int)(uHeight + v13) > (signed int)this->uClipW ) { v15 = this->uClipY; - if ( (signed int)v15 < (signed int)uY ) + if ( (signed int)this->uClipY < (signed int)uY ) v15 = uY; - uHeight = v14 - v15; + uHeight = this->uClipW - v15; } } - - v16 = v19; + for (int y = 0; y < uHeight; ++y) { for (int x = 0; x < uWidth; ++x) { - if ( *v16 ) - WritePixel16(clipped_out_x + x, clipped_out_y + y, pCurrentTexture->pPalette16[*v16]); - ++v16; + if ( *v19 ) + WritePixel16(clipped_out_x + x, clipped_out_y + y, pTexture->pPalette16[*v19]); + ++v19; } - v16 += v18 - uWidth; + v19 += pTexture->uTextureWidth - uWidth; } /*if ( (signed int)uHeight > 0 ) { @@ -8078,30 +8017,22 @@ //----- (004A5EB2) -------------------------------------------------------- void Render::DrawTextureIndexed(unsigned int uX, unsigned int uY, Texture *a4) { - Texture *v4; // edi@2 int v5; // ebx@4 - //unsigned __int16 *pTarget; // eax@4 - unsigned int v7; // edx@5 unsigned int v8; // edx@6 - unsigned int v9; // edx@7 unsigned int v10; // edx@8 unsigned int v11; // edx@9 unsigned int v12; // esi@12 unsigned int v13; // esi@15 - //unsigned int v14; // edx@17 unsigned int v15; // esi@18 - unsigned __int8 *v16; // edx@22 char v17; // zf@26 int v18; // [sp+10h] [bp-10h]@4 unsigned __int8 *v19; // [sp+18h] [bp-8h]@4 int v20; // [sp+1Ch] [bp-4h]@4 int uXa; // [sp+28h] [bp+8h]@24 unsigned int uYa; // [sp+2Ch] [bp+Ch]@22 - unsigned int v23; // [sp+30h] [bp+10h]@11 if ( this->uNumSceneBegins ) { - v4 = a4; if ( a4 ) { if ( a4->pPalette16 ) @@ -8116,37 +8047,36 @@ int clipped_out_y = uY; if ( this->bClip ) { - v7 = this->uClipX; - if ( (signed int)uX < (signed int)v7 ) + if ( (signed int)uX < (signed int)this->uClipX ) { - v8 = v7 - uX; + v8 = this->uClipX - uX; v19 += v8; v20 += uX - this->uClipX; - //pTarget += v8; clipped_out_x = uClipX; } - v9 = this->uClipY; + v5 = a4->uTextureHeight; - if ( (signed int)uY < (signed int)v9 ) + if ( (signed int)uY < (signed int)this->uClipY ) { - v10 = v9 - uY; + v10 = this->uClipY - uY; v19 += v18 * v10; v5 = uY - this->uClipY + a4->uTextureHeight; - v4 = a4; - //pTarget += this->uTargetSurfacePitch * v10; + //v4 = a4; clipped_out_y = uClipY; } + v11 = this->uClipX; if ( (signed int)v11 < (signed int)uX ) v11 = uX; - v23 = this->uClipZ; - if ( (signed int)(v11 + v20) > (signed int)v23 ) + + if ( (signed int)(v11 + v20) > (signed int)this->uClipZ ) { v12 = this->uClipX; if ( (signed int)v12 < (signed int)uX ) v12 = uX; - v20 = v23 - v12; + v20 = this->uClipZ - v12; } + v13 = this->uClipY; if ( (signed int)v13 < (signed int)uY ) v13 = uY; @@ -8159,16 +8089,16 @@ v5 = uClipW - v15; } } - - v16 = v19; + for (int y = 0; y < v5; ++y) { for (int x = 0; x < v20; ++x) { - WritePixel16(clipped_out_x + x, clipped_out_y + y, v4->pPalette16[*v16]); - ++v16; + if ( a4->pPalette16[*v19] != 0x7FF )// 2047 + WritePixel16(clipped_out_x + x, clipped_out_y + y, a4->pPalette16[*v19]); + ++v19; } - v16 += v18 - v20; + v19 += v18 - v20; } /*if ( (signed int)v5 > 0 ) { diff -r 42c8807225a2 -r d9caf2b3d8d5 UI/Books/UIMapBook.cpp --- a/UI/Books/UIMapBook.cpp Fri Jan 31 17:30:36 2014 +0600 +++ b/UI/Books/UIMapBook.cpp Sun Feb 02 00:10:40 2014 +0600 @@ -381,14 +381,14 @@ { for( uint i = 0; i < screenHeight; ++i ) { - curr_line=&texture8_data[scaled_posY*textr_width]; - stepX_r=teal; + curr_line = &texture8_data[scaled_posY*textr_width]; + stepX_r = teal; for( uint j = 0; j < screenWidth; ++j ) { - scaled_posX=stepX_r>>16; + scaled_posX = stepX_r>>16; //map_texture_16[i*screenWidth+j]=pPalette_16[*(curr_line+scaled_posX)]; pRenderer->WritePixel16(tl_x + j, tl_y + i, pPalette_16[*(curr_line+scaled_posX)]); - stepX_r+=scale_increment; + stepX_r += scale_increment; } stepY_r+=scale_increment; scaled_posY=stepY_r>>16; diff -r 42c8807225a2 -r d9caf2b3d8d5 UI/UiGame.cpp --- a/UI/UiGame.cpp Fri Jan 31 17:30:36 2014 +0600 +++ b/UI/UiGame.cpp Sun Feb 02 00:10:40 2014 +0600 @@ -1636,8 +1636,8 @@ void GameUI_DrawPartySpells() { unsigned int v0; // ebp@1 - Texture *v7; // [sp-4h] [bp-1Ch]@12 - Texture *v9; // [sp-4h] [bp-1Ch]@21 + Texture *spell_texture; // [sp-4h] [bp-1Ch]@12 + //Texture *v9; // [sp-4h] [bp-1Ch]@21 v0 = (signed __int64)((double)GetTickCount() * 0.050000001); //v1 = 0; @@ -1660,22 +1660,22 @@ if (pParty->FlyActive()) { if ( pParty->bFlying ) - v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, v0)->uTextureID); + spell_texture = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, v0)->uTextureID); else - v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)->uTextureID); + spell_texture = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)->uTextureID); //if ( pRenderer->pRenderD3D ) - pRenderer->DrawTextureIndexed(8, 8, v7); + pRenderer->DrawTextureIndexed(8, 8, spell_texture); /*else pRenderer->DrawTextureTransparent(8, 8, v7);*/ } if ( pParty->WaterWalkActive() ) { if ( pParty->uFlags & PARTY_FLAGS_1_STANDING_ON_WATER ) - v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, v0)->uTextureID); + spell_texture = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, v0)->uTextureID); else - v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, 0)->uTextureID); + spell_texture = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, 0)->uTextureID); //if ( pRenderer->pRenderD3D ) - pRenderer->DrawTextureIndexed(396, 8, v9); + pRenderer->DrawTextureIndexed(396, 8, spell_texture); /*else pRenderer->DrawTextureTransparent(396, 8, v9);*/ } diff -r 42c8807225a2 -r d9caf2b3d8d5 mm7_3.cpp --- a/mm7_3.cpp Fri Jan 31 17:30:36 2014 +0600 +++ b/mm7_3.cpp Sun Feb 02 00:10:40 2014 +0600 @@ -1892,14 +1892,15 @@ float v41; // [sp+2Ch] [bp-4h]@6 float v42; // [sp+2Ch] [bp-4h]@9 - __debugbreak();//нужно почистить, срабатывает при применении закла Точечный взрыв + //__debugbreak();//нужно почистить, срабатывает при применении закла Точечный взрыв if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) { - v2 = 0; + if ( this->uNumVertices > 0 ) { v3 = (int)&this->field_14[1]; - do + //do + for ( v2 = 0; v2 < this->uNumVertices; ++v2 ) { v4 = *(float *)(v3 - 4); LODWORD(v37) = *(int *)v3; @@ -1941,7 +1942,7 @@ v12 = v36 - (double)pGame->pIndoorCameraD3D->vPartyPos.z; } v13 = v12; - ++v2; + //++v2; *(int *)(v3 + 84) = LODWORD(v13); v14 = *(int *)(v3 + 8); *(float *)(v3 + 76) = v10; @@ -1949,14 +1950,14 @@ *(float *)(v3 + 80) = v11; v3 += 16; } - while ( v2 < this->uNumVertices ); + //while ( v2 < this->uNumVertices ); } } else { v15 = (char *)&this->field_14[1]; - v31 = 3; - do + //do + for ( v31 = 3; v31; --v31 ) { v40 = (double)stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationX) * 0.0000152587890625; v32 = (double)stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationX) * 0.0000152587890625; @@ -1991,9 +1992,9 @@ *((int *)v15 + 22) = v29; *((float *)v15 + 20) = v26; v15 += 16; - --v31; + //--v31; } - while ( v31 ); + //while ( v31 ); } this->uNumVertices = 3; return 1; diff -r 42c8807225a2 -r d9caf2b3d8d5 stru6.cpp --- a/stru6.cpp Fri Jan 31 17:30:36 2014 +0600 +++ b/stru6.cpp Sun Feb 02 00:10:40 2014 +0600 @@ -169,9 +169,9 @@ field_14[j].x = x_offset + scale * *(&pArray1->field_0 + 4 * *(int *)((char *)&pArray2->field_0 + v7)); field_14[j].y = y_offset + scale * *(&pArray1->field_4 + 4 * *(int *)((char *)&pArray2->field_0 + v7)); field_14[j].z = z_offset + scale * *(&pArray1->field_8 + 4 * *(int *)((char *)&pArray2->field_0 + v7)); - int v10 = *(int *)((char *)&pArray2->field_0 + v7); + //int v10 = *(int *)((char *)&pArray2->field_0 + v7); - field_14[j].diffuse = *((int *)&pArray1[1].field_0 + 4 * v10); + field_14[j].diffuse = *((int *)&pArray1[1].field_0 + 4 * (*(int *)((char *)&pArray2->field_0 + v7))); v7 += 4; } @@ -354,18 +354,11 @@ { double v3; // st7@1 double v4; // st7@2 - int v6; // eax@6 - float v7; // ST0C_4@6 - float v8; // ST08_4@6 - float v9; // ST04_4@6 - float v10; // ST00_4@6 Particle_sw local_0; // [sp+1Ch] [bp-7Ch]@1 - float v13; // [sp+88h] [bp-10h]@1 memset(&local_0, 0, 0x68u); v3 = (double)a2->uSpriteFrameID / (double)pObjectList->pObjects[a2->uObjectDescID].uLifetime; - v13 = 512.0 * v3; if ( v3 >= 0.75 ) v4 = (1.0 - v3) * 4.0; else @@ -389,15 +382,10 @@ pGame->pParticleEngine->AddParticle(&local_0); } - v6 = ModulateColor(0xFF3C1E, v4); - v7 = (double)floorf(0.5f + v13); - v8 = (double)a2->vPosition.z; - v9 = (double)a2->vPosition.y; - v10 = (double)a2->vPosition.x; - pStru1->_47829F_sphere_particle(v10, v9, v8, v7, v6); + pStru1->_47829F_sphere_particle((double)a2->vPosition.x, (double)a2->vPosition.y, (double)a2->vPosition.z, + (double)floorf(0.5f + (512.0 * v3)), ModulateColor(0xFF3C1E, v4)); } - //----- (004A77FD) -------------------------------------------------------- void stru6::_4A77FD_implosion_particle_d3d(SpriteObject *a1) {