Mercurial > mm7
comparison Engine/MapInfo.cpp @ 2569:d433439699be
Слияние
author | Ritor1 |
---|---|
date | Thu, 21 May 2015 18:33:07 +0600 |
parents | d569340b05ff |
children |
comparison
equal
deleted
inserted
replaced
2568:f2f2595fe308 | 2569:d433439699be |
---|---|
384 int v9; // eax@1 | 384 int v9; // eax@1 |
385 signed int v10; // ebx@1 | 385 signed int v10; // ebx@1 |
386 signed int result; // eax@1 | 386 signed int result; // eax@1 |
387 signed __int64 v12; // qtt@1 | 387 signed __int64 v12; // qtt@1 |
388 int v13; // ebx@1 | 388 int v13; // ebx@1 |
389 int v14; // edx@10 | |
390 signed int v15; // ebx@20 | 389 signed int v15; // ebx@20 |
391 unsigned __int16 v16; // dx@20 | 390 unsigned __int16 v16; // dx@20 |
392 // ObjectDesc *v17; // ecx@21 | 391 // ObjectDesc *v17; // ecx@21 |
393 unsigned __int16 v18; // ax@24 | 392 unsigned __int16 v18; // ax@24 |
394 int v19; // ST0C_4@27 | 393 int v19; // ST0C_4@27 |
436 v22 = rand(); | 435 v22 = rand(); |
437 return sub_450521_ProllyDropItemAt(v13, v22 % 27 + 20, v21, v20, v19, 0); | 436 return sub_450521_ProllyDropItemAt(v13, v22 % 27 + 20, v21, v20, v19, 0); |
438 } | 437 } |
439 if ( a2->uIndex == 1 ) | 438 if ( a2->uIndex == 1 ) |
440 { | 439 { |
441 v14 = rand() % 51 + 50; | 440 a1a.containing_item.uItemID = ITEM_GOLD_SMALL; |
442 a1a.stru_24.uItemID = 197; | 441 v34 = rand() % 51 + 50; |
443 v34 = v14; | |
444 } | 442 } |
445 else if ( a2->uIndex == 2 ) | 443 else if ( a2->uIndex == 2 ) |
446 { | 444 { |
447 v14 = rand() % 101 + 100; | 445 a1a.containing_item.uItemID = ITEM_GOLD_SMALL; |
448 a1a.stru_24.uItemID = 197; | 446 v34 = rand() % 101 + 100; |
449 v34 = v14; | |
450 } | 447 } |
451 else if ( a2->uIndex == 3 ) | 448 else if ( a2->uIndex == 3 ) |
452 { | 449 { |
453 v14 = rand() % 301 + 200; | 450 a1a.containing_item.uItemID = ITEM_GOLD_MEDIUM; |
454 a1a.stru_24.uItemID = 198; | 451 v34 = rand() % 301 + 200; |
455 v34 = v14; | |
456 } | 452 } |
457 else if ( a2->uIndex == 4 ) | 453 else if ( a2->uIndex == 4 ) |
458 { | 454 { |
459 v14 = rand() % 501 + 500; | 455 a1a.containing_item.uItemID = ITEM_GOLD_MEDIUM; |
460 a1a.stru_24.uItemID = 198; | 456 v34 = rand() % 501 + 500; |
461 v34 = v14; | |
462 } | 457 } |
463 else if ( a2->uIndex == 5 ) | 458 else if ( a2->uIndex == 5 ) |
464 { | 459 { |
465 v14 = rand() % 1001 + 1000; | 460 a1a.containing_item.uItemID = ITEM_GOLD_LARGE; |
466 a1a.stru_24.uItemID = 199; | 461 v34 = rand() % 1001 + 1000; |
467 v34 = v14; | |
468 } | 462 } |
469 else if ( a2->uIndex == 6 ) | 463 else if ( a2->uIndex == 6 ) |
470 { | 464 { |
471 v14 = rand() % 3001 + 2000; | 465 a1a.containing_item.uItemID = ITEM_GOLD_LARGE; |
472 a1a.stru_24.uItemID = 199; | 466 v34 = rand() % 3001 + 2000; |
473 v34 = v14; | |
474 } | 467 } |
475 v15 = 0; | 468 v15 = 0; |
476 v16 = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 469 v16 = pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
477 a1a.uType = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 470 a1a.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
478 v18 = 0; | 471 v18 = 0; |
479 for( int i = 0; i < pObjectList->uNumObjects; i++ ) | 472 for( int i = 0; i < pObjectList->uNumObjects; i++ ) |
480 { | 473 { |
481 if ( pObjectList->pObjects[i].uObjectID == v16 ) | 474 if ( pObjectList->pObjects[i].uObjectID == v16 ) |
482 { | 475 { |
483 v18 = i; | 476 v18 = i; |
484 break; | 477 break; |
485 } | 478 } |
486 } | 479 } |
487 a1a.stru_24.SetIdentified(); | 480 a1a.containing_item.SetIdentified(); |
488 a1a.uObjectDescID = v18; | 481 a1a.uObjectDescID = v18; |
489 a1a.stru_24.uSpecEnchantmentType = v34; | 482 a1a.containing_item.special_enchantment = (ITEM_ENCHANTMENT)v34; |
490 } | 483 } |
491 else | 484 else |
492 { | 485 { |
493 result = a1a.stru_24.GenerateArtifact(); | 486 result = a1a.containing_item.GenerateArtifact(); |
494 if ( !result ) | 487 if ( !result ) |
495 return result; | 488 return result; |
496 v23 = 0; | 489 v23 = 0; |
497 v24 = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 490 v24 = pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
498 a1a.uType = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 491 a1a.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
499 v26 = 0; | 492 v26 = 0; |
500 for( int i = 0; i < pObjectList->uNumObjects; i++ ) | 493 for( int i = 0; i < pObjectList->uNumObjects; i++ ) |
501 { | 494 { |
502 if( v24 == pObjectList->pObjects[i].uObjectID ) | 495 if( v24 == pObjectList->pObjects[i].uObjectID ) |
503 { | 496 { |
504 v26 = i; | 497 v26 = i; |
505 break; | 498 break; |
506 } | 499 } |
507 } | 500 } |
508 a1a.uObjectDescID = v26; | 501 a1a.uObjectDescID = v26; |
509 a1a.stru_24.Reset(); | 502 a1a.containing_item.Reset(); |
510 } | 503 } |
511 a1a.vPosition.y = a2->vPosition.y; | 504 a1a.vPosition.y = a2->vPosition.y; |
512 a1a.uAttributes = 0; | 505 a1a.uAttributes = 0; |
513 a1a.uSoundID = 0; | 506 a1a.uSoundID = 0; |
514 a1a.uFacing = 0; | 507 a1a.uFacing = 0; |