Mercurial > mm7
comparison AudioPlayer.cpp @ 11:66319a734368
16.01.13(work)
author | Ritor1 |
---|---|
date | Wed, 16 Jan 2013 17:31:56 +0600 |
parents | 8e33efd39355 |
children | 352b15291822 |
comparison
equal
deleted
inserted
replaced
10:40f6ac8fbe39 | 11:66319a734368 |
---|---|
1353 | 1353 |
1354 | 1354 |
1355 //----- (004AAFCF) -------------------------------------------------------- | 1355 //----- (004AAFCF) -------------------------------------------------------- |
1356 void AudioPlayer::_4AAFCF() | 1356 void AudioPlayer::_4AAFCF() |
1357 { | 1357 { |
1358 AudioPlayer *v1; // edi@1 | 1358 AudioPlayer *pAudioPlayer; // edi@1 |
1359 int v2; // ebx@1 | 1359 int v2; // ebx@1 |
1360 unsigned __int8 v3; // zf@1 | 1360 unsigned __int8 v3; // zf@1 |
1361 int *v4; // eax@2 | 1361 int *v4; // eax@2 |
1362 unsigned __int8 v5; // sf@4 | 1362 unsigned __int8 v5; // sf@4 |
1363 AudioPlayer_3DSample *v6; // esi@5 | 1363 AudioPlayer_3DSample *v6; // esi@5 |
1414 int uNumRepeats; // [sp+5Ch] [bp-10h]@15 | 1414 int uNumRepeats; // [sp+5Ch] [bp-10h]@15 |
1415 float v58; // [sp+60h] [bp-Ch]@23 | 1415 float v58; // [sp+60h] [bp-Ch]@23 |
1416 int v59; // [sp+64h] [bp-8h]@4 | 1416 int v59; // [sp+64h] [bp-8h]@4 |
1417 AudioPlayer *thisa; // [sp+68h] [bp-4h]@1 | 1417 AudioPlayer *thisa; // [sp+68h] [bp-4h]@1 |
1418 | 1418 |
1419 v1 = this; | 1419 pAudioPlayer = this; |
1420 v2 = 0; | 1420 v2 = 0; |
1421 thisa = this; | 1421 thisa = this; |
1422 v3 = this->bPlayerReady == 0; | 1422 v3 = this->bPlayerReady == 0; |
1423 a1.flt_2C = 0.0; | 1423 a1.flt_2C = 0.0; |
1424 if ( !v3 ) | 1424 if ( !v3 ) |
1441 { | 1441 { |
1442 v7 = v6->field_4 & 7; | 1442 v7 = v6->field_4 & 7; |
1443 if ( AIL_3D_sample_status(v6->hSample) == 2 ) | 1443 if ( AIL_3D_sample_status(v6->hSample) == 2 ) |
1444 { | 1444 { |
1445 AIL_end_3D_sample(v6->hSample); | 1445 AIL_end_3D_sample(v6->hSample); |
1446 v1->_4ABF23(v6); | 1446 pAudioPlayer->_4ABF23(v6); |
1447 } | 1447 } |
1448 if ( AIL_3D_sample_status(v6->hSample) != 4 ) | 1448 if ( AIL_3D_sample_status(v6->hSample) != 4 ) |
1449 goto LABEL_35; | 1449 goto LABEL_35; |
1450 v8 = v7 - 1; | 1450 v8 = v7 - 1; |
1451 if ( v8 ) | 1451 if ( v8 ) |
1464 goto LABEL_21; | 1464 goto LABEL_21; |
1465 } | 1465 } |
1466 LABEL_35: | 1466 LABEL_35: |
1467 ++v59; | 1467 ++v59; |
1468 ++v6; | 1468 ++v6; |
1469 if ( v59 >= v1->uNum3DSamples ) | 1469 if ( v59 >= pAudioPlayer->uNum3DSamples ) |
1470 { | 1470 { |
1471 v2 = 0; | 1471 v2 = 0; |
1472 goto LABEL_37; | 1472 goto LABEL_37; |
1473 } | 1473 } |
1474 } | 1474 } |
1567 AIL_set_3D_orientation(v6->hSample, LODWORD(v27), 0.0, LODWORD(v26), 0.0, 1.0, 0.0); | 1567 AIL_set_3D_orientation(v6->hSample, LODWORD(v27), 0.0, LODWORD(v26), 0.0, 1.0, 0.0); |
1568 } | 1568 } |
1569 else | 1569 else |
1570 { | 1570 { |
1571 AIL_end_3D_sample(v6->hSample); | 1571 AIL_end_3D_sample(v6->hSample); |
1572 v1->_4ABF23(v6); | 1572 pAudioPlayer->_4ABF23(v6); |
1573 } | 1573 } |
1574 goto LABEL_35; | 1574 goto LABEL_35; |
1575 } | 1575 } |
1576 } | 1576 } |
1577 LABEL_37: | 1577 LABEL_37: |
1578 if ( v1->uMixerChannels > v2 ) | 1578 if ( pAudioPlayer->uMixerChannels > v2 ) |
1579 { | 1579 { |
1580 v28 = v1->pMixerChannels; | 1580 v28 = pAudioPlayer->pMixerChannels; |
1581 do | 1581 do |
1582 { | 1582 { |
1583 if ( AIL_sample_status(v28->hSample) == 2 ) | 1583 if ( AIL_sample_status(v28->hSample) == 2 ) |
1584 { | 1584 { |
1585 AIL_end_sample(v28->hSample); | 1585 AIL_end_sample(v28->hSample); |
1586 v1->_4ABE55(v28); | 1586 pAudioPlayer->_4ABE55(v28); |
1587 } | 1587 } |
1588 ++v2; | 1588 ++v2; |
1589 ++v28; | 1589 ++v28; |
1590 } | 1590 } |
1591 while ( v2 < v1->uMixerChannels ); | 1591 while ( v2 < pAudioPlayer->uMixerChannels ); |
1592 v2 = 0; | 1592 v2 = 0; |
1593 } | 1593 } |
1594 //v29 = __OFSUB__(v1->uMixerChannels, v2); | 1594 //v29 = __OFSUB__(v1->uMixerChannels, v2); |
1595 v29 = v1->uMixerChannels > v2; | 1595 v29 = pAudioPlayer->uMixerChannels > v2; |
1596 v3 = v1->uMixerChannels == v2; | 1596 v3 = pAudioPlayer->uMixerChannels == v2; |
1597 v5 = v1->uMixerChannels - v2 < 0; | 1597 v5 = pAudioPlayer->uMixerChannels - v2 < 0; |
1598 v59 = v2; | 1598 v59 = v2; |
1599 if ( !((unsigned __int8)(v5 ^ v29) | v3) ) | 1599 if ( !((unsigned __int8)(v5 ^ v29) | v3) ) |
1600 { | 1600 { |
1601 v30 = v1->pMixerChannels; | 1601 v30 = pAudioPlayer->pMixerChannels; |
1602 while ( 1 ) | 1602 while ( 1 ) |
1603 { | 1603 { |
1604 v31 = v30->dword_000004; | 1604 v31 = v30->dword_000004; |
1605 if ( (v30->dword_000004 & 7) == 1 ) | 1605 if ( (v30->dword_000004 & 7) == 1 ) |
1606 { | 1606 { |
1608 { | 1608 { |
1609 v39 = &pIndoor->pDoors[v31 >> 3]; | 1609 v39 = &pIndoor->pDoors[v31 >> 3]; |
1610 if ( !v39->uDoorID ) | 1610 if ( !v39->uDoorID ) |
1611 { | 1611 { |
1612 LABEL_61: | 1612 LABEL_61: |
1613 v1 = thisa; | 1613 pAudioPlayer = thisa; |
1614 goto LABEL_62; | 1614 goto LABEL_62; |
1615 } | 1615 } |
1616 v40 = GetSoundStrengthByDistanceFromParty(*v39->pXOffsets, *v39->pYOffsets, *v39->pZOffsets); | 1616 v40 = GetSoundStrengthByDistanceFromParty(*v39->pXOffsets, *v39->pYOffsets, *v39->pZOffsets); |
1617 if ( !v40 ) | 1617 if ( !v40 ) |
1618 { | 1618 { |
1663 } | 1663 } |
1664 } | 1664 } |
1665 LABEL_62: | 1665 LABEL_62: |
1666 ++v59; | 1666 ++v59; |
1667 ++v30; | 1667 ++v30; |
1668 if ( v59 >= v1->uMixerChannels ) | 1668 if ( v59 >= pAudioPlayer->uMixerChannels ) |
1669 { | 1669 { |
1670 v2 = 0; | 1670 v2 = 0; |
1671 break; | 1671 break; |
1672 } | 1672 } |
1673 } | 1673 } |
1674 } | 1674 } |
1675 if ( pCurrentScreen != v2 ) | 1675 if ( pCurrentScreen != v2 ) |
1676 { | 1676 { |
1677 v42 = &v1->pMixerChannels[4]; | 1677 v42 = &pAudioPlayer->pMixerChannels[4]; |
1678 if ( AIL_sample_status(v42->hSample) == 4 ) | 1678 if ( AIL_sample_status(v42->hSample) == 4 ) |
1679 AIL_end_sample(v42->hSample); | 1679 AIL_end_sample(v42->hSample); |
1680 return; | 1680 return; |
1681 } | 1681 } |
1682 v59 = v2; | 1682 v59 = v2; |