comparison mm7_4.cpp @ 746:852ec78d9548

Слияние
author Ritor1
date Fri, 22 Mar 2013 23:46:32 +0600
parents 0b7a55e955f2 225d92620998
children 585490c29945
comparison
equal deleted inserted replaced
745:0b7a55e955f2 746:852ec78d9548
4931 4931
4932 4932
4933 4933
4934 4934
4935 //----- (004A19D8) -------------------------------------------------------- 4935 //----- (004A19D8) --------------------------------------------------------
4936 int __fastcall sub_4A19D8(unsigned int a1, unsigned int a2) 4936 unsigned int BlendColors(unsigned int a1, unsigned int a2)
4937 { 4937 {
4938 signed __int64 v2; // ST10_8@1 4938 /*signed __int64 v2; // ST10_8@1
4939 double v3; // st7@1 4939 double v3; // st7@1
4940 float v4; // ST24_4@1 4940 float v4; // ST24_4@1
4941 double v5; // ST10_8@1 4941 double v5; // ST10_8@1
4942 int v6; // ST1C_4@1 4942 int v6; // ST1C_4@1
4943 float v7; // ST24_4@1 4943 float v7; // ST24_4@1
4944 double v8; // ST10_8@1 4944 double v8; // ST10_8@1
4945 unsigned __int8 v9; // ST20_1@1 4945 unsigned __int8 v9; // ST20_1@1
4946 float v10; // ST24_4@1 4946 float v10; // ST24_4@1
4947 double v11; // ST10_8@1 4947 double v11; // ST10_8@1
4948 float v12; // ST24_4@1 4948 float v12; // ST24_4@1
4949 double v13; // ST08_8@1 4949 double v13; // ST08_8@1*/
4950 4950
4951 v2 = a1 >> 24; 4951 uint alpha = (uint)floorf(0.5f + (a1 >> 24) / 255.0f *
4952 v3 = (double)v2 * 0.0039215689; 4952 (a2 >> 24) / 255.0f * 255.0f),
4953 red = (uint)floorf(0.5f + ((a1 >> 16) & 0xFF) / 255.0f *
4954 ((a2 >> 16) & 0xFF) / 255.0f * 255.0f),
4955 green = (uint)floorf(0.5f + ((a1 >> 8) & 0xFF) / 255.0f *
4956 ((a2 >> 8) & 0xFF) / 255.0f * 255.0f),
4957 blue = (uint)floorf(0.5f + ((a1 >> 0) & 0xFF) / 255.0f *
4958 ((a2 >> 0) & 0xFF) / 255.0f * 255.0f);
4959 return (alpha << 24) | (red << 16) | (green << 8) | blue;
4960 /*v2 = a1 >> 24;
4961 v3 = (double)v2 / 255.0f;
4962 HIDWORD(v2) = 0;
4953 LODWORD(v2) = a2 >> 24; 4963 LODWORD(v2) = a2 >> 24;
4954 v4 = v3 * (double)v2 * 0.0039215689 * 255.0; 4964 v4 = v3 * (double)v2 / 255.0f * 255.0;
4955 v5 = v4 + 6.7553994e15; 4965 v5 = v4 + 6.7553994e15;
4956 v6 = LODWORD(v5); 4966 v6 = LODWORD(v5);
4957 v7 = (double)((a1 >> 16) & 0xFFi64) * 0.0039215689 * (double)((a2 >> 16) & 0xFF) * 0.0039215689 * 255.0; 4967 v7 = (double)((a1 >> 16) & 0xFFi64) / 255.0f * (double)((a2 >> 16) & 0xFF) * 0.0039215689 * 255.0;
4958 v8 = v7 + 6.7553994e15; 4968 v8 = v7 + 6.7553994e15;
4959 v9 = LOBYTE(v8); 4969 v9 = LOBYTE(v8);
4960 v10 = (double)((unsigned __int16)a1 >> 8) * 0.0039215689 * (double)((unsigned __int16)a2 >> 8) * 0.0039215689 * 255.0; 4970 v10 = (double)((unsigned __int16)a1 >> 8) / 255.0f * (double)((unsigned __int16)a2 >> 8) / 255.0f * 255.0;
4961 v11 = v10 + 6.7553994e15; 4971 v11 = v10 + 6.7553994e15;
4962 v12 = (double)(a1 & 0xFFi64) * 0.0039215689 * (double)(unsigned __int8)a2 * 0.0039215689 * 255.0; 4972 v12 = (double)(a1 & 0xFFi64) / 255.0f * (double)(unsigned __int8)a2 / 255.0f * 255.0;
4963 v13 = v12 + 6.7553994e15; 4973 v13 = v12 + 6.7553994e15;
4964 return LOBYTE(v13) | ((LOBYTE(v11) | (((v6 << 8) | v9) << 8)) << 8); 4974 return LOBYTE(v13) | ((LOBYTE(v11) | (((v6 << 8) | v9) << 8)) << 8);*/
4965 } 4975 }
4966 4976
4967 4977
4968 4978
4969 //----- (004A46E6) -------------------------------------------------------- 4979 //----- (004A46E6) --------------------------------------------------------