comparison Mouse.cpp @ 954:27bfe64b13b5

Слияние
author Ritor1
date Mon, 29 Apr 2013 09:18:19 +0600
parents 34ed2d5e7cfb
children c8a0f6d89c70
comparison
equal deleted inserted replaced
953:aa7bd15e2655 954:27bfe64b13b5
427 } 427 }
428 428
429 //----- (00469EA4) -------------------------------------------------------- 429 //----- (00469EA4) --------------------------------------------------------
430 void Mouse::_469EA4() 430 void Mouse::_469EA4()
431 { 431 {
432 Mouse *v1; // esi@1 432 //Mouse *v1; // esi@1
433 unsigned int v2; // eax@2 433 unsigned int pTextureID; // eax@2
434 Texture *v3; // edi@2 434 Texture *pTexture; // edi@2
435 unsigned int v4; // ecx@3 435 unsigned int v4; // ecx@3
436 unsigned int v5; // eax@3 436 unsigned int v5; // eax@3
437 unsigned int v6; // ebx@5 437 unsigned int v6; // ebx@5
438 int v7; // ecx@15 438 int v7; // ecx@15
439 int v8; // ecx@25 439 int v8; // ecx@25
447 unsigned int v16; // [sp+14h] [bp-14h]@25 447 unsigned int v16; // [sp+14h] [bp-14h]@25
448 unsigned __int16 *v17; // [sp+18h] [bp-10h]@25 448 unsigned __int16 *v17; // [sp+18h] [bp-10h]@25
449 int v18; // [sp+1Ch] [bp-Ch]@27 449 int v18; // [sp+1Ch] [bp-Ch]@27
450 int v19; // [sp+20h] [bp-8h]@15 450 int v19; // [sp+20h] [bp-8h]@15
451 unsigned __int16 *v20; // [sp+20h] [bp-8h]@28 451 unsigned __int16 *v20; // [sp+20h] [bp-8h]@28
452 int v21; // [sp+24h] [bp-4h]@12 452 int pTextureWidth; // [sp+24h] [bp-4h]@12
453 unsigned __int16 *v22; // [sp+24h] [bp-4h]@25 453 unsigned __int16 *v22; // [sp+24h] [bp-4h]@25
454 454
455 v1 = this; 455 //v1 = this;
456 if ( pParty->pPickedItem.uItemID ) 456 if ( pParty->pPickedItem.uItemID )
457 { 457 {
458 v2 = pIcons_LOD->LoadTexture( 458 pTextureID = pIcons_LOD->LoadTexture(pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, TEXTURE_16BIT_PALETTE);
459 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, 459 pTexture = (Texture *)(pTextureID != -1 ? (int)&pIcons_LOD->pTextures[pTextureID] : 0);
460 TEXTURE_16BIT_PALETTE);
461 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0);
462 if (pAsyncMouse) 460 if (pAsyncMouse)
463 { 461 {
464 v4 = *((int *)pAsyncMouse + 6); 462 v4 = *((int *)pAsyncMouse + 6);
465 v5 = *((int *)pAsyncMouse + 7); 463 v5 = *((int *)pAsyncMouse + 7);
466 } 464 }
479 if ( (v5 & 0x80000000u) != 0 ) 477 if ( (v5 & 0x80000000u) != 0 )
480 { 478 {
481 v6 = 0; 479 v6 = 0;
482 v15 = 0; 480 v15 = 0;
483 } 481 }
484 if ( (signed int)(v3->uTextureWidth + a2) <= 640 ) 482 if ( (signed int)(pTexture->uTextureWidth + a2) <= 640 )
485 v21 = v3->uTextureWidth; 483 pTextureWidth = pTexture->uTextureWidth;
486 else 484 else
487 v21 = 640 - a2; 485 pTextureWidth = 640 - a2;
488 if ( (signed int)(v3->uTextureHeight + v6) <= 480 ) 486 if ( (signed int)(pTexture->uTextureHeight + v6) <= 480 )
489 { 487 {
490 v19 = v3->uTextureHeight; 488 v19 = pTexture->uTextureHeight;
491 v7 = v3->uTextureHeight; 489 v7 = pTexture->uTextureHeight;
492 } 490 }
493 else 491 else
494 { 492 {
495 v7 = 480 - v6; 493 v7 = 480 - v6;
496 v19 = 480 - v6; 494 v19 = 480 - v6;
497 } 495 }
498 if ( !v1->pCursorBitmap3_sysmembits_16bit 496 if ( !this->pCursorBitmap3_sysmembits_16bit
499 || a2 != v1->field_40 497 || a2 != this->field_40
500 || v6 != v1->field_44 498 || v6 != this->field_44
501 || a2 + v21 != v1->field_48 499 || a2 + pTextureWidth != this->field_48
502 || v6 + v7 != v1->field_4C ) 500 || v6 + v7 != this->field_4C )
503 { 501 {
504 if ( v1->pCursorBitmap3_sysmembits_16bit ) 502 if ( this->pCursorBitmap3_sysmembits_16bit )
505 free(v1->pCursorBitmap3_sysmembits_16bit); 503 free(this->pCursorBitmap3_sysmembits_16bit);
506 v1->pCursorBitmap3_sysmembits_16bit = (unsigned __int16 *)operator new(2 * v3->uTextureHeight 504 this->pCursorBitmap3_sysmembits_16bit = (unsigned __int16 *)operator new(2 * pTexture->uTextureHeight * pTexture->uTextureWidth);
507 * v3->uTextureWidth); 505 this->field_40 = a2;
508 v1->field_40 = a2; 506 this->field_48 = a2 + pTextureWidth;
509 v1->field_48 = a2 + v21; 507 this->field_44 = v6;
510 v1->field_44 = v6; 508 this->field_4C = v6 + v19;
511 v1->field_4C = v6 + v19;
512 } 509 }
513 v8 = v1->field_44; 510 v8 = this->field_44;
514 v22 = v1->pCursorBitmap3_sysmembits_16bit; 511 v22 = this->pCursorBitmap3_sysmembits_16bit;
515 v17 = pRenderer->pTargetSurface; 512 v17 = pRenderer->pTargetSurface;
516 v16 = pRenderer->uTargetSurfacePitch; 513 v16 = pRenderer->uTargetSurfacePitch;
517 if ( v8 < v1->field_4C ) 514 if ( v8 < this->field_4C )
518 { 515 {
519 v9 = v1->field_48; 516 v9 = this->field_48;
520 v10 = pRenderer->uTargetSurfacePitch * v8; 517 v10 = pRenderer->uTargetSurfacePitch * v8;
521 do 518 do
522 { 519 {
523 v11 = v1->field_40; 520 v11 = this->field_40;
524 v18 = v1->field_40; 521 v18 = this->field_40;
525 if ( v11 < v9 ) 522 if ( v11 < v9 )
526 { 523 {
527 v20 = &v17[v10 + v11]; 524 v20 = &v17[v10 + v11];
528 do 525 do
529 { 526 {
531 v13 = v22; 528 v13 = v22;
532 ++v18; 529 ++v18;
533 ++v20; 530 ++v20;
534 ++v22; 531 ++v22;
535 *v13 = *v12; 532 *v13 = *v12;
536 v9 = v1->field_48; 533 v9 = this->field_48;
537 } 534 }
538 while ( v18 < v9 ); 535 while ( v18 < v9 );
539 } 536 }
540 v10 += v16; 537 v10 += v16;
541 ++v8; 538 ++v8;
542 } 539 }
543 while ( v8 < v1->field_4C ); 540 while ( v8 < this->field_4C );
544 v6 = v15; 541 v6 = v15;
545 } 542 }
546 if (pParty->pPickedItem.Broken()) 543 if (pParty->pPickedItem.Broken())
547 pRenderer->DrawTransparentRedShade(a2, v6, v3); 544 pRenderer->DrawTransparentRedShade(a2, v6, pTexture);
548 else if (!pParty->pPickedItem.Identified()) 545 else if (!pParty->pPickedItem.Identified())
549 pRenderer->DrawTransparentGreenShade(a2, v6, v3); 546 pRenderer->DrawTransparentGreenShade(a2, v6, pTexture);
550 else 547 else
551 pRenderer->DrawTextureTransparent(a2, v6, v3); 548 pRenderer->DrawTextureTransparent(a2, v6, pTexture);
552 } 549 }
553 } 550 }
554 else 551 else
555 { 552 {
556 if ( this->pCursorBitmap3_sysmembits_16bit ) 553 if ( this->pCursorBitmap3_sysmembits_16bit )
557 { 554 {
558 free(this->pCursorBitmap3_sysmembits_16bit); 555 free(this->pCursorBitmap3_sysmembits_16bit);
559 v1->pCursorBitmap3_sysmembits_16bit = 0; 556 this->pCursorBitmap3_sysmembits_16bit = 0;
560 } 557 }
561 } 558 }
562 } 559 }
563 560
564 //----- (0046A080) -------------------------------------------------------- 561 //----- (0046A080) --------------------------------------------------------