comparison mm7_2.cpp @ 1438:bc99e1a48bea

m
author Ritor1
date Mon, 22 Jul 2013 18:00:34 +0600
parents 82431a85b28e
children 468f434a8d8a
comparison
equal deleted inserted replaced
1437:47975067d6a8 1438:bc99e1a48bea
7130 unsigned int v9; // edi@19 7130 unsigned int v9; // edi@19
7131 signed int v10; // ebx@19 7131 signed int v10; // ebx@19
7132 char *v11; // edx@20 7132 char *v11; // edx@20
7133 unsigned __int16 v12; // ax@23 7133 unsigned __int16 v12; // ax@23
7134 int v13; // eax@27 7134 int v13; // eax@27
7135 unsigned int v14; // ebx@33 7135 //unsigned int v14; // ebx@33
7136 unsigned __int16 v15; // ax@35 7136 //unsigned __int16 v15; // ax@35
7137 int v16; // eax@36 7137 int v16; // eax@36
7138 unsigned int v17; // eax@37 7138 unsigned int v17; // eax@37
7139 __int16 v18; // di@37 7139 __int16 v18; // di@37
7140 signed int v19; // edx@37 7140 signed int v19; // edx@37
7141 unsigned __int8 v20; // sf@37 7141 unsigned __int8 v20; // sf@37
7241 char *v120; // edx@252 7241 char *v120; // edx@252
7242 unsigned __int16 v121; // ax@255 7242 unsigned __int16 v121; // ax@255
7243 unsigned int v122; // eax@260 7243 unsigned int v122; // eax@260
7244 char *v123; // edx@261 7244 char *v123; // edx@261
7245 int v124; // eax@267 7245 int v124; // eax@267
7246 int v125; // [sp-20h] [bp-4Ch]@28 7246 //int v125; // [sp-20h] [bp-4Ch]@28
7247 signed int v126; // [sp-1Ch] [bp-48h]@27 7247 //signed int v126; // [sp-1Ch] [bp-48h]@27
7248 unsigned int v127; // [sp-18h] [bp-44h]@27 7248 //unsigned int v127; // [sp-18h] [bp-44h]@27
7249 signed int v128; // [sp-14h] [bp-40h]@27 7249 //signed int v128; // [sp-14h] [bp-40h]@27
7250 signed int v129; // [sp-10h] [bp-3Ch]@27 7250 //signed int v129; // [sp-10h] [bp-3Ch]@27
7251 int v130; // [sp-Ch] [bp-38h]@27 7251 //int v130; // [sp-Ch] [bp-38h]@27
7252 unsigned int v131; // [sp-8h] [bp-34h]@27 7252 //unsigned int v131; // [sp-8h] [bp-34h]@27
7253 char v132; // [sp-8h] [bp-34h]@131 7253 char v132; // [sp-8h] [bp-34h]@131
7254 int v133; // [sp-4h] [bp-30h]@27 7254 //int v133; // [sp-4h] [bp-30h]@27
7255 char v134; // [sp-4h] [bp-30h]@131 7255 char v134; // [sp-4h] [bp-30h]@131
7256 signed int v135; // [sp-4h] [bp-30h]@217 7256 signed int v135; // [sp-4h] [bp-30h]@217
7257 int v136; // [sp+Ch] [bp-20h]@208 7257 int v136; // [sp+Ch] [bp-20h]@208
7258 int v137; // [sp+10h] [bp-1Ch]@208 7258 int v137; // [sp+10h] [bp-1Ch]@208
7259 signed int v138; // [sp+14h] [bp-18h]@207 7259 signed int v138; // [sp+14h] [bp-18h]@207
7303 BYTE2(pActors[PID_ID(v2->spell_caster_pid)].uAttributes) |= 4; 7303 BYTE2(pActors[PID_ID(v2->spell_caster_pid)].uAttributes) |= 4;
7304 } 7304 }
7305 7305
7306 v6 = v2->uType; 7306 v6 = v2->uType;
7307 v7 = v2->uType; 7307 v7 = v2->uType;
7308 if ( v7 > 3060 ) 7308 if ( v2->uType > 3060 )
7309 { 7309 {
7310 if ( v7 > 6090 ) 7310 if ( v2->uType > 6090 )
7311 { 7311 {
7312 if ( v7 > 8090 ) 7312 if ( v2->uType > 8090 )
7313 { 7313 {
7314 if ( v7 == 9010 ) 7314 if ( v2->uType == 9010 )
7315 goto LABEL_247; 7315 goto LABEL_247;
7316 if ( v7 != 9030 ) 7316 if ( v7 != 9030 )
7317 { 7317 {
7318 if ( v7 != 9040 ) 7318 if ( v7 != 9040 )
7319 { 7319 {
7331 while ( v98 != *(short *)v144 ) 7331 while ( v98 != *(short *)v144 )
7332 { 7332 {
7333 ++v146; 7333 ++v146;
7334 v144 += 56; 7334 v144 += 56;
7335 if ( v146 >= (signed int)v99 ) 7335 if ( v146 >= (signed int)v99 )
7336 goto LABEL_195; 7336 {
7337 v46 = 0;
7338 v2->uObjectDescID = v46;
7339 if ( v46 == (short)v32 )
7340 SpriteObject::OnInteraction(v153);
7341 v100 = v2->field_61;
7342 v101 = v2->vPosition.z;
7343 v2->uSpriteFrameID = v32;
7344 v102 = 8 * v153;
7345 v103 = v2->vPosition.y;
7346 LOBYTE(v102) = PID(OBJECT_Item,v153);
7347 v2->vVelocity.x = v32;
7348 v2->vVelocity.y = v32;
7349 v104 = v2->vPosition.x;
7350 v2->vVelocity.z = v32;
7351 v149 = v102;
7352 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32);
7353 if ( HIBYTE(v3->uFlags) & 1 )
7354 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor);
7355 v105 = v2->uSoundID;
7356 if ( v105 == (short)v32 )
7357 v47 = 0;
7358 else
7359 v47 = (signed __int16)v105 + 4;
7360 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7361 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32);
7362 return 0;
7363 }
7337 } 7364 }
7338 goto LABEL_80; 7365 v46 = v146;
7366 v2->uObjectDescID = v46;
7367 if ( v46 == (short)v32 )
7368 SpriteObject::OnInteraction(v153);
7369 v100 = v2->field_61;
7370 v101 = v2->vPosition.z;
7371 v2->uSpriteFrameID = v32;
7372 v102 = 8 * v153;
7373 v103 = v2->vPosition.y;
7374 LOBYTE(v102) = PID(OBJECT_Item,v153);
7375 v2->vVelocity.x = v32;
7376 v2->vVelocity.y = v32;
7377 v104 = v2->vPosition.x;
7378 v2->vVelocity.z = v32;
7379 v149 = v102;
7380 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32);
7381 if ( HIBYTE(v3->uFlags) & 1 )
7382 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor);
7383 v105 = v2->uSoundID;
7384 if ( v105 == (short)v32 )
7385 v47 = 0;
7386 else
7387 v47 = (signed __int16)v105 + 4;
7388 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7389 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32);
7390 return 0;
7339 } 7391 }
7340 LABEL_195:
7341 v46 = 0; 7392 v46 = 0;
7342 goto LABEL_196; 7393 v2->uObjectDescID = v46;
7394 if ( v46 == (short)v32 )
7395 SpriteObject::OnInteraction(v153);
7396 v100 = v2->field_61;
7397 v101 = v2->vPosition.z;
7398 v2->uSpriteFrameID = v32;
7399 v102 = 8 * v153;
7400 v103 = v2->vPosition.y;
7401 LOBYTE(v102) = PID(OBJECT_Item,v153);
7402 v2->vVelocity.x = v32;
7403 v2->vVelocity.y = v32;
7404 v104 = v2->vPosition.x;
7405 v2->vVelocity.z = v32;
7406 v149 = v102;
7407 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32);
7408 if ( HIBYTE(v3->uFlags) & 1 )
7409 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor);
7410 v105 = v2->uSoundID;
7411 if ( v105 == (short)v32 )
7412 v47 = 0;
7413 else
7414 v47 = (signed __int16)v105 + 4;
7415 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7416 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32);
7417 return 0;
7343 } 7418 }
7344 goto LABEL_93; 7419 goto LABEL_93;
7345 } 7420 }
7346 LABEL_172: 7421 LABEL_172:
7347 v143 = 17030; 7422 v143 = 17030;
7359 } 7434 }
7360 v138 = 1; 7435 v138 = 1;
7361 if ( v151 != OBJECT_Actor) 7436 if ( v151 != OBJECT_Actor)
7362 { 7437 {
7363 if ( v6 != 9030 || v2->spell_skill != 4 ) 7438 if ( v6 != 9030 || v2->spell_skill != 4 )
7364 goto LABEL_246; 7439 {
7440 SpriteObject::OnInteraction(v153);
7441 return 0;
7442 }
7365 v2->_46BEF1_apply_spells_aoe(); 7443 v2->_46BEF1_apply_spells_aoe();
7366 LABEL_233: 7444 LABEL_233:
7367 if ( !v138 ) 7445 if ( !v138 )
7368 { 7446 {
7369 v109 = pObjectList->uNumObjects; 7447 v109 = pObjectList->uNumObjects;
7396 v113 = v2->uSoundID; 7474 v113 = v2->uSoundID;
7397 if ( v113 ) 7475 if ( v113 )
7398 v114 = (signed __int16)v113 + 4; 7476 v114 = (signed __int16)v113 + 4;
7399 else 7477 else
7400 v114 = 0; 7478 v114 = 0;
7401 v133 = 0;
7402 v131 = 0;
7403 v130 = v114;
7404 v115 = 8 * v153; 7479 v115 = 8 * v153;
7405 v129 = 0;
7406 v128 = -1;
7407 LOBYTE(v115) = PID(OBJECT_Item,v153); 7480 LOBYTE(v115) = PID(OBJECT_Item,v153);
7408 v127 = 0; 7481 v116 = v143 + 1;
7409 v126 = v115; 7482 pAudioPlayer->PlaySound((SoundID)v116, v115, 0, -1, 0, 0, 0, 0);
7410 v116 = v143; 7483 return 0;
7411 goto LABEL_269;
7412 } 7484 }
7413 LABEL_246:
7414 SpriteObject::OnInteraction(v153); 7485 SpriteObject::OnInteraction(v153);
7415 return 0; 7486 return 0;
7416 } 7487 }
7417 v106 = v145; 7488 v106 = v145;
7418 v150 = 0; 7489 v150 = 0;
7459 if ( v2->uType == 8030 ) 7530 if ( v2->uType == 8030 )
7460 { 7531 {
7461 pActors[v108].uAIState = Standing; 7532 pActors[v108].uAIState = Standing;
7462 pActors[v108].UpdateAnimation(); 7533 pActors[v108].UpdateAnimation();
7463 } 7534 }
7464 pActors[v108].pActorBuffs[v136].Apply( 7535 pActors[v108].pActorBuffs[v136].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(v137 << 7) * 0.033333335),
7465 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v137 << 7) * 0.033333335), 7536 v152, v150, 0, 0);
7466 v152,
7467 v150,
7468 0,
7469 0);
7470 } 7537 }
7471 } 7538 }
7472 else 7539 else
7473 { 7540 {
7474 v2->_46BEF1_apply_spells_aoe(); 7541 v2->_46BEF1_apply_spells_aoe();
7501 while ( v2->uType != *(short *)v94 ) 7568 while ( v2->uType != *(short *)v94 )
7502 { 7569 {
7503 ++v52; 7570 ++v52;
7504 v94 += 56; 7571 v94 += 56;
7505 if ( v52 >= (signed int)v93 ) 7572 if ( v52 >= (signed int)v93 )
7506 goto LABEL_181; 7573 {
7574 v95 = 0;
7575 v2->uObjectDescID = v95;
7576 if ( v95 == (short)v9 )
7577 SpriteObject::OnInteraction(v153);
7578 v96 = v2->uSoundID;
7579 v2->vVelocity.z = v9;
7580 v2->vVelocity.y = v9;
7581 v2->vVelocity.x = v9;
7582 v2->uSpriteFrameID = v9;
7583 if ( v96 == (short)v9 )
7584 v97 = 0;
7585 else
7586 v97 = (signed __int16)v96 + 4;
7587 v92 = v153;
7588 v124 = 8 * v92;
7589 LOBYTE(v124) = v124 | 2;
7590 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7591 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
7592 return 0;
7593 }
7507 } 7594 }
7508 goto LABEL_202; 7595 v95 = v52;
7509 } 7596 v2->uObjectDescID = v95;
7510 goto LABEL_181; 7597 if ( v95 == (short)v9 )
7598 SpriteObject::OnInteraction(v153);
7599 v96 = v2->uSoundID;
7600 v2->vVelocity.z = v9;
7601 v2->vVelocity.y = v9;
7602 v2->vVelocity.x = v9;
7603 v2->uSpriteFrameID = v9;
7604 if ( v96 == (short)v9 )
7605 v97 = 0;
7606 else
7607 v97 = (signed __int16)v96 + 4;
7608 v92 = v153;
7609 v124 = 8 * v92;
7610 LOBYTE(v124) = v124 | 2;
7611 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7612 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
7613 return 0;
7614 }
7615 v95 = 0;
7616 v2->uObjectDescID = v95;
7617 if ( v95 == (short)v9 )
7618 SpriteObject::OnInteraction(v153);
7619 v96 = v2->uSoundID;
7620 v2->vVelocity.z = v9;
7621 v2->vVelocity.y = v9;
7622 v2->vVelocity.x = v9;
7623 v2->uSpriteFrameID = v9;
7624 if ( v96 == (short)v9 )
7625 v97 = 0;
7626 else
7627 v97 = (signed __int16)v96 + 4;
7628 v92 = v153;
7629 v124 = 8 * v92;
7630 LOBYTE(v124) = v124 | 2;
7631 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7632 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
7633 return 0;
7511 } 7634 }
7512 v79 = v7 == 8030; 7635 v79 = v7 == 8030;
7513 } 7636 }
7514 else 7637 else
7515 { 7638 {
7557 v58 = v56; 7680 v58 = v56;
7558 } 7681 }
7559 v2->uObjectDescID = v58; 7682 v2->uObjectDescID = v58;
7560 if ( !v58 ) 7683 if ( !v58 )
7561 SpriteObject::OnInteraction(v153); 7684 SpriteObject::OnInteraction(v153);
7562 v14 = v153;
7563 v2->vVelocity.z = 0; 7685 v2->vVelocity.z = 0;
7564 v2->vVelocity.y = 0; 7686 v2->vVelocity.y = 0;
7565 v2->vVelocity.x = 0; 7687 v2->vVelocity.x = 0;
7566 v2->uSpriteFrameID = 0; 7688 v2->uSpriteFrameID = 0;
7567 sub_43A97E(v153, v145); 7689 sub_43A97E(v153, v145);
7568 LABEL_35: 7690 //v15 = v2->uSoundID;
7569 v15 = v2->uSoundID; 7691 if ( v2->uSoundID == (short)v9 )
7570 if ( v15 == (short)v9 )
7571 v16 = 0; 7692 v16 = 0;
7572 else 7693 else
7573 v16 = (signed __int16)v15 + 4; 7694 v16 = (signed __int16)v2->uSoundID + 4;
7574 v133 = v9; 7695 v92 = v153;
7575 v131 = v9;
7576 v130 = v16;
7577 v92 = v14;
7578 LABEL_267:
7579 v124 = 8 * v92; 7696 v124 = 8 * v92;
7580 v129 = v9;
7581 v128 = -1;
7582 LOBYTE(v124) = v124 | 2; 7697 LOBYTE(v124) = v124 | 2;
7583 v127 = v9; 7698 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7584 v126 = v124; 7699 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v16, v9, v9);
7585 LABEL_268: 7700 return 0;
7586 v116 = word_4EE088_sound_ids[v2->spell_id - 1];
7587 LABEL_269:
7588 v125 = v116 + 1;
7589 goto LABEL_29;
7590 } 7701 }
7591 v59 = v6 + 2; 7702 v59 = v6 + 2;
7592 v60 = pObjectList->uNumObjects; 7703 v60 = pObjectList->uNumObjects;
7593 v9 = 0; 7704 v9 = 0;
7594 v61 = 0; 7705 v61 = 0;
7633 --v141; 7744 --v141;
7634 } 7745 }
7635 while ( v141 ); 7746 while ( v141 );
7636 } 7747 }
7637 LABEL_160: 7748 LABEL_160:
7638 v14 = v153; 7749 SpriteObject::OnInteraction(v153);
7639 LABEL_34: 7750 if ( v2->uSoundID == (short)v9 )
7640 SpriteObject::OnInteraction(v14); 7751 v16 = 0;
7641 goto LABEL_35; 7752 else
7753 v16 = (signed __int16)v2->uSoundID + 4;
7754 v92 = v153;
7755 v124 = 8 * v92;
7756 LOBYTE(v124) = v124 | 2;
7757 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7758 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v16, v9, v9);
7759 return 0;
7642 } 7760 }
7643 if ( v151 == 6 || v151 == 5 || (v66 = 0, !v151) ) 7761 if ( v151 == 6 || v151 == 5 || (v66 = 0, !v151) )
7644 return 1; 7762 return 1;
7645 v67 = v6 + 1; 7763 v67 = v6 + 1;
7646 v68 = pObjectList->uNumObjects; 7764 v68 = pObjectList->uNumObjects;
7669 if ( !v71 ) 7787 if ( !v71 )
7670 SpriteObject::OnInteraction(v153); 7788 SpriteObject::OnInteraction(v153);
7671 v134 = 0; 7789 v134 = 0;
7672 v72 = v153; 7790 v72 = v153;
7673 v132 = 0; 7791 v132 = 0;
7674 LABEL_132:
7675 v73 = v2->vPosition.z; 7792 v73 = v2->vPosition.z;
7676 v74 = v2->vPosition.y; 7793 v74 = v2->vPosition.y;
7677 v75 = PID(OBJECT_Item,v72); 7794 v75 = PID(OBJECT_Item,v72);
7678 v2->vVelocity.z = v66; 7795 v2->vVelocity.z = v66;
7679 v2->vVelocity.y = v66; 7796 v2->vVelocity.y = v66;
7684 v77 = v2->uSoundID; 7801 v77 = v2->uSoundID;
7685 if ( v77 == (short)v66 ) 7802 if ( v77 == (short)v66 )
7686 v78 = 0; 7803 v78 = 0;
7687 else 7804 else
7688 v78 = (signed __int16)v77 + 4; 7805 v78 = (signed __int16)v77 + 4;
7689 v133 = v66; 7806 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7690 v131 = v66; 7807 pAudioPlayer->PlaySound((SoundID)v116, v75, v66, -1, v66, v78, v66, v66);
7691 v130 = v78; 7808 return 0;
7692 v129 = v66;
7693 v128 = -1;
7694 v127 = v66;
7695 v126 = v75;
7696 goto LABEL_268;
7697 } 7809 }
7698 if ( v7 == 4090 ) 7810 if ( v7 == 4090 )
7699 { 7811 {
7700 v84 = v6 + 2; 7812 v84 = v6 + 2;
7701 v85 = pObjectList->uNumObjects; 7813 v85 = pObjectList->uNumObjects;
7772 if ( !v83 ) 7884 if ( !v83 )
7773 SpriteObject::OnInteraction(v153); 7885 SpriteObject::OnInteraction(v153);
7774 v134 = 0; 7886 v134 = 0;
7775 v72 = v153; 7887 v72 = v153;
7776 v132 = v2->field_61; 7888 v132 = v2->field_61;
7777 goto LABEL_132; 7889 v73 = v2->vPosition.z;
7890 v74 = v2->vPosition.y;
7891 v75 = PID(OBJECT_Item,v72);
7892 v2->vVelocity.z = v66;
7893 v2->vVelocity.y = v66;
7894 v76 = v2->vPosition.x;
7895 v2->vVelocity.x = v66;
7896 v2->uSpriteFrameID = v66;
7897 stru_50FE08.Add(v75, 512, v76, v74, v73, v132, v134);
7898 v77 = v2->uSoundID;
7899 if ( v77 == (short)v66 )
7900 v78 = 0;
7901 else
7902 v78 = (signed __int16)v77 + 4;
7903 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7904 pAudioPlayer->PlaySound((SoundID)v116, v75, v66, -1, v66, v78, v66, v66);
7905 return 0;
7778 } 7906 }
7779 if ( v7 == 4100 || v7 == 6010 ) 7907 if ( v7 == 4100 || v7 == 6010 )
7780 goto LABEL_93; 7908 goto LABEL_93;
7781 v79 = v7 == 6040; 7909 v79 = v7 == 6040;
7782 } 7910 }
7838 v8 = pObjectList->uNumObjects; 7966 v8 = pObjectList->uNumObjects;
7839 ++v2->uType; 7967 ++v2->uType;
7840 v9 = 0; 7968 v9 = 0;
7841 v10 = 0; 7969 v10 = 0;
7842 if ( (signed int)v8 <= 0 ) 7970 if ( (signed int)v8 <= 0 )
7843 goto LABEL_23; 7971 {
7972 v12 = 0;
7973 goto LABEL_24;
7974 }
7844 v11 = (char *)&pObjectList->pObjects->uObjectID; 7975 v11 = (char *)&pObjectList->pObjects->uObjectID;
7845 break; 7976 break;
7846 case 545: 7977 case 545:
7847 case 550: 7978 case 550:
7848 if ( v2->stru_24.uItemID != 405 && v2->stru_24.uSpecEnchantmentType != 3 ) 7979 if ( v2->stru_24.uItemID != 405 && v2->stru_24.uSpecEnchantmentType != 3 )
7849 { 7980 {
7850 v14 = v153;
7851 v9 = 0; 7981 v9 = 0;
7852 v2->vVelocity.z = 0; 7982 v2->vVelocity.z = 0;
7853 v2->vVelocity.y = 0; 7983 v2->vVelocity.y = 0;
7854 v2->vVelocity.x = 0; 7984 v2->vVelocity.x = 0;
7855 v2->uSpriteFrameID = 0; 7985 v2->uSpriteFrameID = 0;
7856 sub_43A97E(v153, v145); 7986 sub_43A97E(v153, v145);
7857 goto LABEL_34; 7987 SpriteObject::OnInteraction(v153);
7988 if ( v2->uSoundID == (short)v9 )
7989 v16 = 0;
7990 else
7991 v16 = (signed __int16)v2->uSoundID + 4;
7992 v92 = v153;
7993 v124 = 8 * v92;
7994 LOBYTE(v124) = v124 | 2;
7995 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
7996 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v16, v9, v9);
7997 return 0;
7858 } 7998 }
7859 v17 = pObjectList->uNumObjects; 7999 v17 = pObjectList->uNumObjects;
7860 v18 = 0; 8000 v18 = 0;
7861 v19 = 0; 8001 v19 = 0;
7862 v44 = pObjectList->uNumObjects == 0; 8002 v44 = pObjectList->uNumObjects == 0;
7881 { 8021 {
7882 ++v10; 8022 ++v10;
7883 v11 += 56; 8023 v11 += 56;
7884 if ( v10 >= (signed int)v8 ) 8024 if ( v10 >= (signed int)v8 )
7885 { 8025 {
7886 LABEL_23:
7887 v12 = 0; 8026 v12 = 0;
7888 goto LABEL_24; 8027 goto LABEL_24;
7889 } 8028 }
7890 } 8029 }
7891 v12 = v10; 8030 v12 = v10;
7897 v2->vVelocity.z = 0; 8036 v2->vVelocity.z = 0;
7898 v2->vVelocity.y = 0; 8037 v2->vVelocity.y = 0;
7899 v2->vVelocity.x = 0; 8038 v2->vVelocity.x = 0;
7900 v2->uSpriteFrameID = 0; 8039 v2->uSpriteFrameID = 0;
7901 if ( !v44 ) 8040 if ( !v44 )
7902 goto LABEL_27; 8041 {
8042 v13 = 8 * v153;
8043 LOBYTE(v13) = PID(OBJECT_Item,v153);
8044 pAudioPlayer->PlaySound((SoundID)8, v13, v9, -1, v9, v9, v9, v9);
8045 return 0;
8046 }
7903 } 8047 }
7904 return 0; 8048 return 0;
7905 } 8049 }
7906 if ( v7 > 1100 ) 8050 if ( v7 > 1100 )
7907 { 8051 {
7932 while ( v2->uType != *(short *)v53 ) 8076 while ( v2->uType != *(short *)v53 )
7933 { 8077 {
7934 ++v52; 8078 ++v52;
7935 v53 += 56; 8079 v53 += 56;
7936 if ( v52 >= (signed int)v51 ) 8080 if ( v52 >= (signed int)v51 )
7937 goto LABEL_181; 8081 {
7938 } 8082 v95 = 0;
7939 goto LABEL_202; 8083 v2->uObjectDescID = v95;
7940 } 8084 if ( v95 == (short)v9 )
7941 LABEL_181: 8085 SpriteObject::OnInteraction(v153);
8086 v96 = v2->uSoundID;
8087 v2->vVelocity.z = v9;
8088 v2->vVelocity.y = v9;
8089 v2->vVelocity.x = v9;
8090 v2->uSpriteFrameID = v9;
8091 if ( v96 == (short)v9 )
8092 v97 = 0;
8093 else
8094 v97 = (signed __int16)v96 + 4;
8095 v92 = v153;
8096 v124 = 8 * v92;
8097 LOBYTE(v124) = v124 | 2;
8098 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8099 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
8100 return 0;
8101 }
8102 }
8103 v95 = v52;
8104 v2->uObjectDescID = v95;
8105 if ( v95 == (short)v9 )
8106 SpriteObject::OnInteraction(v153);
8107 v96 = v2->uSoundID;
8108 v2->vVelocity.z = v9;
8109 v2->vVelocity.y = v9;
8110 v2->vVelocity.x = v9;
8111 v2->uSpriteFrameID = v9;
8112 if ( v96 == (short)v9 )
8113 v97 = 0;
8114 else
8115 v97 = (signed __int16)v96 + 4;
8116 v92 = v153;
8117 v124 = 8 * v92;
8118 LOBYTE(v124) = v124 | 2;
8119 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8120 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
8121 return 0;
8122 }
7942 v95 = 0; 8123 v95 = 0;
7943 LABEL_182:
7944 v2->uObjectDescID = v95; 8124 v2->uObjectDescID = v95;
7945 if ( v95 == (short)v9 ) 8125 if ( v95 == (short)v9 )
7946 SpriteObject::OnInteraction(v153); 8126 SpriteObject::OnInteraction(v153);
7947 v96 = v2->uSoundID; 8127 v96 = v2->uSoundID;
7948 v2->vVelocity.z = v9; 8128 v2->vVelocity.z = v9;
7951 v2->uSpriteFrameID = v9; 8131 v2->uSpriteFrameID = v9;
7952 if ( v96 == (short)v9 ) 8132 if ( v96 == (short)v9 )
7953 v97 = 0; 8133 v97 = 0;
7954 else 8134 else
7955 v97 = (signed __int16)v96 + 4; 8135 v97 = (signed __int16)v96 + 4;
7956 v133 = v9;
7957 v131 = v9;
7958 v130 = v97;
7959 v92 = v153; 8136 v92 = v153;
7960 goto LABEL_267; 8137 v124 = 8 * v92;
8138 LOBYTE(v124) = v124 | 2;
8139 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8140 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
8141 return 0;
7961 } 8142 }
7962 if ( v7 == 1100 ) 8143 if ( v7 == 1100 )
7963 goto LABEL_93; 8144 goto LABEL_93;
7964 v26 = v7 - 600; 8145 v26 = v7 - 600;
7965 if ( !v26 ) 8146 if ( !v26 )
8000 v2->uSpriteFrameID = 0; 8181 v2->uSpriteFrameID = 0;
8001 v147 = v38; 8182 v147 = v38;
8002 stru_50FE08.Add(v38, 512, v40, v39, v37, 0, 0); 8183 stru_50FE08.Add(v38, 512, v40, v39, v37, 0, 0);
8003 if ( HIBYTE(v3->uFlags) & 1 ) 8184 if ( HIBYTE(v3->uFlags) & 1 )
8004 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, 0, v3->uParticleTrailColor); 8185 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, 0, v3->uParticleTrailColor);
8005 v133 = 0; 8186 pAudioPlayer->PlaySound((SoundID)8, v147, 0, -1, 0, 0, 0, 0);
8006 v131 = 0; 8187 return 0;
8007 v130 = 0;
8008 v129 = 0;
8009 v128 = -1;
8010 v127 = 0;
8011 v126 = v147;
8012 goto LABEL_28;
8013 } 8188 }
8014 v27 = v26 - 410; 8189 v27 = v26 - 410;
8015 if ( !v27 ) 8190 if ( !v27 )
8016 goto LABEL_93; 8191 goto LABEL_93;
8017 v28 = v27 - 40; 8192 v28 = v27 - 40;
8036 while ( v30 != *(short *)v140 ) 8211 while ( v30 != *(short *)v140 )
8037 { 8212 {
8038 ++v146; 8213 ++v146;
8039 v140 += 56; 8214 v140 += 56;
8040 if ( v146 >= (signed int)v31 ) 8215 if ( v146 >= (signed int)v31 )
8041 goto LABEL_195; 8216 {
8042 } 8217 v46 = 0;
8043 LABEL_80: 8218 v2->uObjectDescID = v46;
8219 if ( v46 == (short)v32 )
8220 SpriteObject::OnInteraction(v153);
8221 v100 = v2->field_61;
8222 v101 = v2->vPosition.z;
8223 v2->uSpriteFrameID = v32;
8224 v102 = 8 * v153;
8225 v103 = v2->vPosition.y;
8226 LOBYTE(v102) = PID(OBJECT_Item,v153);
8227 v2->vVelocity.x = v32;
8228 v2->vVelocity.y = v32;
8229 v104 = v2->vPosition.x;
8230 v2->vVelocity.z = v32;
8231 v149 = v102;
8232 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32);
8233 if ( HIBYTE(v3->uFlags) & 1 )
8234 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor);
8235 v105 = v2->uSoundID;
8236 if ( v105 == (short)v32 )
8237 v47 = 0;
8238 else
8239 v47 = (signed __int16)v105 + 4;
8240 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8241 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32);
8242 return 0;
8243 }
8244 }
8044 v46 = v146; 8245 v46 = v146;
8045 LABEL_196:
8046 v2->uObjectDescID = v46; 8246 v2->uObjectDescID = v46;
8047 if ( v46 == (short)v32 ) 8247 if ( v46 == (short)v32 )
8048 SpriteObject::OnInteraction(v153); 8248 SpriteObject::OnInteraction(v153);
8049 v100 = v2->field_61; 8249 v100 = v2->field_61;
8050 v101 = v2->vPosition.z; 8250 v101 = v2->vPosition.z;
8057 v104 = v2->vPosition.x; 8257 v104 = v2->vPosition.x;
8058 v2->vVelocity.z = v32; 8258 v2->vVelocity.z = v32;
8059 v149 = v102; 8259 v149 = v102;
8060 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32); 8260 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32);
8061 if ( HIBYTE(v3->uFlags) & 1 ) 8261 if ( HIBYTE(v3->uFlags) & 1 )
8062 array_5118E8._440E91( 8262 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor);
8063 v2->vPosition.x,
8064 v2->vPosition.y,
8065 v2->vPosition.z,
8066 v32,
8067 v3->uParticleTrailColor);
8068 v105 = v2->uSoundID; 8263 v105 = v2->uSoundID;
8069 if ( v105 == (short)v32 ) 8264 if ( v105 == (short)v32 )
8070 v47 = 0; 8265 v47 = 0;
8071 else 8266 else
8072 v47 = (signed __int16)v105 + 4; 8267 v47 = (signed __int16)v105 + 4;
8073 v133 = v32; 8268 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8074 v131 = v32; 8269 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32);
8075 v130 = v47; 8270 return 0;
8076 v129 = v32; 8271 }
8077 v128 = -1; 8272 v46 = 0;
8078 v127 = v32; 8273 v2->uObjectDescID = v46;
8079 v126 = v149; 8274 if ( v46 == (short)v32 )
8080 goto LABEL_268; 8275 SpriteObject::OnInteraction(v153);
8081 } 8276 v100 = v2->field_61;
8082 goto LABEL_195; 8277 v101 = v2->vPosition.z;
8278 v2->uSpriteFrameID = v32;
8279 v102 = 8 * v153;
8280 v103 = v2->vPosition.y;
8281 LOBYTE(v102) = PID(OBJECT_Item,v153);
8282 v2->vVelocity.x = v32;
8283 v2->vVelocity.y = v32;
8284 v104 = v2->vPosition.x;
8285 v2->vVelocity.z = v32;
8286 v149 = v102;
8287 stru_50FE08.Add(v102, 512, v104, v103, v101, v100, v32);
8288 if ( HIBYTE(v3->uFlags) & 1 )
8289 array_5118E8._440E91(v2->vPosition.x, v2->vPosition.y, v2->vPosition.z, v32, v3->uParticleTrailColor);
8290 v105 = v2->uSoundID;
8291 if ( v105 == (short)v32 )
8292 v47 = 0;
8293 else
8294 v47 = (signed __int16)v105 + 4;
8295 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8296 pAudioPlayer->PlaySound((SoundID)v116, v149, v32, -1, v32, v47, v32, v32);
8297 return 0;
8083 } 8298 }
8084 return 1; 8299 return 1;
8085 } 8300 }
8086 LABEL_247: 8301 LABEL_247:
8087 if ( v151 == 6 || v151 == 5 || (v9 = 0, !v151) ) 8302 if ( v151 == 6 || v151 == 5 || (v9 = 0, !v151) )
8098 while ( v2->uType != *(short *)v123 ) 8313 while ( v2->uType != *(short *)v123 )
8099 { 8314 {
8100 ++v52; 8315 ++v52;
8101 v123 += 56; 8316 v123 += 56;
8102 if ( v52 >= (signed int)v122 ) 8317 if ( v52 >= (signed int)v122 )
8103 goto LABEL_181; 8318 {
8104 } 8319 v95 = 0;
8105 LABEL_202: 8320 v2->uObjectDescID = v95;
8321 if ( v95 == (short)v9 )
8322 SpriteObject::OnInteraction(v153);
8323 v96 = v2->uSoundID;
8324 v2->vVelocity.z = v9;
8325 v2->vVelocity.y = v9;
8326 v2->vVelocity.x = v9;
8327 v2->uSpriteFrameID = v9;
8328 if ( v96 == (short)v9 )
8329 v97 = 0;
8330 else
8331 v97 = (signed __int16)v96 + 4;
8332 v92 = v153;
8333 v124 = 8 * v92;
8334 LOBYTE(v124) = v124 | 2;
8335 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8336 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
8337 return 0;
8338 }
8339 }
8106 v95 = v52; 8340 v95 = v52;
8107 goto LABEL_182; 8341 v2->uObjectDescID = v95;
8108 } 8342 if ( v95 == (short)v9 )
8109 goto LABEL_181; 8343 SpriteObject::OnInteraction(v153);
8344 v96 = v2->uSoundID;
8345 v2->vVelocity.z = v9;
8346 v2->vVelocity.y = v9;
8347 v2->vVelocity.x = v9;
8348 v2->uSpriteFrameID = v9;
8349 if ( v96 == (short)v9 )
8350 v97 = 0;
8351 else
8352 v97 = (signed __int16)v96 + 4;
8353 v92 = v153;
8354 v124 = 8 * v92;
8355 LOBYTE(v124) = v124 | 2;
8356 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8357 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
8358 return 0;
8359 }
8360 v95 = 0;
8361 v2->uObjectDescID = v95;
8362 if ( v95 == (short)v9 )
8363 SpriteObject::OnInteraction(v153);
8364 v96 = v2->uSoundID;
8365 v2->vVelocity.z = v9;
8366 v2->vVelocity.y = v9;
8367 v2->vVelocity.x = v9;
8368 v2->uSpriteFrameID = v9;
8369 if ( v96 == (short)v9 )
8370 v97 = 0;
8371 else
8372 v97 = (signed __int16)v96 + 4;
8373 v92 = v153;
8374 v124 = 8 * v92;
8375 LOBYTE(v124) = v124 | 2;
8376 v116 = word_4EE088_sound_ids[v2->spell_id] + 1;
8377 pAudioPlayer->PlaySound((SoundID)v116, v124, v9, -1, v9, v97, v9, v9);
8378 return 0;
8110 } 8379 }
8111 v117 = v6 + 1; 8380 v117 = v6 + 1;
8112 v118 = pObjectList->uNumObjects; 8381 v118 = pObjectList->uNumObjects;
8113 v119 = 0; 8382 v119 = 0;
8114 v44 = pObjectList->uNumObjects == 0; 8383 v44 = pObjectList->uNumObjects == 0;
8136 SpriteObject::OnInteraction(v153); 8405 SpriteObject::OnInteraction(v153);
8137 v2->vVelocity.z = 0; 8406 v2->vVelocity.z = 0;
8138 v2->vVelocity.y = 0; 8407 v2->vVelocity.y = 0;
8139 v2->vVelocity.x = 0; 8408 v2->vVelocity.x = 0;
8140 v2->uSpriteFrameID = 0; 8409 v2->uSpriteFrameID = 0;
8141 LABEL_27:
8142 v133 = v9;
8143 v131 = v9;
8144 v130 = v9;
8145 v13 = 8 * v153; 8410 v13 = 8 * v153;
8146 v129 = v9;
8147 v128 = -1;
8148 LOBYTE(v13) = PID(OBJECT_Item,v153); 8411 LOBYTE(v13) = PID(OBJECT_Item,v153);
8149 v127 = v9; 8412 pAudioPlayer->PlaySound((SoundID)8, v13, v9, -1, v9, v9, v9, v9);
8150 v126 = v13;
8151 LABEL_28:
8152 v125 = 8;
8153 LABEL_29:
8154 pAudioPlayer->PlaySound((SoundID)v125, v126, v127, v128, v129, v130, v131, v133);
8155 return 0; 8413 return 0;
8156 } 8414 }