Mercurial > mm7
comparison mm7_2.cpp @ 1441:b67a3e0d6fc3
Слияние
author | Ritor1 |
---|---|
date | Sat, 27 Jul 2013 09:36:55 +0600 |
parents | 468f434a8d8a 2423bc2af692 |
children | a8b1bbac95d4 |
comparison
equal
deleted
inserted
replaced
1440:a72236d60edc | 1441:b67a3e0d6fc3 |
---|---|
570 num_monsters = v5; | 570 num_monsters = v5; |
571 LABEL_22: | 571 LABEL_22: |
572 v4 /= 2; | 572 v4 /= 2; |
573 goto LABEL_24; | 573 goto LABEL_24; |
574 } | 574 } |
575 __debugbreak(); // warning C4700: uninitialized local variable 'v27' used | |
575 if ( uDialogueType == 88 ) | 576 if ( uDialogueType == 88 ) |
576 num_monsters = 2 * v4; | 577 num_monsters = 2 * v4; |
577 else | 578 else |
578 v4 = v27; | 579 v4 = v27; |
579 LABEL_24: | 580 LABEL_24: |
713 { | 714 { |
714 if ( v0 == 3 || v0 == 5 || v0 == 4 ) | 715 if ( v0 == 3 || v0 == 5 || v0 == 4 ) |
715 { | 716 { |
716 UI_CreateEndConversationButton(); | 717 UI_CreateEndConversationButton(); |
717 dialog_menu_id = HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT; | 718 dialog_menu_id = HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT; |
718 sub_4B3AD4(in_current_building_type); | 719 InitializaDialogueOptions_Shops(in_current_building_type); |
719 } | 720 } |
720 else | 721 else |
721 { | 722 { |
722 if ( v0 != 102 && v0 != 103 && v0 != 104 ) | 723 if ( v0 != 102 && v0 != 103 && v0 != 104 ) |
723 { | 724 { |
724 pVideoPlayer->_4BF5B2(); | 725 pVideoPlayer->_4BF5B2(); |
725 //LABEL_28: | 726 //LABEL_28: |
726 dialog_menu_id = HOUSE_DIALOGUE_MAIN; | 727 dialog_menu_id = HOUSE_DIALOGUE_MAIN; |
727 sub_4B3B42(in_current_building_type); | 728 InitializaDialogueOptions(in_current_building_type); |
728 return 1; | 729 return 1; |
729 } | 730 } |
730 pVideoPlayer->_4BF5B2(); | 731 pVideoPlayer->_4BF5B2(); |
731 UI_CreateEndConversationButton(); | 732 UI_CreateEndConversationButton(); |
732 dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN; | 733 dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN; |
733 sub_4B3A72(in_current_building_type); | 734 InitializaDialogueOptions_Tavern(in_current_building_type); |
734 } | 735 } |
735 return 1; | 736 return 1; |
736 } | 737 } |
737 pVideoPlayer->_4BF5B2(); | 738 pVideoPlayer->_4BF5B2(); |
738 UI_CreateEndConversationButton(); | 739 UI_CreateEndConversationButton(); |
739 dialog_menu_id = HOUSE_DIALOGUE_MAIN; | 740 dialog_menu_id = HOUSE_DIALOGUE_MAIN; |
740 sub_4B3B42(in_current_building_type); | 741 InitializaDialogueOptions(in_current_building_type); |
741 return 1; | 742 return 1; |
742 } | 743 } |
743 pDialogueNPCCount = 0; | 744 pDialogueNPCCount = 0; |
744 pDialogueWindow->Release(); | 745 pDialogueWindow->Release(); |
745 dialog_menu_id = HOUSE_DIALOGUE_NULL; | 746 dialog_menu_id = HOUSE_DIALOGUE_NULL; |
2337 LOWORD(v9) = v9 & 0x1C00; | 2338 LOWORD(v9) = v9 & 0x1C00; |
2338 v11 = v7 + v4; | 2339 v11 = v7 + v4; |
2339 LOWORD(v7) = v5 & 0xE0; | 2340 LOWORD(v7) = v5 & 0xE0; |
2340 v12 = v7 + v11; | 2341 v12 = v7 + v11; |
2341 LOWORD(v7) = v8 & 0xE0; | 2342 LOWORD(v7) = v8 & 0xE0; |
2343 __debugbreak(); // warning C4700: uninitialized local variable 'v10' used | |
2342 return (PID_TYPE(v8) + PID_TYPE(v5) + PID_TYPE(a3a) + PID_TYPE(v6)) | (v7 + v12) | ((v8 & 0x1C00) | 2344 return (PID_TYPE(v8) + PID_TYPE(v5) + PID_TYPE(a3a) + PID_TYPE(v6)) | (v7 + v12) | ((v8 & 0x1C00) |
2343 + (v5 & 0x1C00) | 2345 + (v5 & 0x1C00) |
2344 + v9 | 2346 + v9 |
2345 + (__PAIR__(v10, (unsigned __int16)a4 >> 2) & 0x1C00)); | 2347 + (__PAIR__(v10, (unsigned __int16)a4 >> 2) & 0x1C00)); |
2346 } | 2348 } |
2991 { | 2993 { |
2992 case 0x100: return 4; // Grandmaster | 2994 case 0x100: return 4; // Grandmaster |
2993 case 0x80: return 3; // Master | 2995 case 0x80: return 3; // Master |
2994 case 0x40: return 2; // Expert | 2996 case 0x40: return 2; // Expert |
2995 case 0x00: return 1; // Normal | 2997 case 0x00: return 1; // Normal |
2996 default: | 2998 } |
2997 assert(false); | 2999 assert(false); |
2998 } | 3000 return 0; |
2999 } | 3001 } |
3000 | 3002 |
3001 //----- (0045828B) -------------------------------------------------------- | 3003 //----- (0045828B) -------------------------------------------------------- |
3002 unsigned int __fastcall GetSpellColor(signed int a1) | 3004 unsigned int __fastcall GetSpellColor(signed int a1) |
3003 { | 3005 { |
3340 return result; | 3342 return result; |
3341 } | 3343 } |
3342 // 6836C8: using guessed type int 6836C8_num_decorations_6807E8; | 3344 // 6836C8: using guessed type int 6836C8_num_decorations_6807E8; |
3343 | 3345 |
3344 //----- (004621DA) -------------------------------------------------------- | 3346 //----- (004621DA) -------------------------------------------------------- |
3345 int __fastcall int_get_vector_length(signed int a1, signed int a2, signed int a3) | 3347 int int_get_vector_length(signed int x, signed int y, signed int z) |
3346 { | 3348 { |
3347 signed int v3; // eax@2 | 3349 signed int v3; // eax@2 |
3348 signed int v4; // eax@3 | 3350 |
3349 signed int v5; // esi@4 | 3351 if ( x < y ) |
3350 signed int v6; // esi@6 | 3352 { |
3351 | 3353 v3 = x; |
3352 if ( a1 < a2 ) | 3354 x = y; |
3353 { | 3355 y = v3; |
3354 v3 = a1; | 3356 } |
3355 a1 = a2; | 3357 if ( x < z ) |
3356 a2 = v3; | 3358 { |
3357 } | 3359 v3 = x; |
3358 v4 = a3; | 3360 x = z; |
3359 if ( a1 < a3 ) | 3361 z = v3; |
3360 { | 3362 } |
3361 v5 = a1; | 3363 if ( y < z ) |
3362 a1 = a3; | 3364 { |
3363 v4 = v5; | 3365 v3 = y; |
3364 } | 3366 y = z; |
3365 if ( a2 < v4 ) | 3367 z = v3; |
3366 { | 3368 } |
3367 v6 = a2; | 3369 return (11 * y >> 5) + x + (z >> 2); |
3368 a2 = v4; | |
3369 v4 = v6; | |
3370 } | |
3371 return (11 * a2 >> 5) + a1 + (v4 >> 2); | |
3372 } | 3370 } |
3373 | 3371 |
3374 OPENFILENAMEA ofn; | 3372 OPENFILENAMEA ofn; |
3375 //----- (0046271C) -------------------------------------------------------- | 3373 //----- (0046271C) -------------------------------------------------------- |
3376 void __cdecl crt_init_globals_46271C() | 3374 void __cdecl crt_init_globals_46271C() |
5367 assert(sizeof(PaletteManager) == 0x267AF0); | 5365 assert(sizeof(PaletteManager) == 0x267AF0); |
5368 assert(sizeof(ViewingParams) == 0x26C); | 5366 assert(sizeof(ViewingParams) == 0x26C); |
5369 assert(sizeof(IndoorCamera) == 0x50); | 5367 assert(sizeof(IndoorCamera) == 0x50); |
5370 assert(sizeof(Bloodsplat) == 0x28); | 5368 assert(sizeof(Bloodsplat) == 0x28); |
5371 assert(sizeof(BloodsplatContainer) == 0xA0C); | 5369 assert(sizeof(BloodsplatContainer) == 0xA0C); |
5372 assert(sizeof(stru167) == 0x18); | 5370 assert(sizeof(TrailParticle) == 0x18); |
5373 assert(sizeof(EventIndex) == 0xC); | 5371 assert(sizeof(EventIndex) == 0xC); |
5374 assert(sizeof(_2devent) == 0x34); | 5372 assert(sizeof(_2devent) == 0x34); |
5375 assert(sizeof(stru176) == 0x20); | 5373 assert(sizeof(stru176) == 0x20); |
5376 assert(sizeof(SavegameHeader) == 0x64); | 5374 assert(sizeof(SavegameHeader) == 0x64); |
5377 assert(sizeof(SavegameList) == 0x3138); | 5375 assert(sizeof(SavegameList) == 0x3138); |
5775 { | 5773 { |
5776 outdoor_grid_band_1 = 10; | 5774 outdoor_grid_band_1 = 10; |
5777 outdoor_grid_band_2 = 15; | 5775 outdoor_grid_band_2 = 15; |
5778 outdoor_grid_band_3 = 20; | 5776 outdoor_grid_band_3 = 20; |
5779 pOutdoorCamera->shading_dist_mist = 8192; | 5777 pOutdoorCamera->shading_dist_mist = 8192; |
5780 pOutdoorCamera->bNoSky = 0; | 5778 pOutdoorCamera->bNoSky = false; |
5781 LOBYTE(viewparams->field_20) = 0; | 5779 LOBYTE(viewparams->field_20) = 0; |
5782 } | 5780 } |
5783 mipmapping_terrain_mm1 = 1024; | 5781 mipmapping_terrain_mm1 = 1024; |
5784 mipmapping_terrain_mm2 = 2048; | 5782 mipmapping_terrain_mm2 = 2048; |
5785 mipmapping_building_mm1 = 1024; | 5783 mipmapping_building_mm1 = 1024; |
5789 pOutdoorCamera->building_gamme = 0; | 5787 pOutdoorCamera->building_gamme = 0; |
5790 mipmapping_terrain_mm3 = 4096; | 5788 mipmapping_terrain_mm3 = 4096; |
5791 mipmapping_building_mm3 = 4096; | 5789 mipmapping_building_mm3 = 4096; |
5792 pOutdoorCamera->shading_dist_shademist = 4096; | 5790 pOutdoorCamera->shading_dist_shademist = 4096; |
5793 pOutdoorCamera->outdoor_no_wavy_water = 0; | 5791 pOutdoorCamera->outdoor_no_wavy_water = 0; |
5794 sub_47F4D3(outdoor_grid_band_1, outdoor_grid_band_2, outdoor_grid_band_3); | 5792 //_47F4D3_initialize_terrain_bezier_stuff(outdoor_grid_band_1, outdoor_grid_band_2, outdoor_grid_band_3); |
5793 { | |
5794 pOutdoorCamera->outdoor_grid_band_3 = outdoor_grid_band_3; | |
5795 pOutdoorCamera->uPickDepth = outdoor_grid_band_3 * 512; | |
5796 } | |
5795 } | 5797 } |
5796 else | 5798 else |
5797 { | 5799 { |
5798 LOBYTE(viewparams->field_20) = 0; | 5800 LOBYTE(viewparams->field_20) = 0; |
5799 } | 5801 } |
6359 unsigned int v9; // edi@19 | 6361 unsigned int v9; // edi@19 |
6360 signed int v10; // ebx@19 | 6362 signed int v10; // ebx@19 |
6361 char *v11; // edx@20 | 6363 char *v11; // edx@20 |
6362 unsigned __int16 v12; // ax@23 | 6364 unsigned __int16 v12; // ax@23 |
6363 int v13; // eax@27 | 6365 int v13; // eax@27 |
6364 //unsigned int v14; // ebx@33 | 6366 unsigned int v14; // ebx@33 |
6365 //unsigned __int16 v15; // ax@35 | 6367 unsigned __int16 v15; // ax@35 |
6366 int v16; // eax@36 | 6368 int v16; // eax@36 |
6367 unsigned int v17; // eax@37 | 6369 unsigned int v17; // eax@37 |
6368 __int16 v18; // di@37 | 6370 __int16 v18; // di@37 |
6369 signed int v19; // edx@37 | 6371 signed int v19; // edx@37 |
6370 unsigned __int8 v20; // sf@37 | 6372 unsigned __int8 v20; // sf@37 |
6470 char *v120; // edx@252 | 6472 char *v120; // edx@252 |
6471 unsigned __int16 v121; // ax@255 | 6473 unsigned __int16 v121; // ax@255 |
6472 unsigned int v122; // eax@260 | 6474 unsigned int v122; // eax@260 |
6473 char *v123; // edx@261 | 6475 char *v123; // edx@261 |
6474 int v124; // eax@267 | 6476 int v124; // eax@267 |
6475 //int v125; // [sp-20h] [bp-4Ch]@28 | 6477 int v125; // [sp-20h] [bp-4Ch]@28 |
6476 //signed int v126; // [sp-1Ch] [bp-48h]@27 | 6478 signed int v126; // [sp-1Ch] [bp-48h]@27 |
6477 //unsigned int v127; // [sp-18h] [bp-44h]@27 | 6479 unsigned int v127; // [sp-18h] [bp-44h]@27 |
6478 //signed int v128; // [sp-14h] [bp-40h]@27 | 6480 signed int v128; // [sp-14h] [bp-40h]@27 |
6479 //signed int v129; // [sp-10h] [bp-3Ch]@27 | 6481 signed int v129; // [sp-10h] [bp-3Ch]@27 |
6480 //int v130; // [sp-Ch] [bp-38h]@27 | 6482 int v130; // [sp-Ch] [bp-38h]@27 |
6481 //unsigned int v131; // [sp-8h] [bp-34h]@27 | 6483 unsigned int v131; // [sp-8h] [bp-34h]@27 |
6482 char v132; // [sp-8h] [bp-34h]@131 | 6484 char v132; // [sp-8h] [bp-34h]@131 |
6483 //int v133; // [sp-4h] [bp-30h]@27 | 6485 int v133; // [sp-4h] [bp-30h]@27 |
6484 char v134; // [sp-4h] [bp-30h]@131 | 6486 char v134; // [sp-4h] [bp-30h]@131 |
6485 signed int v135; // [sp-4h] [bp-30h]@217 | 6487 signed int v135; // [sp-4h] [bp-30h]@217 |
6486 int v136; // [sp+Ch] [bp-20h]@208 | 6488 int v136; // [sp+Ch] [bp-20h]@208 |
6487 int v137; // [sp+10h] [bp-1Ch]@208 | 6489 int v137; // [sp+10h] [bp-1Ch]@208 |
6488 signed int v138; // [sp+14h] [bp-18h]@207 | 6490 signed int v138; // [sp+14h] [bp-18h]@207 |
6532 BYTE2(pActors[PID_ID(v2->spell_caster_pid)].uAttributes) |= 4; | 6534 BYTE2(pActors[PID_ID(v2->spell_caster_pid)].uAttributes) |= 4; |
6533 } | 6535 } |
6534 | 6536 |
6535 v6 = v2->uType; | 6537 v6 = v2->uType; |
6536 v7 = v2->uType; | 6538 v7 = v2->uType; |
6537 if ( v2->uType > 3060 ) | 6539 if ( v7 > 3060 ) |
6538 { | 6540 { |
6539 if ( v2->uType > 6090 ) | 6541 if ( v7 > 6090 ) |
6540 { | 6542 { |
6541 if ( v2->uType > 8090 ) | 6543 if ( v7 > 8090 ) |
6542 { | 6544 { |
6543 if ( v2->uType == 9010 ) | 6545 if ( v7 == 9010 ) |
6544 goto LABEL_247; | 6546 goto LABEL_247; |
6545 if ( v7 != 9030 ) | 6547 if ( v7 != 9030 ) |
6546 { | 6548 { |
6547 if ( v7 != 9040 ) | 6549 if ( v7 != 9040 ) |
6548 { | 6550 { |
6560 while ( v98 != *(short *)v144 ) | 6562 while ( v98 != *(short *)v144 ) |
6561 { | 6563 { |
6562 ++v146; | 6564 ++v146; |
6563 v144 += 56; | 6565 v144 += 56; |
6564 if ( v146 >= (signed int)v99 ) | 6566 if ( v146 >= (signed int)v99 ) |
6565 { | 6567 goto LABEL_195; |
6566 v46 = 0; | |
6567 v2->uObjectDescID = v46; | |
6568 if ( v46 == (short)v32 ) | |
6569 SpriteObject::OnInteraction(v153); | |
6570 v100 = v2->field_61; | |
6571 v101 = v2->vPosition.z; | |
6572 v2->uSpriteFrameID = v32; | |
6573 v102 = 8 * v153; | |
6574 v103 = v2->vPosition.y; | |
6575 LOBYTE(v102) = PID(OBJECT_Item,v153); | |
6576 v2->vVelocity.x = v32; | |
6577 v2->vVelocity.y = v32; | |
6578 v104 = v2->vPosition.x; | |
6579 v2->vVelocity.z = v32; | |
6580 v149 = v102; | |
6581 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); | |
6582 if ( HIBYTE(v3->uFlags) & 1 ) | |
6583 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor); | |
6584 v105 = v2->uSoundID; | |
6585 if ( v105 == (short)v32 ) | |
6586 v47 = 0; | |
6587 else | |
6588 v47 = (signed __int16)v105 + 4; | |
6589 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
6590 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32); | |
6591 return 0; | |
6592 } | |
6593 } | 6568 } |
6594 v46 = v146; | 6569 goto LABEL_80; |
6595 v2->uObjectDescID = v46; | |
6596 if ( v46 == (short)v32 ) | |
6597 SpriteObject::OnInteraction(v153); | |
6598 v100 = v2->field_61; | |
6599 v101 = v2->vPosition.z; | |
6600 v2->uSpriteFrameID = v32; | |
6601 v102 = 8 * v153; | |
6602 v103 = v2->vPosition.y; | |
6603 LOBYTE(v102) = PID(OBJECT_Item,v153); | |
6604 v2->vVelocity.x = v32; | |
6605 v2->vVelocity.y = v32; | |
6606 v104 = v2->vPosition.x; | |
6607 v2->vVelocity.z = v32; | |
6608 v149 = v102; | |
6609 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); | |
6610 if ( HIBYTE(v3->uFlags) & 1 ) | |
6611 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor); | |
6612 v105 = v2->uSoundID; | |
6613 if ( v105 == (short)v32 ) | |
6614 v47 = 0; | |
6615 else | |
6616 v47 = (signed __int16)v105 + 4; | |
6617 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
6618 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32); | |
6619 return 0; | |
6620 } | 6570 } |
6571 LABEL_195: | |
6621 v46 = 0; | 6572 v46 = 0; |
6622 v2->uObjectDescID = v46; | 6573 goto LABEL_196; |
6623 if ( v46 == (short)v32 ) | |
6624 SpriteObject::OnInteraction(v153); | |
6625 v100 = v2->field_61; | |
6626 v101 = v2->vPosition.z; | |
6627 v2->uSpriteFrameID = v32; | |
6628 v102 = 8 * v153; | |
6629 v103 = v2->vPosition.y; | |
6630 LOBYTE(v102) = PID(OBJECT_Item,v153); | |
6631 v2->vVelocity.x = v32; | |
6632 v2->vVelocity.y = v32; | |
6633 v104 = v2->vPosition.x; | |
6634 v2->vVelocity.z = v32; | |
6635 v149 = v102; | |
6636 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); | |
6637 if ( HIBYTE(v3->uFlags) & 1 ) | |
6638 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor); | |
6639 v105 = v2->uSoundID; | |
6640 if ( v105 == (short)v32 ) | |
6641 v47 = 0; | |
6642 else | |
6643 v47 = (signed __int16)v105 + 4; | |
6644 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
6645 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32); | |
6646 return 0; | |
6647 } | 6574 } |
6648 goto LABEL_93; | 6575 goto LABEL_93; |
6649 } | 6576 } |
6650 LABEL_172: | 6577 LABEL_172: |
6651 v143 = 17030; | 6578 v143 = 17030; |
6663 } | 6590 } |
6664 v138 = 1; | 6591 v138 = 1; |
6665 if ( v151 != OBJECT_Actor) | 6592 if ( v151 != OBJECT_Actor) |
6666 { | 6593 { |
6667 if ( v6 != 9030 || v2->spell_skill != 4 ) | 6594 if ( v6 != 9030 || v2->spell_skill != 4 ) |
6668 { | 6595 goto LABEL_246; |
6669 SpriteObject::OnInteraction(v153); | |
6670 return 0; | |
6671 } | |
6672 v2->_46BEF1_apply_spells_aoe(); | 6596 v2->_46BEF1_apply_spells_aoe(); |
6673 LABEL_233: | 6597 LABEL_233: |
6674 if ( !v138 ) | 6598 if ( !v138 ) |
6675 { | 6599 { |
6676 v109 = pObjectList->uNumObjects; | 6600 v109 = pObjectList->uNumObjects; |
6703 v113 = v2->uSoundID; | 6627 v113 = v2->uSoundID; |
6704 if ( v113 ) | 6628 if ( v113 ) |
6705 v114 = (signed __int16)v113 + 4; | 6629 v114 = (signed __int16)v113 + 4; |
6706 else | 6630 else |
6707 v114 = 0; | 6631 v114 = 0; |
6632 v133 = 0; | |
6633 v131 = 0; | |
6634 v130 = v114; | |
6708 v115 = 8 * v153; | 6635 v115 = 8 * v153; |
6636 v129 = 0; | |
6637 v128 = -1; | |
6709 LOBYTE(v115) = PID(OBJECT_Item,v153); | 6638 LOBYTE(v115) = PID(OBJECT_Item,v153); |
6710 v116 = v143 + 1; | 6639 v127 = 0; |
6711 pAudioPlayer->PlaySound((SoundID)v116, v115, 0, -1, 0, 0, 0, 0); | 6640 v126 = v115; |
6712 return 0; | 6641 v116 = v143; |
6642 goto LABEL_269; | |
6713 } | 6643 } |
6644 LABEL_246: | |
6714 SpriteObject::OnInteraction(v153); | 6645 SpriteObject::OnInteraction(v153); |
6715 return 0; | 6646 return 0; |
6716 } | 6647 } |
6717 v106 = v145; | 6648 v106 = v145; |
6718 v150 = 0; | 6649 v150 = 0; |
6759 if ( v2->uType == 8030 ) | 6690 if ( v2->uType == 8030 ) |
6760 { | 6691 { |
6761 pActors[v108].uAIState = Standing; | 6692 pActors[v108].uAIState = Standing; |
6762 pActors[v108].UpdateAnimation(); | 6693 pActors[v108].UpdateAnimation(); |
6763 } | 6694 } |
6764 pActors[v108].pActorBuffs[v136].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(v137 << 7) * 0.033333335), | 6695 pActors[v108].pActorBuffs[v136].Apply( |
6765 v152, v150, 0, 0); | 6696 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v137 << 7) * 0.033333335), |
6697 v152, | |
6698 v150, | |
6699 0, | |
6700 0); | |
6766 } | 6701 } |
6767 } | 6702 } |
6768 else | 6703 else |
6769 { | 6704 { |
6770 v2->_46BEF1_apply_spells_aoe(); | 6705 v2->_46BEF1_apply_spells_aoe(); |
6797 while ( v2->uType != *(short *)v94 ) | 6732 while ( v2->uType != *(short *)v94 ) |
6798 { | 6733 { |
6799 ++v52; | 6734 ++v52; |
6800 v94 += 56; | 6735 v94 += 56; |
6801 if ( v52 >= (signed int)v93 ) | 6736 if ( v52 >= (signed int)v93 ) |
6802 { | 6737 goto LABEL_181; |
6803 v95 = 0; | |
6804 v2->uObjectDescID = v95; | |
6805 if ( v95 == (short)v9 ) | |
6806 SpriteObject::OnInteraction(v153); | |
6807 v96 = v2->uSoundID; | |
6808 v2->vVelocity.z = v9; | |
6809 v2->vVelocity.y = v9; | |
6810 v2->vVelocity.x = v9; | |
6811 v2->uSpriteFrameID = v9; | |
6812 if ( v96 == (short)v9 ) | |
6813 v97 = 0; | |
6814 else | |
6815 v97 = (signed __int16)v96 + 4; | |
6816 v92 = v153; | |
6817 v124 = 8 * v92; | |
6818 LOBYTE(v124) = v124 | 2; | |
6819 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
6820 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
6821 return 0; | |
6822 } | |
6823 } | 6738 } |
6824 v95 = v52; | 6739 goto LABEL_202; |
6825 v2->uObjectDescID = v95; | 6740 } |
6826 if ( v95 == (short)v9 ) | 6741 goto LABEL_181; |
6827 SpriteObject::OnInteraction(v153); | |
6828 v96 = v2->uSoundID; | |
6829 v2->vVelocity.z = v9; | |
6830 v2->vVelocity.y = v9; | |
6831 v2->vVelocity.x = v9; | |
6832 v2->uSpriteFrameID = v9; | |
6833 if ( v96 == (short)v9 ) | |
6834 v97 = 0; | |
6835 else | |
6836 v97 = (signed __int16)v96 + 4; | |
6837 v92 = v153; | |
6838 v124 = 8 * v92; | |
6839 LOBYTE(v124) = v124 | 2; | |
6840 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
6841 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
6842 return 0; | |
6843 } | |
6844 v95 = 0; | |
6845 v2->uObjectDescID = v95; | |
6846 if ( v95 == (short)v9 ) | |
6847 SpriteObject::OnInteraction(v153); | |
6848 v96 = v2->uSoundID; | |
6849 v2->vVelocity.z = v9; | |
6850 v2->vVelocity.y = v9; | |
6851 v2->vVelocity.x = v9; | |
6852 v2->uSpriteFrameID = v9; | |
6853 if ( v96 == (short)v9 ) | |
6854 v97 = 0; | |
6855 else | |
6856 v97 = (signed __int16)v96 + 4; | |
6857 v92 = v153; | |
6858 v124 = 8 * v92; | |
6859 LOBYTE(v124) = v124 | 2; | |
6860 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
6861 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
6862 return 0; | |
6863 } | 6742 } |
6864 v79 = v7 == 8030; | 6743 v79 = v7 == 8030; |
6865 } | 6744 } |
6866 else | 6745 else |
6867 { | 6746 { |
6909 v58 = v56; | 6788 v58 = v56; |
6910 } | 6789 } |
6911 v2->uObjectDescID = v58; | 6790 v2->uObjectDescID = v58; |
6912 if ( !v58 ) | 6791 if ( !v58 ) |
6913 SpriteObject::OnInteraction(v153); | 6792 SpriteObject::OnInteraction(v153); |
6793 v14 = v153; | |
6914 v2->vVelocity.z = 0; | 6794 v2->vVelocity.z = 0; |
6915 v2->vVelocity.y = 0; | 6795 v2->vVelocity.y = 0; |
6916 v2->vVelocity.x = 0; | 6796 v2->vVelocity.x = 0; |
6917 v2->uSpriteFrameID = 0; | 6797 v2->uSpriteFrameID = 0; |
6918 sub_43A97E(v153, v145); | 6798 sub_43A97E(v153, v145); |
6919 //v15 = v2->uSoundID; | 6799 LABEL_35: |
6920 if ( v2->uSoundID == (short)v9 ) | 6800 v15 = v2->uSoundID; |
6801 if ( v15 == (short)v9 ) | |
6921 v16 = 0; | 6802 v16 = 0; |
6922 else | 6803 else |
6923 v16 = (signed __int16)v2->uSoundID + 4; | 6804 v16 = (signed __int16)v15 + 4; |
6924 v92 = v153; | 6805 v133 = v9; |
6806 v131 = v9; | |
6807 v130 = v16; | |
6808 v92 = v14; | |
6809 LABEL_267: | |
6925 v124 = 8 * v92; | 6810 v124 = 8 * v92; |
6811 v129 = v9; | |
6812 v128 = -1; | |
6926 LOBYTE(v124) = v124 | 2; | 6813 LOBYTE(v124) = v124 | 2; |
6927 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | 6814 v127 = v9; |
6928 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v16, v9, v9); | 6815 v126 = v124; |
6929 return 0; | 6816 LABEL_268: |
6817 v116 = word_4EE088_sound_ids[v2->spell_id - 1]; | |
6818 LABEL_269: | |
6819 v125 = v116 + 1; | |
6820 goto LABEL_29; | |
6930 } | 6821 } |
6931 v59 = v6 + 2; | 6822 v59 = v6 + 2; |
6932 v60 = pObjectList->uNumObjects; | 6823 v60 = pObjectList->uNumObjects; |
6933 v9 = 0; | 6824 v9 = 0; |
6934 v61 = 0; | 6825 v61 = 0; |
6973 --v141; | 6864 --v141; |
6974 } | 6865 } |
6975 while ( v141 ); | 6866 while ( v141 ); |
6976 } | 6867 } |
6977 LABEL_160: | 6868 LABEL_160: |
6978 SpriteObject::OnInteraction(v153); | 6869 v14 = v153; |
6979 if ( v2->uSoundID == (short)v9 ) | 6870 LABEL_34: |
6980 v16 = 0; | 6871 SpriteObject::OnInteraction(v14); |
6981 else | 6872 goto LABEL_35; |
6982 v16 = (signed __int16)v2->uSoundID + 4; | |
6983 v92 = v153; | |
6984 v124 = 8 * v92; | |
6985 LOBYTE(v124) = v124 | 2; | |
6986 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
6987 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v16, v9, v9); | |
6988 return 0; | |
6989 } | 6873 } |
6990 if ( v151 == 6 || v151 == 5 || (v66 = 0, !v151) ) | 6874 if ( v151 == 6 || v151 == 5 || (v66 = 0, !v151) ) |
6991 return 1; | 6875 return 1; |
6992 v67 = v6 + 1; | 6876 v67 = v6 + 1; |
6993 v68 = pObjectList->uNumObjects; | 6877 v68 = pObjectList->uNumObjects; |
7016 if ( !v71 ) | 6900 if ( !v71 ) |
7017 SpriteObject::OnInteraction(v153); | 6901 SpriteObject::OnInteraction(v153); |
7018 v134 = 0; | 6902 v134 = 0; |
7019 v72 = v153; | 6903 v72 = v153; |
7020 v132 = 0; | 6904 v132 = 0; |
6905 LABEL_132: | |
7021 v73 = v2->vPosition.z; | 6906 v73 = v2->vPosition.z; |
7022 v74 = v2->vPosition.y; | 6907 v74 = v2->vPosition.y; |
7023 v75 = PID(OBJECT_Item,v72); | 6908 v75 = PID(OBJECT_Item,v72); |
7024 v2->vVelocity.z = v66; | 6909 v2->vVelocity.z = v66; |
7025 v2->vVelocity.y = v66; | 6910 v2->vVelocity.y = v66; |
7030 v77 = v2->uSoundID; | 6915 v77 = v2->uSoundID; |
7031 if ( v77 == (short)v66 ) | 6916 if ( v77 == (short)v66 ) |
7032 v78 = 0; | 6917 v78 = 0; |
7033 else | 6918 else |
7034 v78 = (signed __int16)v77 + 4; | 6919 v78 = (signed __int16)v77 + 4; |
7035 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | 6920 v133 = v66; |
7036 pAudioPlayer->PlaySound((SoundID)v116, v75, v66, -1, v66, v78, v66, v66); | 6921 v131 = v66; |
7037 return 0; | 6922 v130 = v78; |
6923 v129 = v66; | |
6924 v128 = -1; | |
6925 v127 = v66; | |
6926 v126 = v75; | |
6927 goto LABEL_268; | |
7038 } | 6928 } |
7039 if ( v7 == 4090 ) | 6929 if ( v7 == 4090 ) |
7040 { | 6930 { |
7041 v84 = v6 + 2; | 6931 v84 = v6 + 2; |
7042 v85 = pObjectList->uNumObjects; | 6932 v85 = pObjectList->uNumObjects; |
7113 if ( !v83 ) | 7003 if ( !v83 ) |
7114 SpriteObject::OnInteraction(v153); | 7004 SpriteObject::OnInteraction(v153); |
7115 v134 = 0; | 7005 v134 = 0; |
7116 v72 = v153; | 7006 v72 = v153; |
7117 v132 = v2->field_61; | 7007 v132 = v2->field_61; |
7118 v73 = v2->vPosition.z; | 7008 goto LABEL_132; |
7119 v74 = v2->vPosition.y; | |
7120 v75 = PID(OBJECT_Item,v72); | |
7121 v2->vVelocity.z = v66; | |
7122 v2->vVelocity.y = v66; | |
7123 v76 = v2->vPosition.x; | |
7124 v2->vVelocity.x = v66; | |
7125 v2->uSpriteFrameID = v66; | |
7126 stru_50FE08.Add(v75, 512, v76, v74, v73, v132, v134); | |
7127 v77 = v2->uSoundID; | |
7128 if ( v77 == (short)v66 ) | |
7129 v78 = 0; | |
7130 else | |
7131 v78 = (signed __int16)v77 + 4; | |
7132 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7133 pAudioPlayer->PlaySound((SoundID)v116, v75, v66, -1, v66, v78, v66, v66); | |
7134 return 0; | |
7135 } | 7009 } |
7136 if ( v7 == 4100 || v7 == 6010 ) | 7010 if ( v7 == 4100 || v7 == 6010 ) |
7137 goto LABEL_93; | 7011 goto LABEL_93; |
7138 v79 = v7 == 6040; | 7012 v79 = v7 == 6040; |
7139 } | 7013 } |
7195 v8 = pObjectList->uNumObjects; | 7069 v8 = pObjectList->uNumObjects; |
7196 ++v2->uType; | 7070 ++v2->uType; |
7197 v9 = 0; | 7071 v9 = 0; |
7198 v10 = 0; | 7072 v10 = 0; |
7199 if ( (signed int)v8 <= 0 ) | 7073 if ( (signed int)v8 <= 0 ) |
7200 { | 7074 goto LABEL_23; |
7201 v12 = 0; | |
7202 goto LABEL_24; | |
7203 } | |
7204 v11 = (char *)&pObjectList->pObjects->uObjectID; | 7075 v11 = (char *)&pObjectList->pObjects->uObjectID; |
7205 break; | 7076 break; |
7206 case 545: | 7077 case 545: |
7207 case 550: | 7078 case 550: |
7208 if ( v2->stru_24.uItemID != 405 && v2->stru_24.uSpecEnchantmentType != 3 ) | 7079 if ( v2->stru_24.uItemID != 405 && v2->stru_24.uSpecEnchantmentType != 3 ) |
7209 { | 7080 { |
7081 v14 = v153; | |
7210 v9 = 0; | 7082 v9 = 0; |
7211 v2->vVelocity.z = 0; | 7083 v2->vVelocity.z = 0; |
7212 v2->vVelocity.y = 0; | 7084 v2->vVelocity.y = 0; |
7213 v2->vVelocity.x = 0; | 7085 v2->vVelocity.x = 0; |
7214 v2->uSpriteFrameID = 0; | 7086 v2->uSpriteFrameID = 0; |
7215 sub_43A97E(v153, v145); | 7087 sub_43A97E(v153, v145); |
7216 SpriteObject::OnInteraction(v153); | 7088 goto LABEL_34; |
7217 if ( v2->uSoundID == (short)v9 ) | |
7218 v16 = 0; | |
7219 else | |
7220 v16 = (signed __int16)v2->uSoundID + 4; | |
7221 v92 = v153; | |
7222 v124 = 8 * v92; | |
7223 LOBYTE(v124) = v124 | 2; | |
7224 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7225 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v16, v9, v9); | |
7226 return 0; | |
7227 } | 7089 } |
7228 v17 = pObjectList->uNumObjects; | 7090 v17 = pObjectList->uNumObjects; |
7229 v18 = 0; | 7091 v18 = 0; |
7230 v19 = 0; | 7092 v19 = 0; |
7231 v44 = pObjectList->uNumObjects == 0; | 7093 v44 = pObjectList->uNumObjects == 0; |
7250 { | 7112 { |
7251 ++v10; | 7113 ++v10; |
7252 v11 += 56; | 7114 v11 += 56; |
7253 if ( v10 >= (signed int)v8 ) | 7115 if ( v10 >= (signed int)v8 ) |
7254 { | 7116 { |
7117 LABEL_23: | |
7255 v12 = 0; | 7118 v12 = 0; |
7256 goto LABEL_24; | 7119 goto LABEL_24; |
7257 } | 7120 } |
7258 } | 7121 } |
7259 v12 = v10; | 7122 v12 = v10; |
7265 v2->vVelocity.z = 0; | 7128 v2->vVelocity.z = 0; |
7266 v2->vVelocity.y = 0; | 7129 v2->vVelocity.y = 0; |
7267 v2->vVelocity.x = 0; | 7130 v2->vVelocity.x = 0; |
7268 v2->uSpriteFrameID = 0; | 7131 v2->uSpriteFrameID = 0; |
7269 if ( !v44 ) | 7132 if ( !v44 ) |
7270 { | 7133 goto LABEL_27; |
7271 v13 = 8 * v153; | |
7272 LOBYTE(v13) = PID(OBJECT_Item,v153); | |
7273 pAudioPlayer->PlaySound((SoundID)8, v13, v9, -1, v9, v9, v9, v9); | |
7274 return 0; | |
7275 } | |
7276 } | 7134 } |
7277 return 0; | 7135 return 0; |
7278 } | 7136 } |
7279 if ( v7 > 1100 ) | 7137 if ( v7 > 1100 ) |
7280 { | 7138 { |
7305 while ( v2->uType != *(short *)v53 ) | 7163 while ( v2->uType != *(short *)v53 ) |
7306 { | 7164 { |
7307 ++v52; | 7165 ++v52; |
7308 v53 += 56; | 7166 v53 += 56; |
7309 if ( v52 >= (signed int)v51 ) | 7167 if ( v52 >= (signed int)v51 ) |
7310 { | 7168 goto LABEL_181; |
7311 v95 = 0; | 7169 } |
7312 v2->uObjectDescID = v95; | 7170 goto LABEL_202; |
7313 if ( v95 == (short)v9 ) | 7171 } |
7314 SpriteObject::OnInteraction(v153); | 7172 LABEL_181: |
7315 v96 = v2->uSoundID; | |
7316 v2->vVelocity.z = v9; | |
7317 v2->vVelocity.y = v9; | |
7318 v2->vVelocity.x = v9; | |
7319 v2->uSpriteFrameID = v9; | |
7320 if ( v96 == (short)v9 ) | |
7321 v97 = 0; | |
7322 else | |
7323 v97 = (signed __int16)v96 + 4; | |
7324 v92 = v153; | |
7325 v124 = 8 * v92; | |
7326 LOBYTE(v124) = v124 | 2; | |
7327 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7328 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
7329 return 0; | |
7330 } | |
7331 } | |
7332 v95 = v52; | |
7333 v2->uObjectDescID = v95; | |
7334 if ( v95 == (short)v9 ) | |
7335 SpriteObject::OnInteraction(v153); | |
7336 v96 = v2->uSoundID; | |
7337 v2->vVelocity.z = v9; | |
7338 v2->vVelocity.y = v9; | |
7339 v2->vVelocity.x = v9; | |
7340 v2->uSpriteFrameID = v9; | |
7341 if ( v96 == (short)v9 ) | |
7342 v97 = 0; | |
7343 else | |
7344 v97 = (signed __int16)v96 + 4; | |
7345 v92 = v153; | |
7346 v124 = 8 * v92; | |
7347 LOBYTE(v124) = v124 | 2; | |
7348 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7349 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
7350 return 0; | |
7351 } | |
7352 v95 = 0; | 7173 v95 = 0; |
7174 LABEL_182: | |
7353 v2->uObjectDescID = v95; | 7175 v2->uObjectDescID = v95; |
7354 if ( v95 == (short)v9 ) | 7176 if ( v95 == (short)v9 ) |
7355 SpriteObject::OnInteraction(v153); | 7177 SpriteObject::OnInteraction(v153); |
7356 v96 = v2->uSoundID; | 7178 v96 = v2->uSoundID; |
7357 v2->vVelocity.z = v9; | 7179 v2->vVelocity.z = v9; |
7360 v2->uSpriteFrameID = v9; | 7182 v2->uSpriteFrameID = v9; |
7361 if ( v96 == (short)v9 ) | 7183 if ( v96 == (short)v9 ) |
7362 v97 = 0; | 7184 v97 = 0; |
7363 else | 7185 else |
7364 v97 = (signed __int16)v96 + 4; | 7186 v97 = (signed __int16)v96 + 4; |
7187 v133 = v9; | |
7188 v131 = v9; | |
7189 v130 = v97; | |
7365 v92 = v153; | 7190 v92 = v153; |
7366 v124 = 8 * v92; | 7191 goto LABEL_267; |
7367 LOBYTE(v124) = v124 | 2; | |
7368 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7369 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
7370 return 0; | |
7371 } | 7192 } |
7372 if ( v7 == 1100 ) | 7193 if ( v7 == 1100 ) |
7373 goto LABEL_93; | 7194 goto LABEL_93; |
7374 v26 = v7 - 600; | 7195 v26 = v7 - 600; |
7375 if ( !v26 ) | 7196 if ( !v26 ) |
7408 v2->vVelocity.x = 0; | 7229 v2->vVelocity.x = 0; |
7409 v40 = v2->vPosition.x; | 7230 v40 = v2->vPosition.x; |
7410 v2->uSpriteFrameID = 0; | 7231 v2->uSpriteFrameID = 0; |
7411 v147 = v38; | 7232 v147 = v38; |
7412 stru_50FE08.Add(v38, 512, v40, v39, v37, 0, 0); | 7233 stru_50FE08.Add(v38, 512, v40, v39, v37, 0, 0); |
7413 if ( HIBYTE(v3->uFlags) & 1 ) | 7234 if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE) |
7414 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, 0, v3->uParticleTrailColor); | 7235 trail_particle_generator.GenerateTrailParticles(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v3->uParticleTrailColor); |
7415 pAudioPlayer->PlaySound((SoundID)8, v147, 0, -1, 0, 0, 0, 0); | 7236 v133 = 0; |
7416 return 0; | 7237 v131 = 0; |
7238 v130 = 0; | |
7239 v129 = 0; | |
7240 v128 = -1; | |
7241 v127 = 0; | |
7242 v126 = v147; | |
7243 goto LABEL_28; | |
7417 } | 7244 } |
7418 v27 = v26 - 410; | 7245 v27 = v26 - 410; |
7419 if ( !v27 ) | 7246 if ( !v27 ) |
7420 goto LABEL_93; | 7247 goto LABEL_93; |
7421 v28 = v27 - 40; | 7248 v28 = v27 - 40; |
7440 while ( v30 != *(short *)v140 ) | 7267 while ( v30 != *(short *)v140 ) |
7441 { | 7268 { |
7442 ++v146; | 7269 ++v146; |
7443 v140 += 56; | 7270 v140 += 56; |
7444 if ( v146 >= (signed int)v31 ) | 7271 if ( v146 >= (signed int)v31 ) |
7445 { | 7272 goto LABEL_195; |
7446 v46 = 0; | 7273 } |
7447 v2->uObjectDescID = v46; | 7274 LABEL_80: |
7448 if ( v46 == (short)v32 ) | |
7449 SpriteObject::OnInteraction(v153); | |
7450 v100 = v2->field_61; | |
7451 v101 = v2->vPosition.z; | |
7452 v2->uSpriteFrameID = v32; | |
7453 v102 = 8 * v153; | |
7454 v103 = v2->vPosition.y; | |
7455 LOBYTE(v102) = PID(OBJECT_Item,v153); | |
7456 v2->vVelocity.x = v32; | |
7457 v2->vVelocity.y = v32; | |
7458 v104 = v2->vPosition.x; | |
7459 v2->vVelocity.z = v32; | |
7460 v149 = v102; | |
7461 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); | |
7462 if ( HIBYTE(v3->uFlags) & 1 ) | |
7463 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor); | |
7464 v105 = v2->uSoundID; | |
7465 if ( v105 == (short)v32 ) | |
7466 v47 = 0; | |
7467 else | |
7468 v47 = (signed __int16)v105 + 4; | |
7469 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7470 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32); | |
7471 return 0; | |
7472 } | |
7473 } | |
7474 v46 = v146; | 7275 v46 = v146; |
7276 LABEL_196: | |
7475 v2->uObjectDescID = v46; | 7277 v2->uObjectDescID = v46; |
7476 if ( v46 == (short)v32 ) | 7278 if ( v46 == (short)v32 ) |
7477 SpriteObject::OnInteraction(v153); | 7279 SpriteObject::OnInteraction(v153); |
7478 v100 = v2->field_61; | 7280 v100 = v2->field_61; |
7479 v101 = v2->vPosition.z; | 7281 v101 = v2->vPosition.z; |
7485 v2->vVelocity.y = v32; | 7287 v2->vVelocity.y = v32; |
7486 v104 = v2->vPosition.x; | 7288 v104 = v2->vPosition.x; |
7487 v2->vVelocity.z = v32; | 7289 v2->vVelocity.z = v32; |
7488 v149 = v102; | 7290 v149 = v102; |
7489 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); | 7291 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); |
7490 if ( HIBYTE(v3->uFlags) & 1 ) | 7292 if (v3->uFlags & OBJECT_DESC_TRIAL_PARTICLE) |
7491 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor); | 7293 trail_particle_generator.GenerateTrailParticles( |
7294 v2->vPosition.x, | |
7295 v2->vPosition.y, | |
7296 v2->vPosition.z, | |
7297 v3->uParticleTrailColor); | |
7492 v105 = v2->uSoundID; | 7298 v105 = v2->uSoundID; |
7493 if ( v105 == (short)v32 ) | 7299 if ( v105 == (short)v32 ) |
7494 v47 = 0; | 7300 v47 = 0; |
7495 else | 7301 else |
7496 v47 = (signed __int16)v105 + 4; | 7302 v47 = (signed __int16)v105 + 4; |
7497 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | 7303 v133 = v32; |
7498 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32); | 7304 v131 = v32; |
7499 return 0; | 7305 v130 = v47; |
7500 } | 7306 v129 = v32; |
7501 v46 = 0; | 7307 v128 = -1; |
7502 v2->uObjectDescID = v46; | 7308 v127 = v32; |
7503 if ( v46 == (short)v32 ) | 7309 v126 = v149; |
7504 SpriteObject::OnInteraction(v153); | 7310 goto LABEL_268; |
7505 v100 = v2->field_61; | 7311 } |
7506 v101 = v2->vPosition.z; | 7312 goto LABEL_195; |
7507 v2->uSpriteFrameID = v32; | |
7508 v102 = 8 * v153; | |
7509 v103 = v2->vPosition.y; | |
7510 LOBYTE(v102) = PID(OBJECT_Item,v153); | |
7511 v2->vVelocity.x = v32; | |
7512 v2->vVelocity.y = v32; | |
7513 v104 = v2->vPosition.x; | |
7514 v2->vVelocity.z = v32; | |
7515 v149 = v102; | |
7516 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); | |
7517 if ( HIBYTE(v3->uFlags) & 1 ) | |
7518 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor); | |
7519 v105 = v2->uSoundID; | |
7520 if ( v105 == (short)v32 ) | |
7521 v47 = 0; | |
7522 else | |
7523 v47 = (signed __int16)v105 + 4; | |
7524 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7525 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32); | |
7526 return 0; | |
7527 } | 7313 } |
7528 return 1; | 7314 return 1; |
7529 } | 7315 } |
7530 LABEL_247: | 7316 LABEL_247: |
7531 if ( v151 == 6 || v151 == 5 || (v9 = 0, !v151) ) | 7317 if ( v151 == 6 || v151 == 5 || (v9 = 0, !v151) ) |
7542 while ( v2->uType != *(short *)v123 ) | 7328 while ( v2->uType != *(short *)v123 ) |
7543 { | 7329 { |
7544 ++v52; | 7330 ++v52; |
7545 v123 += 56; | 7331 v123 += 56; |
7546 if ( v52 >= (signed int)v122 ) | 7332 if ( v52 >= (signed int)v122 ) |
7547 { | 7333 goto LABEL_181; |
7548 v95 = 0; | 7334 } |
7549 v2->uObjectDescID = v95; | 7335 LABEL_202: |
7550 if ( v95 == (short)v9 ) | |
7551 SpriteObject::OnInteraction(v153); | |
7552 v96 = v2->uSoundID; | |
7553 v2->vVelocity.z = v9; | |
7554 v2->vVelocity.y = v9; | |
7555 v2->vVelocity.x = v9; | |
7556 v2->uSpriteFrameID = v9; | |
7557 if ( v96 == (short)v9 ) | |
7558 v97 = 0; | |
7559 else | |
7560 v97 = (signed __int16)v96 + 4; | |
7561 v92 = v153; | |
7562 v124 = 8 * v92; | |
7563 LOBYTE(v124) = v124 | 2; | |
7564 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7565 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
7566 return 0; | |
7567 } | |
7568 } | |
7569 v95 = v52; | 7336 v95 = v52; |
7570 v2->uObjectDescID = v95; | 7337 goto LABEL_182; |
7571 if ( v95 == (short)v9 ) | 7338 } |
7572 SpriteObject::OnInteraction(v153); | 7339 goto LABEL_181; |
7573 v96 = v2->uSoundID; | |
7574 v2->vVelocity.z = v9; | |
7575 v2->vVelocity.y = v9; | |
7576 v2->vVelocity.x = v9; | |
7577 v2->uSpriteFrameID = v9; | |
7578 if ( v96 == (short)v9 ) | |
7579 v97 = 0; | |
7580 else | |
7581 v97 = (signed __int16)v96 + 4; | |
7582 v92 = v153; | |
7583 v124 = 8 * v92; | |
7584 LOBYTE(v124) = v124 | 2; | |
7585 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7586 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
7587 return 0; | |
7588 } | |
7589 v95 = 0; | |
7590 v2->uObjectDescID = v95; | |
7591 if ( v95 == (short)v9 ) | |
7592 SpriteObject::OnInteraction(v153); | |
7593 v96 = v2->uSoundID; | |
7594 v2->vVelocity.z = v9; | |
7595 v2->vVelocity.y = v9; | |
7596 v2->vVelocity.x = v9; | |
7597 v2->uSpriteFrameID = v9; | |
7598 if ( v96 == (short)v9 ) | |
7599 v97 = 0; | |
7600 else | |
7601 v97 = (signed __int16)v96 + 4; | |
7602 v92 = v153; | |
7603 v124 = 8 * v92; | |
7604 LOBYTE(v124) = v124 | 2; | |
7605 v116 = word_4EE088_sound_ids[v2->spell_id] + 1; | |
7606 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9); | |
7607 return 0; | |
7608 } | 7340 } |
7609 v117 = v6 + 1; | 7341 v117 = v6 + 1; |
7610 v118 = pObjectList->uNumObjects; | 7342 v118 = pObjectList->uNumObjects; |
7611 v119 = 0; | 7343 v119 = 0; |
7612 v44 = pObjectList->uNumObjects == 0; | 7344 v44 = pObjectList->uNumObjects == 0; |
7634 SpriteObject::OnInteraction(v153); | 7366 SpriteObject::OnInteraction(v153); |
7635 v2->vVelocity.z = 0; | 7367 v2->vVelocity.z = 0; |
7636 v2->vVelocity.y = 0; | 7368 v2->vVelocity.y = 0; |
7637 v2->vVelocity.x = 0; | 7369 v2->vVelocity.x = 0; |
7638 v2->uSpriteFrameID = 0; | 7370 v2->uSpriteFrameID = 0; |
7371 LABEL_27: | |
7372 v133 = v9; | |
7373 v131 = v9; | |
7374 v130 = v9; | |
7639 v13 = 8 * v153; | 7375 v13 = 8 * v153; |
7376 v129 = v9; | |
7377 v128 = -1; | |
7640 LOBYTE(v13) = PID(OBJECT_Item,v153); | 7378 LOBYTE(v13) = PID(OBJECT_Item,v153); |
7641 pAudioPlayer->PlaySound((SoundID)8, v13, v9, -1, v9, v9, v9, v9); | 7379 v127 = v9; |
7380 v126 = v13; | |
7381 LABEL_28: | |
7382 v125 = 8; | |
7383 LABEL_29: | |
7384 pAudioPlayer->PlaySound((SoundID)v125, v126, v127, v128, v129, v130, v131, v133); | |
7642 return 0; | 7385 return 0; |
7643 } | 7386 } |