comparison Render.cpp @ 1675:f1cdf8c062d4

MainMenuUI_Credits_Loop() and CreditsTextureScroll
author Ritor1
date Thu, 19 Sep 2013 16:45:21 +0600
parents 5302a9811767
children 4da5644df18f
comparison
equal deleted inserted replaced
1674:2a5f2aaec367 1675:f1cdf8c062d4
6912 } 6912 }
6913 } 6913 }
6914 } 6914 }
6915 6915
6916 //----- (004A5D33) -------------------------------------------------------- 6916 //----- (004A5D33) --------------------------------------------------------
6917 void Render::_4A5D33(unsigned int pX, unsigned int pY, int a4, int a5, RGBTexture *pTexture) 6917 void Render::CreditsTextureScroll(unsigned int pX, unsigned int pY, int move_X, int move_Y, RGBTexture *pTexture)
6918 { 6918 {
6919 Render *v6; // esi@1
6920 unsigned __int16 *v7; // ebx@3 6919 unsigned __int16 *v7; // ebx@3
6921 int v8; // ecx@3 6920 int full_width; // ecx@3
6922 int v9; // edx@3 6921 int full_height; // edi@3
6923 int v10; // ecx@3
6924 int v11; // edi@3
6925 signed int v12; // eax@4
6926 unsigned int v13; // eax@5
6927 signed int v14; // eax@6
6928 unsigned int v15; // eax@7
6929 unsigned int v16; // edx@8
6930 int v17; // eax@10
6931 unsigned int v18; // ecx@11
6932 unsigned int v19; // ecx@14
6933 int v20; // eax@16
6934 unsigned int v21; // ecx@17
6935 int v22; // eax@21
6936 int v23; // edi@23 6922 int v23; // edi@23
6937 int v24; // [sp+Ch] [bp-4h]@3
6938 int a2a; // [sp+18h] [bp+8h]@21
6939 unsigned int teal; // [sp+1Ch] [bp+Ch]@20
6940 int a4a; // [sp+20h] [bp+10h]@3
6941 int a4b; // [sp+20h] [bp+10h]@21
6942 unsigned __int16 *pTexturea; // [sp+28h] [bp+18h]@3 6923 unsigned __int16 *pTexturea; // [sp+28h] [bp+18h]@3
6943 6924
6944 v6 = this;
6945 if ( this->uNumSceneBegins && pTexture ) 6925 if ( this->uNumSceneBegins && pTexture )
6946 { 6926 {
6947 v7 = &this->pTargetSurface[pX + pY * this->uTargetSurfacePitch]; 6927 v7 = &this->pTargetSurface[pX + pY * this->uTargetSurfacePitch];
6948 v8 = pTexture->uWidth; 6928 full_width = pTexture->uWidth - move_X;
6949 v24 = pTexture->uWidth; 6929 full_height = pTexture->uHeight - move_Y;
6950 v9 = a4 + a5 * v8; 6930 pTexturea = &pTexture->pPixels[move_X + move_Y * pTexture->uWidth];
6951 v10 = v8 - a4; 6931 if ( this->bClip )
6952 a4a = v10; 6932 {
6953 v11 = pTexture->uHeight - a5; 6933 if ( pX < this->uClipX )//если кадр выходит за правую границу
6954 pTexturea = &pTexture->pPixels[v9]; 6934 {
6955 if ( v6->bClip ) 6935 pTexturea = (unsigned __int16 *)((char *)pTexturea + (2 * (this->uClipX - pX)));
6956 { 6936 full_width += pX - this->uClipX;
6957 v12 = v6->uClipX; 6937 v7 = (unsigned __int16 *)((char *)v7 + (2 * (this->uClipX - pX)));
6958 if ( (signed int)pX < v12 ) 6938 }
6959 { 6939 if ( pY < this->uClipY )//если кадр выходит за верхнюю границу
6960 v13 = 2 * (v12 - pX); 6940 {
6961 pTexturea = (unsigned __int16 *)((char *)pTexturea + v13); 6941 pTexturea += pTexture->uWidth * (this->uClipY - pY);
6962 v10 += pX - v6->uClipX; 6942 full_height += pY - this->uClipY;
6963 v7 = (unsigned __int16 *)((char *)v7 + v13); 6943 v7 += this->uTargetSurfacePitch * (this->uClipY - pY);
6964 a4a = v10; 6944 }
6965 } 6945 if ( this->uClipX < pX )//если правая граница окна меньше х координаты кадра
6966 v14 = v6->uClipY; 6946 this->uClipX = pX;
6967 if ( (signed int)pY < v14 ) 6947 if ( this->uClipY < pY )//если верхняя граница окна меньше y координаты кадра
6968 { 6948 this->uClipY = pY;
6969 v15 = v14 - pY; 6949 if ( (full_width + this->uClipX) > this->uClipZ )//если ширина кадра выходит за правую границу
6970 pTexturea += v24 * v15; 6950 {
6971 v11 += pY - v6->uClipY; 6951 if ( this->uClipX < pX )
6972 v10 = a4a; 6952 this->uClipX = pX;
6973 v7 += v6->uTargetSurfacePitch * v15; 6953 full_width = this->uClipZ - this->uClipX;
6974 } 6954 }
6975 v16 = v6->uClipX; 6955 if ( (full_height + this->uClipY) > this->uClipW )//если высота кадра выходит за нижнюю границу
6976 if ( (signed int)v16 < (signed int)pX ) 6956 {
6977 v16 = pX; 6957 if ( this->uClipY < pY )
6978 v17 = v6->uClipZ; 6958 this->uClipY = pY;
6979 if ( (signed int)(v10 + v16) > v17 ) 6959 full_height = this->uClipW - this->uClipY;
6980 { 6960 }
6981 v18 = v6->uClipX; 6961 }
6982 if ( (signed int)v18 < (signed int)pX ) 6962 if ( full_height > 0 )
6983 v18 = pX; 6963 {
6984 a4a = v17 - v18;
6985 }
6986 v19 = v6->uClipY;
6987 if ( (signed int)v19 < (signed int)pY )
6988 v19 = pY;
6989 v20 = v6->uClipW;
6990 if ( (signed int)(v11 + v19) > v20 )
6991 {
6992 v21 = v6->uClipY;
6993 if ( (signed int)v21 < (signed int)pY )
6994 v21 = pY;
6995 v11 = v20 - v21;
6996 }
6997 }
6998 teal = TargetColor(0, 0xFFu, 0xFFu);
6999 if ( v11 > 0 )
7000 {
7001 v22 = a4a;
7002 a2a = v11;
7003 a4b = 2 * (v24 - a4a);
7004 do 6964 do
7005 { 6965 {
7006 if ( v22 > 0 ) 6966 if ( full_width > 0 )
7007 { 6967 {
7008 v23 = v22; 6968 v23 = full_width;
7009 do 6969 do
7010 { 6970 {
7011 if ( *pTexturea != teal ) 6971 if ( *pTexturea != TargetColor(0, 0xFFu, 0xFFu) )
7012 *v7 = *pTexturea; 6972 *v7 = *pTexturea;
7013 ++pTexturea; 6973 ++pTexturea;
7014 ++v7; 6974 ++v7;
7015 --v23; 6975 --v23;
7016 } 6976 }
7017 while ( v23 ); 6977 while ( v23 );
7018 } 6978 }
7019 v7 += v6->uTargetSurfacePitch - v22; 6979 v7 += this->uTargetSurfacePitch - full_width;
7020 pTexturea = (unsigned __int16 *)((char *)pTexturea + a4b); 6980 pTexturea = (unsigned __int16 *)((char *)pTexturea + 2 * (pTexture->uWidth - full_width));
7021 --a2a; 6981 --full_height;
7022 } 6982 }
7023 while ( a2a ); 6983 while ( full_height );
7024 } 6984 }
7025 } 6985 }
7026 } 6986 }
7027 6987
7028 //----- (004A6E7E) -------------------------------------------------------- 6988 //----- (004A6E7E) --------------------------------------------------------
8390 v5->uParticleTrailColor = v5->uParticleTrailColorB | (v4 << 8); 8350 v5->uParticleTrailColor = v5->uParticleTrailColorB | (v4 << 8);
8391 } 8351 }
8392 SetUserInterface(pParty->alignment, true); 8352 SetUserInterface(pParty->alignment, true);
8393 if ( pVideoPlayer->pVideoFrame.pPixels ) 8353 if ( pVideoPlayer->pVideoFrame.pPixels )
8394 pVideoPlayer->pVideoFrame.Load(pVideoPlayer->pVideoFrameTextureFilename, 1); 8354 pVideoPlayer->pVideoFrame.Load(pVideoPlayer->pVideoFrameTextureFilename, 1);
8395 if ( uCurrentMenuID != 6 ) 8355 if ( uCurrentMenuID != MENU_CREATEPARTY )
8396 { 8356 {
8397 if ( uCurrentMenuID == 8 ) 8357 if ( uCurrentMenuID == MENU_CREDITSPROC )
8398 dword_A74C88 = 1; 8358 dword_A74C88 = 1;
8399 } 8359 }
8400 else 8360 else
8401 { 8361 {
8402 if ( uCurrentMenuID ) 8362 if ( uCurrentMenuID )