comparison PaletteManager.cpp @ 100:67f843a23f8b

Outdoor::Load
author Nomad
date Sun, 04 Nov 2012 13:58:15 +0200
parents 51a5b0dc3f30
children
comparison
equal deleted inserted replaced
99:6305c1cd9f6e 100:67f843a23f8b
327 signed int v80; // [sp+C5Ch] [bp+8h]@43 327 signed int v80; // [sp+C5Ch] [bp+8h]@43
328 int v81; // [sp+C5Ch] [bp+8h]@57 328 int v81; // [sp+C5Ch] [bp+8h]@57
329 329
330 v2 = this; 330 v2 = this;
331 v3 = (char *)this + 768 * a2; 331 v3 = (char *)this + 768 * a2;
332 if ( this->field_267AD3 || this->field_267AD4 || this->field_267AD5 ) 332 if (pPalette_tintColor[0] || pPalette_tintColor[1] || pPalette_tintColor[2])
333 { 333 {
334 v8 = 0; 334 v8 = 0;
335 i = 0; 335 i = 0;
336 do 336 do
337 { 337 {
338 v9 = (float *)((char *)v63 + v8); 338 v9 = (float *)((char *)v63 + v8);
339 v10 = (float *)((char *)a6 + v8); 339 v10 = (float *)((char *)a6 + v8);
340 v11 = (float *)((char *)v64 + v8); 340 v11 = (float *)((char *)v64 + v8);
341 v12 = v2->field_267AD4; 341 v12 = pPalette_tintColor[1];
342 LODWORD(v75) = v2->field_267AD5 + (unsigned __int8)v3[2]; 342 LODWORD(v75) = pPalette_tintColor[2] + (unsigned __int8)v3[2];
343 v13 = v12 + (unsigned __int8)v3[1]; 343 v13 = v12 + (unsigned __int8)v3[1];
344 LODWORD(v14) = (unsigned __int8)*v3; 344 LODWORD(v14) = (unsigned __int8)*v3;
345 v15 = (double)SLODWORD(v75) * 0.00196078431372549; 345 v15 = (double)SLODWORD(v75) * 0.00196078431372549;
346 LODWORD(v75) = v13; 346 LODWORD(v75) = v13;
347 LODWORD(v75) = LODWORD(v14) + v2->field_267AD3; 347 LODWORD(v75) = LODWORD(v14) + pPalette_tintColor[0];
348 v16 = (double)v13 * 0.00196078431372549; 348 v16 = (double)v13 * 0.00196078431372549;
349 v17 = (double)SLODWORD(v75) * 0.00196078431372549; 349 v17 = (double)SLODWORD(v75) * 0.00196078431372549;
350 RGB2HSV(v11, v9, v17, v16, v15, v10); 350 RGB2HSV(v11, v9, v17, v16, v15, v10);
351 v3 += 3; 351 v3 += 3;
352 v8 = i + 4; 352 v8 = i + 4;
498 v19 = __OFSUB__(i + 4, 1024); 498 v19 = __OFSUB__(i + 4, 1024);
499 v18 = i - 1020 < 0; 499 v18 = i - 1020 < 0;
500 i += 4; 500 i += 4;
501 } 501 }
502 while ( v18 ^ v19 ); 502 while ( v18 ^ v19 );
503 v45 = v2->field_267AD0; 503 v45 = pPalette_mistColor[0];
504 if ( v45 || v2->field_267AD1 || v2->field_267AD2 ) 504 if (v45 || pPalette_mistColor[1] || pPalette_mistColor[2])
505 { 505 {
506 v46 = (double)v45; 506 v46 = (double)v45;
507 v80 = v2->field_267AD1; 507 v80 = pPalette_mistColor[1];
508 v47 = v2->field_267AD2; 508 v47 = pPalette_mistColor[2];
509 v70 = v46 * 0.00392156862745098; 509 v70 = v46 * 0.00392156862745098;
510 *((float *)&v71 + 1) = (double)v80 * 0.00392156862745098; 510 *((float *)&v71 + 1) = (double)v80 * 0.00392156862745098;
511 v75 = (double)v47 * 0.00392156862745098; 511 v75 = (double)v47 * 0.00392156862745098;
512 RGB2HSV(&v68, &v67, v70, *((float *)&v71 + 1), v75, (float *)&v66); 512 RGB2HSV(&v68, &v67, v70, *((float *)&v71 + 1), v75, (float *)&v66);
513 } 513 }
536 { 536 {
537 a1 = a1 * 31.0; 537 a1 = a1 * 31.0;
538 a2a = a2a * 31.0; 538 a2a = a2a * 31.0;
539 a3 = a3 * 31.0; 539 a3 = a3 * 31.0;
540 } 540 }
541 if ( v2->field_267AD0 || v2->field_267AD1 || v2->field_267AD2 ) 541 if (pPalette_mistColor[0] || pPalette_mistColor[1] || pPalette_mistColor[2])
542 { 542 {
543 v55 = (double)v72 * 0.03225806451612903; 543 v55 = (double)v72 * 0.03225806451612903;
544 v52 = (signed __int64)((double)(1 << v2->uNumTargetRBits) * v70 * v55 + a1 * (1.0 - v55)); 544 v52 = (signed __int64)((double)(1 << v2->uNumTargetRBits) * v70 * v55 + a1 * (1.0 - v55));
545 v53 = (signed __int64)((double)(1 << v51) * *((float *)&v71 + 1) * v55 + a2a * (1.0 - v55)); 545 v53 = (signed __int64)((double)(1 << v51) * *((float *)&v71 + 1) * v55 + a2a * (1.0 - v55));
546 v54 = (signed __int64)((double)(1 << v2->uNumTargetBBits) * v75 * v55 + a3 * (1.0 - v55)); 546 v54 = (signed __int64)((double)(1 << v2->uNumTargetBBits) * v75 * v55 + a3 * (1.0 - v55));